[evolution-patches] Fix to resize the composer attachment bar



Hi,

I have attached a patch, which allows to resize the attachment bar when
its visible.

Please review and give back the comments.

Thanks
Srini.
Index: e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.510
diff -u -p -r1.510 e-msg-composer.c
--- e-msg-composer.c	3 Jun 2005 09:52:02 -0000	1.510
+++ e-msg-composer.c	9 Jun 2005 05:15:28 -0000
@@ -55,6 +55,7 @@
 #include <errno.h>
 #include <ctype.h>
 
+#include <gtk/gtk.h>
 #include <gtk/gtkoptionmenu.h>
 #include <gtk/gtkscrolledwindow.h>
 #include <gtk/gtkmain.h>
@@ -3369,6 +3370,7 @@ create_composer (int visible_mask)
 	GtkWidget *html_widget = NULL;
 	gpointer servant;;
 	BonoboObject *impl;	
+	GtkWidget *vpane, *attachment_box;
 	
 	composer = g_object_new (E_TYPE_MSG_COMPOSER, "win_name", _("Compose a message"), NULL);
 	gtk_window_set_title ((GtkWindow *) composer, _("Compose a message"));
@@ -3501,17 +3503,23 @@ create_composer (int visible_mask)
 	gtk_widget_show_all (expander_hbox);
 	gtk_widget_hide (composer->attachment_expander_icon);
 
+	vpane = gtk_vpaned_new ();
+	gtk_paned_pack1 ((GtkPaned *) vpane, vbox, TRUE, FALSE);
+	gtk_widget_show (vbox);
 	
-	gtk_box_pack_start (GTK_BOX (vbox), expander_hbox, FALSE, FALSE, 0);
-	gtk_box_pack_start (GTK_BOX (vbox), composer->attachment_scrolled_window,
-			    FALSE, FALSE, GNOME_PAD_SMALL);
-	
+	attachment_box = gtk_vbox_new (FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (attachment_box), expander_hbox, FALSE, FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (attachment_box), composer->attachment_scrolled_window, TRUE, TRUE, GNOME_PAD_SMALL);
+
+	gtk_paned_pack2 ((GtkPaned *) vpane, attachment_box, FALSE, TRUE);
 	composer->attachment_expander = expander_hbox;
+
+	gtk_widget_show (attachment_box);
 	gtk_widget_hide (composer->attachment_scrolled_window);
 	gtk_widget_hide (expander_hbox);
 	
-	bonobo_window_set_contents (BONOBO_WINDOW (composer), vbox);
-	gtk_widget_show (vbox);
+	bonobo_window_set_contents (BONOBO_WINDOW (composer), vpane);
+	gtk_widget_show (vpane);
 	
 	/* If we show this widget earlier, we lose network transparency. i.e. the
 	   component appears on the machine evo is running on, ignoring any DISPLAY


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