2011-01-06 [pawel] 3.7.8cvs33
authorPaweł Pękala <c0rn@gazeta.pl>
Thu, 6 Jan 2011 21:50:00 +0000 (21:50 +0000)
committerPaweł Pękala <c0rn@gazeta.pl>
Thu, 6 Jan 2011 21:50:00 +0000 (21:50 +0000)
* src/prefs_account.c
* src/prefs_folder_item.c
* src/prefs_quote.c
* src/quote_fmt.c
Make quote templates widgets more compact

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

index 38398e0..e461132 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-01-06 [pawel]     3.7.8cvs33
+
+       * src/prefs_account.c
+       * src/prefs_folder_item.c
+       * src/prefs_quote.c
+       * src/quote_fmt.c
+               Make quote templates widgets more compact
+
 2011-01-06 [pawel]     3.7.8cvs32
 
        * src/plugins/trayicon/trayicon.c
index ffedcc7..744baa0 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.94.2.211 -r 1.94.2.212 src/messageview.c;  cvs diff -u -r 1.9.2.71 -r 1.9.2.72 src/gtk/gtkaspell.c;  cvs diff -u -r 1.1.2.46 -r 1.1.2.47 src/plugins/pgpinline/pgpinline.c;  ) > 3.7.8cvs30.patchset
 ( cvs diff -u -r 1.6.10.23 -r 1.6.10.24 src/addrharvest.c;  cvs diff -u -r 1.65.2.70 -r 1.65.2.71 src/codeconv.c;  cvs diff -u -r 1.15.2.24 -r 1.15.2.25 src/codeconv.h;  cvs diff -u -r 1.382.2.565 -r 1.382.2.566 src/compose.c;  cvs diff -u -r 1.101.2.62 -r 1.101.2.63 src/news.c;  cvs diff -u -r 1.47.2.52 -r 1.47.2.53 src/procheader.c;  cvs diff -u -r 1.49.2.135 -r 1.49.2.136 src/procmime.c;  cvs diff -u -r 1.8.2.16 -r 1.8.2.17 src/unmime.c;  cvs diff -u -r 1.2.10.7 -r 1.2.10.8 src/unmime.h;  ) > 3.7.8cvs31.patchset
 ( cvs diff -u -r 1.14.2.74 -r 1.14.2.75 src/plugins/trayicon/trayicon.c;  ) > 3.7.8cvs32.patchset
+( cvs diff -u -r 1.105.2.161 -r 1.105.2.162 src/prefs_account.c;  cvs diff -u -r 1.52.2.79 -r 1.52.2.80 src/prefs_folder_item.c;  cvs diff -u -r 1.1.2.32 -r 1.1.2.33 src/prefs_quote.c;  cvs diff -u -r 1.8.2.42 -r 1.8.2.43 src/quote_fmt.c;  ) > 3.7.8cvs33.patchset
index 8d11af6..bb96dda 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=32
+EXTRA_VERSION=33
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index db7ff30..2605725 100644 (file)
@@ -2116,7 +2116,7 @@ static void templates_create_widget_func(PrefsPage * _page,
                                NULL,
                                &page->compose_subject_format,
                                &page->compose_body_format,
-                               FALSE, NULL);
+                               TRUE, NULL);
        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(_("Compose")));
 
        /* reply format */      
@@ -2131,7 +2131,7 @@ static void templates_create_widget_func(PrefsPage * _page,
                                NULL,
                                &page->reply_quotemark,
                                &page->reply_body_format,
-                               FALSE, NULL);
+                               TRUE, NULL);
        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(_("Reply")));
 
        /* forward format */    
@@ -2146,11 +2146,9 @@ static void templates_create_widget_func(PrefsPage * _page,
                                NULL,
                                &page->forward_quotemark,
                                &page->forward_body_format,
-                               FALSE, NULL);
+                               TRUE, NULL);
        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(_("Forward")));
 
-       quotefmt_add_info_button(window, vbox);
-
        tmp_ac_prefs = *ac_prefs;
 
        if (new_account) {
index ad00a2a..092e3c4 100644 (file)
@@ -1332,6 +1332,7 @@ static void prefs_folder_item_templates_create_widget_func(PrefsPage * page_,
        GtkWidget *new_msg_format_rec_checkbtn;
        GtkWidget *reply_format_rec_checkbtn;
        GtkWidget *forward_format_rec_checkbtn;
+       GtkWidget *hbox;
 
        page->item = item;
 
@@ -1370,9 +1371,13 @@ static void prefs_folder_item_templates_create_widget_func(PrefsPage * page_,
        address_completion_register_entry(GTK_ENTRY(page->compose_override_from_format),
                        TRUE);
 
+       hbox = gtk_hbox_new (FALSE, 0);
+       gtk_box_pack_end (GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
+       quotefmt_add_info_button(window, hbox);
+       
        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_box_pack_end (GTK_BOX(hbox), new_msg_format_rec_checkbtn, FALSE, FALSE, 0);
        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, gtk_label_new(_("Compose")));
 
        /* reply format */
@@ -1391,9 +1396,13 @@ static void prefs_folder_item_templates_create_widget_func(PrefsPage * page_,
        address_completion_register_entry(GTK_ENTRY(page->reply_override_from_format),
                        TRUE);
 
+       hbox = gtk_hbox_new (FALSE, 0);
+       gtk_box_pack_end (GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
+       quotefmt_add_info_button(window, hbox);
+
        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_box_pack_end (GTK_BOX(hbox), reply_format_rec_checkbtn, FALSE, FALSE, 0);
        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, gtk_label_new(_("Reply")));
 
        /* forward format */
@@ -1412,14 +1421,15 @@ static void prefs_folder_item_templates_create_widget_func(PrefsPage * page_,
        address_completion_register_entry(GTK_ENTRY(page->forward_override_from_format),
                        TRUE);
 
+       hbox = gtk_hbox_new (FALSE, 0);
+       gtk_box_pack_end (GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
+       quotefmt_add_info_button(window, hbox);
+
        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_box_pack_end (GTK_BOX(hbox), forward_format_rec_checkbtn, FALSE, FALSE, 0);
        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, gtk_label_new(_("Forward")));
 
-       /* information button */
-       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);
        pref_set_entry_from_pref(GTK_ENTRY(page->compose_override_from_format),
index 5338f81..dc69513 100644 (file)
@@ -114,7 +114,7 @@ static void prefs_quote_create_widget(PrefsPage *_page, GtkWindow *window,
                                NULL,
                                &prefs_quote->entry_subject,
                                &prefs_quote->text_format,
-                               FALSE, prefs_quote_set_default_new_msg_fmt);
+                               TRUE, prefs_quote_set_default_new_msg_fmt);
        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(_("Compose")));
 
        /* reply */
@@ -129,7 +129,7 @@ static void prefs_quote_create_widget(PrefsPage *_page, GtkWindow *window,
                                NULL,
                                &prefs_quote->entry_quotemark,
                                &prefs_quote->text_quotefmt,
-                               FALSE, prefs_quote_set_default_reply_fmt);
+                               TRUE, prefs_quote_set_default_reply_fmt);
        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(_("Reply")));
 
        /* forward */
@@ -144,12 +144,9 @@ static void prefs_quote_create_widget(PrefsPage *_page, GtkWindow *window,
                                NULL,
                                &prefs_quote->entry_fw_quotemark,
                                &prefs_quote->text_fw_quotefmt,
-                               FALSE, prefs_quote_set_default_forward_fmt);
+                               TRUE, prefs_quote_set_default_forward_fmt);
        gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(_("Forward")));
 
-       /* info button */
-       quotefmt_add_info_button(window, vbox);
-
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(prefs_quote->checkbtn_compose_with_format),
                        prefs_common.compose_with_format);
        pref_set_entry_from_pref(GTK_ENTRY(prefs_quote->entry_subject),
index 2b0677c..7b31c6e 100644 (file)
@@ -116,6 +116,24 @@ void quote_fmt_quote_description(GtkWidget *widget, GtkWidget *pref_window)
        description_window_create(&quote_desc_win);
 }
 
+static void quote_fmt_add_buttons(GtkWindow* parent_window, GtkWidget *parent_box,
+                       gboolean add_info_button, void(*set_defaults_func)(void)) {
+       GtkWidget *hbox_btns;
+       
+       if (!add_info_button && !set_defaults_func)
+               return;
+       
+       hbox_btns = gtk_hbox_new(FALSE, 0);
+       gtk_box_pack_end (GTK_BOX(parent_box), hbox_btns, FALSE, TRUE, 0);      
+
+       if (add_info_button)
+               quotefmt_add_info_button(parent_window, hbox_btns);
+       if (set_defaults_func)
+               quotefmt_add_defaults_button(parent_window, hbox_btns, set_defaults_func);
+
+       gtk_widget_show(GTK_WIDGET(hbox_btns));
+}
+
 void quotefmt_create_new_msg_fmt_widgets(GtkWindow *parent_window,
                                                GtkWidget *parent_box,
                                                GtkWidget **checkbtn_compose_with_format,
@@ -230,10 +248,8 @@ void quotefmt_create_new_msg_fmt_widgets(GtkWindow *parent_window,
                SET_TOGGLE_SENSITIVITY(checkbtn_use_format, text_format);
        }
 
-       if (add_info_button)
-               quotefmt_add_info_button(parent_window, vbox_format);
-       if (set_defaults_func)
-               quotefmt_add_defaults_button(parent_window, vbox_format, set_defaults_func);
+       quote_fmt_add_buttons(parent_window, vbox_format,
+                               add_info_button, set_defaults_func);
 
        if (checkbtn_compose_with_format)
                *checkbtn_compose_with_format = checkbtn_use_format;
@@ -362,10 +378,8 @@ void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
                SET_TOGGLE_SENSITIVITY(checkbtn_use_format, text_quotefmt);
        }
 
-       if (add_info_button)
-               quotefmt_add_info_button(parent_window, vbox_quote);
-       if (set_defaults_func)
-               quotefmt_add_defaults_button(parent_window, vbox_quote, set_defaults_func);
+       quote_fmt_add_buttons(parent_window, vbox_quote,
+                               add_info_button, set_defaults_func);
 
        if (checkbtn_reply_with_format)
                *checkbtn_reply_with_format = checkbtn_use_format;
@@ -496,10 +510,8 @@ void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
                SET_TOGGLE_SENSITIVITY(checkbtn_use_format, text_fw_quotefmt);
        }
 
-       if (add_info_button)
-               quotefmt_add_info_button(parent_window, vbox_quote);
-       if (set_defaults_func)
-               quotefmt_add_defaults_button(parent_window, vbox_quote, set_defaults_func);
+       quote_fmt_add_buttons(parent_window, vbox_quote,
+                               add_info_button, set_defaults_func);
 
        if (checkbtn_forward_with_format)
                *checkbtn_forward_with_format = checkbtn_use_format;
@@ -511,17 +523,11 @@ void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
 
 void quotefmt_add_info_button(GtkWindow *parent_window, GtkWidget *parent_box)
 {
-       GtkWidget *hbox_formatdesc;
        GtkWidget *btn_formatdesc;
 
-       hbox_formatdesc = gtk_hbox_new (FALSE, 32);
-       gtk_widget_show (hbox_formatdesc);
-       gtk_box_pack_start (GTK_BOX (parent_box), hbox_formatdesc, FALSE, FALSE,
-                               VBOX_BORDER);
-
        btn_formatdesc = gtk_button_new_from_stock(GTK_STOCK_INFO);
        gtk_widget_show (btn_formatdesc);
-       gtk_box_pack_start (GTK_BOX (hbox_formatdesc), btn_formatdesc, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX (parent_box), btn_formatdesc, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(btn_formatdesc), "clicked",
                         G_CALLBACK(quote_fmt_quote_description), GTK_WIDGET(parent_window));
 }
@@ -530,21 +536,15 @@ void quotefmt_add_defaults_button(GtkWindow *parent_window,
                                                                  GtkWidget *parent_box,
                                                                  void(*set_defaults_func)(void))
 {
-       GtkWidget *hbox_formatdesc;
        GtkWidget *btn_formatdesc;
 
        cm_return_if_fail(set_defaults_func != NULL);
 
-       hbox_formatdesc = gtk_hbox_new (FALSE, 32);
-       gtk_widget_show (hbox_formatdesc);
-       gtk_box_pack_start (GTK_BOX (parent_box), hbox_formatdesc, FALSE, FALSE,
-                               VBOX_BORDER);
-
        btn_formatdesc = gtk_button_new_with_mnemonic (_("Defaults"));
        gtk_button_set_image (GTK_BUTTON(btn_formatdesc),
                gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_BUTTON));
        gtk_widget_show (btn_formatdesc);
-       gtk_box_pack_start (GTK_BOX (hbox_formatdesc), btn_formatdesc, FALSE, FALSE, 0);
+       gtk_box_pack_end (GTK_BOX (parent_box), btn_formatdesc, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(btn_formatdesc), "clicked",
                         G_CALLBACK(set_defaults_func), GTK_WIDGET(parent_window));
 }