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 609654 - Support for application-indicators/StatusNotifierIcon
Support for application-indicators/StatusNotifierIcon
Status: RESOLVED OBSOLETE
Product: gnome-power-manager
Classification: Deprecated
Component: applets
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Karl Lattimer
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-02-11 15:03 UTC by Jorge Castro
Modified: 2020-04-24 15:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
Patch which implements support for application indicators in GNOME Power manager (11.93 KB, patch)
2010-02-11 15:10 UTC, Jan Arne Petersen
needs-work Details | Review
Updated patch for application indciators support (16.19 KB, patch)
2010-03-05 15:28 UTC, Jan Arne Petersen
none Details | Review
Add support for application indicators. (13.86 KB, patch)
2010-03-30 14:12 UTC, Jan Arne Petersen
none Details | Review
Display more information in the application indicator menu items and updated strings. (4.18 KB, patch)
2010-03-30 14:13 UTC, Jan Arne Petersen
none Details | Review
Updated ubuntu patch (13.78 KB, patch)
2010-09-03 12:33 UTC, Karl Lattimer
needs-work Details | Review

Description Jorge Castro 2010-02-11 15:03:54 UTC
We would like to support application-indicators for gnome-power-manager as
proposed at this page:

https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators

The Canonical DX team will provide a patch, but the work has not started, so I
wanted to open this bug as a placeholder and to get feedback on the feature,
thanks!
Comment 1 Jan Arne Petersen 2010-02-11 15:10:54 UTC
Created attachment 153535 [details] [review]
Patch which implements support for application indicators in GNOME Power manager
Comment 2 Martin Pitt 2010-02-17 08:09:24 UTC
Review of attachment 153535 [details] [review]:

This patch causes crashes, so should not be accepted as is (https://launchpad.net/bugs/523041)

This should be written more robustly. It initializes icon->priv->app_indicator = app_indicator_new() without ever checking for success, or NULL, and all the new code which accesses this does not do anything like g_assert() or g_return_if_fail() if the indicator is NULL. It should just fall back to the current upstream behaviour (showing its own tray icon) if initializing the indicator fails.

As for a general "yay" or "nay" to this, I can't comment on this from an upstream POV.
Comment 3 Jan Arne Petersen 2010-02-22 16:21:04 UTC
(In reply to comment #2)
> Review of attachment 153535 [details] [review]:
> 
> This patch causes crashes, so should not be accepted as is
> (https://launchpad.net/bugs/523041)

The crashes were cause by a bug in application-indicators which is fixed now.

> This should be written more robustly. It initializes icon->priv->app_indicator
> = app_indicator_new() without ever checking for success, or NULL, and all the
> new code which accesses this does not do anything like g_assert() or
> g_return_if_fail() if the indicator is NULL. It should just fall back to the
> current upstream behaviour (showing its own tray icon) if initializing the
> indicator fails.

app_indicator_new() never fails and the fall back is done internally in application-indicators. It just crashed because of a bug in application-indicators, so the patch should be fine.
Comment 4 Jan Arne Petersen 2010-03-05 15:28:56 UTC
Created attachment 155315 [details] [review]
Updated patch for application indciators support

Updated patch.
Comment 5 André Klapper 2010-03-14 12:59:50 UTC
(Not potentially blocking the upstream release, hence removing GNOME Target milestone)
Comment 6 Richard Hughes 2010-03-25 11:43:56 UTC
There are quite a few changes to strings there:

+#ifdef HAVE_APP_INDICATOR
+			/* TRANSLATORS: the device is fully charged */
+			description = g_strdup_printf (_("%s is charged"), type_desc);
+#else
 			/* TRANSLATORS: the device is fully charged */
 			description = g_strdup_printf (_("%s is fully charged"), type_desc);
+#endif

I'm really not keen having two sets of translations for this kind of thing. I don't mind changing the strings where it makes sense, but app-indicator was meant to be about how the data is shown, not changing the data that's shown.

Richard.
Comment 7 Jan Arne Petersen 2010-03-26 10:02:30 UTC
Application indicators do not support tooltips, so the relevant information needs to be displayed in the menu. The strings where changed to make them fit into menu items. See https://wiki.ubuntu.com/PowerStatusMenu#Items

Of course it is not so great to have two sets of translations and it would be nice if one could unify the strings.
Comment 8 Jan Arne Petersen 2010-03-30 14:12:00 UTC
I will attach the patch split in two parts. The first patch is adding support for the application indicator, the second patch changes the strings.
Comment 9 Jan Arne Petersen 2010-03-30 14:12:34 UTC
Created attachment 157487 [details] [review]
Add support for application indicators.
Comment 10 Jan Arne Petersen 2010-03-30 14:13:07 UTC
Created attachment 157488 [details] [review]
Display more information in the application indicator menu items and updated strings.
Comment 11 Richard Hughes 2010-03-31 15:31:41 UTC
I've merged some of the hunks of both patches into master, and another string patch which should make your life a little easier when patching.

I'm still keen on seeing this accepted as an external dep by GNOME before we add the other main hunks.
Comment 12 Karl Lattimer 2010-09-03 12:33:48 UTC
Created attachment 169426 [details] [review]
Updated ubuntu patch

This patch updates the strings and conditions to meet the specifications outlined by mpt on; https://wiki.ubuntu.com/BatteryStatusMenu#Items
Comment 13 Jeremy Bicha 2011-07-17 05:45:16 UTC
I believe this bug can be closed as system tray support has been removed from g-p-m. http://git.gnome.org/browse/gnome-power-manager/commit/?id=baa2317cd326304ac785514f84b505df5a6f80ba

Also, Ubuntu has indicator-power now which I believe is Unity's frontend to g-p-m.

But where's the power menu for GNOME Fallback?
Comment 14 André Klapper 2020-04-24 15:19:46 UTC
Closing per last comment