Icon Set Pripority

So im tinkering about making some custom icons, and just run into a slight hitch...

Im managing to make my .xml / .dis file correctly, and all is working fine & dandy.

However my problem is trying to determine exactly how icon's are prioritised.

I'll give an example...

I put the "syncpane" button on a toolbar, I then create my own .dis which also has a "syncpane" entry. Now, I import my .dis file and if I search for icons (All Combined) then I see the default "syncpane" and also my "syncpane". Now the button that I added is still using the default "syncpane" button I added earlier - this is as I expected as my newly imported .dis is at the bottom (bottom priority) of the list.

Now, as I understand it, DOpus will search through all the installed .dis Icon Sets from top to bottom looking for the icon name ("syncpane" in this case) until it is found, or none is found and uses the smiley face icon.

So, based on this theory, if I move my installed .dis to the top of the list, then MY "syncpane" icon should be found first. If I search for "syncpane" in the icon selector then the order of the results does seem to represent the order of the icon sets. e.g if I type syncpane while "Default Icon Set" is at the top of the icon set list, then the syncpane for "Default Icon Set" is displayed first, followed by the other "syncpane" 's in the other Icon Sets, including MY syncpane. So... If I now put my icon set at the top of the list, and again search for "syncpane", my "syncpane" is displayed at the top of the list, indicating that DOPus IS looking through the Icon Sets from top to bottom.

So, going back to what I said originally, I created a button on a toolbar (syncpane), and I have also created my own syncpane in an icon set. I was hoping, that by moving my icon set to the top of the list, that MY syncpane icon would take priority over any other "syncpane" icon's used, but this is not happening for me. It doesnt matter in what order I have the Icon Sets in the list, the same Default Icon Set : syncpane icon is always displayed, almost as though the button is not just referencing the icon's name (syncpane) but also the icon package (Default Icon Set).

I have tried refreshing the list, opening and closing Directory Opus, but nothing works.

I hope I have explained that in a way that is understandable, and if anybody could give me some pointers as to where I am going wrong then that would be much appreciated.

Thank you.

Just experimenting, I tried moving on to see if I could get it to work for other buttons and used the "Join" and "Find" at random.

Defining entries for the join, and find icons in my. xml is working! but I still can NOT get it to work for syncpane.

Also, I have a few other icon sets installed, and if I have the join / find / sync button on a toolbar, and change the order of the icon sets... the join and find icons update to the current icon set, but the syncpane does not!!, even though the icon sets have all got syncpane icons!

This is starting to make me pull my hair out a little, as I have tried all sorts of combinations but just cannot get the syncpane icon to update.

Here is a sample of my xml code

(Yes, i know they are all using the same Synchronize Icon, but this is just for testing at the moment)

Well... Think I MAY of discovered my problem.

When adding a button / copying a button as a template for a new button, and I was choosing the Icon I wanted, I MAY of been choosing an icon from a sepecific set, rather than the defaults.

For example, I could choose
"Default Icon Set", search for "sync", select "syncpane" from icons.

Now move my icon set up the list, and the syncpane button does NOT refresh with my icon(s)

However, if I choose
"All Icons (Default)", search for "sync", select "syncpane" from icons.

Now move my icon set up the list, and the syncpane button DOES refresh with my icon(s)

So, it basically is essential that the icon is referencing (default) if you want new icons to replace current icons. I suppose this makes perfect sense thinking about it, but it wasnt very obvious to start with!

So, it seems as though I have found my own solution! yaaaaaaaay! :smiley:

[quote="jimmyboy"]So, it basically is essential that the icon is referencing (default) if you want new icons to replace current icons. I suppose this makes perfect sense thinking about it, but it wasnt very obvious to start with!

So, it seems as though I have found my own solution! yaaaaaaaay! :smiley:[/quote]

Just to confirm that you worked it out, that is indeed how it works.

A little note about Opus' "innards"... when you are selecting an icon in a button editor (etc) and you select an icon while having the "All Icons (Default)" set selected from "Use internal icon set:" drop down then I think the tag in the toolbar/hotkey/etc XML will just end up with an unqualified value of #icon_name. This as opposed to if you change that drop-down to a specific icon set (use an iconset name of "myiconset" as an example), then your XML will have the tag set to a qualified value of #myiconset:icon_name.

So yeah, having 'default' icon selections is the mechanism that let's you "replace" your entire set of icon selections by swapping in a new iconset and making it the default - or bumping it higher or to the top of the list in the Prefs->Toolbars->Icons page... but having explicit iconset:icon selections are telling Opus to pull the icon from that specific set, no matter how you move it around in the list of iconsets in prefs.

Yes it does make perfect sense, and maybe I was just being a little bit blonde at the time, but I think what may of been confusing me a little is the terminology used "Default Icon Set", because I was aware that choosing it from a specific icon set would bind dopus to icon set + icon name and not just icon name. BUT... I was thinking I was choosing the default set, and therefore it wouldnt be binding to an icon set, but I wasnt in fact choosing the default icon's, it's just the naming lead me to believe I was. Maybe I just couldnt see the wood for the trees. Lesson learned though! :smiley:

Just on a side note... what would the possibility be of expanding the Icon Implementation to support a few more Icon Sizes, not just "small" and "large". There have been instances where I have wanted to use more than 2 sizes of an icon, and as a lot of Icon Set's come with 16x16,24x24,32x32 etc... it would sometimes be nice to be able to use the sizes provided. Im thinking instead on having a checkbox "Large Image Size", you would either have a small slider which lets you slide through sizes defined in the .xml (say 16x16,20x20,32x32), or 2 text boxes to enter the dimensions, ie 20x20.

I have made it possible for me to have more than 2 icon sizes of one icon available to me in the icon selector, but the .xml is not pretty!

Each icon set can only have two sizes but those sizes can be different between sets, so you can do what yoy want, it just requires more than one set.