2007-03-16 [wwp] 2.8.1cvs19
authorTristan Chabredier <wwp@claws-mail.org>
Fri, 16 Mar 2007 15:26:21 +0000 (15:26 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Fri, 16 Mar 2007 15:26:21 +0000 (15:26 +0000)
* src/action.c
Fix logics issues around the action IO dialog:
- disable entry widget and exec button when
  the exec button is clicked (don't wait for any
  output line) - fix possible disabling/re-enabling/
  re-disabling of those widgets
- raise an error if executing a %as{} action either
  empty or invalid, instead of failing silently
- don't close the dialog if the abort button has been
  clicked and if there was no output yet
- set focus to the abort button when the exec button
  is clicked
- fix capitalization of a warning message

ChangeLog
PATCHSETS
configure.ac
src/action.c

index 4d94e3e69fb8018bd49104e14e70da46a8eeabce..324f19d53172b66b41a966a37bff47e31a0d4b68 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2007-03-16 [wwp]       2.8.1cvs19
+
+       * src/action.c
+               Fix logics issues around the action IO dialog:
+               - disable entry widget and exec button when
+                 the exec button is clicked (don't wait for any
+                 output line) - fix possible disabling/re-enabling/
+                 re-disabling of those widgets
+               - raise an error if executing a %as{} action either
+                 empty or invalid, instead of failing silently
+               - don't close the dialog if the abort button has been
+                 clicked and if there was no output yet
+               - set focus to the abort button when the exec button
+                 is clicked
+               - fix capitalization of a warning message
+
 2007-03-16 [wwp]       2.8.1cvs18
 
        * tools/mairix.sh
index bd981ba1e65a8a416cd65328b2ab42dc16d902d2..0cdaf13afc0e33ea1a50cdfaf97f2dbb842fdb23 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.8.2.5 -r 1.8.2.6 .cvsignore;  ) > 2.8.1cvs16.patchset
 ( cvs diff -u -r 1.94.2.125 -r 1.94.2.126 src/messageview.c;  cvs diff -u -r 1.20.2.19 -r 1.20.2.20 src/mimeview.h;  ) > 2.8.1cvs17.patchset
 ( diff -u /dev/null tools/mairix.sh;  ) > 2.8.1cvs18.patchset
+( cvs diff -u -r 1.12.2.42 -r 1.12.2.43 src/action.c;  ) > 2.8.1cvs19.patchset
index 07e0ed4f392a259eb17544624d4d62cc59b38b9a..318fa4fe95ba4893c1cc2388ce66816ab65d8426 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=18
+EXTRA_VERSION=19
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 4798c33568452166475843e00e2858533723e0d9..d807eecea39fd235d9d966689f8437d632afa89c 100644 (file)
@@ -607,13 +607,23 @@ static gboolean execute_filtering_actions(gchar *action, GSList *msglist)
        action_string = g_strndup(sbegin, send - sbegin);
        
        action_list = matcher_parser_get_action_list(action_string);
+       if (action_list == NULL) {
+               gchar *tmp = g_strdup(action_string);
+
+               g_strstrip(tmp);
+               if (*tmp == '\0')
+                       alertpanel_error(_("There is no filtering action set"));
+               else
+                       alertpanel_error(_("Invalid filtering action(s):\n%s"), tmp);
+               g_free(action_string);
+               g_free(tmp);
+               return FALSE;
+       }
        g_free(action_string);
-       if (action_list == NULL) return FALSE;
        
        /* apply actions on each message info */
        for (p = msglist; p && p->data; p = g_slist_next(p)) {
                filteringaction_apply_action_list(action_list, (MsgInfo *) p->data);
-               
        }
 
        if (summaryview) {
@@ -912,7 +922,7 @@ static ChildInfo *fork_child(gchar *cmd, const gchar *msg_str,
                                close(chld_err[1]);
                                close(chld_status[0]);
 
-                               debug_print("Child: Waiting for grandchild\n");
+                               debug_print("Child: waiting for grandchild\n");
                                waitpid(gch_pid, NULL, 0);
                                debug_print("Child: grandchild ended\n");
                                write(chld_status[1], "0\n", 2);
@@ -1030,11 +1040,8 @@ static gint wait_for_children(Children *children)
        if (children->nb)
                return FALSE;
 
-       if (!children->dialog) {
+       if (!children->dialog)
                free_children(children);
-       } else if (!children->output) {
-               gtk_widget_destroy(children->dialog);
-       }
 
        return FALSE;
 }
@@ -1047,7 +1054,6 @@ static void send_input(GtkWidget *w, gpointer data)
        child_info->tag_in = gdk_input_add(child_info->chld_in,
                                           GDK_INPUT_WRITE,
                                           catch_input, children);
-       gtk_widget_set_sensitive(children->input_hbox, FALSE);
 }
 
 static gint delete_io_dialog_cb(GtkWidget *w, GdkEvent *e, gpointer data)
@@ -1402,6 +1408,9 @@ static void catch_input(gpointer data, gint source, GdkInputCondition cond)
        if (!(cond && GDK_INPUT_WRITE))
                return;
 
+       gtk_widget_set_sensitive(children->input_hbox, FALSE);
+       gtk_widget_grab_focus(children->abort_btn);
+
        gdk_input_remove(child_info->tag_in);
        child_info->tag_in = -1;
 
@@ -1428,8 +1437,6 @@ static void catch_input(gpointer data, gint source, GdkInputCondition cond)
 
        g_free(input);
 
-       gtk_entry_set_text(GTK_ENTRY(children->input_entry), "");
-       gtk_widget_set_sensitive(children->input_hbox, TRUE);
        close(child_info->chld_in);
        child_info->chld_in = -1;
        debug_print("Input to grand child sent.\n");