2004-12-17 [martin] 0.9.13cvs17.2
authorMartin Schaaf <mascha@ma-scha.de>
Fri, 17 Dec 2004 14:52:39 +0000 (14:52 +0000)
committerMartin Schaaf <mascha@ma-scha.de>
Fri, 17 Dec 2004 14:52:39 +0000 (14:52 +0000)
* src/action.c
convert actions input to locale
* src/inc.c
convert notification command to locale
* src/plugins/pgpmime/select-keys.c
convert attributes to utf8

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/action.c
src/inc.c
src/plugins/pgpmime/select-keys.c

index 820fc32e65b7a663f55f03c3350050aababe94f6..2839916a032c57657884dea6876863b6a750b18f 100644 (file)
@@ -1,3 +1,12 @@
+2004-12-17 [martin]    0.9.13cvs17.2
+
+       * src/action.c
+               convert actions input to locale
+       * src/inc.c
+               convert notification command to locale
+       * src/plugins/pgpmime/select-keys.c
+               convert attributes to utf8
+
 2004-12-14 [colin]     0.9.13cvs17.1
 
        * ChangeLog
index 30a634120609a65780bc93e02b9922769fb7191b..d1370de336891e7207299a02284c58064f662cbc 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.3.2.14 -r 1.3.2.15 src/prefs_themes.c; cvs diff -u -r 1.274.2.25 -r 1.274.2.26 src/mainwindow.c; cvs diff -u -r 1.94.2.36 -r 1.94.2.37 src/messageview.c; ) > 0.9.13cvs12.1.patchset
 ( cvs diff -u -r 1.22.2.5 -r 1.22.2.6 src/quote_fmt_parse.y; ) > 0.9.13cvs14.1.patchset
 ( cvs diff -u -r 1.396.2.15 -r 1.396.2.16 ChangeLog; cvs diff -u -r 1.391.2.15 -r 1.391.2.16 ChangeLog.jp; cvs diff -u -r 1.2504.2.38 -r 1.2504.2.39 ChangeLog.claws; cvs diff -u -r 1.12.2.13 -r 1.12.2.14 src/action.c; cvs diff -u -r 1.36.2.17 -r 1.36.2.18 src/common/utils.c; cvs diff -u -r 1.12.2.10 -r 1.12.2.11 src/gtk/prefswindow.c; cvs diff -u -r 1.5.2.5 -r 1.5.2.6 src/gtk/gtkutils.c; cvs diff -u -r 1.4.2.4 -r 1.4.2.5 src/gtk/gtkutils.h; cvs diff -u -r 1.4.2.3 -r 1.4.2.4 src/plugins/spamassassin/libspamc.c; ) > 0.9.13cvs17.1.patchset
+( cvs diff -u -r 1.12.2.14 -r 1.12.2.15 src/action.c; cvs diff -u -r 1.149.2.17 -r 1.149.2.18 src/inc.c; cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/plugins/pgpmime/select-keys.c; ) > 0.9.13cvs17.2.patchset
index c9dce69880a1da068b88e92982027d5e27795cba..905a8128baec728ff55e2e1844e0feceb2db4424 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=17
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.1
+EXTRA_GTK2_VERSION=.2
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index 5ca04ad7241e9f9e9cb41d3dd7505b5f4a49727e..ee76fafbdaebcf576bbfc3be5f103b1e8862d6c8 100644 (file)
@@ -770,10 +770,11 @@ static ChildInfo *fork_child(gchar *cmd, const gchar *msg_str,
                             Children *children)
 {
        gint chld_in[2], chld_out[2], chld_err[2], chld_status[2];
-       gchar *cmdline[4];
+       gchar *cmdline[4], *ret_str;
        pid_t pid, gch_pid;
        ChildInfo *child_info;
        gint sync;
+       gssize by_written = 0, by_read = 0;
 
        sync = !(children->action_type & ACTION_ASYNC);
 
@@ -841,7 +842,14 @@ static ChildInfo *fork_child(gchar *cmd, const gchar *msg_str,
 
                        cmdline[0] = "sh";
                        cmdline[1] = "-c";
-                       cmdline[2] = cmd;
+                       ret_str = g_locale_from_utf8(cmd, strlen(cmd),
+                                                    &by_read, &by_written,
+                                                    NULL);
+                       if (ret_str && by_written) {
+                               cmdline[2] = ret_str;
+                               g_free(ret_str);
+                       } else
+                               cmdline[2] = cmd;
                        cmdline[3] = NULL;
                        execvp("/bin/sh", cmdline);
 
@@ -918,7 +926,13 @@ static ChildInfo *fork_child(gchar *cmd, const gchar *msg_str,
                return child_info;
 
        if ((children->action_type & ACTION_PIPE_IN) && msg_str) {
-               write(chld_in[1], msg_str, strlen(msg_str));
+               ret_str = g_locale_from_utf8(msg_str, strlen(msg_str),
+                                            &by_read, &by_written, NULL);
+               if (ret_str && by_written) {
+                       write(chld_in[1], ret_str, strlen(ret_str));
+                       g_free(ret_str);
+               } else
+                       write(chld_in[1], msg_str, strlen(msg_str));
                if (!(children->action_type &
                      (ACTION_USER_IN | ACTION_USER_HIDDEN_IN)))
                        close(chld_in[1]);
@@ -1270,8 +1284,9 @@ static void catch_input(gpointer data, gint source, GdkInputCondition cond)
 {
        Children *children = (Children *)data;
        ChildInfo *child_info = (ChildInfo *)children->list->data;
-       gchar *input;
+       gchar *input, *ret_str;
        gint c, count, len;
+       gssize by_read = 0, by_written = 0;
 
        debug_print("Sending input to grand child.\n");
        if (!(cond && GDK_INPUT_WRITE))
@@ -1282,6 +1297,13 @@ static void catch_input(gpointer data, gint source, GdkInputCondition cond)
 
        input = gtk_editable_get_chars(GTK_EDITABLE(children->input_entry),
                                       0, -1);
+       ret_str = g_locale_from_utf8(input, strlen(input), &by_read,
+                                    &by_written, NULL);
+       if (ret_str && by_written) {
+               g_free(input);
+               input = ret_str;
+       }
+
        len = strlen(input);
        count = 0;
 
index a91739192db01cf935d9bdf850014c36303a594b..2578da91cf5da05911865fe61c9793e4b3578a1d 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -1328,7 +1328,8 @@ static gpointer autocheck_data = NULL;
 static void inc_notify_cmd(gint new_msgs, gboolean notify)
 {
 
-       gchar *buf, *numpos;
+       gchar *buf, *numpos, *ret_str;
+       gssize by_read = 0, by_written = 0;
 
        if (!(new_msgs && notify && prefs_common.newmail_notify_cmd &&
            *prefs_common.newmail_notify_cmd))
@@ -1343,6 +1344,12 @@ static void inc_notify_cmd(gint new_msgs, gboolean notify)
                buf = buf2;
        }
 
+       ret_str = g_locale_from_utf8(buf, strlen(buf), &by_read, &by_written,
+                                    NULL);
+       if (ret_str && by_written) {
+               g_free(buf);
+               buf = ret_str;
+       }
        debug_print("executing new mail notification command: %s\n", buf);
        execute_command_line(buf, TRUE);
 
index 6621ea561650e398cd4035ff8051221fb8bb6533..35975b38358fe0936ae0f90827330b0e475d62c8 100644 (file)
@@ -171,6 +171,8 @@ set_row (GtkCList *clist, GpgmeKey key)
     const char *text[N_COL_TITLES];
     char *algo_buf;
     int row;
+    gssize by_read = 0, by_written = 0;
+    gchar *ret_str;
 
     /* first check whether the key is capable of encryption which is not
      * the case for revoked, expired or sign-only keys */
@@ -188,12 +190,24 @@ set_row (GtkCList *clist, GpgmeKey key)
     text[COL_KEYID] = s;
 
     s = gpgme_key_get_string_attr (key, GPGME_ATTR_NAME, NULL, 0);
+    ret_str = g_locale_to_utf8 (s, strlen(s), &by_read, &by_written, NULL);
+    if (ret_str && by_written) {
+        s = ret_str;
+    }
     text[COL_NAME] = s;
 
     s = gpgme_key_get_string_attr (key, GPGME_ATTR_EMAIL, NULL, 0);
+    ret_str = g_locale_to_utf8 (s, strlen(s), &by_read, &by_written, NULL);
+    if (ret_str && by_written) {
+        s = ret_str;
+    }
     text[COL_EMAIL] = s;
 
     s = gpgme_key_get_string_attr (key, GPGME_ATTR_VALIDITY, NULL, 0);
+    ret_str = g_locale_to_utf8 (s, strlen(s), &by_read, &by_written, NULL);
+    if (ret_str && by_written) {
+        s = ret_str;
+    }
     text[COL_VALIDITY] = s;
 
     row = gtk_clist_append (clist, (gchar**)text);