r3258 - in trunk/src/target/OM-2007.2/applications/openmoko-today2: . src
chris at sita.openmoko.org
chris at sita.openmoko.org
Tue Oct 23 19:25:53 CEST 2007
Author: chris
Date: 2007-10-23 19:25:51 +0200 (Tue, 23 Oct 2007)
New Revision: 3258
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today.h
Log:
* src/today-main.c: (digital_clock_notify), (main):
* src/today.h:
Listen to /desktop/poky/interface/digital_clock to determine whether
to display a digital or analogue clock
Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog 2007-10-23 16:57:40 UTC (rev 3257)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog 2007-10-23 17:25:51 UTC (rev 3258)
@@ -1,5 +1,12 @@
2007-10-23 Chris Lord <chris at openedhand.com>
+ * src/today-main.c: (digital_clock_notify), (main):
+ * src/today.h:
+ Listen to /desktop/poky/interface/digital_clock to determine whether
+ to display a digital or analogue clock
+
+2007-10-23 Chris Lord <chris at openedhand.com>
+
* src/today-main.c: (set_time_idle):
Return FALSE instead of TRUE so the callback doesn't get added more
and more over time
Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c 2007-10-23 16:57:40 UTC (rev 3257)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c 2007-10-23 17:25:51 UTC (rev 3258)
@@ -261,6 +261,17 @@
gtk_widget_queue_draw (data->bg_ebox);
}
+static void
+digital_clock_notify (GConfClient *client, guint cnxn_id,
+ GConfEntry *entry, TodayData *data)
+{
+ GConfValue *value;
+
+ value = gconf_entry_get_value (entry);
+ if (value) jana_gtk_clock_set_digital (JANA_GTK_CLOCK (data->clock),
+ gconf_value_get_bool (value));
+}
+
int
main (int argc, char **argv)
{
@@ -352,8 +363,14 @@
GCONF_POKY_INTERFACE_PREFIX GCONF_POKY_WALLPAPER,
(GConfClientNotifyFunc)wallpaper_notify,
&data, NULL, NULL);
+ gconf_client_notify_add (gconf_client_get_default (),
+ GCONF_POKY_INTERFACE_PREFIX GCONF_POKY_DIGITAL,
+ (GConfClientNotifyFunc)digital_clock_notify,
+ &data, NULL, NULL);
gconf_client_notify (gconf_client_get_default (),
GCONF_POKY_INTERFACE_PREFIX GCONF_POKY_WALLPAPER);
+ gconf_client_notify (gconf_client_get_default (),
+ GCONF_POKY_INTERFACE_PREFIX GCONF_POKY_DIGITAL);
gtk_main ();
Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today.h
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today.h 2007-10-23 16:57:40 UTC (rev 3257)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today.h 2007-10-23 17:25:51 UTC (rev 3258)
@@ -8,6 +8,7 @@
#define GCONF_POKY_INTERFACE_PREFIX "/desktop/poky/interface"
#define GCONF_POKY_WALLPAPER "/wallpaper"
+#define GCONF_POKY_DIGITAL "/digital_clock"
typedef struct {
/* Home */
More information about the commitlog
mailing list