2007-09-21 [paul] 3.0.1cvs19
authorPaul Mangan <paul@claws-mail.org>
Fri, 21 Sep 2007 09:41:43 +0000 (09:41 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 21 Sep 2007 09:41:43 +0000 (09:41 +0000)
* src/prefs_account.c
* src/prefs_folder_item.c
* src/prefs_quote.c
* src/quote_fmt.c
put the Templates options into a tabbed
layout. Patch by Pawel Pekala

ChangeLog
PATCHSETS
configure.ac
src/prefs_account.c
src/prefs_folder_item.c
src/prefs_quote.c
src/quote_fmt.c

index fb9e837fbb5f494b6b31f375c48c6d6bd3957460..983ebd5f97bd39040e65e3f43a9756fdcca6b658 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-09-21 [paul]      3.0.1cvs19
+
+       * src/prefs_account.c
+       * src/prefs_folder_item.c
+       * src/prefs_quote.c
+       * src/quote_fmt.c
+               put the Templates options into a tabbed
+               layout. Patch by Pawel Pekala
+
 2007-09-21 [paul]      3.0.1cvs18
 
        * src/mainwindow.c
index 7ea0a05892da6f637633d6d5f2aae5ea6822e84d..825a73857b090e7e621e7ddd21f3eff564bd397a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.207.2.184 -r 1.207.2.185 src/folderview.c;  ) > 3.0.1cvs16.patchset
 ( cvs diff -u -r 1.382.2.409 -r 1.382.2.410 src/compose.c;  ) > 3.0.1cvs17.patchset
 ( cvs diff -u -r 1.274.2.212 -r 1.274.2.213 src/mainwindow.c;  ) > 3.0.1cvs18.patchset
+( cvs diff -u -r 1.105.2.110 -r 1.105.2.111 src/prefs_account.c;  cvs diff -u -r 1.52.2.48 -r 1.52.2.49 src/prefs_folder_item.c;  cvs diff -u -r 1.1.2.23 -r 1.1.2.24 src/prefs_quote.c;  cvs diff -u -r 1.8.2.23 -r 1.8.2.24 src/quote_fmt.c;  ) > 3.0.1cvs19.patchset
index ddff2317b55800229b51ae9576e085baf0be47f1..eff24703c0b70c725cfe2b8d26989cde878cf631 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=18
+EXTRA_VERSION=19
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index a21f7181e196bcc5310b7ea7a988b4e3bb4ff5ba..8ff72071a0f184a84253e7ae166c054dcf4ac88c 100644 (file)
@@ -2023,36 +2023,62 @@ static void templates_create_widget_func(PrefsPage * _page,
        TemplatesPage *page = (TemplatesPage *) _page;
        PrefsAccount *ac_prefs = (PrefsAccount *) data;
        GtkWidget *vbox;
+       GtkWidget *vbox2;
+       GtkWidget *notebook;
 
-       vbox = gtk_vbox_new(FALSE, VSPACING);
+       vbox = gtk_vbox_new(FALSE, 0);
        gtk_widget_show(vbox);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox), VBOX_BORDER);
+       
+       notebook = gtk_notebook_new();
+       gtk_widget_show(notebook);
+       gtk_notebook_set_homogeneous_tabs(GTK_NOTEBOOK(notebook), TRUE);
+       gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
+
+       /* compose format */
+       vbox2 = gtk_vbox_new (FALSE, VSPACING);
+       gtk_widget_show (vbox2);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox2), VBOX_BORDER);
 
-       /* compose/reply/forward formats */
        quotefmt_create_new_msg_fmt_widgets(
                                window,
-                               vbox,
+                               vbox2,
                                &page->checkbtn_compose_with_format,
                                _("Use a specific format for new messages"),
                                &page->compose_subject_format,
                                &page->compose_body_format,
                                FALSE);
+       gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(_("Compose")));
+
+       /* reply format */      
+       vbox2 = gtk_vbox_new (FALSE, VSPACING);
+       gtk_widget_show (vbox2);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox2), VBOX_BORDER);
+       
        quotefmt_create_reply_fmt_widgets(
                                window,
-                               vbox,
+                               vbox2,
                                &page->checkbtn_reply_with_format,
                                _("Use a specific reply quote format"),
                                &page->reply_quotemark,
                                &page->reply_body_format,
                                FALSE);
+       gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(_("Reply")));
+
+       /* forward format */    
+       vbox2 = gtk_vbox_new (FALSE, VSPACING);
+       gtk_widget_show (vbox2);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox2), VBOX_BORDER);
+
        quotefmt_create_forward_fmt_widgets(
                                window,
-                               vbox,
+                               vbox2,
                                &page->checkbtn_forward_with_format,
                                _("Use a specific forward quote format"),
                                &page->forward_quotemark,
                                &page->forward_body_format,
                                FALSE);
+       gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(_("Forward")));
+
        quotefmt_add_info_button(window, vbox);
 
        tmp_ac_prefs = *ac_prefs;
index ca660e264c27465a46a4de0bbcb17f8a1f64f294..a5a4b94cc4d07c975e18adda3560c441bb0c1f43 100644 (file)
@@ -1129,37 +1129,28 @@ static void prefs_folder_item_templates_create_widget_func(PrefsPage * page_,
        FolderItemTemplatesPage *page = (FolderItemTemplatesPage *) page_;
        FolderItem *item = (FolderItem *) data;
 
-       GtkWidget *table;
-       GtkWidget *label;
-       guint rowcount;
+       GtkWidget *notebook;
        GtkWidget *vbox;
-       GtkWidget *alignment;
+       GtkWidget *page_vbox;
        GtkWidget *new_msg_format_rec_checkbtn;
        GtkWidget *reply_format_rec_checkbtn;
        GtkWidget *forward_format_rec_checkbtn;
 
-       page->item         = item;
+       page->item = item;
 
-       /* Table */
-       table = gtk_table_new(5, 3, FALSE);
-       gtk_container_set_border_width (GTK_CONTAINER (table), VBOX_BORDER);
-       gtk_table_set_row_spacings(GTK_TABLE(table), 4);
-       gtk_table_set_col_spacings(GTK_TABLE(table), 4);
-       rowcount = 0;
-
-       /* Apply to subfolders */
-       label = gtk_label_new(_("Apply to\nsubfolders"));
-       gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5);
-       gtk_table_attach(GTK_TABLE(table), label, 2, 3,
-                        rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-       rowcount++;
+       page_vbox = gtk_vbox_new (FALSE, 0);
+       gtk_widget_show (page_vbox);
+       
+       /* Notebook */
+       notebook = gtk_notebook_new();
+       gtk_widget_show(notebook);
+       gtk_notebook_set_homogeneous_tabs(GTK_NOTEBOOK(notebook), TRUE);
+       gtk_box_pack_start(GTK_BOX(page_vbox), notebook, TRUE, TRUE, 0);
 
        /* compose format */
        vbox = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox), 0);
-       gtk_table_attach(GTK_TABLE(table), vbox, 1, 2, 
-                        rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox), VBOX_BORDER);
 
        quotefmt_create_new_msg_fmt_widgets(
                                window,
@@ -1170,25 +1161,15 @@ static void prefs_folder_item_templates_create_widget_func(PrefsPage * page_,
                                &page->compose_body_format,
                                FALSE);
 
-       vbox = gtk_vbox_new (FALSE, VSPACING);
-       gtk_widget_show (vbox);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox), 0);
-       gtk_table_attach(GTK_TABLE(table), vbox, 2, 3, 
-                        rowcount, rowcount + 1, GTK_SHRINK, GTK_FILL, 0, 0);
-
-       new_msg_format_rec_checkbtn = gtk_check_button_new();
-       gtk_box_pack_start (GTK_BOX(vbox), new_msg_format_rec_checkbtn, FALSE, FALSE, 0);
-       alignment = gtk_alignment_new(0, 1, 0, 0);      
-       gtk_box_pack_start (GTK_BOX(vbox), alignment, FALSE, FALSE, 0);
-
-       rowcount++;
+       new_msg_format_rec_checkbtn = gtk_check_button_new_with_label(
+                       _("Apply to subfolders"));
+       gtk_box_pack_end (GTK_BOX(vbox), new_msg_format_rec_checkbtn, FALSE, FALSE, 0);
+       gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, gtk_label_new(_("Compose")));
 
        /* reply format */
        vbox = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox), 0);
-       gtk_table_attach(GTK_TABLE(table), vbox, 1, 2, 
-                        rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox), VBOX_BORDER);
 
        quotefmt_create_reply_fmt_widgets(
                                window,
@@ -1199,25 +1180,15 @@ static void prefs_folder_item_templates_create_widget_func(PrefsPage * page_,
                                &page->reply_body_format,
                                FALSE);
 
-       vbox = gtk_vbox_new (FALSE, VSPACING);
-       gtk_widget_show (vbox);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox), 0);
-       gtk_table_attach(GTK_TABLE(table), vbox, 2, 3, 
-                        rowcount, rowcount + 1, GTK_SHRINK, GTK_FILL, 0, 0);
-
-       reply_format_rec_checkbtn = gtk_check_button_new();
-       gtk_box_pack_start (GTK_BOX(vbox), reply_format_rec_checkbtn, FALSE, FALSE, 0);
-       alignment = gtk_alignment_new(0, 1, 0, 0);      
-       gtk_box_pack_start (GTK_BOX(vbox), alignment, FALSE, FALSE, 0);
-
-       rowcount++;
+       reply_format_rec_checkbtn = gtk_check_button_new_with_label(
+                       _("Apply to subfolders"));
+       gtk_box_pack_end (GTK_BOX(vbox), reply_format_rec_checkbtn, FALSE, FALSE, 0);
+       gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, gtk_label_new(_("Reply")));
 
        /* forward format */
        vbox = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox), 0);
-       gtk_table_attach(GTK_TABLE(table), vbox, 1, 2, 
-                        rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox), VBOX_BORDER);
 
        quotefmt_create_forward_fmt_widgets(
                                window,
@@ -1228,28 +1199,13 @@ static void prefs_folder_item_templates_create_widget_func(PrefsPage * page_,
                                &page->forward_body_format,
                                FALSE);
 
-       vbox = gtk_vbox_new (FALSE, VSPACING);
-       gtk_widget_show (vbox);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox), 0);
-       gtk_table_attach(GTK_TABLE(table), vbox, 2, 3, 
-                        rowcount, rowcount + 1, GTK_SHRINK, GTK_FILL, 0, 0);
-
-       forward_format_rec_checkbtn = gtk_check_button_new();
-       gtk_box_pack_start (GTK_BOX(vbox), forward_format_rec_checkbtn, FALSE, FALSE, 0);
-       alignment = gtk_alignment_new(0, 1, 0, 0);      
-       gtk_box_pack_start (GTK_BOX(vbox), alignment, FALSE, FALSE, 0);
-
-       rowcount++;
+       forward_format_rec_checkbtn = gtk_check_button_new_with_label(
+                       _("Apply to subfolders"));
+       gtk_box_pack_end (GTK_BOX(vbox), forward_format_rec_checkbtn, FALSE, FALSE, 0);
+       gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, gtk_label_new(_("Forward")));
 
        /* information button */
-       vbox = gtk_vbox_new (FALSE, VSPACING);
-       gtk_widget_show (vbox);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox), 0);
-       gtk_table_attach(GTK_TABLE(table), vbox, 1, 2, 
-                        rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-       rowcount++;
-       quotefmt_add_info_button(window, vbox);
-
+       quotefmt_add_info_button(window, page_vbox);
 
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(page->checkbtn_compose_with_format),
                        item->prefs->compose_with_format);
@@ -1272,16 +1228,15 @@ static void prefs_folder_item_templates_create_widget_func(PrefsPage * page_,
        pref_set_textview_from_pref(GTK_TEXT_VIEW(page->forward_body_format),
                        item->prefs->forward_body_format);
 
-       gtk_widget_show_all(table);
+       gtk_widget_show_all(page_vbox);
 
        page->window = GTK_WIDGET(window);
-       page->table = table;
 
        page->new_msg_format_rec_checkbtn = new_msg_format_rec_checkbtn;
        page->reply_format_rec_checkbtn = reply_format_rec_checkbtn;
        page->forward_format_rec_checkbtn = forward_format_rec_checkbtn;
 
-       page->page.widget = table;
+       page->page.widget = page_vbox;
 }
 
 static void prefs_folder_item_templates_destroy_widget_func(PrefsPage *page_) 
index 7f823dd6bdb139de8750f02fc6de870904496d7f..2d1b8147c712e4449945305c285e939be2bfcc6e 100644 (file)
@@ -64,43 +64,61 @@ static void prefs_quote_create_widget(PrefsPage *_page, GtkWindow *window,
        QuotePage *prefs_quote = (QuotePage *) _page;
        
        GtkWidget *vbox;
+       GtkWidget *vbox2;
+       GtkWidget *notebook;
 
-       vbox = gtk_vbox_new (FALSE, VSPACING);
+       vbox = gtk_vbox_new (FALSE, 0);
        gtk_widget_show (vbox);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox), VBOX_BORDER);
 
-       /* new message */
+       notebook = gtk_notebook_new();
+       gtk_widget_show(notebook);
+       gtk_notebook_set_homogeneous_tabs(GTK_NOTEBOOK(notebook), TRUE);
+       gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
 
+       /* new message */
+       vbox2 = gtk_vbox_new (FALSE, VSPACING);
+       gtk_widget_show (vbox2);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox2), VBOX_BORDER);
+       
        quotefmt_create_new_msg_fmt_widgets(
                                window,
-                               vbox,
+                               vbox2,
                                &prefs_quote->checkbtn_compose_with_format,
                                _("New message format"),
                                &prefs_quote->entry_subject,
                                &prefs_quote->text_format,
                                FALSE);
+       gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(_("Compose")));
 
        /* reply */
-
+       vbox2 = gtk_vbox_new (FALSE, VSPACING);
+       gtk_widget_show (vbox2);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox2), VBOX_BORDER);
+       
        quotefmt_create_reply_fmt_widgets(
                                window,
-                               vbox,
+                               vbox2,
                                NULL,
                                NULL,
                                &prefs_quote->entry_quotemark,
                                &prefs_quote->text_quotefmt,
                                FALSE);
+       gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(_("Reply")));
 
        /* forward */
-
+       vbox2 = gtk_vbox_new (FALSE, VSPACING);
+       gtk_widget_show (vbox2);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox2), VBOX_BORDER);
+       
        quotefmt_create_forward_fmt_widgets(
                                window,
-                               vbox,
+                               vbox2,
                                NULL,
                                NULL,
                                &prefs_quote->entry_fw_quotemark,
                                &prefs_quote->text_fw_quotefmt,
                                FALSE);
+       gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(_("Forward")));
 
        /* info button */
 
index 70edd55c097d231b1fac98b9de1bd990e1504349..609011991cc951194e7840f7062eaf864120cb14 100644 (file)
@@ -144,7 +144,15 @@ void quotefmt_create_new_msg_fmt_widgets(GtkWindow *parent_window,
                PACK_CHECK_BUTTON (parent_box, checkbtn_use_format, 
                                   _("Use format when composing new messages"));
 
-       vbox_format = gtkut_get_options_frame(parent_box, &frame_format, checkbtn_compose_text);
+       frame_format = gtk_frame_new(checkbtn_compose_text);
+       gtk_widget_show(frame_format);
+       gtk_box_pack_start(GTK_BOX(parent_box), frame_format, TRUE, TRUE, 0);
+       gtk_frame_set_label_align(GTK_FRAME(frame_format), 0.01, 0.5);
+
+       vbox_format = gtk_vbox_new (FALSE, 4);
+       gtk_widget_show(vbox_format);
+       gtk_container_add(GTK_CONTAINER (frame_format), vbox_format);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox_format), 8);
 
        if (checkbtn_compose_with_format)
                SET_TOGGLE_SENSITIVITY(checkbtn_use_format, frame_format);
@@ -228,16 +236,19 @@ void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
        if (checkbtn_reply_with_format)
                PACK_CHECK_BUTTON (parent_box, checkbtn_use_format, checkbtn_reply_text);
 
-       PACK_FRAME (parent_box, frame_quote, _("Reply format"));
+       frame_quote = gtk_frame_new(checkbtn_reply_text);
+       gtk_widget_show(frame_quote);
+       gtk_box_pack_start(GTK_BOX(parent_box), frame_quote, TRUE, TRUE, 0);
+       gtk_frame_set_label_align(GTK_FRAME(frame_quote), 0.01, 0.5);
+
+       vbox_quote = gtk_vbox_new (FALSE, 4);
+       gtk_widget_show(vbox_quote);
+       gtk_container_add(GTK_CONTAINER (frame_quote), vbox_quote);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
 
        if (checkbtn_reply_with_format)
                SET_TOGGLE_SENSITIVITY(checkbtn_use_format, frame_quote);
 
-       vbox_quote = gtk_vbox_new (FALSE, VSPACING_NARROW);
-       gtk_widget_show (vbox_quote);
-       gtk_container_add (GTK_CONTAINER (frame_quote), vbox_quote);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
-
        hbox1 = gtk_hbox_new (FALSE, 32);
        gtk_widget_show (hbox1);
        gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, FALSE, FALSE, 0);
@@ -321,16 +332,19 @@ void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
        if (checkbtn_forward_with_format)
                PACK_CHECK_BUTTON (parent_box, checkbtn_use_format, checkbtn_forward_text);
 
-       PACK_FRAME (parent_box, frame_quote, _("Forward format"));
+       frame_quote = gtk_frame_new(checkbtn_forward_text);
+       gtk_widget_show(frame_quote);
+       gtk_box_pack_start(GTK_BOX(parent_box), frame_quote, TRUE, TRUE, 0);
+       gtk_frame_set_label_align(GTK_FRAME(frame_quote), 0.01, 0.5);
+
+       vbox_quote = gtk_vbox_new (FALSE, 4);
+       gtk_widget_show(vbox_quote);
+       gtk_container_add(GTK_CONTAINER (frame_quote), vbox_quote);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
 
        if (checkbtn_forward_with_format)
                SET_TOGGLE_SENSITIVITY(checkbtn_use_format, frame_quote);
 
-       vbox_quote = gtk_vbox_new (FALSE, VSPACING_NARROW);
-       gtk_widget_show (vbox_quote);
-       gtk_container_add (GTK_CONTAINER (frame_quote), vbox_quote);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
-
        hbox1 = gtk_hbox_new (FALSE, 32);
        gtk_widget_show (hbox1);
        gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, FALSE, FALSE, 0);
@@ -392,7 +406,8 @@ void quotefmt_add_info_button(GtkWindow *parent_window, GtkWidget *parent_box)
 
        hbox_formatdesc = gtk_hbox_new (FALSE, 32);
        gtk_widget_show (hbox_formatdesc);
-       gtk_box_pack_start (GTK_BOX (parent_box), hbox_formatdesc, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX (parent_box), hbox_formatdesc, FALSE, FALSE,
+                               VBOX_BORDER);
 
 #if GTK_CHECK_VERSION(2, 8, 0)
        btn_formatdesc = gtk_button_new_from_stock(GTK_STOCK_INFO);