r2757 - in trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src

njp at sita.openmoko.org njp at sita.openmoko.org
Tue Aug 21 15:26:57 CEST 2007


Author: njp
Date: 2007-08-21 15:26:55 +0200 (Tue, 21 Aug 2007)
New Revision: 2757

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-talking.c
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-tips.c
Log:
2007-08-21  Neil J. Patel  <njp at o-hand.com>

	* src/moko-talking.c: (moko_talking_init):
	Fixed bug #730 (panel menu and 'hang up' are too close).

	* src/moko-tips.c: (moko_tips_set_matches):
	Check gdkpixbuf is valid before using it.

Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog	2007-08-21 12:54:05 UTC (rev 2756)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog	2007-08-21 13:26:55 UTC (rev 2757)
@@ -1,5 +1,13 @@
 2007-08-21  Neil J. Patel  <njp at o-hand.com>
 
+	* src/moko-talking.c: (moko_talking_init):
+	Fixed bug #730 (panel menu and 'hang up' are too close).
+
+	* src/moko-tips.c: (moko_tips_set_matches):
+	Check gdkpixbuf is valid before using it.
+
+2007-08-21  Neil J. Patel  <njp at o-hand.com>
+
 	* src/Makefile.am:
 	* src/moko-contacts.c: (new_digit), (add_number),
 	(moko_contacts_fuzzy_lookup), (moko_contacts_get_photo),

Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-talking.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-talking.c	2007-08-21 12:54:05 UTC (rev 2756)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-talking.c	2007-08-21 13:26:55 UTC (rev 2757)
@@ -381,28 +381,28 @@
   gtk_widget_set_no_show_all (priv->main_bar, TRUE);
   gtk_box_pack_start (GTK_BOX (talking), toolbar, FALSE, FALSE, 0);
 
-  icon = gdk_pixbuf_new_from_file (PKGDATADIR"/cancel.png", NULL);
+  icon = gdk_pixbuf_new_from_file (PKGDATADIR"/speaker.png", NULL);
   image = gtk_image_new_from_pixbuf (icon);
-  item = gtk_tool_button_new (image, "Cancel");
+  item = gtk_toggle_tool_button_new ();
+  gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (item), image);
+  gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), "Speaker Phone");
   gtk_widget_show_all (GTK_WIDGET (item)); 
   gtk_tool_item_set_expand (item, TRUE);
-  g_signal_connect (G_OBJECT (item), "clicked", 
-                    G_CALLBACK (on_cancel_clicked), (gpointer)talking);
+  g_signal_connect (G_OBJECT (item), "toggled", 
+                    G_CALLBACK (on_speaker_toggled), (gpointer)talking);
   gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, 0);
 
   gtk_toolbar_insert (GTK_TOOLBAR (toolbar), gtk_separator_tool_item_new (), 1);
-  
-  icon = gdk_pixbuf_new_from_file (PKGDATADIR"/speaker.png", NULL);
+
+  icon = gdk_pixbuf_new_from_file (PKGDATADIR"/cancel.png", NULL);
   image = gtk_image_new_from_pixbuf (icon);
-  item = gtk_toggle_tool_button_new ();
-  gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (item), image);
-  gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), "Speaker Phone");
+  item = gtk_tool_button_new (image, "Cancel");
   gtk_widget_show_all (GTK_WIDGET (item)); 
   gtk_tool_item_set_expand (item, TRUE);
-  g_signal_connect (G_OBJECT (item), "toggled", 
-                    G_CALLBACK (on_speaker_toggled), (gpointer)talking);
-  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, 2);
-  
+  g_signal_connect (G_OBJECT (item), "clicked", 
+                    G_CALLBACK (on_cancel_clicked), (gpointer)talking);
+  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, 2);  
+
   /* The title label and image */
   vbox = gtk_vbox_new (FALSE, 0);
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);

Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-tips.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-tips.c	2007-08-21 12:54:05 UTC (rev 2756)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-tips.c	2007-08-21 13:26:55 UTC (rev 2757)
@@ -74,6 +74,11 @@
           moko_contacts_get_photo (moko_contacts_get_default (), 
                                    entry->contact);
         
+        if (!entry->contact->photo)
+        {
+          gtk_image_clear (GTK_IMAGE (priv->image));
+          continue;
+        }
         scaled = gdk_pixbuf_scale_simple (entry->contact->photo,
                                           36, 36,
                                           GDK_INTERP_BILINEAR);





More information about the commitlog mailing list