2008-06-25 [colin] 3.4.0cvs111
authorColin Leroy <colin@colino.net>
Wed, 25 Jun 2008 05:55:04 +0000 (05:55 +0000)
committerColin Leroy <colin@colino.net>
Wed, 25 Jun 2008 05:55:04 +0000 (05:55 +0000)
* src/gtk/gtkaspell.c
Fix non-UTF8 in the replace with dialog
* src/prefs_actions.c
Fix possible crasher
Patches by Pawel

ChangeLog
PATCHSETS
configure.ac
src/gtk/gtkaspell.c
src/prefs_actions.c

index 6229d80..51f27ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-06-25 [colin]     3.4.0cvs111
+
+       * src/gtk/gtkaspell.c
+               Fix non-UTF8 in the replace with dialog
+       * src/prefs_actions.c
+               Fix possible crasher
+               Patches by Pawel
+
 2008-06-24 [mones]     3.4.0cvs110
 
        * src/autofaces.c
index 886abe2..b02dea3 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.94.2.180 -r 1.94.2.181 src/messageview.c;  ) > 3.4.0cvs108.patchset
 ( cvs diff -u -r 1.395.2.370 -r 1.395.2.371 src/summaryview.c;  ) > 3.4.0cvs109.patchset
 ( cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/autofaces.c;  ) > 3.4.0cvs110.patchset
+( cvs diff -u -r 1.9.2.55 -r 1.9.2.56 src/gtk/gtkaspell.c;  cvs diff -u -r 1.60.2.57 -r 1.60.2.58 src/prefs_actions.c;  ) > 3.4.0cvs111.patchset
index 39a9fea..34aa84d 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=110
+EXTRA_VERSION=111
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index fd146df..cf7ca16 100644 (file)
@@ -1523,7 +1523,7 @@ static void replace_with_create_dialog_cb(GtkWidget *w, gpointer data)
        GtkWidget *cancel_button;
        GtkWidget *confirm_area;
        GtkWidget *icon;
-       gchar *thelabel;
+       gchar *utf8buf, *thelabel;
        gint xx, yy;
        GtkAspell *gtkaspell = (GtkAspell *) data;
 
@@ -1549,9 +1549,13 @@ static void replace_with_create_dialog_cb(GtkWidget *w, gpointer data)
        gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
                            FALSE, FALSE, 0);
 
+       utf8buf  = conv_codeset_strdup(gtkaspell->theword,
+                               conv_get_locale_charset_str(),
+                               CS_UTF_8);
+
        thelabel = g_strdup_printf(_("<span weight=\"bold\" "
                                        "size=\"larger\">Replace \"%s\" with: </span>"), 
-                                  gtkaspell->theword);
+                                  utf8buf);
        /* for title label */
        w_hbox = gtk_hbox_new(FALSE, 0);
        
@@ -1587,12 +1591,13 @@ static void replace_with_create_dialog_cb(GtkWidget *w, gpointer data)
        
        entry = gtk_entry_new();
        gtkaspell->replace_entry = entry;
-       gtk_entry_set_text(GTK_ENTRY(entry), gtkaspell->theword);
+       gtk_entry_set_text(GTK_ENTRY(entry), utf8buf);
        gtk_editable_select_region(GTK_EDITABLE(entry), 0, -1);
        g_signal_connect(G_OBJECT(dialog),
                        "key_press_event",
                        G_CALLBACK(replace_key_pressed), gtkaspell);
        gtk_box_pack_start(GTK_BOX(vbox), entry, FALSE, FALSE, 0);
+       g_free(utf8buf);  
 
        label = gtk_label_new(_("Holding down Control key while pressing "
                                "Enter\nwill learn from mistake.\n"));
index 1daf6b7..7483a32 100644 (file)
@@ -1264,7 +1264,7 @@ static void prefs_action_filterbtn_cb(GtkWidget *widget, gpointer data)
        action_str = gtk_editable_get_chars(GTK_EDITABLE(actions.cmd_entry), 0, -1);
        tokens = g_strsplit_set(action_str, "{}", 5);
 
-       if (tokens[1] && *tokens[1] != '\0') {
+       if (tokens[0] && tokens[1] && *tokens[1] != '\0') {
                action_list = matcher_parser_get_action_list(tokens[1]);
                if (action_list == NULL)
                        alertpanel_error(_("Action string is not valid."));