Send Message Attachment Field Size Patch.
- From: "Jesse D . Sightler" <jsight pair com>
- To: balsa-list gnome org
- Subject: Send Message Attachment Field Size Patch.
- Date: Sat, 13 Mar 1999 01:05:41 -0500
Here is a small patch for balsa/src/sendmsg-window.c that
makes the send message window much nicer looking. Basically
it just makes the attachments field a much more reasonable size
as well as making the entire top pane of the send message window
resizable. This still isn't perfect, as it is possible to resize
the top pane to such a small value that it is unusable, but it is
IMO an improvement.
Anyway, enjoy the patch, and feel free to make improvements and/or
commit this one to CVS. :)
---------------
Jesse D. Sightler
http://www3.pair.com/jsight/
"An honest answer can get you into a lot of trouble."
- Anonymous
--- /home/jsight/gnomecvs/balsa/src/sendmsg-window.c Tue Mar 2 19:59:48 1999
+++ sendmsg-window.c Sat Mar 13 00:59:13 1999
@@ -288,11 +288,11 @@
label = gtk_label_new (_("To:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
- GTK_FILL, GTK_FILL, 0, 0);
+ GTK_FILL, GTK_FILL | GTK_SHRINK, 0, 0);
msg->to = gtk_entry_new ();
gtk_table_attach (GTK_TABLE (table), msg->to, 1, 2, 0, 1,
- GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
+ GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, 0, 0);
button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
@@ -307,11 +307,11 @@
label = gtk_label_new (_("From:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
- GTK_FILL, GTK_FILL, 0, 0);
+ GTK_FILL, GTK_FILL | GTK_SHRINK, 0, 0);
msg->from = gtk_entry_new ();
gtk_table_attach (GTK_TABLE (table), msg->from, 1, 2, 1, 2,
- GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
+ GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, 0, 0);
GTK_WIDGET_UNSET_FLAGS (msg->from, GTK_CAN_FOCUS);
gtk_entry_set_editable (GTK_ENTRY (msg->from), FALSE);
@@ -327,21 +327,21 @@
label = gtk_label_new (_("Subject:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3,
- GTK_FILL, GTK_FILL, 0, 0);
+ GTK_FILL, GTK_FILL | GTK_SHRINK, 0, 0);
msg->subject = gtk_entry_new ();
gtk_table_attach (GTK_TABLE (table), msg->subject, 1, 2, 2, 3,
- GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
+ GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, 0, 0);
/* cc: */
label = gtk_label_new (_("cc:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4,
- GTK_FILL, GTK_FILL, 0, 0);
+ GTK_FILL, GTK_FILL | GTK_SHRINK, 0, 0);
msg->cc = gtk_entry_new ();
gtk_table_attach (GTK_TABLE (table), msg->cc, 1, 2, 3, 4,
- GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
+ GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, 0, 0);
button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
@@ -355,11 +355,11 @@
label = gtk_label_new (_("bcc:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5,
- GTK_FILL, GTK_FILL, 0, 0);
+ GTK_FILL, GTK_FILL | GTK_SHRINK, 0, 0);
msg->bcc = gtk_entry_new ();
gtk_table_attach (GTK_TABLE (table), msg->bcc, 1, 2, 4, 5,
- GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
+ GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, 0, 0);
button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
@@ -373,7 +373,7 @@
label = gtk_label_new (_("Attachments:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 5, 6,
- GTK_FILL, GTK_FILL, 0, 0);
+ GTK_FILL, GTK_FILL | GTK_SHRINK, 0, 0);
gtk_widget_push_visual (gdk_imlib_get_visual ());
gtk_widget_push_colormap (gdk_imlib_get_colormap ());
@@ -407,7 +407,7 @@
gtk_container_add (GTK_CONTAINER (frame), sw);
gtk_table_attach (GTK_TABLE (table), frame, 1, 3, 5, 6,
- GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0);
+ GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 0);
gtk_signal_connect (GTK_OBJECT (msg->attachments), "select_icon",
GTK_SIGNAL_FUNC (select_attachment),
@@ -458,7 +458,7 @@
sendmsg_window_new (GtkWidget * widget, Message * message, SendType type)
{
GtkWidget *window;
- GtkWidget *vbox;
+ GtkWidget *paned = gtk_vpaned_new ();
gchar *newsubject = NULL;
BalsaSendmsg *msg = NULL;
@@ -491,14 +491,9 @@
gtk_signal_connect (GTK_OBJECT (msg->window), "delete_event",
GTK_SIGNAL_FUNC (gtk_false), NULL);
- vbox = gtk_vbox_new (FALSE, 1);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
- gtk_widget_show (vbox);
-
/* create the top portion with the to, from, etc in it */
- gtk_box_pack_start (GTK_BOX (vbox),
- create_info_pane (msg, type),
- TRUE, TRUE, 0);
+ gtk_paned_add1 (GTK_PANED(paned),
+ create_info_pane (msg, type));
/* fill in that info: */
@@ -606,11 +601,9 @@
}
}
- gtk_box_pack_end (GTK_BOX (vbox),
- create_text_area (msg),
- TRUE, TRUE, 0);
+ gtk_paned_add2 (GTK_PANED (paned),create_text_area (msg));
- gnome_app_set_contents (GNOME_APP (window), vbox);
+ gnome_app_set_contents (GNOME_APP (window), paned);
gnome_app_create_menus_with_data (GNOME_APP (window), main_menu, msg);
gnome_app_create_toolbar_with_data (GNOME_APP (window), main_toolbar, msg);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]