After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 320589 - Better descriptions for panel changes
Better descriptions for panel changes
Status: RESOLVED FIXED
Product: sabayon
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Sayamindu Dasgupta
Maintainers of sabayon
Depends on:
Blocks:
 
 
Reported: 2005-11-03 10:38 UTC by Alexander Larsson
Modified: 2007-01-19 01:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Partial fix (4.18 KB, patch)
2006-12-20 08:59 UTC, Sayamindu Dasgupta
none Details | Review
more translator friendly patch (4.71 KB, patch)
2006-12-22 16:47 UTC, Sayamindu Dasgupta
none Details | Review
Updated patch, handling addition/removal of other panel objects (menubar, buttons, drawers, etc) (8.78 KB, patch)
2006-12-26 13:11 UTC, Sayamindu Dasgupta
committed Details | Review

Description Alexander Larsson 2005-11-03 10:38: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.
Comment 1 Sayamindu Dasgupta 2006-12-20 08:59:05 UTC
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.
Comment 2 Federico Mena Quintero 2006-12-22 02:41:23 UTC
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!
Comment 3 Sayamindu Dasgupta 2006-12-22 16:47:33 UTC
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
Comment 4 Sayamindu Dasgupta 2006-12-26 13:11:51 UTC
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 5 Federico Mena Quintero 2007-01-12 02:14:31 UTC
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 :)
Comment 6 Sayamindu Dasgupta 2007-01-12 05:35:44 UTC
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 ?
Comment 7 Federico Mena Quintero 2007-01-16 16:44:43 UTC
Sure!  I'll commit it in a second.
Comment 8 Federico Mena Quintero 2007-01-17 19:53:12 UTC
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).
Comment 9 William Lachance 2007-01-17 21:36:59 UTC
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.
Comment 10 Federico Mena Quintero 2007-01-19 01:56:31 UTC
(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?