aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2011-07-04 13:41:35 +0200
committerJon Lund Steffensen <jonlst@gmail.com>2011-07-04 13:41:35 +0200
commit02719732d9cce0afea1e014bc8f7a23d343b3c84 (patch)
tree2fadc01910932fd3c8f9a4ddd9519f6346e512b3 /src
parentMerge manual mode from Joe Hillenbrand with some modifications. (diff)
downloadredshift-ng-02719732d9cce0afea1e014bc8f7a23d343b3c84.tar.gz
redshift-ng-02719732d9cce0afea1e014bc8f7a23d343b3c84.tar.bz2
redshift-ng-02719732d9cce0afea1e014bc8f7a23d343b3c84.tar.xz
Apply fix for new clock applet gconf (Miloš Komarčević).
Diffstat (limited to 'src')
-rw-r--r--src/location-gnome-clock.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/location-gnome-clock.c b/src/location-gnome-clock.c
index 8c317ed..b9baf31 100644
--- a/src/location-gnome-clock.c
+++ b/src/location-gnome-clock.c
@@ -104,10 +104,26 @@ location_gnome_clock_init(location_gnome_clock_state_t *state)
char *bonobo_iid = gconf_client_get_string(client, key,
&error);
+ /* Try both gnome-panel 2.30.x and earlier bonobo_iid key and
+ newer applet_iid. */
if (!error && bonobo_iid != NULL &&
!strcmp(bonobo_iid, "OAFIID:GNOME_ClockApplet")) {
clock_applet_count += 1;
current_city = find_current_city(client, id);
+ } else {
+ g_free(key);
+ key = g_strdup_printf("/apps/panel/applets/%s"
+ "/applet_iid", id);
+ char *applet_iid = gconf_client_get_string(client, key,
+ &error);
+
+ if (!error && applet_iid != NULL &&
+ !strcmp(applet_iid, "ClockAppletFactory::ClockApplet")) {
+ clock_applet_count += 1;
+ current_city = find_current_city(client, id);
+ }
+
+ g_free(applet_iid);
}
g_free(bonobo_iid);