GNOME Bugzilla – Bug 320589
Better descriptions for panel changes
Last modified: 2007-01-19 01:56:31 UTC
All the descriptions are like "Panel applet '%s' added", which is lame. They should be more like: "Battery applet added to top panel" "Launcher (gnome-terminal) added to bottom panel" etc.
Created attachment 78668 [details] [review] Partial fix Attaching a partial fix for the issue. This currently handles only applets (PanelApplet) - support for better description of launcher addition/removal (ie, PanelObject) has not been added yet.
Very nice! I'd like to run this by the translators to see if those format strings are enough, or if we need to break them down like if orientation == "top": return _("%s added to top panel") else if orientation == "bottom" return _("%s added to bottom panel") else ... etc ... Could you please mail gnome-i18n@gnome.org about this? Thanks for the patch!
Created attachment 78797 [details] [review] more translator friendly patch Based on comments made in http://mail.gnome.org/archives/gnome-i18n/2006-December/msg00108.html
Created attachment 78900 [details] [review] Updated patch, handling addition/removal of other panel objects (menubar, buttons, drawers, etc) This adds support for other types of objects (menubars, logout buttons, launchers, drawers, etc). The only thing remaining is that it does not handle additions/removals from drawers (all drawers seem to have orientation set to left).
Comment on attachment 78900 [details] [review] Updated patch, handling addition/removal of other panel objects (menubar, buttons, drawers, etc) Wow, awesome. Feel free to commit it to trunk. Thanks for the patch, Sayamindu :)
I don't have an svn account (I actually had a cvs account, but I don't think it works anymore, since I did not submit my ssh keys). Can someone please commit this patch for me ?
Sure! I'll commit it in a second.
Sorry for the delay (had to fix my distro installation to have a few more Python packages...). I've committed your patch to trunk with this ChangeLog: 2007-01-17 Federico Mena Quintero <federico@novell.com> Fix bug #320589 - use long descriptions for changes to the panel, instead of generic "%s added to panel". * lib/sources/paneldelegate.py (PanelAppletAddedChange.get_short_description): Use long descriptions, like "Applet %s added to top panel". (PanelAppletRemovedChange.get_short_description): Likewise, "Applet %s removed from left panel". (PanelObjectAddedChange.get_short_description): Likewise, "%s added to right panel". (PanelObjectRemovedChange.get_short_description): Likewise, "%s removed from bottom panel". (PanelDelegate.__init__): Store the orientation of the panel so that we can use it from the applet/object delegates. (PanelDelegate.__init__): Find the human-readable name of the applet by querying bonobo-activation. (PanelDelegate.__init__): Compute a human-readable name from the object's type. Please see bug #397742, which I just filed - it's about not using xdg.DesktopEntry since not all distributions carry the python-xdg package yet. Other than that, I really like the patch :) This fix should appear in Sabayon 2.17.0 (w00t, we haven't had releases since 2.12.4 - I'll cook a release soon).
I have one minor nit about the new behaviour. All other changes are printed in the form: Key '/foo/bar' changed File 'foo' changed This patch removes the quotes from each change (e.g.: it says "Applet 'Clock' added to top panel" instead of "Applet 'Clock' added to panel top"). This makes it (slightly) more difficult to immediately see what's been changed.
(In reply to comment #9) > This patch removes the quotes from each change (e.g.: it says "Applet 'Clock' > added to top panel" instead of "Applet 'Clock' added to panel top"). This makes > it (slightly) more difficult to immediately see what's been changed. Good catch! Can you please file another bug with a patch for this?