Send commitlog mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r2931 - in trunk/src/target/OM-2007.2/libraries/libmokogsmd2:
      . libmokogsmd ([EMAIL PROTECTED])
   2. r2932 - in
      trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
      ([EMAIL PROTECTED])
   3. r2933 - in
      trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
      ([EMAIL PROTECTED])
   4. r2934 - in
      trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
      ([EMAIL PROTECTED])
   5. r2935 - in
      trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: thomas
Date: 2007-09-06 15:27:14 +0200 (Thu, 06 Sep 2007)
New Revision: 2931

Modified:
   trunk/src/target/OM-2007.2/libraries/libmokogsmd2/ChangeLog
   
trunk/src/target/OM-2007.2/libraries/libmokogsmd2/libmokogsmd/moko-gsmd-connection.c
   
trunk/src/target/OM-2007.2/libraries/libmokogsmd2/libmokogsmd/moko-gsmd-connection.h
Log:
* libmokogsmd/moko-gsmd-connection.c:
* libmokogsmd/moko-gsmd-connection.h:

Add GError to moko_gsmd_connection_set_antenna_power ()


Modified: trunk/src/target/OM-2007.2/libraries/libmokogsmd2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokogsmd2/ChangeLog 2007-09-06 
09:11:23 UTC (rev 2930)
+++ trunk/src/target/OM-2007.2/libraries/libmokogsmd2/ChangeLog 2007-09-06 
13:27:14 UTC (rev 2931)
@@ -1,3 +1,10 @@
+2007-09-06  Thomas Wood  <[EMAIL PROTECTED]>
+
+       * libmokogsmd/moko-gsmd-connection.c:
+       * libmokogsmd/moko-gsmd-connection.h:
+
+       Add GError to moko_gsmd_connection_set_antenna_power
+
 2007-08-22  Holger Freyther  <[EMAIL PROTECTED]>
 
         Rubberstamped by Mickey.

Modified: 
trunk/src/target/OM-2007.2/libraries/libmokogsmd2/libmokogsmd/moko-gsmd-connection.c
===================================================================
--- 
trunk/src/target/OM-2007.2/libraries/libmokogsmd2/libmokogsmd/moko-gsmd-connection.c
        2007-09-06 09:11:23 UTC (rev 2930)
+++ 
trunk/src/target/OM-2007.2/libraries/libmokogsmd2/libmokogsmd/moko-gsmd-connection.c
        2007-09-06 13:27:14 UTC (rev 2931)
@@ -42,6 +42,18 @@
 #define GSMD_CONNECTION_GET_PRIVATE(o)   (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
         MOKO_TYPE_GSMD_CONNECTION, MokoGsmdConnectionPrivate))
 
+
+GQuark
+moko_gsmd_error_quark ()
+{
+  static GQuark quark = 0;
+
+  if (quark == 0)
+    quark = g_quark_from_static_string ("moko-gsmd-error");
+  return quark;
+}
+#define MOKO_GSMD_ERROR moko_gsmd_error_quark ()
+
 /* ugly temp. hack until libgsmd features a user_data pointer for its callbacks
  * Note that this effectively means you can only have one MokoGsmdConnection 
  * object per process (which should be ok anyway...) :M: 
@@ -445,7 +457,7 @@
 
 /* public API */
 void 
-moko_gsmd_connection_set_antenna_power(MokoGsmdConnection* self, gboolean on)
+moko_gsmd_connection_set_antenna_power(MokoGsmdConnection* self, gboolean on, 
GError **error)
 {
     MokoGsmdConnectionPrivate* priv;
     gint result;
@@ -453,10 +465,18 @@
     g_return_if_fail ( MOKO_IS_GSMD_CONNECTION ( self ) );
     priv  = GSMD_CONNECTION_GET_PRIVATE( self );
 
-    g_return_if_fail( priv->handle );
+    if (!priv->handle)
+    {
+      g_set_error (error, MOKO_GSMD_ERROR, MOKO_GSMD_ERROR_CONNECT, "Error 
connecting to gsmd");
+      return;
+    }
     
     result = lgsm_phone_power( priv->handle, on ? 1 : 0 );
-    g_debug( "lgsm_phone_power returned %d", result );
+
+    if (result != 0)
+    {
+      g_set_error (error, MOKO_GSMD_ERROR, MOKO_GSMD_ERROR_POWER, "Error 
setting antenna power");
+    }
 }
 
 void 

Modified: 
trunk/src/target/OM-2007.2/libraries/libmokogsmd2/libmokogsmd/moko-gsmd-connection.h
===================================================================
--- 
trunk/src/target/OM-2007.2/libraries/libmokogsmd2/libmokogsmd/moko-gsmd-connection.h
        2007-09-06 09:11:23 UTC (rev 2930)
+++ 
trunk/src/target/OM-2007.2/libraries/libmokogsmd2/libmokogsmd/moko-gsmd-connection.h
        2007-09-06 13:27:14 UTC (rev 2931)
@@ -91,13 +91,19 @@
 
 } MokoGsmdConnectionProgress;
 
+typedef enum
+{
+  MOKO_GSMD_ERROR_CONNECT, /* could not connect to gsmd */
+  MOKO_GSMD_ERROR_POWER /* attenna power did not set correctly */
+} MokoGsmdConnectionError;
+
 GType moko_gsmd_connection_get_type ();
 
 MokoGsmdConnection* moko_gsmd_connection_new ();
 
 /* power */
 void moko_gsmd_connection_set_antenna_power (MokoGsmdConnection *self, 
-                                             gboolean on);
+                                             gboolean on, GError **error);
 /* pin */
 void moko_gsmd_connection_send_pin (MokoGsmdConnection *self, const gchar 
*pin);
 




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-09-06 15:32:19 +0200 (Thu, 06 Sep 2007)
New Revision: 2932

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
Log:
* src/moko-dialer.c: (moko_dialer_class_init), (moko_dialer_init):
- Add support for displaying GError messages
- Handle new GError in moko_gsmd_connection_set_antenna_power ()


Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-09-06 13:27:14 UTC (rev 2931)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-09-06 13:32:19 UTC (rev 2932)
@@ -1,3 +1,9 @@
+2007-09-06  Thomas Wood  <[EMAIL PROTECTED]>
+
+       * src/moko-dialer.c: (moko_dialer_class_init), (moko_dialer_init):
+       - Add support for displaying GError messages
+       - Handle new GError in moko_gsmd_connection_set_antenna_power ()
+
 2007-08-31  Thomas Wood  <[EMAIL PROTECTED]>
 
        * src/moko-contacts.c: (moko_contacts_get_photo): Check photo before

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c  
2007-09-06 13:27:14 UTC (rev 2931)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c  
2007-09-06 13:32:19 UTC (rev 2932)
@@ -738,10 +738,24 @@
 }
 
 static void
+dialer_display_error (GError *err)
+{
+  GtkWidget *dlg;
+
+  if (!err)
+    return;
+
+  dlg = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, 
"Dialer: %s", err->message);
+  gtk_dialog_run (GTK_DIALOG (dlg));
+  gtk_widget_destroy (dlg);
+}
+
+static void
 moko_dialer_init (MokoDialer *dialer)
 {
   MokoDialerPrivate *priv;
   MokoGsmdConnection *conn;
+  GError *err = NULL;
 
   priv = dialer->priv = MOKO_DIALER_GET_PRIVATE (dialer);
 
@@ -753,8 +767,10 @@
 
   /* Init the gsmd connection, and power it up */
   conn = priv->connection = moko_gsmd_connection_new ();
-  moko_gsmd_connection_set_antenna_power (conn, TRUE);
+  moko_gsmd_connection_set_antenna_power (conn, TRUE, &err);
 
+  dialer_display_error (err);
+
   /* Handle network registration a few seconds after powering up the 
    * antenna*/ 
   priv->registered = MOKO_GSMD_CONNECTION_NETREG_NONE;




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-09-06 16:04:43 +0200 (Thu, 06 Sep 2007)
New Revision: 2933

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
Log:
* src/moko-dialer.c: (on_keypad_dial_clicked): Inform user if dialer is busy
or network is not registered when attempting to dial


Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-09-06 13:32:19 UTC (rev 2932)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-09-06 14:04:43 UTC (rev 2933)
@@ -1,5 +1,10 @@
 2007-09-06  Thomas Wood  <[EMAIL PROTECTED]>
 
+       * src/moko-dialer.c: (on_keypad_dial_clicked): Inform user if dialer is 
busy
+       or network is not registered when attempting to dial
+
+2007-09-06  Thomas Wood  <[EMAIL PROTECTED]>
+
        * src/moko-dialer.c: (moko_dialer_class_init), (moko_dialer_init):
        - Add support for displaying GError messages
        - Handle new GError in moko_gsmd_connection_set_antenna_power ()

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c  
2007-09-06 13:32:19 UTC (rev 2932)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c  
2007-09-06 14:04:43 UTC (rev 2933)
@@ -226,19 +226,57 @@
                         const gchar *number,
                         MokoDialer  *dialer)
 {
+  GtkWidget *dlg;
   MokoDialerPrivate *priv;
   MokoContactEntry *entry = NULL;
   
   g_return_if_fail (MOKO_IS_DIALER (dialer));
   priv = dialer->priv;
 
+
+  /* check current dialer state */
   if (0 || priv->status != DIALER_STATUS_NORMAL)
   {
+    gchar *strings[] = {
+      "Normal",
+      "Incoming Call",
+      "Dialing",
+      "Outgoing Call"
+    };
+    dlg = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+        "Cannot dial when dialer is busy.\nCurrent status = %s", 
strings[priv->status]);
+    gtk_dialog_run (GTK_DIALOG (dlg));
+    gtk_widget_destroy (dlg);
+
     g_warning ("Cannot dial when dialer is busy: %d\n", priv->status);
+
     return;
   }
   priv->status = DIALER_STATUS_DIALING;
 
+  /* check for network connection */
+  if (priv->registered != MOKO_GSMD_CONNECTION_NETREG_HOME
+      || priv->registered != MOKO_GSMD_CONNECTION_NETREG_ROAMING)
+  {
+    gchar *strings[] = {
+      "No Status",
+      "Home network registered",
+      "Waiting for network registration",
+      "Network registration denied",
+      "",
+      "Roaming network reigstered"
+    };
+
+    dlg = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+        "Not connected to network.\nCurrent status = %s ", 
strings[priv->registered]);
+    gtk_dialog_run (GTK_DIALOG (dlg));
+    gtk_widget_destroy (dlg);
+
+    /* no point continuing if we're not connected to a network! */
+    priv->status = DIALER_STATUS_NORMAL;
+    return;
+  }
+
   entry = moko_contacts_lookup (moko_contacts_get_default (), number);
 
   /* Prepare a voice journal entry */




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-09-06 17:28:49 +0200 (Thu, 06 Sep 2007)
New Revision: 2934

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-contacts.c
   
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.c
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-history.c
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-keypad.c
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
Log:
* src/moko-contacts.c: (moko_contacts_add_contact),
(on_ebook_contacts_changed), (on_ebook_contacts_removed):
* src/moko-dialer-panel.c: (moko_dialer_panel_class_init):
* src/moko-dialer.c: (on_keypad_pin_entry),
(on_talking_speaker_toggle), (on_network_registered),
(on_incoming_call), (on_incoming_clip), (on_pin_requested),
(on_call_progress_changed), (register_network_cb),
(moko_dialer_init):
* src/moko-history.c: (history_add_entry),
(moko_history_load_entries):
* src/moko-keypad.c: (on_tip_selected), (on_panel_user_hold):
* src/moko-notify.c: (moko_notify_check_brightness), (play),
(play_timeout), (moko_notify_start_ringtone),
(moko_notify_stop_ringtone):

Use g_debug() rather than g_print()


Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-09-06 14:04:43 UTC (rev 2933)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-09-06 15:28:49 UTC (rev 2934)
@@ -1,5 +1,24 @@
 2007-09-06  Thomas Wood  <[EMAIL PROTECTED]>
 
+       * src/moko-contacts.c: (moko_contacts_add_contact),
+       (on_ebook_contacts_changed), (on_ebook_contacts_removed):
+       * src/moko-dialer-panel.c: (moko_dialer_panel_class_init):
+       * src/moko-dialer.c: (on_keypad_pin_entry),
+       (on_talking_speaker_toggle), (on_network_registered),
+       (on_incoming_call), (on_incoming_clip), (on_pin_requested),
+       (on_call_progress_changed), (register_network_cb),
+       (moko_dialer_init):
+       * src/moko-history.c: (history_add_entry),
+       (moko_history_load_entries):
+       * src/moko-keypad.c: (on_tip_selected), (on_panel_user_hold):
+       * src/moko-notify.c: (moko_notify_check_brightness), (play),
+       (play_timeout), (moko_notify_start_ringtone),
+       (moko_notify_stop_ringtone):
+
+       Use g_debug() rather than g_print()
+
+2007-09-06  Thomas Wood  <[EMAIL PROTECTED]>
+
        * src/moko-dialer.c: (on_keypad_dial_clicked): Inform user if dialer is 
busy
        or network is not registered when attempting to dial
 

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-contacts.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-contacts.c    
    2007-09-06 14:04:43 UTC (rev 2933)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-contacts.c    
    2007-09-06 15:28:49 UTC (rev 2934)
@@ -280,7 +280,7 @@
       entry->number = normalize (phone);
       entry->contact = m_contact;
 
-      g_print ("%s %s\n", m_contact->name, entry->number);
+      g_debug ("%s %s", m_contact->name, entry->number);
 
       priv->entries = g_list_append (priv->entries, (gpointer)entry);
       g_hash_table_insert (priv->prefixes, 
@@ -311,7 +311,7 @@
                            GList        *c_list,
                            MokoContacts *contacts)
 {
-  g_print ("Contacts changed\n");
+  g_debug ("Contacts changed");
 }
 
 static void
@@ -319,7 +319,7 @@
                            GList        *c_list,
                            MokoContacts *contacts)
 {
-  g_print ("Contacts removed\n");
+  g_debug ("Contacts removed");
 }
 
 /* GObject functions */

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-06 14:04:43 UTC (rev 2933)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-panel.c
    2007-09-06 15:28:49 UTC (rev 2934)
@@ -49,7 +49,7 @@
   class->moko_dialer_panel_input = NULL;
   class->moko_dialer_panel_hold = NULL;
 
-  g_print ("moko_dialer_panel:start signal register\n");
+  g_debug ("moko_dialer_panel:start signal register");
 
   moko_dialer_panel_signals[CLICKED_SIGNAL] =
     g_signal_new ("user_input",
@@ -60,7 +60,7 @@
                   g_cclosure_marshal_VOID__CHAR, G_TYPE_NONE, 1,
                   g_type_from_name ("gchar"));
 
-  g_print ("moko_dialer_panel:signal register end,got the id :%d\n",
+  g_debug ("moko_dialer_panel:signal register end,got the id :%d",
            moko_dialer_panel_signals[CLICKED_SIGNAL]);
 
   moko_dialer_panel_signals[HOLD_SIGNAL] =
@@ -72,7 +72,7 @@
                   g_cclosure_marshal_VOID__CHAR, G_TYPE_NONE, 1,
                   g_type_from_name ("gchar"));
 
-  g_print ("moko_dialer_panel:signal register end,got the id :%d\n",
+  g_debug ("moko_dialer_panel:signal register end,got the id :%d",
            moko_dialer_panel_signals[HOLD_SIGNAL]);
 
 }

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c  
2007-09-06 14:04:43 UTC (rev 2933)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c  
2007-09-06 15:28:49 UTC (rev 2934)
@@ -324,7 +324,7 @@
 
   pin = g_strdup (in_pin);
 
-  g_print ("Sending pin %s\n", pin);
+  g_debug ("Sending pin %s", pin);
   moko_gsmd_connection_send_pin (priv->connection, pin);
 
   moko_keypad_set_pin_mode (MOKO_KEYPAD (priv->keypad), FALSE);
@@ -427,7 +427,7 @@
                            MokoDialer  *dialer)
 {
   /* Toggle speaker phone */
-  g_print ("Speaker toggled\n");
+  g_debug ("Speaker toggled");
 }
 
 static void
@@ -467,15 +467,15 @@
     case MOKO_GSMD_CONNECTION_NETREG_NONE:
     case MOKO_GSMD_CONNECTION_NETREG_SEARCHING:
       /* Do nothing */
-      g_print ("NetReg: Searching for network\n");
+      g_debug ("NetReg: Searching for network");
       break;
     case MOKO_GSMD_CONNECTION_NETREG_DENIED:
       /* This may be a pin issue*/
       break;
     case MOKO_GSMD_CONNECTION_NETREG_HOME:
     case MOKO_GSMD_CONNECTION_NETREG_ROAMING:
-      g_print ("NetReg: Network registered\n");
-      g_print("\tLocationAreaCode = %x\n\tCellID = %x\n", lac, cell);
+      g_debug ("NetReg: Network registered");
+      g_debug ("\tLocationAreaCode = %x\n\tCellID = %x", lac, cell);
       g_source_remove (priv->reg_timeout);
       break;
     default:
@@ -497,7 +497,7 @@
   if (priv->status == DIALER_STATUS_INCOMING  
         || priv->status == DIALER_STATUS_TALKING)
   {
-    /*g_print ("We are already showing the incoming page\n");*/
+    /*g_debug ("We are already showing the incoming page");*/
     return;
   }
   priv->status = DIALER_STATUS_INCOMING;
@@ -566,7 +566,7 @@
   }
   g_signal_emit (G_OBJECT (dialer), dialer_signals[INCOMING_CALL], 
                  0, number);
-  g_print ("Incoming Number = %s\n", number);
+  g_debug ("Incoming Number = %s", number);
 }
 
 static void
@@ -580,7 +580,7 @@
   g_source_remove (priv->reg_timeout);
   moko_keypad_set_pin_mode (MOKO_KEYPAD (priv->keypad), TRUE);
   moko_dialer_show_dialer (dialer, NULL);
-  g_print ("Pin Requested\n");
+  g_debug ("Pin Requested");
 
 }
 
@@ -613,38 +613,38 @@
         priv->time = NULL;
       }
       moko_notify_stop (priv->notify);
-      g_print ("mokogsmd disconnect\n");
+      g_debug ("mokogsmd disconnect");
       break;
     
     case MOKO_GSMD_PROG_REJECT:
       moko_dialer_rejected (dialer);
       moko_keypad_set_talking (MOKO_KEYPAD (priv->keypad), FALSE);
-      g_print ("mokogsmd reject\n");
+      g_debug ("mokogsmd reject");
       break;
     
     case MOKO_GSMD_PROG_CONNECTED:
       moko_talking_accepted_call (MOKO_TALKING (priv->talking), NULL, NULL);
       moko_keypad_set_talking (MOKO_KEYPAD (priv->keypad), TRUE);
-      g_print ("mokogsmd connected\n");
+      g_debug ("mokogsmd connected");
       break;
     case MOKO_GSMD_PROG_SETUP:
-      g_print ("mokogsmd setup\n");
+      g_debug ("mokogsmd setup");
       break;
     case MOKO_GSMD_PROG_ALERT:
-      g_print ("mokogsmd alert\n");
+      g_debug ("mokogsmd alert");
       break;
     case  MOKO_GSMD_PROG_CALL_PROCEED:
-      g_print ("mokogsmd proceed\n");
+      g_debug ("mokogsmd proceed");
       break;
     case MOKO_GSMD_PROG_SYNC:
-      g_print ("mokogsmd sync\n");
+      g_debug ("mokogsmd sync");
       break;
     case  MOKO_GSMD_PROG_PROGRESS:
-      g_print ("mokogsmd progress\n");
+      g_debug ("mokogsmd progress");
       break;
     case MOKO_GSMD_PROG_UNKNOWN:
     default:
-      g_print ("mokogsmd unknown\n");
+      g_debug ("mokogsmd unknown");
       break;
   }
 }
@@ -664,21 +664,21 @@
     case MOKO_GSMD_CONNECTION_NETREG_NONE:
       /* We have yet to request registration, so lets do it */
       /* FIXME: do the pin stuff */
-      g_print ("Requesting registration\n");
+      g_debug ("Requesting registration");
       moko_gsmd_connection_network_register (priv->connection);
       priv->registered = MOKO_GSMD_CONNECTION_NETREG_SEARCHING;
       break;
     case MOKO_GSMD_CONNECTION_NETREG_SEARCHING:
-      g_print ("Waiting for registration\n");
+      g_debug ("Waiting for registration");
       break;
     case MOKO_GSMD_CONNECTION_NETREG_DENIED:
-      g_print ("Registration denied, retrying\n");
+      g_debug ("Registration denied, retrying");
       moko_gsmd_connection_network_register (priv->connection);
       priv->registered = MOKO_GSMD_CONNECTION_NETREG_SEARCHING;
       break;
     case MOKO_GSMD_CONNECTION_NETREG_HOME:
     case MOKO_GSMD_CONNECTION_NETREG_ROAMING:
-      g_print ("Network Registered\n");
+      g_debug ("Network Registered");
            return FALSE;
     default:
       g_warning ("Unhandled register event type = %d\n", priv->registered);
@@ -836,7 +836,7 @@
     priv->journal = NULL;
   }
   else
-    g_print ("Journal Loaded\n");
+    g_debug ("Journal Loaded");
 
   /* Load the contacts store */
   priv->contacts = moko_contacts_get_default ();

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-history.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-history.c 
2007-09-06 14:04:43 UTC (rev 2933)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-history.c 
2007-09-06 15:28:49 UTC (rev 2934)
@@ -131,7 +131,7 @@
 static void
 on_sms_clicked (GtkWidget *button, MokoHistory *history)
 {
-  g_print ("sms clicked\n");
+  g_debug ("sms clicked");
 }
 
 static void
@@ -270,7 +270,7 @@
 
   if ( number == NULL || display_text == NULL || uid == NULL)
   {
-    /*g_print ("Not adding\n");
+    /*g_debug ("Not adding");
     return FALSE;*/
   }
   gtk_list_store_insert_with_values (store, &iter, 0,
@@ -414,7 +414,7 @@
   n_entries = moko_journal_get_nb_entries (priv->journal);
   if (n_entries < 1)
   {
-    g_print ("The Journal is empty\n");
+    g_debug ("The Journal is empty");
     return;
   }
 

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-keypad.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-keypad.c  
2007-09-06 14:04:43 UTC (rev 2933)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-keypad.c  
2007-09-06 15:28:49 UTC (rev 2934)
@@ -135,7 +135,7 @@
   moko_dialer_textview_insert (MOKO_DIALER_TEXTVIEW (priv->textview),
                                entry->number);
 
-  g_print ("%s\n", entry->number);
+  g_debug ("%s", entry->number);
   g_signal_emit (G_OBJECT (keypad), keypad_signals[DIAL_NUMBER], 
                  0, entry->number);
 }
@@ -246,7 +246,7 @@
                      const gchar      digit, 
                      MokoKeypad      *keypad)
 {
-  g_print ("on_panel_user_hold: %c\n", digit);
+  g_debug ("on_panel_user_hold: %c", digit);
 }
 
 /* GObject functions */

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c  
2007-09-06 14:04:43 UTC (rev 2933)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c  
2007-09-06 15:28:49 UTC (rev 2934)
@@ -85,7 +85,7 @@
         == G_IO_STATUS_NORMAL)
   {
     buf[bytes] = '\0';
-    /*g_print ("Current brightness = %s\n", buf); */
+    /*g_debug ("Current brightness = %s", buf); */
   }
   else
   {
@@ -107,7 +107,7 @@
 play (MokoNotify *notify)
 {
   moko_notify_start_ringtone (notify);
-  g_print ("1500 timeout\n");
+  g_debug ("1500 timeout");
   return FALSE;
 }
 
@@ -124,22 +124,22 @@
 
   if (!priv->operation)
   {
-    g_print ("No operation\n");
+    g_debug ("No operation");
     return FALSE;
   }
   if (!priv->started)
   {
     pa_operation_cancel (priv->operation);
-    g_print ("Cancelling early\n");
+    g_debug ("Cancelling early");
     return FALSE;
   }
   if (pa_operation_get_state (priv->operation) == PA_OPERATION_DONE)
   {
     g_timeout_add (1500, (GSourceFunc)play, (gpointer)notify);
-    g_print ("Playing done\n");
+    g_debug ("Playing done");
     return FALSE;
   }
-  g_print ("Not finsihed yet\n");
+  g_debug ("Not finsihed yet");
   return TRUE;  
 }
 
@@ -161,7 +161,7 @@
                                             NULL, 
                                             NULL);
   g_timeout_add (500, (GSourceFunc)play_timeout, (gpointer)notify);
-  g_print ("Playing\n");
+  g_debug ("Playing");
 }
 
 static void
@@ -175,7 +175,7 @@
   if (priv->operation)
   {
     pa_operation_cancel (priv->operation);
-    g_print ("Cancelling\n");
+    g_debug ("Cancelling");
   }
 
   priv->operation = NULL;




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-09-06 18:14:28 +0200 (Thu, 06 Sep 2007)
New Revision: 2935

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-textview.c
Log:
* src/moko-dialer-textview.c: (moko_dialer_textview_init): Prevent the display
from resizing when the font size is reduced


Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-09-06 15:28:49 UTC (rev 2934)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-09-06 16:14:28 UTC (rev 2935)
@@ -1,5 +1,10 @@
 2007-09-06  Thomas Wood  <[EMAIL PROTECTED]>
 
+       * src/moko-dialer-textview.c: (moko_dialer_textview_init): Prevent the 
display
+       from resizing when the font size is reduced
+
+2007-09-06  Thomas Wood  <[EMAIL PROTECTED]>
+
        * src/moko-contacts.c: (moko_contacts_add_contact),
        (on_ebook_contacts_changed), (on_ebook_contacts_removed):
        * src/moko-dialer-panel.c: (moko_dialer_panel_class_init):

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-textview.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-textview.c
 2007-09-06 15:28:49 UTC (rev 2934)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-textview.c
 2007-09-06 16:14:28 UTC (rev 2935)
@@ -72,6 +72,19 @@
 
 
 static void
+moko_dialer_textview_realize (MokoDialerTextview *moko_dialer_textview, 
gpointer user_data)
+{
+  /* Get the initial size of the textview and make sure it does not become
+   * smaller. This will prevent the widget resizing if the font size
+   * is reduced later on
+   */
+  GtkRequisition r;
+  gtk_widget_size_request (GTK_WIDGET (moko_dialer_textview), &r);
+  gtk_widget_set_size_request (GTK_WIDGET (moko_dialer_textview), r.width, 
r.height);
+
+}
+
+static void
 moko_dialer_textview_init (MokoDialerTextview * moko_dialer_textview)
 {
 
@@ -116,6 +129,8 @@
                                 "PANGO_WEIGHT_BOLD", NULL);
   moko_dialer_textview->sensed = FALSE;
 
+
+  g_signal_connect (moko_dialer_textview, "realize", G_CALLBACK 
(moko_dialer_textview_realize), NULL);
 }
 
 




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to