Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 5cbd35ebd51716f4439d6d1aae1d9e50 > files > 2

redshift-1.6-3.fc13.src.rpm

diff -Naur redshift-1.6/src/location-gnome-clock.c redshift-1.6_bonobo_iid_fix/src/location-gnome-clock.c
--- redshift-1.6/src/location-gnome-clock.c	2010-09-04 13:32:56.000000000 +0100
+++ redshift-1.6_bonobo_iid_fix/src/location-gnome-clock.c	2011-01-16 23:10:54.654764596 +0000
@@ -104,11 +104,28 @@
 			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);
 			g_free(key);