Changeset 3356
- Timestamp:
- 11/04/07 23:14:13 (6 years ago)
- Location:
- trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-battery
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
src/openmoko-panel-battery.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-battery/ChangeLog
r3355 r3356 1 2007-11-05 Michael Lauer <mickey@openmoko.org> 2 3 * src/openmoko-panel-battery.c: Use g_timeout_add_seconds. 4 Note that we now require glib >= 2.14 5 1 6 2007-11-02 Michael Lauer <mickey@openmoko.org> 2 7 -
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-battery/src/openmoko-panel-battery.c
r3355 r3356 1 /* vim: set sts=4 sw=4 expandtab: */2 1 /* openmoko-panel-battery.c 3 2 * … … 26 25 #include <gtk/gtklabel.h> 27 26 #include <dbus/dbus.h> 28 27 #include <dbus/dbus-glib-lowlevel.h> 29 28 #include <apm.h> 30 29 #include <string.h> … … 104 103 { 105 104 char* icon; 106 static int last_status = - 255; /* the status last time we checked */105 static int last_status = -123; /* the status last time we checked */ 107 106 108 107 apm_info info; … … 157 156 local_time = localtime(&t); 158 157 158 timeout( applet ); 159 159 battery_applet_init_dbus( applet ); 160 161 /* should use g_timeout_add_seconds() here to save power, but it is only 162 * available in glib >= 2.14 163 */ 164 applet->timeout_id = g_timeout_add ( 10 * 1000, (GSourceFunc) timeout, applet); 165 moko_panel_applet_set_icon( applet->mokoapplet, icon ); // initial status = unknown 160 applet->timeout_id = g_timeout_add_seconds( 60, (GSourceFunc) timeout, applet); 166 161 gtk_widget_show_all( GTK_WIDGET(mokoapplet) ); 167 162 return GTK_WIDGET(mokoapplet); 168 163 } 169 22
Note: See TracChangeset
for help on using the changeset viewer.
