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

thomas at sita.openmoko.org thomas at sita.openmoko.org
Tue Jun 12 13:25:46 CEST 2007


Author: thomas
Date: 2007-06-12 13:25:45 +0200 (Tue, 12 Jun 2007)
New Revision: 2219

Modified:
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-dialer.c
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-history.c
Log:
openmoko-dialer: Remove hard coded widget sizes (bug 600)


Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-dialer.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-dialer.c	2007-06-12 11:10:19 UTC (rev 2218)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-dialer.c	2007-06-12 11:25:45 UTC (rev 2219)
@@ -269,13 +269,6 @@
   DBG_LEAVE ();
 }
 
-
-
-
-
-
-#define WINDOW_DIALER_BUTTON_SIZE_X 100
-#define WINDOW_DIALER_BUTTON_SIZE_Y 100
 gint
 window_dialer_init (MokoDialerData * p_dialer_data)
 {
@@ -375,7 +368,7 @@
 
 //the buttons
 
-    GtkWidget *vbox2 = gtk_vbox_new (FALSE, 0);
+    GtkWidget *vbox2 = gtk_vbox_new (FALSE, 10);
     GtkWidget *button1 = moko_pixmap_button_new ();
     g_signal_connect (G_OBJECT (button1), "clicked",
                       G_CALLBACK (cb_delete_button_clicked), p_dialer_data);
@@ -385,10 +378,8 @@
        file_new_image_from_relative_path ("delete.png"));
     moko_pixmap_button_set_action_btn_lower_label (MOKO_PIXMAP_BUTTON
                                                    (button1), "Delete");
-    gtk_widget_set_size_request (button1, WINDOW_DIALER_BUTTON_SIZE_X,
-                                 WINDOW_DIALER_BUTTON_SIZE_Y);
 
-    gtk_box_pack_start (GTK_BOX (vbox2), button1, FALSE, FALSE, 5);
+    gtk_box_pack_start (GTK_BOX (vbox2), button1, FALSE, FALSE, 0);
 
     GtkWidget *button3 = moko_pixmap_button_new ();
     g_signal_connect (G_OBJECT (button3), "clicked",
@@ -399,9 +390,7 @@
        file_new_image_from_relative_path ("history.png"));
     moko_pixmap_button_set_action_btn_lower_label (MOKO_PIXMAP_BUTTON
                                                    (button3), "History");
-    gtk_widget_set_size_request (button3, WINDOW_DIALER_BUTTON_SIZE_X,
-                                 WINDOW_DIALER_BUTTON_SIZE_Y);
-    gtk_box_pack_start (GTK_BOX (vbox2), button3, FALSE, FALSE, 5);
+    gtk_box_pack_start (GTK_BOX (vbox2), button3, FALSE, FALSE, 0);
 
 
     GtkWidget *button2 = moko_pixmap_button_new ();
@@ -414,16 +403,12 @@
        file_new_image_from_relative_path ("phone.png"));
     moko_pixmap_button_set_action_btn_lower_label (MOKO_PIXMAP_BUTTON
                                                    (button2), "Dial");
-    gtk_widget_set_size_request (button2, WINDOW_DIALER_BUTTON_SIZE_X + 20,
-                                 WINDOW_DIALER_BUTTON_SIZE_Y + 80);
 
-    gtk_box_pack_start (GTK_BOX (vbox2), button2, FALSE, FALSE, 20);
+    gtk_box_pack_start (GTK_BOX (vbox2), button2, TRUE, TRUE, 0);
 
 
     gtk_box_pack_start (GTK_BOX (hbox), vbox2, TRUE, TRUE, 5);
 
-
-
     gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 5);
 
 

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-history.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-history.c	2007-06-12 11:10:19 UTC (rev 2218)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-history.c	2007-06-12 11:25:45 UTC (rev 2219)
@@ -553,7 +553,6 @@
   GtkWidget *eventboxTop = gtk_event_box_new ();
   gtk_widget_show (eventboxTop);
   gtk_box_pack_start (GTK_BOX (vbox), eventboxTop, FALSE, FALSE, 5);
-  gtk_widget_set_size_request (eventboxTop, 480, 64);
   gtk_widget_set_name (eventboxTop, "gtkeventbox-black");
 
   GtkWidget *hbox67 = gtk_hbox_new (FALSE, 0);
@@ -574,7 +573,6 @@
   GtkWidget *labelHistoryTitle = gtk_label_new (("History-"));
   gtk_widget_show (labelHistoryTitle);
   gtk_box_pack_start (GTK_BOX (hbox67), labelHistoryTitle, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (labelHistoryTitle, 221, -1);
   gtk_label_set_justify (GTK_LABEL (labelHistoryTitle), GTK_JUSTIFY_RIGHT);
   gtk_misc_set_alignment (GTK_MISC (labelHistoryTitle), 1, 0.5);
 
@@ -611,17 +609,13 @@
 
   gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeviewHistory), FALSE);
   gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeviewHistory), FALSE);
-//   gtk_misc_set_alignment (GTK_MISC (treeviewHistory), 0.5, 0.5);
   gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
 
 
   gtk_widget_set_name (treeviewHistory, "gtktreeview-black");
   p_dialer_data->treeview_history = treeviewHistory;
   history_build_history_list_view (p_dialer_data);
-  gtk_widget_set_size_request (scrolledwindow, -1, 400);
-//  gtk_misc_set_alignment (GTK_MISC (treeviewHistory),1,0.1);
 
-
   g_signal_connect ((gpointer) treeviewHistory, "cursor_changed",
                     G_CALLBACK (on_treeviewHistory_cursor_changed),
                     p_dialer_data);





More information about the commitlog mailing list