Changeset 1932
- Timestamp:
- 05/09/07 13:38:26 (6 years ago)
- Location:
- trunk/src/target/OM-2007/applications/openmoko-today
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
src/today-main.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
r1567 r1932 1 2007-05-09 Thomas Wood <thomas@openedhand.com> 2 3 * src/today-main.c: (today_update_date), (create_ui): Remove the clock. Closes bug 469. 4 1 5 Fri, 30 Mar 2007 13:18:28 +0200 Dodji Seketeli 2 6 -
trunk/src/target/OM-2007/applications/openmoko-today/src/today-main.c
r1486 r1932 72 72 73 73 /* TODO: use something nicer from the locale here */ 74 strftime (date_str, sizeof (date_str), "%a %d/%b/%Y", tmp); 75 gtk_label_set_text (label, date_str); 76 77 } 78 79 /** 80 * today_update_time () 81 * 82 * Update the specified GtkLabel with the current time 83 */ 84 static void 85 today_update_time (GtkLabel * label) 86 { 87 time_t t; 88 struct tm *tmp; 89 gchar time_str[64]; 90 91 t = time (NULL); 92 tmp = localtime (&t); 93 94 if (tmp == NULL) 95 { 96 // error = could not get localtime 97 return; 98 } 99 100 /* TODO: make 12/24 hr optional */ 101 strftime (time_str, sizeof (time_str), "<big>%I:%M</big> %p", tmp); 102 gtk_label_set_markup (label, time_str); 74 strftime (date_str, sizeof (date_str), "<big>%a %d/%b/%Y</big>", tmp); 75 gtk_label_set_markup (label, date_str); 76 103 77 } 104 78 … … 263 237 g_timeout_add (60 * 60 * 1000, (GSourceFunc) today_update_date, date); 264 238 265 /* time */266 alignment = gtk_alignment_new (1, 0, 0, 0);267 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 0, 12);268 time_label = gtk_label_new (NULL);269 gtk_label_set_markup (GTK_LABEL (time_label), "<big>10:30am</big>");270 gtk_container_add (GTK_CONTAINER (alignment), time_label);271 gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);272 today_update_time (GTK_LABEL (time_label));273 g_timeout_add (60 * 1000, (GSourceFunc) today_update_time, time_label);274 275 239 /* main message */ 276 240 alignment = gtk_alignment_new (0.5, 0.5, 0, 0);
Note: See TracChangeset
for help on using the changeset viewer.
