Page 4 of 4

Re: MiniTreeSwitcher

Posted: 24 Jan 2026 13:51
by highend
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
MiniTreeSwitcher_v0.5.6.xys

Re: MiniTreeSwitcher

Posted: 24 Jan 2026 15:30
by klownboy
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 "|".
additional separator added.jpg
On a side note. We discussed earlier removing the "Save" menu item when in full or maxi tree which you did already here:
$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

Posted: 24 Jan 2026 15:55
by highend
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
I'll add that.

Attach your MiniTreeSwitcher.cfg file (or send it via pm if your trees are too private)

Re: MiniTreeSwitcher

Posted: 24 Jan 2026 16:21
by klownboy
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

Posted: 24 Jan 2026 16:29
by highend
Try the new version:
MiniTreeSwitcher_v0.5.7.xys

Re: MiniTreeSwitcher

Posted: 24 Jan 2026 16:39
by klownboy
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, , "");

Re: MiniTreeSwitcher

Posted: 24 Jan 2026 17:12
by klownboy
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:

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:="|");
It appears that it's using the variable $header from the sort funcition.
Delete menu item displays is inputselect but it looks like a sort title.jpg

Re: MiniTreeSwitcher

Posted: 24 Jan 2026 17:21
by highend
Why on SC getkey through out the script do you have 5 fields?
Just an oversight
It looks like the proper SC inputselet dialog, but the title looks like the sort title
Not here?

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...
MiniTreeSwitcher_v0.5.8.xys

Re: MiniTreeSwitcher

Posted: 24 Jan 2026 18:18
by highend
And here the latest version...

It checks icons for existence before displaying them and replaces non-existing ones with "*.<DIR>"...
MiniTreeSwitcher_v0.5.9.xys

Re: MiniTreeSwitcher

Posted: 24 Jan 2026 20:04
by klownboy
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.

Re: MiniTreeSwitcher

Posted: 27 Jan 2026 18:20
by klownboy
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

Posted: 27 Jan 2026 19:22
by highend
Thats unnecessarily complicated:

Code: Select all

        if($active) {$icon = ":favs"; $result .= "$section||$icon|$active<crlf>";}
        else {$result .= "$section||$icon|$active<crlf>";}
Apart from that I've uploaded v0.6.0 which adds the option to configure this behavior...

Re: MiniTreeSwitcher

Posted: 27 Jan 2026 20:10
by klownboy
Thanks unnecessarily complicated:
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. :tup:

Re: MiniTreeSwitcher

Posted: 27 Jan 2026 22:28
by highend
What I meant is this:

Code: Select all

        if ($active) { $icon = ":favs"; }
No if / else necessary...

Re: MiniTreeSwitcher

Posted: 27 Jan 2026 22:35
by klownboy
OK gotcha, I repeated the $result with if/else and didn't need to. Thanks again. :party: It's good to have power and internet back :blackstorm: bad ice storm.