compose stuff
authorHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Sun, 17 Jun 2001 02:43:41 +0000 (02:43 +0000)
committerHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Sun, 17 Jun 2001 02:43:41 +0000 (02:43 +0000)
ChangeLog.claws
src/compose.c
src/mainwindow.c
src/prefs_account.c

index ad14742..b4458a2 100644 (file)
@@ -1,3 +1,17 @@
+2001-06-17 [hoa]
+
+       * src/compose.c
+               Better interface for compose, displayed fields
+               are updated whenever we change account.
+               Newsgroups field is automatically filled.
+
+       * src/mainwindow.c
+               Newsgroups field is automatically filled.
+
+       * src/prefs_account.c
+               Some interface stuff when fields appear and
+               disappear.
+
 2001-06-16 [paul]
 
         0.4.99claws
index 1dbcba5..c9e9648 100644 (file)
@@ -240,6 +240,7 @@ static void toolbar_linewrap_cb             (GtkWidget      *widget,
 static void toolbar_address_cb         (GtkWidget      *widget,
                                         gpointer        data);
 
+static void select_account(Compose * compose, PrefsAccount * ac);
 static void account_activated          (GtkMenuItem    *menuitem,
                                         gpointer        data);
 
@@ -471,8 +472,13 @@ Compose * compose_new_with_recipient(PrefsAccount *account, const gchar *to)
                        gtk_widget_grab_focus(compose->subject_entry);
                } else
                        gtk_widget_grab_focus(compose->to_entry);
-       } else
-               gtk_widget_grab_focus(compose->newsgroups_entry);
+       } else {
+               if (to) {
+                       compose_entry_append(compose, to, COMPOSE_NEWSGROUPS);
+                       gtk_widget_grab_focus(compose->subject_entry);
+               } else
+                       gtk_widget_grab_focus(compose->newsgroups_entry);
+       }
 
        return compose;
 }
@@ -1925,7 +1931,7 @@ static gint compose_write_to_file(Compose *compose, const gchar *file,
                (compose, fp, out_codeset, encoding, is_draft) < 0) {
                g_warning(_("can't write headers\n"));
                fclose(fp);
-               unlink(file);
+               /* unlink(file); */
                g_free(buf);
                return -1;
        }
@@ -2715,18 +2721,25 @@ static Compose *compose_create(PrefsAccount *account)
        /* header labels and entries */
        compose_add_entry_field(table, &to_hbox, &to_entry, &count,
                                "To:", TRUE); 
+       gtk_table_set_row_spacing(GTK_TABLE(table), 0, 4);
        compose_add_entry_field(table, &newsgroups_hbox, &newsgroups_entry,
                                &count, "Newsgroups:", FALSE);
+       gtk_table_set_row_spacing(GTK_TABLE(table), 1, 4);
        compose_add_entry_field(table, &hbox, &subject_entry, &count,
                                "Subject:", FALSE);
+       gtk_table_set_row_spacing(GTK_TABLE(table), 2, 4);
        compose_add_entry_field(table, &cc_hbox, &cc_entry, &count,
                                "Cc:", TRUE);
+       gtk_table_set_row_spacing(GTK_TABLE(table), 3, 4);
        compose_add_entry_field(table, &bcc_hbox, &bcc_entry, &count,
                                "Bcc:", TRUE);
+       gtk_table_set_row_spacing(GTK_TABLE(table), 4, 4);
        compose_add_entry_field(table, &reply_hbox, &reply_entry, &count,
                                "Reply-To:", TRUE);
+       gtk_table_set_row_spacing(GTK_TABLE(table), 5, 4);
        compose_add_entry_field(table, &followup_hbox, &followup_entry, &count,
                                "Followup-To:", FALSE);
+       gtk_table_set_row_spacing(GTK_TABLE(table), 6, 4);
 
        gtk_table_set_col_spacings(GTK_TABLE(table), 4);
 
@@ -2909,17 +2922,7 @@ static Compose *compose_create(PrefsAccount *account)
        menu_set_sensitive(ifactory, "/Edit/Undo", FALSE);
        menu_set_sensitive(ifactory, "/Edit/Redo", FALSE);
 
-       gtk_widget_hide(bcc_hbox);
-       gtk_widget_hide(bcc_entry);
-       gtk_widget_hide(reply_hbox);
-       gtk_widget_hide(reply_entry);
-       gtk_widget_hide(followup_hbox);
-       gtk_widget_hide(followup_entry);
-       gtk_widget_hide(ruler_hbox);
-       gtk_table_set_row_spacing(GTK_TABLE(table), 4, 0);
-       gtk_table_set_row_spacing(GTK_TABLE(table), 5, 0);
-       gtk_table_set_row_spacing(GTK_TABLE(table), 6, 0);
-
+       /*
        if (account->protocol == A_NNTP) {
                gtk_widget_hide(to_hbox);
                gtk_widget_hide(to_entry);
@@ -2931,8 +2934,10 @@ static Compose *compose_create(PrefsAccount *account)
                gtk_widget_hide(newsgroups_hbox);
                gtk_widget_hide(newsgroups_entry);
                gtk_table_set_row_spacing(GTK_TABLE(table), 2, 0);
+
                menu_set_sensitive(ifactory, "/Message/Followup to", FALSE);
        }
+       */
 
        switch (prefs_common.toolbar_style) {
        case TOOLBAR_NONE:
@@ -3006,13 +3011,6 @@ static Compose *compose_create(PrefsAccount *account)
        compose->msgid       = NULL;
        compose->boundary    = NULL;
 
-       compose->use_to         = FALSE;
-       compose->use_cc         = FALSE;
-       compose->use_bcc        = FALSE;
-       compose->use_replyto    = FALSE;
-       compose->use_followupto = FALSE;
-       compose->use_attach     = FALSE;
-
 #if USE_GPGME
        compose->use_signing    = FALSE;
        compose->use_encryption = FALSE;
@@ -3032,6 +3030,7 @@ static Compose *compose_create(PrefsAccount *account)
 
        compose_set_title(compose);
 
+       /*
        if (account->protocol != A_NNTP) {
                menuitem = gtk_item_factory_get_item(ifactory, "/Message/To");
                gtk_check_menu_item_set_active
@@ -3042,12 +3041,14 @@ static Compose *compose_create(PrefsAccount *account)
                        (GTK_CHECK_MENU_ITEM(menuitem), TRUE);
                gtk_widget_set_sensitive(menuitem, FALSE);
        }
+       */
        if (account->set_autocc && account->auto_cc) {
                gtk_entry_set_text(GTK_ENTRY(cc_entry), account->auto_cc);
                menuitem = gtk_item_factory_get_item(ifactory, "/Message/Cc");
                gtk_check_menu_item_set_active
                        (GTK_CHECK_MENU_ITEM(menuitem), TRUE);
        }
+
        if (account->set_autobcc) {
                menuitem = gtk_item_factory_get_item(ifactory, "/Message/Bcc");
                gtk_check_menu_item_set_active
@@ -3083,6 +3084,29 @@ static Compose *compose_create(PrefsAccount *account)
 
        compose_list = g_list_append(compose_list, compose);
 
+       /*
+       compose->use_to         = FALSE;
+       compose->use_cc         = FALSE;
+       */
+       compose->use_attach     = FALSE;
+
+       compose->use_bcc        = FALSE;
+       compose->use_replyto    = FALSE;
+       compose->use_followupto = FALSE;
+       gtk_widget_hide(bcc_hbox);
+       gtk_widget_hide(bcc_entry);
+       gtk_widget_hide(reply_hbox);
+       gtk_widget_hide(reply_entry);
+       gtk_widget_hide(followup_hbox);
+       gtk_widget_hide(followup_entry);
+       gtk_widget_hide(ruler_hbox);
+       gtk_table_set_row_spacing(GTK_TABLE(table), 4, 0);
+       gtk_table_set_row_spacing(GTK_TABLE(table), 5, 0);
+       gtk_table_set_row_spacing(GTK_TABLE(table), 6, 0);
+
+
+       select_account(compose, account);
+
        return compose;
 }
 
@@ -3912,6 +3936,85 @@ static void toolbar_address_cb(GtkWidget *widget, gpointer data)
        compose_address_cb(data, 0, NULL);
 }
 
+static void select_account(Compose * compose, PrefsAccount * ac)
+{
+               compose->account = ac;
+               compose_set_title(compose);
+
+               if (ac->protocol == A_NNTP) {
+                       GtkItemFactory *ifactory;
+                       GtkWidget *menuitem;
+
+                       ifactory = gtk_item_factory_from_widget(compose->menubar);
+                       menu_set_sensitive(ifactory,
+                                          "/Message/Followup to", TRUE);
+
+                       gtk_widget_show(compose->newsgroups_hbox);
+                       gtk_widget_show(compose->newsgroups_entry);
+                       gtk_table_set_row_spacing(GTK_TABLE(compose->table),
+                                                 1, 4);
+
+                       compose->use_to = FALSE;
+                       compose->use_cc = FALSE;
+
+                       menuitem = gtk_item_factory_get_item(ifactory, "/Message/To");
+                       gtk_check_menu_item_set_active
+                               (GTK_CHECK_MENU_ITEM(menuitem), FALSE);
+                       menu_set_sensitive(ifactory,
+                                          "/Message/To", TRUE);
+                       menuitem = gtk_item_factory_get_item(ifactory, "/Message/Cc");
+                       gtk_check_menu_item_set_active
+                               (GTK_CHECK_MENU_ITEM(menuitem), FALSE);
+
+                       gtk_widget_hide(compose->to_hbox);
+                       gtk_widget_hide(compose->to_entry);
+                       gtk_widget_hide(compose->cc_hbox);
+                       gtk_widget_hide(compose->cc_entry);
+
+                       gtk_table_set_row_spacing(GTK_TABLE(compose->table),
+                                                 0, 0);
+                       gtk_table_set_row_spacing(GTK_TABLE(compose->table),
+                                                 3, 0);
+               }
+               else {
+                       GtkItemFactory *ifactory;
+                       GtkWidget *menuitem;
+
+                       ifactory = gtk_item_factory_from_widget(compose->menubar);
+                       menu_set_sensitive(ifactory,
+                                          "/Message/Followup to", FALSE);
+
+                       gtk_entry_set_text(GTK_ENTRY(compose->newsgroups_entry), "");
+                       gtk_widget_hide(compose->newsgroups_hbox);
+                       gtk_widget_hide(compose->newsgroups_entry);
+                       gtk_table_set_row_spacing(GTK_TABLE(compose->table),
+                                                 1, 0);
+
+                       compose->use_to = TRUE;
+                       compose->use_cc = TRUE;
+
+                       menuitem = gtk_item_factory_get_item(ifactory, "/Message/To");
+                       gtk_check_menu_item_set_active
+                               (GTK_CHECK_MENU_ITEM(menuitem), TRUE);
+                       menu_set_sensitive(ifactory,
+                                          "/Message/To", FALSE);
+                       menuitem = gtk_item_factory_get_item(ifactory, "/Message/Cc");
+                       gtk_check_menu_item_set_active
+                               (GTK_CHECK_MENU_ITEM(menuitem), TRUE);
+
+                       gtk_widget_show(compose->to_hbox);
+                       gtk_widget_show(compose->to_entry);
+                       gtk_widget_show(compose->cc_hbox);
+                       gtk_widget_show(compose->cc_entry);
+
+                       gtk_table_set_row_spacing(GTK_TABLE(compose->table),
+                                                 0, 4);
+                       gtk_table_set_row_spacing(GTK_TABLE(compose->table),
+                                                 3, 4);
+               }
+               gtk_widget_queue_resize(compose->table_vbox);
+}
+
 static void account_activated(GtkMenuItem *menuitem, gpointer data)
 {
        Compose *compose = (Compose *)data;
@@ -3921,10 +4024,8 @@ static void account_activated(GtkMenuItem *menuitem, gpointer data)
        ac = (PrefsAccount *)gtk_object_get_user_data(GTK_OBJECT(menuitem));
        g_return_if_fail(ac != NULL);
 
-       if (ac != compose->account) {
-               compose->account = ac;
-               compose_set_title(compose);
-       }
+       if (ac != compose->account)
+               select_account(compose, ac);
 }
 
 static void attach_selected(GtkCList *clist, gint row, gint column,
index d052487..1cc4f29 100644 (file)
@@ -1946,8 +1946,13 @@ static void send_queue_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
 
 static void compose_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
 {
-       if (mainwin->summaryview->folder_item)
-               compose_new(mainwin->summaryview->folder_item->folder->account);
+       if (mainwin->summaryview->folder_item) {
+               if (mainwin->summaryview->folder_item->folder->account != NULL
+                   && mainwin->summaryview->folder_item->folder->account->protocol == A_NNTP)
+                       compose_new_with_recipient(mainwin->summaryview->folder_item->folder->account, mainwin->summaryview->folder_item->path);
+               else
+                       compose_new(mainwin->summaryview->folder_item->folder->account);
+       }
        else
                compose_new(NULL);
 }
index b4fb9e0..8a3c6f3 100644 (file)
@@ -1398,28 +1398,39 @@ static void prefs_account_protocol_activated(GtkMenuItem *menuitem)
                gtk_widget_set_sensitive(basic.inbox_entry, FALSE);
                gtk_widget_show(basic.nntpserv_label);
                gtk_widget_show(basic.nntpserv_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          0, VSPACING_NARROW);
                gtk_widget_set_sensitive(basic.nntpauth_chkbtn, TRUE);
                gtk_widget_show(basic.nntpauth_chkbtn);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          1, VSPACING_NARROW);
                gtk_widget_hide(basic.recvserv_label);
                gtk_widget_hide(basic.recvserv_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          2, 0);
                gtk_widget_show(basic.smtpserv_label);
                gtk_widget_show(basic.smtpserv_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          4, VSPACING_NARROW);
                gtk_widget_hide(basic.localmbox_label);
                gtk_widget_hide(basic.localmbox_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          3, 0);
                gtk_widget_hide(basic.mailcmd_label);
                gtk_widget_hide(basic.mailcmd_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          6, 0);
                gtk_widget_hide(basic.mailcmd_chkbtn);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          5, 0);
                gtk_widget_show(basic.uid_label);
                gtk_widget_show(basic.pass_label);
-               gtk_widget_show(basic.uid_entry);
-               gtk_widget_show(basic.pass_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          7, VSPACING_NARROW);
 
                gtk_widget_set_sensitive(basic.uid_label,  TRUE);
                gtk_widget_set_sensitive(basic.pass_label, TRUE);
-               gtk_widget_set_sensitive(basic.uid_entry,  TRUE);
-               gtk_widget_set_sensitive(basic.pass_entry, TRUE);
 
-/*             gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table), 3, 0); */
                /* update userid/passwd sensitive state */
                prefs_account_nntpauth_toggled
                        (GTK_TOGGLE_BUTTON(basic.nntpauth_chkbtn), NULL);
@@ -1430,29 +1441,38 @@ static void prefs_account_protocol_activated(GtkMenuItem *menuitem)
                gtk_widget_set_sensitive(basic.inbox_entry, TRUE);
                gtk_widget_hide(basic.nntpserv_label);
                gtk_widget_hide(basic.nntpserv_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          0, 0);
                gtk_widget_set_sensitive(basic.nntpauth_chkbtn, FALSE);
                gtk_widget_hide(basic.nntpauth_chkbtn);
-               gtk_widget_set_sensitive(basic.recvserv_label, FALSE);
-               gtk_widget_set_sensitive(basic.recvserv_entry, FALSE);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          1, 0);
                gtk_widget_hide(basic.recvserv_label);
                gtk_widget_hide(basic.recvserv_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          2, 0);
                gtk_widget_show(basic.smtpserv_label);
                gtk_widget_show(basic.smtpserv_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          4, VSPACING_NARROW);
                gtk_widget_show(basic.localmbox_label);
                gtk_widget_show(basic.localmbox_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          3, VSPACING_NARROW);
                gtk_widget_show(basic.mailcmd_label);
                gtk_widget_show(basic.mailcmd_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          6, VSPACING_NARROW);
                gtk_widget_show(basic.mailcmd_chkbtn);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          5, VSPACING_NARROW);
                gtk_widget_hide(basic.uid_label);
                gtk_widget_hide(basic.pass_label);
-               gtk_widget_hide(basic.uid_entry);
-               gtk_widget_hide(basic.pass_entry);
-/*             gtk_table_set_row_spacing */
-/*                     (GTK_TABLE (basic.serv_table), 3, VSPACING_NARROW); */
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          7, 0);
+
                gtk_widget_set_sensitive(basic.uid_label,  TRUE);
                gtk_widget_set_sensitive(basic.pass_label, TRUE);
-               gtk_widget_set_sensitive(basic.uid_entry,  TRUE);
-               gtk_widget_set_sensitive(basic.pass_entry, TRUE);
                gtk_widget_set_sensitive(receive.pop3_frame, FALSE);
                prefs_account_mailcmd_toggled
                        (GTK_TOGGLE_BUTTON(basic.mailcmd_chkbtn), NULL);
@@ -1462,29 +1482,40 @@ static void prefs_account_protocol_activated(GtkMenuItem *menuitem)
                gtk_widget_set_sensitive(basic.inbox_entry, FALSE);
                gtk_widget_hide(basic.nntpserv_label);
                gtk_widget_hide(basic.nntpserv_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          0, 0);
                gtk_widget_set_sensitive(basic.nntpauth_chkbtn, FALSE);
                gtk_widget_hide(basic.nntpauth_chkbtn);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          1, 0);
                gtk_widget_set_sensitive(basic.recvserv_label, TRUE);
                gtk_widget_set_sensitive(basic.recvserv_entry, TRUE);
                gtk_widget_show(basic.recvserv_label);
                gtk_widget_show(basic.recvserv_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          2, VSPACING_NARROW);
                gtk_widget_show(basic.smtpserv_label);
                gtk_widget_show(basic.smtpserv_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          4, VSPACING_NARROW);
                gtk_widget_hide(basic.localmbox_label);
                gtk_widget_hide(basic.localmbox_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          3, 0);
                gtk_widget_hide(basic.mailcmd_label);
                gtk_widget_hide(basic.mailcmd_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          6, 0);
                gtk_widget_hide(basic.mailcmd_chkbtn);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          5, 0);
                gtk_widget_show(basic.uid_label);
                gtk_widget_show(basic.pass_label);
-               gtk_widget_show(basic.uid_entry);
-               gtk_widget_show(basic.pass_entry);
-/*             gtk_table_set_row_spacing */
-/*                     (GTK_TABLE (basic.serv_table), 3, VSPACING_NARROW); */
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          7, VSPACING_NARROW);
+
                gtk_widget_set_sensitive(basic.uid_label,  TRUE);
                gtk_widget_set_sensitive(basic.pass_label, TRUE);
-               gtk_widget_set_sensitive(basic.uid_entry,  TRUE);
-               gtk_widget_set_sensitive(basic.pass_entry, TRUE);
                gtk_widget_set_sensitive(receive.pop3_frame, FALSE);
                gtk_widget_set_sensitive(basic.smtpserv_entry, TRUE);
                gtk_widget_set_sensitive(basic.smtpserv_label, TRUE);
@@ -1493,32 +1524,42 @@ static void prefs_account_protocol_activated(GtkMenuItem *menuitem)
        default:
                gtk_widget_set_sensitive(basic.inbox_label, TRUE);
                gtk_widget_set_sensitive(basic.inbox_entry, TRUE);
-               gtk_widget_set_sensitive(basic.nntpauth_chkbtn, FALSE);
                gtk_widget_hide(basic.nntpserv_label);
                gtk_widget_hide(basic.nntpserv_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          0, 0);
                gtk_widget_set_sensitive(basic.nntpauth_chkbtn, FALSE);
                gtk_widget_hide(basic.nntpauth_chkbtn);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          1, 0);
                gtk_widget_set_sensitive(basic.recvserv_label, TRUE);
                gtk_widget_set_sensitive(basic.recvserv_entry, TRUE);
                gtk_widget_show(basic.recvserv_label);
                gtk_widget_show(basic.recvserv_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          2, VSPACING_NARROW);
                gtk_widget_show(basic.smtpserv_label);
                gtk_widget_show(basic.smtpserv_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          4, VSPACING_NARROW);
                gtk_widget_hide(basic.localmbox_label);
                gtk_widget_hide(basic.localmbox_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          3, 0);
                gtk_widget_hide(basic.mailcmd_label);
                gtk_widget_hide(basic.mailcmd_entry);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          6, 0);
                gtk_widget_hide(basic.mailcmd_chkbtn);
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          5, 0);
                gtk_widget_show(basic.uid_label);
                gtk_widget_show(basic.pass_label);
-               gtk_widget_show(basic.uid_entry);
-               gtk_widget_show(basic.pass_entry);
-/*             gtk_table_set_row_spacing */
-/*                     (GTK_TABLE (basic.serv_table), 3, VSPACING_NARROW); */
+               gtk_table_set_row_spacing (GTK_TABLE (basic.serv_table),
+                                          7, VSPACING_NARROW);
+
                gtk_widget_set_sensitive(basic.uid_label,  TRUE);
                gtk_widget_set_sensitive(basic.pass_label, TRUE);
-               gtk_widget_set_sensitive(basic.uid_entry,  TRUE);
-               gtk_widget_set_sensitive(basic.pass_entry, TRUE);
                gtk_widget_set_sensitive(receive.pop3_frame, TRUE);
                gtk_widget_set_sensitive(basic.smtpserv_entry, TRUE);
                gtk_widget_set_sensitive(basic.smtpserv_label, TRUE);
@@ -1553,8 +1594,6 @@ static void prefs_account_mailcmd_toggled(GtkToggleButton *button,
        gtk_widget_set_sensitive(basic.mailcmd_label, use_mailcmd);
        gtk_widget_set_sensitive(basic.smtpserv_entry, !use_mailcmd);
        gtk_widget_set_sensitive(basic.smtpserv_label, !use_mailcmd);
-       gtk_widget_set_sensitive(basic.uid_label,  !use_mailcmd);
-       gtk_widget_set_sensitive(basic.pass_label, !use_mailcmd);
        gtk_widget_set_sensitive(basic.uid_entry,  !use_mailcmd);
        gtk_widget_set_sensitive(basic.pass_entry, !use_mailcmd);
 }