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

thomas at sita.openmoko.org thomas at sita.openmoko.org
Thu Sep 13 18:28:26 CEST 2007


Author: thomas
Date: 2007-09-13 18:28:25 +0200 (Thu, 13 Sep 2007)
New Revision: 2965

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/dialer-main.c
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-panel.c
Log:
* src/dialer-main.c: (main): Delay gtk+/mokostock initialisation unless really required
* src/moko-dialer-panel.c: (moko_dialer_panel_class_init): Remove some extra debug messages


Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog	2007-09-13 10:58:48 UTC (rev 2964)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog	2007-09-13 16:28:25 UTC (rev 2965)
@@ -1,5 +1,12 @@
 2007-09-13  Thomas Wood  <thomas at openedhand.com>
 
+	* src/dialer-main.c: (main): Delay gtk+/mokostock initialisation unless
+	really required
+	* src/moko-dialer-panel.c: (moko_dialer_panel_class_init): Remove some
+	extra debug messages
+
+2007-09-13  Thomas Wood  <thomas at openedhand.com>
+
 	* src/moko-dialer.c: (on_keypad_dial_clicked): Update status string
 	* src/moko-keypad.c: (on_dial_clicked): Close bug 814 - Number is
 	cleared when unable to dial

Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/dialer-main.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/dialer-main.c	2007-09-13 10:58:48 UTC (rev 2964)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/dialer-main.c	2007-09-13 16:28:25 UTC (rev 2965)
@@ -130,9 +130,8 @@
     g_option_context_free (context);
   }
 
-  /* Initialize Threading & GTK+ */
-  gtk_init (&argc, &argv);
-  moko_stock_register ();
+  /* initialise type system */
+  g_type_init ();
 
   /* Try and setup our DBus service */
   connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
@@ -154,16 +153,15 @@
     /* Error requesting the name */
     g_warning ("There was an error requesting the name: %s\n",error->message);
     g_error_free (error);
-    
-    gdk_init(&argc, &argv);
+
+    gdk_init (&argc, &argv);
     gdk_notify_startup_complete ();
 
     return 1;
   }
   if (ret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
   {
-    /* Someone else hase registere dthe object */
-    g_warning ("Another instance is running\n");
+    /* Someone else hase registered the object */
 
     if (show_missed)
       _show_missed (connection);
@@ -171,29 +169,20 @@
       _dial_number (connection);
     else
       _show_dialer (connection);
-    
+
     dbus_g_connection_unref (connection);
-    
 
-    gdk_init(&argc, &argv);
+    gdk_init (&argc, &argv);
     gdk_notify_startup_complete ();
     return 0;
   }
 
-  /* So we are creating a new dialer, one of the first things we sould do is
-   * resart gsmd, as we cannot guarentee it is running. This also solves the
-   * problem of when it hangs.
-   * FIXME: This shouldn't be left up to the dialer, and we cannot guarentee
-   * to always have root access, but it'll work for most embedded devices.
-   */
-  /*
-  g_debug ("(re)starting gsmd\n");
-  g_spawn_command_line_sync ("/etc/init.d/gsmd stop",
-                             &out, &err, NULL, NULL);
-  g_spawn_command_line_sync ("/etc/init.d/gsmd start",
-                             &out, &err, NULL, NULL);
-  */
-  /* Create the MokoDialer object */
+
+  /* Initialize Threading & GTK+ */
+  gtk_init (&argc, &argv);
+  moko_stock_register ();
+
+   /* Create the MokoDialer object */
   dialer = moko_dialer_get_default ();
 
   /* Add the object onto the bus */

Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-panel.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-panel.c	2007-09-13 10:58:48 UTC (rev 2964)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-panel.c	2007-09-13 16:28:25 UTC (rev 2965)
@@ -49,8 +49,6 @@
   class->moko_dialer_panel_input = NULL;
   class->moko_dialer_panel_hold = NULL;
 
-  g_debug ("moko_dialer_panel:start signal register");
-
   moko_dialer_panel_signals[CLICKED_SIGNAL] =
     g_signal_new ("user_input",
                   G_OBJECT_CLASS_TYPE (object_class),
@@ -60,9 +58,6 @@
                   g_cclosure_marshal_VOID__CHAR, G_TYPE_NONE, 1,
                   g_type_from_name ("gchar"));
 
-  g_debug ("moko_dialer_panel:signal register end,got the id :%d",
-           moko_dialer_panel_signals[CLICKED_SIGNAL]);
-
   moko_dialer_panel_signals[HOLD_SIGNAL] =
     g_signal_new ("user_hold",
                   G_OBJECT_CLASS_TYPE (object_class),
@@ -72,9 +67,6 @@
                   g_cclosure_marshal_VOID__CHAR, G_TYPE_NONE, 1,
                   g_type_from_name ("gchar"));
 
-  g_debug ("moko_dialer_panel:signal register end,got the id :%d",
-           moko_dialer_panel_signals[HOLD_SIGNAL]);
-
 }
 
 





More information about the commitlog mailing list