2005-12-06 [paul] 1.9.100cvs69
authorPaul Mangan <paul@claws-mail.org>
Tue, 6 Dec 2005 11:50:24 +0000 (11:50 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 6 Dec 2005 11:50:24 +0000 (11:50 +0000)
* src/plugins/clamav/clamav_plugin_gtk.c
add another tooltip
* src/plugins/spamassassin/spamassassin_gtk.c
rework spamassassin_create_widget_func()

ChangeLog
PATCHSETS
configure.ac
src/plugins/clamav/clamav_plugin_gtk.c
src/plugins/spamassassin/spamassassin_gtk.c

index 297cda2..ba10324 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-12-06 [paul]      1.9.100cvs69
+
+       * src/plugins/clamav/clamav_plugin_gtk.c
+               add another tooltip
+       * src/plugins/spamassassin/spamassassin_gtk.c
+               rework spamassassin_create_widget_func()
+
 2005-12-05 [colin]     1.9.100cvs68
 
        * po/POTFILES.in
index 8594467..c869dfa 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.5.2.9 -r 1.5.2.10 src/plugins/dillo_viewer/dillo_prefs.c;  ) > 1.9.100cvs66.patchset
 ( cvs diff -u -r 1.382.2.200 -r 1.382.2.201 src/compose.c;  cvs diff -u -r 1.50.2.15 -r 1.50.2.16 src/compose.h;  ) > 1.9.100cvs67.patchset
 ( cvs diff -u -r 1.53.2.14 -r 1.53.2.15 po/POTFILES.in;  ) > 1.9.100cvs68.patchset
+( cvs diff -u -r 1.9.2.14 -r 1.9.2.15 src/plugins/clamav/clamav_plugin_gtk.c;  cvs diff -u -r 1.23.2.16 -r 1.23.2.17 src/plugins/spamassassin/spamassassin_gtk.c;  ) > 1.9.100cvs69.patchset
index fe97f48..16d2145 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=68
+EXTRA_VERSION=69
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index ac3c551..cb9a3cb 100644 (file)
@@ -81,6 +81,7 @@ static void clamav_create_widget_func(PrefsPage * _page, GtkWindow *window, gpoi
        GtkWidget *hbox1;
        GtkWidget *hbox2;
        GtkWidget *recv_infected;
+       GtkTooltips *recv_infected_tip;
        GtkWidget *save_folder;
        GtkWidget *save_folder_select;
        GtkTooltips *save_folder_tip;
@@ -124,11 +125,15 @@ static void clamav_create_widget_func(PrefsPage * _page, GtkWindow *window, gpoi
        gtk_widget_show (label2);
        gtk_box_pack_start (GTK_BOX (hbox1), label2, FALSE, FALSE, 0);
 
-       recv_infected = gtk_check_button_new_with_label(_("Save infected messages"));
+       recv_infected_tip = gtk_tooltips_new();
+       recv_infected = gtk_check_button_new_with_label(_("Save infected messages"));
        gtk_widget_show (recv_infected);
        gtk_table_attach (GTK_TABLE (table), recv_infected, 0, 1, 4, 5,
                          (GtkAttachOptions) (GTK_FILL),
                          (GtkAttachOptions) (0), 0, 0);
+       gtk_tooltips_set_tip(recv_infected_tip, recv_infected,
+                            _("Save mails that contain viruses"),
+                            NULL);
 
        hbox2 = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox2);
index 04644b3..d10807a 100644 (file)
@@ -67,8 +67,9 @@ struct Transport
 };
 
 enum {
-       PAGE_NETWORK = 0,
-       PAGE_UNIX    = 1,
+       PAGE_DISABLED = 0,
+       PAGE_NETWORK  = 1,
+       PAGE_UNIX     = 2,
 };
 
 enum {
@@ -76,7 +77,7 @@ enum {
 };
 
 struct Transport transports[] = {
-       { N_("Disabled"),       SPAMASSASSIN_DISABLED,                  PAGE_NETWORK, 0 },
+       { N_("Disabled"),       SPAMASSASSIN_DISABLED,                  PAGE_DISABLED, 0 },
        { N_("Localhost"),      SPAMASSASSIN_TRANSPORT_LOCALHOST,       PAGE_NETWORK, 0 },
        { N_("TCP"),            SPAMASSASSIN_TRANSPORT_TCP,             PAGE_NETWORK, NETWORK_HOSTNAME },
        { N_("Unix Socket"),    SPAMASSASSIN_TRANSPORT_UNIX,            PAGE_UNIX,    0 },
@@ -102,13 +103,41 @@ static void show_transport(struct SpamAssassinPage *page, struct Transport *tran
        page->trans = transport->transport;
 
        switch (transport->page) {
+       case PAGE_DISABLED:
+               gtk_widget_show(page->hostname);
+               gtk_widget_show(page->colon);
+               gtk_widget_show(page->port);
+               gtk_widget_hide(page->socket);
+               gtk_widget_set_sensitive(page->hostname, FALSE);
+               gtk_widget_set_sensitive(page->colon, FALSE);
+               gtk_widget_set_sensitive(page->port, FALSE);
+               gtk_widget_set_sensitive(page->max_size, FALSE);
+               gtk_widget_set_sensitive(page->timeout, FALSE);
+               break;
+       case PAGE_UNIX:
+               gtk_widget_hide(page->hostname);
+               gtk_widget_hide(page->colon);
+               gtk_widget_hide(page->port);
+               gtk_widget_show(page->socket);
+               gtk_widget_set_sensitive(page->socket, TRUE);
+               gtk_widget_set_sensitive(page->max_size, TRUE);
+               gtk_widget_set_sensitive(page->timeout, TRUE);
+               break;
        case PAGE_NETWORK:
+               gtk_widget_show(page->hostname);
+               gtk_widget_show(page->colon);
+               gtk_widget_show(page->port);
+               gtk_widget_hide(page->socket);
+               gtk_widget_set_sensitive(page->max_size, TRUE);
+               gtk_widget_set_sensitive(page->timeout, TRUE);
                if (transport->pageflags & NETWORK_HOSTNAME) {
-                       gtk_widget_show(page->hostname);
-                       gtk_widget_show(page->colon);
+                       gtk_widget_set_sensitive(page->hostname, TRUE);
+                       gtk_widget_set_sensitive(page->colon, TRUE);
+                       gtk_widget_set_sensitive(page->port, TRUE);
                } else {
-                       gtk_widget_hide(page->hostname);
-                       gtk_widget_hide(page->colon);
+                       gtk_widget_set_sensitive(page->hostname, FALSE);
+                       gtk_widget_set_sensitive(page->colon, FALSE);
+                       gtk_widget_set_sensitive(page->port, TRUE);
                }
                break;
        default:
@@ -134,10 +163,6 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
        SpamAssassinConfig *config;
        guint i, active;
 
-       /*
-        * BEGIN GLADE CODE
-        * DO NOT EDIT
-        */
        GtkWidget *table;
        GtkWidget *label3;
        GtkWidget *label4;
@@ -146,6 +171,7 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
        GtkWidget *transport_menu;
        GtkWidget *transport_notebook;
        GtkWidget *hbox1;
+       GtkWidget *spamd_hbox;
        GtkWidget *hostname;
        GtkWidget *colon;
        GtkObject *port_adj;
@@ -156,49 +182,38 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
        GtkObject *timeout_adj;
        GtkWidget *timeout;
        GtkWidget *label16;
-       GtkWidget *label9;
        GtkWidget *receive_spam;
        GtkWidget *hbox3;
        GtkObject *max_size_adj;
        GtkWidget *max_size;
        GtkWidget *label11;
-       GtkWidget *label8;
+       GtkWidget *hbox2;
        GtkWidget *save_folder;
-       GtkWidget *button4;
+       GtkWidget *save_folder_select;
        GtkWidget *label6;
        GtkTooltips *tooltips;
 
        tooltips = gtk_tooltips_new();
 
-       table = gtk_table_new(6, 3, FALSE);
+       table = gtk_table_new(8, 3, FALSE);
        gtk_widget_show(table);
        gtk_container_set_border_width(GTK_CONTAINER(table), 8);
        gtk_table_set_row_spacings(GTK_TABLE(table), 4);
        gtk_table_set_col_spacings(GTK_TABLE(table), 8);
 
-       label3 = gtk_label_new(_("Transport"));
-       gtk_widget_show(label3);
-       gtk_table_attach(GTK_TABLE(table), label3, 0, 1, 0, 1,
-                        (GtkAttachOptions) (GTK_FILL),
-                        (GtkAttachOptions) (0), 0, 0);
-       gtk_misc_set_alignment(GTK_MISC(label3), 0, 0.5);
-
-       label4 = gtk_label_new(_("spamd "));
-       gtk_widget_show(label4);
-       gtk_table_attach(GTK_TABLE(table), label4, 0, 1, 1, 2,
-                        (GtkAttachOptions) (GTK_FILL),
-                        (GtkAttachOptions) (0), 0, 0);
-       gtk_misc_set_alignment(GTK_MISC(label4), 0, 0.5);
-
-       hbox4 = gtk_hbox_new(FALSE, 0);
+       hbox4 = gtk_hbox_new(FALSE, 8);
        gtk_widget_show(hbox4);
-       gtk_table_attach(GTK_TABLE(table), hbox4, 1, 2, 0, 1,
+       gtk_table_attach(GTK_TABLE(table), hbox4, 0, 1, 0, 1,
                         (GtkAttachOptions) (GTK_FILL),
                         (GtkAttachOptions) (GTK_FILL), 0, 0);
 
+       label3 = gtk_label_new(_("Transport"));
+       gtk_widget_show(label3);
+       gtk_box_pack_start(GTK_BOX(hbox4), label3, FALSE, FALSE, 0);
+
        transport = gtk_option_menu_new();
        gtk_widget_show(transport);
-       gtk_box_pack_start(GTK_BOX(hbox4), transport, FALSE, FALSE, 0);
+       gtk_box_pack_end(GTK_BOX(hbox4), transport, FALSE, FALSE, 0);
        transport_menu = gtk_menu_new();
 
        transport_notebook = gtk_notebook_new();
@@ -212,146 +227,133 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
        gtk_notebook_set_show_border(GTK_NOTEBOOK(transport_notebook),
                                     FALSE);
 
-       hbox1 = gtk_hbox_new(FALSE, 0);
+       hbox1 = gtk_hbox_new(FALSE, 8);
        gtk_widget_show(hbox1);
        gtk_container_add(GTK_CONTAINER(transport_notebook), hbox1);
 
-       hostname = gtk_entry_new();
-       gtk_widget_show(hostname);
-       gtk_box_pack_start(GTK_BOX(hbox1), hostname, TRUE, TRUE, 0);
-       gtk_tooltips_set_tip(tooltips, hostname,
-                            _("Hostname or IP address of spamd server"),
-                            NULL);
+       spamd_hbox = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (spamd_hbox);
+       gtk_table_attach (GTK_TABLE (table), spamd_hbox, 0, 1, 1, 2,
+                         (GtkAttachOptions) (GTK_FILL),
+                         (GtkAttachOptions) (GTK_FILL), 0, 0);
 
-       colon = gtk_label_new(_(":"));
-       gtk_widget_show(colon);
-       gtk_box_pack_start(GTK_BOX(hbox1), colon, FALSE, FALSE, 0);
-       gtk_misc_set_padding(GTK_MISC(colon), 8, 0);
+       label4 = gtk_label_new(_("spamd"));
+       gtk_widget_show(label4);
+       gtk_box_pack_start(GTK_BOX(spamd_hbox), label4, FALSE, FALSE, 0);
 
        port_adj = gtk_adjustment_new(783, 1, 65535, 1, 10, 10);
        port = gtk_spin_button_new(GTK_ADJUSTMENT(port_adj), 1, 0);
        gtk_widget_show(port);
-       gtk_box_pack_end(GTK_BOX(hbox1), port, FALSE, TRUE, 0);
-       gtk_widget_set_size_request(port, 64, -2);
+       gtk_box_pack_end(GTK_BOX(spamd_hbox), port, FALSE, FALSE, 0);
        gtk_tooltips_set_tip(tooltips, port, _("Port of spamd server"),
                             NULL);
        gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(port), TRUE);
 
+       colon = gtk_label_new(_(":"));
+       gtk_widget_show(colon);
+       gtk_box_pack_end(GTK_BOX(spamd_hbox), colon, FALSE, FALSE, 0);
+
+       hostname = gtk_entry_new();
+       gtk_widget_show(hostname);
+       gtk_box_pack_end(GTK_BOX(spamd_hbox), hostname, FALSE, FALSE, 0);
+       gtk_tooltips_set_tip(tooltips, hostname,
+                            _("Hostname or IP address of spamd server"),
+                            NULL);
+
        socket = gtk_entry_new();
        gtk_widget_show(socket);
-       gtk_container_add(GTK_CONTAINER(transport_notebook), socket);
+       gtk_box_pack_end(GTK_BOX(spamd_hbox), socket, FALSE, FALSE, 0);
        gtk_tooltips_set_tip(tooltips, socket, _("Path of Unix socket"),
                             NULL);
 
-       label15 = gtk_label_new(_("Timeout"));
-       gtk_widget_show(label15);
-       gtk_table_attach(GTK_TABLE(table), label15, 0, 1, 5, 6,
+       hbox3 = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (hbox3);
+       gtk_table_attach (GTK_TABLE (table), hbox3, 0, 1, 2, 3,
+                         (GtkAttachOptions) (GTK_FILL),
+                         (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+       label6 = gtk_label_new(_("Maximum Size"));
+       gtk_widget_show(label6);
+       gtk_box_pack_start(GTK_BOX(hbox3), label6, FALSE, FALSE, 0);
+
+       max_size_adj = gtk_adjustment_new(250, 0, 10000, 10, 10, 10);
+       max_size = gtk_spin_button_new(GTK_ADJUSTMENT(max_size_adj), 1, 0);
+       gtk_widget_show(max_size);
+       gtk_box_pack_end(GTK_BOX(hbox3), max_size, FALSE, FALSE, 0);
+       gtk_tooltips_set_tip(tooltips, max_size,
+                       _("Maximum size a message is allowed to have to be checked"),
+                       NULL);
+       gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(max_size), TRUE);
+
+       label11 = gtk_label_new(_("kB"));
+       gtk_widget_show(label11);
+       gtk_table_attach(GTK_TABLE(table), label11, 1, 2, 2, 3,
                         (GtkAttachOptions) (GTK_FILL),
-                        (GtkAttachOptions) (0), 0, 0);
-       gtk_misc_set_alignment(GTK_MISC(label15), 0, 0.5);
+                        (GtkAttachOptions) (GTK_FILL), 0, 0);
 
-       hbox6 = gtk_hbox_new(FALSE, 0);
+       hbox6 = gtk_hbox_new(FALSE, 8);
        gtk_widget_show(hbox6);
-       gtk_table_attach(GTK_TABLE(table), hbox6, 1, 2, 5, 6,
+       gtk_table_attach(GTK_TABLE(table), hbox6, 0, 1, 3, 4,
                         (GtkAttachOptions) (GTK_FILL),
                         (GtkAttachOptions) (GTK_FILL), 0, 0);
 
+       label15 = gtk_label_new(_("Timeout"));
+       gtk_widget_show(label15);
+       gtk_box_pack_start(GTK_BOX(hbox6), label15, FALSE, FALSE, 0);
+
        timeout_adj = gtk_adjustment_new(60, 0, 10000, 10, 10, 10);
        timeout = gtk_spin_button_new(GTK_ADJUSTMENT(timeout_adj), 1, 0);
        gtk_widget_show(timeout);
-       gtk_box_pack_end(GTK_BOX(hbox6), timeout, FALSE, TRUE, 0);
-       gtk_widget_set_size_request(timeout, 64, -2);
+       gtk_box_pack_end(GTK_BOX(hbox6), timeout, FALSE, FALSE, 0);
        gtk_tooltips_set_tip(tooltips, timeout,
-                            _
-                            ("Time that is allowed for checking. If the check takes longer the check will be aborted and the message will be handled as not spam."),
-                            NULL);
+               _("Time that is allowed for checking. If the check takes longer the check will be aborted and the message will be handled as not spam."),
+               NULL);
        gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(timeout), TRUE);
 
        label16 = gtk_label_new(_("s"));
        gtk_widget_show(label16);
-       gtk_table_attach(GTK_TABLE(table), label16, 2, 3, 5, 6,
+       gtk_table_attach(GTK_TABLE(table), label16, 1, 2, 3, 4,
                         (GtkAttachOptions) (GTK_FILL),
-                        (GtkAttachOptions) (0), 0, 0);
-       gtk_misc_set_alignment(GTK_MISC(label16), 0, 0.5);
-
-       label9 = gtk_label_new(_("Save Spam"));
-       gtk_widget_show(label9);
-       gtk_table_attach(GTK_TABLE(table), label9, 0, 1, 2, 3,
-                        (GtkAttachOptions) (GTK_FILL),
-                        (GtkAttachOptions) (0), 0, 0);
-       gtk_misc_set_alignment(GTK_MISC(label9), 0, 0.5);
+                        (GtkAttachOptions) (GTK_FILL), 0, 0);
 
-       receive_spam = gtk_check_button_new_with_label("");
+       receive_spam = gtk_check_button_new_with_label(_("Save Spam"));
        gtk_widget_show(receive_spam);
-       gtk_table_attach(GTK_TABLE(table), receive_spam, 1, 2, 2, 3,
-                        (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+       gtk_table_attach(GTK_TABLE(table), receive_spam, 0, 1, 4, 5,
+                        (GtkAttachOptions) (GTK_FILL),
                         (GtkAttachOptions) (0), 0, 0);
        gtk_tooltips_set_tip(tooltips, receive_spam,
-                            _
-                            ("Save mails that where identified as spam to a folder"),
-                            NULL);
-
-       hbox3 = gtk_hbox_new(FALSE, 0);
-       gtk_widget_show(hbox3);
-       gtk_table_attach(GTK_TABLE(table), hbox3, 1, 2, 4, 5,
-                        (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                        (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-       max_size_adj = gtk_adjustment_new(250, 0, 10000, 10, 10, 10);
-       max_size = gtk_spin_button_new(GTK_ADJUSTMENT(max_size_adj), 1, 0);
-       gtk_widget_show(max_size);
-       gtk_box_pack_end(GTK_BOX(hbox3), max_size, FALSE, TRUE, 0);
-       gtk_widget_set_size_request(max_size, 64, -2);
-       gtk_tooltips_set_tip(tooltips, max_size,
-                            _
-                            ("Maximum size a message is allowed to have to be checked"),
+                            _("Save mails that where identified as spam"),
                             NULL);
-       gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(max_size), TRUE);
 
-       label11 = gtk_label_new(_("kB"));
-       gtk_widget_show(label11);
-       gtk_table_attach(GTK_TABLE(table), label11, 2, 3, 4, 5,
-                        (GtkAttachOptions) (GTK_FILL),
-                        (GtkAttachOptions) (0), 0, 0);
-       gtk_misc_set_alignment(GTK_MISC(label11), 0, 0.5);
+       hbox2 = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (hbox2);
+       gtk_table_attach (GTK_TABLE (table), hbox2, 0, 1, 5, 6,
+                         (GtkAttachOptions) (GTK_FILL),
+                         (GtkAttachOptions) (GTK_FILL), 0, 0);
+       SET_TOGGLE_SENSITIVITY (receive_spam, hbox2);
 
-       label8 = gtk_label_new(_("Save Folder"));
-       gtk_widget_show(label8);
-       gtk_table_attach(GTK_TABLE(table), label8, 0, 1, 3, 4,
-                        (GtkAttachOptions) (GTK_FILL),
-                        (GtkAttachOptions) (0), 0, 0);
-       gtk_label_set_justify(GTK_LABEL(label8), GTK_JUSTIFY_LEFT);
-       gtk_misc_set_alignment(GTK_MISC(label8), 0, 0.5);
+       label3 = gtk_label_new (_("Save folder"));
+       gtk_widget_show (label3);
+       gtk_box_pack_start (GTK_BOX (hbox2), label3, FALSE, FALSE, 0);
 
-       save_folder = gtk_entry_new();
-       gtk_widget_show(save_folder);
-       gtk_table_attach(GTK_TABLE(table), save_folder, 1, 2, 3, 4,
-                        (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                        (GtkAttachOptions) (0), 0, 0);
+       tooltips = gtk_tooltips_new();
+       save_folder = gtk_entry_new ();
+       gtk_widget_show (save_folder);
+       gtk_box_pack_start (GTK_BOX (hbox2), save_folder, TRUE, FALSE, 0);
        gtk_tooltips_set_tip(tooltips, save_folder,
-                            _
-                            ("Folder that will be used to save spam. Leave empty to use the default trash folder"),
+                            _("Leave empty to use the default trash folder"),
                             NULL);
 
-       button4 = gtkut_get_browse_directory_btn(_("_Browse"));
-       gtk_widget_show(button4);
-       gtk_table_attach(GTK_TABLE(table), button4, 2, 3, 3, 4,
-                        (GtkAttachOptions) (GTK_SHRINK | GTK_FILL),
-                        (GtkAttachOptions) (0), 0, 0);
-
-       label6 = gtk_label_new(_("Maximum Size"));
-       gtk_widget_show(label6);
-       gtk_table_attach(GTK_TABLE(table), label6, 0, 1, 4, 5,
-                        (GtkAttachOptions) (GTK_FILL),
-                        (GtkAttachOptions) (0), 0, 0);
-       gtk_misc_set_alignment(GTK_MISC(label6), 0, 0.5);
-       /*
-        * END GLADE CODE
-        */
+       save_folder_select = gtkut_get_browse_directory_btn(_("_Browse"));
+       gtk_widget_show (save_folder_select);
+       gtk_box_pack_end (GTK_BOX (hbox2), save_folder_select, FALSE, FALSE, 0);
+       gtk_tooltips_set_tip(tooltips, save_folder_select,
+                            _("Leave empty to use the default trash folder"),
+                            NULL);
 
        config = spamassassin_get_config();
 
-       g_signal_connect(G_OBJECT(button4), "released", 
+       g_signal_connect(G_OBJECT(save_folder_select), "released",
                         G_CALLBACK(foldersel_cb), page);
 
        if (config->hostname != NULL)