2006-04-25 [cleroy] 2.1.1cvs34
authorColin Leroy <colin@colino.net>
Tue, 25 Apr 2006 16:59:47 +0000 (16:59 +0000)
committerColin Leroy <colin@colino.net>
Tue, 25 Apr 2006 16:59:47 +0000 (16:59 +0000)
* src/compose.c
* src/gtk/gtkaspell.c
Fix crash on redirect (related to the return
of the aspell menu in compose's toolbar)
* src/image_viewer.c
* src/prefs_msg_colors.c
* src/gtk/pluginwindow.c
* src/gtk/prefswindow.c
Change released signals to clicked (Fabien)
* po/POTFILES.in
* src/common/socket.c
* src/plugins/spamassassin/spamassassin.c
Translate strings (Fabien)

12 files changed:
ChangeLog
PATCHSETS
configure.ac
po/POTFILES.in
src/common/socket.c
src/compose.c
src/gtk/gtkaspell.c
src/gtk/pluginwindow.c
src/gtk/prefswindow.c
src/image_viewer.c
src/plugins/spamassassin/spamassassin.c
src/prefs_msg_colors.c

index 442402a..5c54135 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2006-04-25 [cleroy]    2.1.1cvs34
+
+       * src/compose.c
+       * src/gtk/gtkaspell.c
+               Fix crash on redirect (related to the return 
+               of the aspell menu in compose's toolbar)
+       * src/image_viewer.c
+       * src/prefs_msg_colors.c
+       * src/gtk/pluginwindow.c
+       * src/gtk/prefswindow.c
+               Change released signals to clicked (Fabien)
+       * po/POTFILES.in
+       * src/common/socket.c
+       * src/plugins/spamassassin/spamassassin.c
+               Translate strings (Fabien)
+
 2006-04-25 [paul]      2.1.1cvs33
 
        * src/folder.c
index 783c0b0..77ae257 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.267 -r 1.382.2.268 src/compose.c;  ) > 2.1.1cvs31.patchset
 ( cvs diff -u -r 1.83.2.67 -r 1.83.2.68 src/mimeview.c;  cvs diff -u -r 1.101.2.23 -r 1.101.2.24 src/news.c;  cvs diff -u -r 1.395.2.193 -r 1.395.2.194 src/summaryview.c;  cvs diff -u -r 1.68.2.22 -r 1.68.2.23 src/summaryview.h;  ) > 2.1.1cvs32.patchset
 ( cvs diff -u -r 1.213.2.89 -r 1.213.2.90 src/folder.c;  cvs diff -u -r 1.87.2.26 -r 1.87.2.27 src/folder.h;  cvs diff -u -r 1.207.2.96 -r 1.207.2.97 src/folderview.c;  ) > 2.1.1cvs33.patchset
+( cvs diff -u -r 1.53.2.16 -r 1.53.2.17 po/POTFILES.in;  cvs diff -u -r 1.382.2.268 -r 1.382.2.269 src/compose.c;  cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/image_viewer.c;  cvs diff -u -r 1.1.2.23 -r 1.1.2.24 src/prefs_msg_colors.c;  cvs diff -u -r 1.13.2.20 -r 1.13.2.21 src/common/socket.c;  cvs diff -u -r 1.9.2.39 -r 1.9.2.40 src/gtk/gtkaspell.c;  cvs diff -u -r 1.5.2.29 -r 1.5.2.30 src/gtk/pluginwindow.c;  cvs diff -u -r 1.12.2.25 -r 1.12.2.26 src/gtk/prefswindow.c;  cvs diff -u -r 1.18.2.33 -r 1.18.2.34 src/plugins/spamassassin/spamassassin.c;  ) > 2.1.1cvs34.patchset
index 80db978..56afd7d 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=1
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=33
+EXTRA_VERSION=34
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 7520fad..b50f68c 100644 (file)
@@ -10,6 +10,7 @@ src/common/md5.c
 src/common/nntp.c
 src/common/plugin.c
 src/common/smtp.c
+src/common/socket.c
 src/common/ssl.c
 src/common/ssl_certificate.c
 src/common/string_match.c
index 63ec1ef..ad7dfea 100644 (file)
@@ -22,6 +22,8 @@
 #endif
 
 #include <glib.h>
+#include <glib/gi18n.h>
+
 #include <sys/time.h>
 #include <sys/types.h>
 #ifdef G_OS_WIN32
@@ -1327,7 +1329,7 @@ gint fd_write_all(gint fd, const gchar *buf, gint len)
                         n = write(fd, buf, len);
 
                if (n <= 0) {
-                       log_error("write on fd%d: %s\n", fd, strerror(errno));
+                       log_error(_("write on fd%d: %s\n"), fd, strerror(errno));
                        return -1;
                }
                len -= n;
index 717a30c..e7ca92c 100644 (file)
@@ -5575,6 +5575,9 @@ static void compose_spell_menu_changed(void *data)
        GtkItemFactory *ifactory = gtk_item_factory_from_widget(compose->menubar);
        GSList *spell_menu;
 
+       if (compose->gtkaspell == NULL)
+               return;
+
        parent_item = gtk_item_factory_get_item(ifactory, 
                        "/Spelling/Options");
 
index f22f8a0..1d87a7b 100644 (file)
@@ -2049,9 +2049,13 @@ static GSList *populate_submenu(GtkAspell *gtkaspell)
 {
        GtkWidget *item, *submenu;
        gchar *dictname;
-       GtkAspeller *gtkaspeller = gtkaspell->gtkaspeller;
+       GtkAspeller *gtkaspeller = NULL;
        GSList *list = NULL;
 
+       if (!gtkaspell)
+               return NULL;
+
+       gtkaspeller = gtkaspell->gtkaspeller;
        dictname = g_strdup_printf(_("Dictionary: %s"),
                                   gtkaspeller->dictionary->dictname);
        item = gtk_menu_item_new_with_label(dictname);
index 67381f7..2a9cae4 100644 (file)
@@ -363,11 +363,11 @@ void pluginwindow_create()
        gtk_widget_set_sensitive(GTK_WIDGET(unload_btn), FALSE);
 
 
-       g_signal_connect(G_OBJECT(load_btn), "released",
+       g_signal_connect(G_OBJECT(load_btn), "clicked",
                         G_CALLBACK(load_cb), pluginwindow);
-       g_signal_connect(G_OBJECT(unload_btn), "released",
+       g_signal_connect(G_OBJECT(unload_btn), "clicked",
                         G_CALLBACK(unload_cb), pluginwindow);
-       g_signal_connect(G_OBJECT(close_btn), "released",
+       g_signal_connect(G_OBJECT(close_btn), "clicked",
                         G_CALLBACK(close_cb), pluginwindow);
        g_signal_connect(G_OBJECT(window), "size_allocate",
                         G_CALLBACK(pluginwindow_size_allocate_cb), NULL);
index b4b3b04..c58794d 100644 (file)
@@ -129,7 +129,7 @@ static void close_all_pages(GSList *prefs_pages)
        }       
 }
 
-static void apply_button_released(GtkButton *button, gpointer user_data)
+static void apply_button_clicked(GtkButton *button, gpointer user_data)
 {
        PrefsWindow *prefswindow = (PrefsWindow *) user_data;
 
@@ -149,7 +149,7 @@ static void close_prefs_window(PrefsWindow *prefswindow)
        g_free(prefswindow);
 }
 
-static void ok_button_released(GtkButton *button, gpointer user_data)
+static void ok_button_clicked(GtkButton *button, gpointer user_data)
 {
        PrefsWindow *prefswindow = (PrefsWindow *) user_data;
 
@@ -159,7 +159,7 @@ static void ok_button_released(GtkButton *button, gpointer user_data)
        }               
 }
 
-static void cancel_button_released(GtkButton *button, gpointer user_data)
+static void cancel_button_clicked(GtkButton *button, gpointer user_data)
 {
        PrefsWindow *prefswindow = (PrefsWindow *) user_data;
 
@@ -182,7 +182,7 @@ static gboolean prefswindow_key_pressed(GtkWidget *widget, GdkEventKey *event,
        if (event) {
                switch (event->keyval) {
                        case GDK_Escape :
-                               cancel_button_released(NULL, data);
+                               cancel_button_clicked(NULL, data);
                                break;
                        case GDK_Return : 
                        case GDK_KP_Enter :
@@ -192,7 +192,7 @@ static gboolean prefswindow_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                 * and text (anything that accepts return) (can pass
                                 * NULL to any of the GTK_xxx() casts) */
                                if (!GTK_IS_TEXT_VIEW(focused_child))
-                                       ok_button_released(NULL, data);
+                                       ok_button_clicked(NULL, data);
                                break;
                        default:
                                break;
@@ -424,12 +424,12 @@ void prefswindow_open_full(const gchar *title, GSList *prefs_pages, gpointer dat
 
        gtk_table_attach(GTK_TABLE(prefswindow->table1), prefswindow->confirm_area, 0, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL, 2, 2);
 
-       g_signal_connect(G_OBJECT(prefswindow->ok_btn), "released", 
-                        G_CALLBACK(ok_button_released), prefswindow);
-       g_signal_connect(G_OBJECT(prefswindow->cancel_btn), "released", 
-                        G_CALLBACK(cancel_button_released), prefswindow);
-       g_signal_connect(G_OBJECT(prefswindow->apply_btn), "released", 
-                        G_CALLBACK(apply_button_released), prefswindow);
+       g_signal_connect(G_OBJECT(prefswindow->ok_btn), "clicked", 
+                        G_CALLBACK(ok_button_clicked), prefswindow);
+       g_signal_connect(G_OBJECT(prefswindow->cancel_btn), "clicked", 
+                        G_CALLBACK(cancel_button_clicked), prefswindow);
+       g_signal_connect(G_OBJECT(prefswindow->apply_btn), "clicked", 
+                        G_CALLBACK(apply_button_clicked), prefswindow);
        g_signal_connect(G_OBJECT(prefswindow->window), "delete_event", 
                         G_CALLBACK(window_closed), prefswindow);
        g_signal_connect(G_OBJECT(prefswindow->window), "key_press_event",
index 14369eb..b4a7c17 100644 (file)
@@ -363,7 +363,7 @@ MimeViewer *image_viewer_create(void)
 
        gtk_widget_ref(notebook);
 
-       g_signal_connect(G_OBJECT(load_button), "released",
+       g_signal_connect(G_OBJECT(load_button), "clicked",
                         G_CALLBACK(load_cb), imageviewer);
        g_signal_connect(G_OBJECT(scrolledwin), "button-press-event",
                         G_CALLBACK(scrolledwin_button_cb), imageviewer);
index 9ac5dcf..56c72c1 100644 (file)
@@ -149,7 +149,7 @@ static gboolean msg_is_spam(FILE *fp)
        }
 
        if (transport_setup(&trans, flags) != EX_OK) {
-               log_error("Spamassassin plugin couldn't connect to spamd.\n");
+               log_error(_("Spamassassin plugin couldn't connect to spamd.\n"));
                debug_print("failed to setup transport\n");
                return FALSE;
        }
@@ -189,7 +189,7 @@ static gboolean mail_filtering_hook(gpointer source, gpointer data)
 
        /* SPAMASSASSIN_DISABLED : keep test for compatibility purpose */
        if (!config.enable || config.transport == SPAMASSASSIN_DISABLED) {
-               log_error("Spamassassin plugin is disabled by its preferences.\n");
+               log_error(_("Spamassassin plugin is disabled by its preferences.\n"));
                return FALSE;
        }
        debug_print("Filtering message %d\n", msginfo->msgnum);
@@ -461,7 +461,7 @@ gint plugin_init(gchar **error)
        }
 
        if (!config.enable || config.transport == SPAMASSASSIN_DISABLED) {
-               log_error("Spamassassin plugin is loaded but disabled by its preferences.\n");
+               log_error(_("Spamassassin plugin is loaded but disabled by its preferences.\n"));
        }
        else {
                if (config.transport == SPAMASSASSIN_TRANSPORT_TCP)
index cc61aca..9d9343b 100644 (file)
@@ -274,6 +274,7 @@ void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
 
        hbox = gtk_hbox_new(FALSE, 8);
        gtk_widget_show (hbox);
+       SET_TOGGLE_SENSITIVITY(chkbtn_enable_colors, hbox);
        gtk_box_pack_start (GTK_BOX (vbox_quotebg), hbox, FALSE, TRUE, 0);
        
        color_buttons.btn_quote_level1_bg = gtk_button_new();
@@ -281,7 +282,7 @@ void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_widget_set_size_request (color_buttons.btn_quote_level1_bg, 30, 20);
        gtk_box_pack_start (GTK_BOX(hbox), color_buttons.btn_quote_level1_bg, 
                            FALSE, FALSE, 0);
-       SET_TOGGLE_SENSITIVITY(chkbtn_enable_colors, color_buttons.btn_quote_level1_bg);
+       SET_TOGGLE_SENSITIVITY(chkbtn_enable_bgcolors, color_buttons.btn_quote_level1_bg);
        tooltips = gtk_tooltips_new();
        gtk_tooltips_set_tip(tooltips, color_buttons.btn_quote_level1_bg,
                             _("Pick color for 1st level text background"), NULL);
@@ -290,10 +291,11 @@ void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_widget_show(label_quote_bgcolor1);
        gtk_box_pack_start (GTK_BOX(hbox), label_quote_bgcolor1, 
                            FALSE, FALSE, 0);
-       SET_TOGGLE_SENSITIVITY(chkbtn_enable_colors, label_quote_bgcolor1);
+       SET_TOGGLE_SENSITIVITY(chkbtn_enable_bgcolors, label_quote_bgcolor1);
 
        hbox = gtk_hbox_new(FALSE, 8);
        gtk_widget_show (hbox);
+       SET_TOGGLE_SENSITIVITY(chkbtn_enable_colors, hbox);
        gtk_box_pack_start (GTK_BOX (vbox_quotebg), hbox, FALSE, TRUE, 0);
        
        color_buttons.btn_quote_level2_bg = gtk_button_new();
@@ -301,7 +303,7 @@ void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_widget_set_size_request (color_buttons.btn_quote_level2_bg, 30, 20);
        gtk_box_pack_start (GTK_BOX(hbox), color_buttons.btn_quote_level2_bg, 
                            FALSE, FALSE, 0);
-       SET_TOGGLE_SENSITIVITY(chkbtn_enable_colors, color_buttons.btn_quote_level2_bg);
+       SET_TOGGLE_SENSITIVITY(chkbtn_enable_bgcolors, color_buttons.btn_quote_level2_bg);
        tooltips = gtk_tooltips_new();
        gtk_tooltips_set_tip(tooltips, color_buttons.btn_quote_level2_bg,
                             _("Pick color for 2nd level text background"), NULL);
@@ -310,10 +312,11 @@ void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_widget_show(label_quote_bgcolor2);
        gtk_box_pack_start (GTK_BOX(hbox), label_quote_bgcolor2, 
                            FALSE, FALSE, 0);
-       SET_TOGGLE_SENSITIVITY(chkbtn_enable_colors, label_quote_bgcolor2);
+       SET_TOGGLE_SENSITIVITY(chkbtn_enable_bgcolors, label_quote_bgcolor2);
 
        hbox = gtk_hbox_new(FALSE, 8);
        gtk_widget_show (hbox);
+       SET_TOGGLE_SENSITIVITY(chkbtn_enable_colors, hbox);
        gtk_box_pack_start (GTK_BOX (vbox_quotebg), hbox, FALSE, TRUE, 0);
        
        color_buttons.btn_quote_level3_bg = gtk_button_new();
@@ -321,7 +324,7 @@ void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_widget_set_size_request (color_buttons.btn_quote_level3_bg, 30, 20);
        gtk_box_pack_start (GTK_BOX(hbox), color_buttons.btn_quote_level3_bg, 
                            FALSE, FALSE, 0);
-       SET_TOGGLE_SENSITIVITY(chkbtn_enable_colors, color_buttons.btn_quote_level3_bg);
+       SET_TOGGLE_SENSITIVITY(chkbtn_enable_bgcolors, color_buttons.btn_quote_level3_bg);
        tooltips = gtk_tooltips_new();
        gtk_tooltips_set_tip(tooltips, color_buttons.btn_quote_level3_bg,
                             _("Pick color for 3rd level text background"), NULL);
@@ -330,7 +333,7 @@ void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_widget_show(label_quote_bgcolor3);
        gtk_box_pack_start (GTK_BOX(hbox), label_quote_bgcolor3, 
                            FALSE, FALSE, 0);
-       SET_TOGGLE_SENSITIVITY(chkbtn_enable_colors, label_quote_bgcolor3);
+       SET_TOGGLE_SENSITIVITY(chkbtn_enable_bgcolors, label_quote_bgcolor3);
 
        hbox = gtk_hbox_new(FALSE, 8);
        gtk_widget_show (hbox);