Re: [evolution-patches] A patch for calendar based on trunk



I've checked in the enclosed patch since Rodrigo has approved it. I think it's better and simpler to have a consistent box length large enough under different locales. Anyway, thanks for your suggestions.

JP Rosevear wrote:

On Thu, 2004-03-04 at 00:32, Kidd Wang wrote:

Before I sent you the patch yesterday, I did have tried your second option to call some pango functions, such as pango_layout_get_pixel_size, to calculate the accurate size of the box, but unfortunely it seems that these functions can only give me
an approximate value which is almost always much less than the text appears.
Enclosed is a patch conforming to your first option and snapshots are also given below.
Does it look OK?
this will make the combo get the same size on every locale, so there
might cases, in some resolutions and locales where it is smaller than
the text. Do we want that? If we do, the patch looks ok.

Yes, the sizing is a bit annoying, we could set the fill option to FALSE
when packing the widgets, but this might mean the size jumps around from
event to event.

-JP

Index: widgets/misc/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/ChangeLog,v
retrieving revision 1.279
diff -u -r1.279 ChangeLog
--- widgets/misc/ChangeLog	11 Mar 2004 20:29:15 -0000	1.279
+++ widgets/misc/ChangeLog	12 Mar 2004 08:43:01 -0000
@@ -1,3 +1,8 @@
+2004-03-12  Kidd Wang  <kidd wang sun com>
+
+	* e-dateedit.c: (create_children): enlarge the text box to accomodate
+	the time info in different locales.
+
 2004-03-11  Jeffrey Stedfast  <fejj ximian com>
 
 	Fix for bug #55267.
Index: widgets/misc/e-dateedit.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-dateedit.c,v
retrieving revision 1.39
diff -u -r1.39 e-dateedit.c
--- widgets/misc/e-dateedit.c	26 Feb 2004 22:20:15 -0000	1.39
+++ widgets/misc/e-dateedit.c	12 Mar 2004 08:43:02 -0000
@@ -322,7 +322,6 @@
 	priv = dedit->priv;
 
 	priv->date_entry  = gtk_entry_new ();
-	gtk_widget_set_size_request (priv->date_entry, 90, -1);
 	gtk_box_pack_start (GTK_BOX (dedit), priv->date_entry, FALSE, TRUE, 0);
 	
 	g_signal_connect (priv->date_entry, "key_press_event",
@@ -354,7 +353,6 @@
 
 
 	priv->time_combo = gtk_combo_new ();
-	gtk_widget_set_size_request (GTK_COMBO (priv->time_combo)->entry, 90, -1);
 	gtk_box_pack_start (GTK_BOX (dedit), priv->time_combo, FALSE, TRUE, 0);
 	rebuild_time_popup (dedit);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]