reduce icons in icon chooser dialog
Nick Schermer
nickschermer at gmail.com
Sun Mar 27 20:00:53 CEST 2011
On Sun, Mar 27, 2011 at 7:37 PM, Stephan Arts <stephan at xfce.org> wrote:
> On Sun, Mar 27, 2011 at 4:38 PM, Nick Schermer <nickschermer at gmail.com> wrote:
>> Bump
>>
>> On Sun, Feb 27, 2011 at 8:27 PM, Nick Schermer <nickschermer at gmail.com> wrote:
>>> Folks,
>>>
>>> I've just pushed a branch to exo that excludes the 'symlink' icons in
>>> a theme from the icon view. On the common themes (Gnome,Tango) this
>>> reduces the number of icons with ~50% (ie. 50% of the icons are
>>> symlinks to real files) and you only see each image once. The symlink
>>> names are stored internally, so when you open the chooser for a
>>> desktop files with "xfce4-settings" as icon name,
>>> "preferences-desktop" is selected.
>>>
>>> Downside of this is that "preferences-desktop" is returned when you
>>> click ok and xfce4-settings is lost (I could fix that behaviour, but
>>> you get the point; spec names are set in those cases).
>>>
>>> Upside, less icons to scroll, and probably (no proof here) much
>>> faster; because even though the code pokes the files to check if they
>>> are symlinks, nothing is worse for performance then rendering images.
>>>
>>> If you want to try it, compile the nick/icon-model-without-dups
>>> branch. It will also print you a line what was merged.
>>>
>>> So, any opinions if this is a good idea?
>>>
>>> Nick
>
> Hi Nick,
>
> Sounds like a good plan, I see no down-side to this approach. The file
> needs to be poked one way or another, at least this way you save on
> memory-allocations and rendering-times. - That it cleans up the UI is
> just another advantage.
True, but another downside I explained in the first mail, is that it
has the potential to 'loose' the original icon name:
- So if you start with xfce4-settings as icon-name and tango as icon theme.
- Edit icon -> preferences-desktop is selected because xfce4-settings
is a symlink to preferences-desktop -> ok, preferences-desktop is
returned by the icon chooser (so in the desktop file xfce4-settings is
lost, with no visible interface change).
- Switch to another theme that has a different looking icon for
xfce4-settings (ie, no symlink to preferences-desktop), the user might
expect that icon, but instead preferences-desktop is shown, the old
icon-name is lost.
I could partly work around this:
- If ok is pressed, check if the original icon name is a symlink/alias
to the 'selected' icon name, if so, return the old name. That should
work around the peek-and-click-ok icon-name loose problem.
Nick
More information about the Xfce4-dev
mailing list