r1934 - trunk/src/target/OM-2007/applications/openmoko-dialer/src

thomas at sita.openmoko.org thomas at sita.openmoko.org
Wed May 9 15:47:06 CEST 2007


Author: thomas
Date: 2007-05-09 15:47:05 +0200 (Wed, 09 May 2007)
New Revision: 1934

Modified:
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-main.c
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-outgoing.c
Log:
openmoko-dialer: use openmoko stock items


Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-main.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-main.c	2007-05-09 11:53:33 UTC (rev 1933)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-main.c	2007-05-09 13:47:05 UTC (rev 1934)
@@ -150,6 +150,7 @@
 
   /* Initialize GTK+ */
   gtk_init (&argc, &argv);
+  moko_stock_register ();
 
   if (argc != 1)
   {

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-outgoing.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-outgoing.c	2007-05-09 11:53:33 UTC (rev 1933)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-outgoing.c	2007-05-09 13:47:05 UTC (rev 1934)
@@ -18,12 +18,8 @@
 
 #include <string.h>
 
-#include <libmokoui/moko-finger-tool-box.h>
-#include <libmokoui/moko-finger-window.h>
-#include <libmokoui/moko-finger-wheel.h>
-#include <libmokoui/moko-pixmap-button.h>
-#include <libmokoui/moko-message-dialog.h>
-
+#include <libmokoui/moko-ui.h>
+#
 #include <gtk/gtk.h>
 
 #include "contacts.h"
@@ -231,18 +227,12 @@
 on_window_outgoing_show (GtkWidget * widget, MokoDialerData * appdata)
 {
 
-  //DBG_ENTER ();
   window_outgoing_setup_timer (appdata);
-  //DBG_TRACE ();
   appdata->g_state.callstate = STATE_CALLING;
-  //DBG_TRACE ();
-  //appdata->g_state.historytype = OUTGOING;
-  //DBG_TRACE ();
   /* TODO: MokoGsmdConnection->dial
    * int retv = gsm_dial (appdata->g_peer_info.number);
    * DBG_MESSAGE ("GSM_DIAL returns %d", retv);
    */
-  //DBG_LEAVE ();
 }
 
 
@@ -280,25 +270,19 @@
 
 
     /* Set up buttons */
-    GtkWidget *button = gtk_button_new_with_label ("Speaker");
-    gtk_button_set_image (GTK_BUTTON (button),
-                          file_new_image_from_relative_path ("speaker.png"));
+    GtkWidget *button = gtk_button_new_from_stock (MOKO_STOCK_SPEAKER);
     g_signal_connect (G_OBJECT (button), "clicked",
                       G_CALLBACK (cb_speaker_button_clicked), p_dialer_data);
     p_dialer_data->buttonSpeaker = button;
 
-    button = gtk_button_new_with_label ("Redial");
-    gtk_button_set_image (GTK_BUTTON (button),
-                          file_new_image_from_relative_path ("redial.png"));
+    button = gtk_button_new_from_stock (MOKO_STOCK_CALL_REDIAL);
     p_dialer_data->buttonRedial = button;
     g_signal_connect (G_OBJECT (button), "clicked",
                       G_CALLBACK (cb_redial_button_clicked), p_dialer_data);
     g_object_set (G_OBJECT (button), "no-show-all", TRUE, NULL);
 
 
-    button = gtk_button_new_with_label ("Cancel");
-    gtk_button_set_image (GTK_BUTTON (button),
-                          file_new_image_from_relative_path ("cancel.png"));
+    button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
     p_dialer_data->buttonCancel = button;
     g_signal_connect (G_OBJECT (button), "clicked",
                       G_CALLBACK (cb_cancel_button_clicked), p_dialer_data);
@@ -325,3 +309,10 @@
 
   return 1;
 }
+
+void
+window_outgoing_run (MokoDialerData *appdata, gchar *number)
+{
+  moko_gsmd_connection_voice_dial (appdata->connection, number);
+  gtk_dialog_run (appdata->window_outgoing);
+}





More information about the commitlog mailing list