Re: [evolution-patches] Fix for 48868



On Sat, 2005-02-12 at 17:38 -0500, Rodney Dawes wrote:
>Unfortunately, gtk_button_set_image() is only available in Gtk+ 2.6 or
>newer. Evolution 2.2 has to be usable with Gtk+ 2.4 still currently, so
>this patch can not go into Evolution until the 2.3 branch, I think. We
>may go straight for the Gtk+ 2.8 dependency at that point, depending on
>what GNOME does, I think.

Seems like that is what Evolution 2.0 is for.  Whatever.

Here is a patch that should work.

Jon
Index: shell/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1495
diff -p -u -r1.1495 ChangeLog
--- shell/ChangeLog	8 Feb 2005 00:38:09 -0000	1.1495
+++ shell/ChangeLog	13 Feb 2005 03:39:54 -0000
@@ -1,3 +1,8 @@
+2005-02-12  William Jon McCann  <mccann jhu edu>
+
+	* e-shell-window.c (setup_offline_toggle): Make offline button scale
+	with font size.  Fixes #48868.
+
 2005-02-07  JP Rosevear  <jpr novell com>
 
 	* apps_evolution_shell.schemas.in.in: clean up descriptions
Index: shell/e-shell-window.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-window.c,v
retrieving revision 1.30
diff -p -u -r1.30 e-shell-window.c
--- shell/e-shell-window.c	4 Jan 2005 19:58:45 -0000	1.30
+++ shell/e-shell-window.c	13 Feb 2005 03:40:04 -0000
@@ -491,7 +491,7 @@ setup_offline_toggle (EShellWindow *wind
 
 	priv = window->priv;
 
-	toggle = gtk_button_new ();
+	toggle = gtk_button_new_with_label ("");
 	GTK_WIDGET_UNSET_FLAGS (toggle, GTK_CAN_FOCUS);
 	gtk_button_set_relief (GTK_BUTTON (toggle), GTK_RELIEF_NONE);
 
@@ -499,8 +499,7 @@ setup_offline_toggle (EShellWindow *wind
 			  G_CALLBACK (offline_toggle_clicked_callback), window);
 
 	image = gtk_image_new_from_pixmap (offline_pixmap, offline_mask);
-
-	gtk_container_add (GTK_CONTAINER (toggle), image);
+	g_object_set (toggle, "image", image, NULL);
 
 	gtk_widget_show (toggle);
 	gtk_widget_show (image);


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