Changeset 2104


Ignore:
Timestamp:
05/30/07 18:20:53 (6 years ago)
Author:
thomas
Message:
  • src/today-main.c: (today_infoline_new),

(today_launcher_button_new), (today_setup_events_area),
(create_ui): Use correct icons in Missed Calls/Unread? Messages lines

Location:
trunk/src/target/OM-2007/applications/openmoko-today
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog

    r1933 r2104  
     12007-05-30  Thomas Wood  <thomas@openedhand.com> 
     2 
     3        * src/today-main.c: (today_infoline_new), 
     4        (today_launcher_button_new), (today_setup_events_area), 
     5        (create_ui): Use correct icons in Missed Calls/Unread Messages lines 
     6 
    172007-05-09  Thomas Wood  <thomas@openedhand.com> 
    28 
  • trunk/src/target/OM-2007/applications/openmoko-today/src/today-main.c

    r1932 r2104  
    9090 
    9191static GtkWidget * 
    92 today_infoline_new (gchar * stock_id, gchar * message) 
     92today_infoline_new (gchar * exec, gchar * message) 
    9393{ 
    9494  GtkWidget *eventbox, *hbox, *icon, *label; 
     95  GtkIconTheme *icon_theme = gtk_icon_theme_get_default (); 
     96  GdkPixbuf *pb; 
    9597 
    9698  eventbox = gtk_event_box_new (); 
     
    101103  gtk_container_add (GTK_CONTAINER (eventbox), hbox); 
    102104 
    103   icon = gtk_image_new (); 
    104   gtk_image_set_from_stock (GTK_IMAGE (icon), stock_id, GTK_ICON_SIZE_MENU); 
     105  if (gtk_icon_theme_has_icon (icon_theme, exec)) 
     106  { 
     107    pb = gtk_icon_theme_load_icon (icon_theme, exec, 32, GTK_ICON_LOOKUP_NO_SVG, NULL); 
     108  } 
     109  else 
     110  { 
     111    pb = gtk_icon_theme_load_icon (icon_theme, GTK_STOCK_MISSING_IMAGE, 32, GTK_ICON_LOOKUP_NO_SVG, NULL); 
     112  } 
     113  icon = gtk_image_new_from_pixbuf (pb); 
     114  g_object_unref (pb); 
    105115  gtk_misc_set_alignment (GTK_MISC (icon), 0, 0); 
    106116  gtk_widget_show (icon) ; 
     
    152162  GdkPixbuf *pb; 
    153163  GtkIconTheme *icon_theme = gtk_icon_theme_get_default (); 
    154  
    155   /* libmokoui api really needs fixing... */ 
    156164 
    157165  if (gtk_icon_theme_has_icon (icon_theme, exec)) 
     
    201209{ 
    202210  GtkWidget *window, *vbox; 
    203   GtkWidget *date, *time_label; 
     211  GtkWidget *date; 
    204212  GtkWidget *message; 
    205213 
     
    231239  alignment = gtk_alignment_new (1, 0, 0, 0); 
    232240  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 12, 0, 0, 12); 
    233   date = gtk_label_new ("MON 15/JAN/2007"); 
     241  date = gtk_label_new (NULL); 
    234242  gtk_container_add (GTK_CONTAINER (alignment), date); 
    235243  gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0); 
     
    247255 
    248256  /* unread messages */ 
    249   infoline = today_infoline_new (GTK_STOCK_YES, "Unread Messages (5)"); 
     257  infoline = today_infoline_new ("openmoko-messages", "Unread Messages"); 
    250258  gtk_box_pack_start (GTK_BOX (vbox), infoline, FALSE, FALSE, 0); 
    251259 
    252260  /* missed calls */ 
    253   infoline = today_infoline_new (GTK_STOCK_NO, "Missed Calls (1)"); 
     261  infoline = today_infoline_new ("openmoko-dialer", "Missed Calls"); 
    254262  gtk_box_pack_start (GTK_BOX (vbox), infoline, FALSE, FALSE, 0); 
    255263 
     
    280288 
    281289 
    282   /* temporary */ 
    283   GtkSettings *settings = gtk_settings_get_default (); 
    284   g_object_set (G_OBJECT (settings), "gtk-theme-name", "openmoko-standard", 
    285                 NULL); 
    286  
    287290  gtk_widget_show_all (window); 
    288291 
Note: See TracChangeset for help on using the changeset viewer.