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

thomas at sita.openmoko.org thomas at sita.openmoko.org
Thu Sep 6 18:14:29 CEST 2007


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  <thomas at openedhand.com>
 
+	* 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  <thomas at openedhand.com>
+
 	* 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);
 }
 
 





More information about the commitlog mailing list