combine xmailer/xnewsreader header options into one, using generic term "user agent"
authorPaul <paul@claws-mail.org>
Wed, 5 Feb 2014 09:09:20 +0000 (09:09 +0000)
committerPaul <paul@claws-mail.org>
Wed, 5 Feb 2014 09:09:20 +0000 (09:09 +0000)
src/account.c
src/compose.c
src/prefs_account.c
src/prefs_account.h

index a5053e4..2d70e6d 100644 (file)
@@ -948,7 +948,6 @@ static void account_clone(GtkWidget *widget, gpointer data)
        /* send */
        ACP_FASSIGN(gen_msgid);
        ACP_FASSIGN(gen_xmailer);
-       ACP_FASSIGN(gen_xnewsreader);
        ACP_FASSIGN(add_customhdr);
        ACP_FASSIGN(use_smtp_auth);
        ACP_FASSIGN(smtp_auth_type);
index a3a6cf8..d9593c0 100644 (file)
@@ -6453,7 +6453,7 @@ static gchar *compose_get_header(Compose *compose)
                        gtk_major_version, gtk_minor_version, gtk_micro_version,
                        TARGET_ALIAS);
        }
-       if (compose->account->gen_xnewsreader &&
+       if (compose->account->gen_xmailer &&
            g_slist_length(compose->newsgroup_list) && !IS_IN_CUSTOM_HEADER("X-Newsreader")) {
                g_string_append_printf(header, "X-Newsreader: %s (GTK+ %d.%d.%d; %s)\n",
                        prog_version,
index c5f8ab9..f9232cd 100644 (file)
@@ -168,7 +168,6 @@ typedef struct SendPage
 
        GtkWidget *msgid_checkbtn;
        GtkWidget *xmailer_checkbtn;
-       GtkWidget *xnewsreader_checkbtn;
        GtkWidget *customhdr_checkbtn;
        GtkWidget *msgid_with_addr_checkbtn;
        GtkWidget *smtp_auth_checkbtn;
@@ -515,10 +514,6 @@ static PrefParam send_param[] = {
         &send_page.xmailer_checkbtn,
         prefs_set_data_from_toggle, prefs_set_toggle},
 
-       {"generate_xnewsreader", "TRUE", &tmp_ac_prefs.gen_xnewsreader, P_BOOL,
-        &send_page.xnewsreader_checkbtn,
-        prefs_set_data_from_toggle, prefs_set_toggle},
-
        {"add_custom_header", "FALSE", &tmp_ac_prefs.add_customhdr, P_BOOL,
         &send_page.customhdr_checkbtn,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -1671,7 +1666,6 @@ static void send_create_widget_func(PrefsPage * _page,
        GtkWidget *frame;
        GtkWidget *msgid_checkbtn;
        GtkWidget *xmailer_checkbtn;
-       GtkWidget *xnewsreader_checkbtn;
        GtkWidget *hbox;
        GtkWidget *customhdr_checkbtn;
        GtkWidget *customhdr_edit_btn;
@@ -1704,10 +1698,7 @@ static void send_create_widget_func(PrefsPage * _page,
                           _("Send account mail address in Message-ID"));
 
        PACK_CHECK_BUTTON (vbox2, xmailer_checkbtn,
-                          _("Generate X-Mailer header"));
-
-       PACK_CHECK_BUTTON (vbox2, xnewsreader_checkbtn,
-                          _("Generate X-Newsreader header"));
+                          _("Add user agent header"));
 
        hbox = gtk_hbox_new (FALSE, 12);
        gtk_widget_show (hbox);
@@ -1854,7 +1845,6 @@ static void send_create_widget_func(PrefsPage * _page,
        
        page->msgid_checkbtn     = msgid_checkbtn;
        page->xmailer_checkbtn   = xmailer_checkbtn;
-       page->xnewsreader_checkbtn   = xnewsreader_checkbtn;
        page->customhdr_checkbtn = customhdr_checkbtn;
        page->msgid_with_addr_checkbtn  = checkbtn_msgid_with_addr;
 
@@ -3957,13 +3947,8 @@ static void prefs_account_protocol_set_optmenu(PrefParam *pparam)
                        gtk_widget_hide(send_page.msgid_checkbtn);
                } else
                        gtk_widget_show(send_page.msgid_checkbtn);
-               if (protocol == A_NNTP) {
-                       gtk_widget_hide(send_page.xmailer_checkbtn);
-                       gtk_widget_show(send_page.xnewsreader_checkbtn);
-               } else {
-                       gtk_widget_show(send_page.xmailer_checkbtn);
-                       gtk_widget_hide(send_page.xnewsreader_checkbtn);                        
-               }
+
+               gtk_widget_show(send_page.xmailer_checkbtn);
        }
 }
 
@@ -4112,8 +4097,7 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
                gtk_widget_hide(protocol_optmenu->no_imap_warn_label);
 #endif
                gtk_widget_show(send_page.msgid_checkbtn);
-               gtk_widget_hide(send_page.xmailer_checkbtn);
-               gtk_widget_show(send_page.xnewsreader_checkbtn);
+               gtk_widget_show(send_page.xmailer_checkbtn);
                gtk_widget_show(basic_page.nntpserv_label);
                gtk_widget_show(basic_page.nntpserv_entry);
                gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
@@ -4214,7 +4198,6 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
        case A_LOCAL:
                gtk_widget_show(send_page.msgid_checkbtn);
                gtk_widget_show(send_page.xmailer_checkbtn);
-               gtk_widget_hide(send_page.xnewsreader_checkbtn);
                gtk_widget_hide(protocol_optmenu->no_imap_warn_icon);
                gtk_widget_hide(protocol_optmenu->no_imap_warn_label);
                gtk_widget_hide(basic_page.nntpserv_label);
@@ -4321,7 +4304,6 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
                                TRUE);
                gtk_widget_hide(send_page.msgid_checkbtn);
                gtk_widget_show(send_page.xmailer_checkbtn);
-               gtk_widget_hide(send_page.xnewsreader_checkbtn);
                gtk_widget_hide(basic_page.nntpserv_label);
                gtk_widget_hide(basic_page.nntpserv_entry);
                gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
@@ -4421,7 +4403,6 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
        case A_NONE:
                gtk_widget_show(send_page.msgid_checkbtn);
                gtk_widget_show(send_page.xmailer_checkbtn);
-               gtk_widget_hide(send_page.xnewsreader_checkbtn);
                gtk_widget_hide(protocol_optmenu->no_imap_warn_icon);
                gtk_widget_hide(protocol_optmenu->no_imap_warn_label);
                gtk_widget_hide(basic_page.nntpserv_label);
@@ -4519,7 +4500,6 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
        default:
                gtk_widget_show(send_page.msgid_checkbtn);
                gtk_widget_show(send_page.xmailer_checkbtn);
-               gtk_widget_hide(send_page.xnewsreader_checkbtn);
                gtk_widget_hide(protocol_optmenu->no_imap_warn_icon);
                gtk_widget_hide(protocol_optmenu->no_imap_warn_label);
                gtk_widget_hide(basic_page.nntpserv_label);
index 6bc27a9..40b9301 100644 (file)
@@ -110,7 +110,6 @@ struct _PrefsAccount
        /* Send */
        gboolean gen_msgid;
        gboolean gen_xmailer;
-       gboolean gen_xnewsreader;
        gboolean add_customhdr;
        gboolean use_smtp_auth;
        SMTPAuthType smtp_auth_type;