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

thomas at sita.openmoko.org thomas at sita.openmoko.org
Tue Apr 8 15:37:06 CEST 2008


Author: thomas
Date: 2008-04-08 15:37:05 +0200 (Tue, 08 Apr 2008)
New Revision: 4325

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/dialer/dialer-main.c
Log:
2008-04-08  Thomas Wood  <thomas at openedhand.com>

	* src/dialer/dialer-main.c: (main): Revert previous history widget
	creation changes until at least after MP image.


Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog	2008-04-08 12:03:56 UTC (rev 4324)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog	2008-04-08 13:37:05 UTC (rev 4325)
@@ -1,5 +1,10 @@
 2008-04-08  Thomas Wood  <thomas at openedhand.com>
 
+	* src/dialer/dialer-main.c: (main): Revert previous history widget
+	creation changes until at least after MP image.
+
+2008-04-08  Thomas Wood  <thomas at openedhand.com>
+
 	* src/common/Makefile.am: Add missing header file
 	* src/dialer/dialer-main.c: (program_log), (main): Create the history
 	widget after everything else has loaded, unless it is explicitly

Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/dialer/dialer-main.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/dialer/dialer-main.c	2008-04-08 12:03:56 UTC (rev 4324)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/dialer/dialer-main.c	2008-04-08 13:37:05 UTC (rev 4325)
@@ -29,13 +29,10 @@
 {
   GtkWidget *notebook;
   GtkWidget *history;
-
-  GtkWidget *history_placeholder;
   
   GtkWidget *main_window;
 
   DBusGProxy *dialer_proxy;
-  MokoJournal *journal;
 } DialerData;
 
 static gboolean show_missed;
@@ -101,18 +98,6 @@
   g_free (str);
 }
 
-gboolean
-create_history_window (DialerData *data)
-{
-  /* create the history window in an idle callback, if we don't need it straight
-   * away */
-  data->history = moko_history_new (data->journal);
-  g_signal_connect (data->history, "dial_number", G_CALLBACK (dial_clicked_cb), data);
-  gtk_container_add (GTK_CONTAINER (data->history_placeholder), data->history);
-  return FALSE;
-
-}
-
 int main (int argc, char **argv)
 {
   GtkWidget *window, *keypad;
@@ -168,7 +153,7 @@
 
   /* Set up the journal */
   program_log ("load journal");
-  data->journal = journal = moko_journal_open_default ();
+  journal = moko_journal_open_default ();
   if (!journal || !moko_journal_load_from_storage (journal))
   {
     g_warning ("Could not load journal");
@@ -195,32 +180,20 @@
   gtk_notebook_append_page (GTK_NOTEBOOK (data->notebook), keypad, gtk_image_new_from_file (PKGDATADIR"/dtmf.png"));
   gtk_container_child_set (GTK_CONTAINER (data->notebook), keypad, "tab-expand", TRUE, NULL);
 
-
+  /* History */
   program_log ("create history widget");
-  if (!show_missed)
-  {
-    /* set a temporary widget while we create the real history widget */
-    data->history_placeholder = gtk_alignment_new (0, 0, 1, 1);
-    gtk_notebook_append_page (GTK_NOTEBOOK (data->notebook), data->history_placeholder,
-                              gtk_image_new_from_icon_name ("moko-call-history",
-                                                        GTK_ICON_SIZE_BUTTON));
-    gtk_container_child_set (GTK_CONTAINER (data->notebook), data->history_placeholder,
-                             "tab-expand", TRUE,
-                             NULL);
-    /* wait until everything else finishes before creating the history widget */
-    g_idle_add ((GSourceFunc) create_history_window, data);
-  }
-  else
-  {
-    /* we need to show the history window right now, so don't delay creation */
-    create_history_window (data);
-  }
+  data->history = moko_history_new (journal);
+  g_signal_connect (data->history, "dial_number", G_CALLBACK (dial_clicked_cb), data);
+  gtk_notebook_append_page (GTK_NOTEBOOK (data->notebook), data->history,
+                            gtk_image_new_from_icon_name ("moko-call-history",
+                                                      GTK_ICON_SIZE_BUTTON));
+  gtk_container_child_set (GTK_CONTAINER (data->notebook), data->history,
+                           "tab-expand", TRUE,
+                           NULL);
 
   program_log ("show window");
   gtk_widget_show_all (window);
 
-
-  /* History */
   if (show_missed)
     gtk_notebook_set_current_page (GTK_NOTEBOOK (data->notebook), 1);
   else





More information about the commitlog mailing list