MiniTreeSwitcher
Re: MiniTreeSwitcher
Try v0.5.6...
To add an icon:
01. Load the minitree from its menu item
02. Use "Save current mini tree..."
The notes in that window tell you how to do it
The drawback is: There is no favorite icon for the last loaded mini tree anymore but that item has a bold font instead
These icons are implemented for all functions, even for importing from other .cfg files
A side note: The current x64 beta already supports icon indexes, the x32 isn't out yet
To add an icon:
01. Load the minitree from its menu item
02. Use "Save current mini tree..."
The notes in that window tell you how to do it
The drawback is: There is no favorite icon for the last loaded mini tree anymore but that item has a bold font instead
These icons are implemented for all functions, even for importing from other .cfg files
A side note: The current x64 beta already supports icon indexes, the x32 isn't out yet
One of my scripts helped you out? Please donate via Paypal
-
klownboy
- Posts: 4451
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440
Re: MiniTreeSwitcher
Thanks highend for mini tree icon update. It's looking good. I noticed though that the drop down in the icon input dialog the script is adding a separator "|".
On a side note. We discussed earlier removing the "Save" menu item when in full or maxi tree which you did already here:
It might be nice to actually do a replacement for "Save" when in maxi to have the "Mini tree from here" (from View | Mini tree | "Mini tree from here") which is simply CID #518. So when in Maxi tree a user could click on "Mini tree from here" to make a new mini tree without having to go through the normal menu to do it. When you use that menu item it will automatically sense your in mini tree and the "Save" menu item automatically comes up. It does for me.
$menu = regexreplace($menu, "^Save.+?(\r?\n|$)");It might be nice to actually do a replacement for "Save" when in maxi to have the "Mini tree from here" (from View | Mini tree | "Mini tree from here") which is simply CID #518. So when in Maxi tree a user could click on "Mini tree from here" to make a new mini tree without having to go through the normal menu to do it. When you use that menu item it will automatically sense your in mini tree and the "Save" menu item automatically comes up. It does for me.
Re: MiniTreeSwitcher
I'll add that.It might be nice to actually do a replacement for "Save" when in maxi to have the "Mini tree from here" (from View | Mini tree | "Mini tree from here") which is simply CID #518
Attach your MiniTreeSwitcher.cfg file (or send it via pm if your trees are too private)
One of my scripts helped you out? Please donate via Paypal
-
klownboy
- Posts: 4451
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440
Re: MiniTreeSwitcher
I sent my cfg file via email. There's no carry over of double or triple "|' in the cfg file. Even though "Mini tree from here" is in the context menu which you have already, it'll probably be good to have direct access to that particular menu item. Thanks.
Re: MiniTreeSwitcher
Try the new version:
One of my scripts helped you out? Please donate via Paypal
-
klownboy
- Posts: 4451
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440
Re: MiniTreeSwitcher
Side question nothing to do with anything else we've discussed. Why on SC getkey through out the script do you have 5 fields? I only see 4 in the help file. SC setkey has 5 fields.
getkey(key, section, [INIfile], [flags])$icon = getkey("Icon", $section, $cfgFile, , "");-
klownboy
- Posts: 4451
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440
Re: MiniTreeSwitcher
I hadn't tried the delete mini tree menu item until now. This is what I get when I select it. It looks like the proper SC inputselet dialog, but the title looks like the sort title. Odd since I see this in the script:It appears that it's using the variable $header from the sort funcition.
Code: Select all
function del_trees($cfgFile, $w, $h) {
$listData = get_section_listdata($cfgFile);
$sections = inputselect("Select mini tree(s)...", $listData, <crlf>, 1+2+32+1024+8192, , $w, $h, 11:="|");
Re: MiniTreeSwitcher
Just an oversightWhy on SC getkey through out the script do you have 5 fields?
Not here?It looks like the proper SC inputselet dialog, but the title looks like the sort title
Latest version adds the default icon "*.<DIR>" to all places, even when no icon is given for e.g. a mini tree to save / import.
Otherwise you'll get ugly question mark icons in delete / reorder / import dialogs...
One of my scripts helped you out? Please donate via Paypal
Re: MiniTreeSwitcher
And here the latest version...
It checks icons for existence before displaying them and replaces non-existing ones with "*.<DIR>"...
It checks icons for existence before displaying them and replaces non-existing ones with "*.<DIR>"...
One of my scripts helped you out? Please donate via Paypal
-
klownboy
- Posts: 4451
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440
Re: MiniTreeSwitcher
All seems to be working fine now. The delete mini tree dialog issue I brought up has resolved itself as well. Thanks highend.
Edit: The problem with the carry over header wasn't actually resolved until beta v28.10.0508 was issued.
Edit: The problem with the carry over header wasn't actually resolved until beta v28.10.0508 was issued.
-
klownboy
- Posts: 4451
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440
Re: MiniTreeSwitcher
Hi highend, I didn't want to mention it, but the bolding of the current mini tree really wasn't cutting it for me. It just didn't stand out enough especially in dark mode. So I came up with a solution that seems to work fine at least in my testing which included changing mini trees, toggling mini and maxi, along with using the other menu items. It brings back the star icon (:favs) for the current minitree. The normally assigned icon for the current mini tree returns as it should when that mini is no longer current. It maintains the bolding since it doesn't hurt having it along with the star. Not a big change, but it took me some time to figure out where to do it (and we've been without power and internet for the last couple of days).
Code: Select all
function get_cfg_menu_items($cfgFile) {
$sections = getsectionlist(, $cfgFile);
if (!$sections) { return ""; }
$result = "";
foreach($section, $sections, <crlf>, "e") {
$icon = getkey("Icon", $section, $cfgFile);
$icon = set_default_icon($icon);
$active = getkey("Active", $section, $cfgFile);
if($active) {$icon = ":favs"; $result .= "$section||$icon|$active<crlf>";}
else {$result .= "$section||$icon|$active<crlf>";}
}
return trim($result, <crlf>);
}
Re: MiniTreeSwitcher
Thats unnecessarily complicated:
Apart from that I've uploaded v0.6.0 which adds the option to configure this behavior...
Code: Select all
if($active) {$icon = ":favs"; $result .= "$section||$icon|$active<crlf>";}
else {$result .= "$section||$icon|$active<crlf>";}
One of my scripts helped you out? Please donate via Paypal
-
klownboy
- Posts: 4451
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440
Re: MiniTreeSwitcher
Complicated, no I only changed the 2 lines. I put the entire function in the post only for anyone other than you or I making it easier to make a change. But I see you put the option to use it as well. Thanks again highend.Thanks unnecessarily complicated:
Re: MiniTreeSwitcher
What I meant is this:
No if / else necessary...
Code: Select all
if ($active) { $icon = ":favs"; }
One of my scripts helped you out? Please donate via Paypal
-
klownboy
- Posts: 4451
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440
Re: MiniTreeSwitcher
OK gotcha, I repeated the $result with if/else and didn't need to. Thanks again.
It's good to have power and internet back
bad ice storm.
XYplorer Beta Club