From: Tristan Chabredier Date: Fri, 16 Mar 2007 15:26:21 +0000 (+0000) Subject: 2007-03-16 [wwp] 2.8.1cvs19 X-Git-Tag: rel_2_9_0~86 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=bcd0621cc6786e5d9be70c48c73e3f48f040dcd8 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 --- diff --git a/ChangeLog b/ChangeLog index 4d94e3e69..324f19d53 100644 --- 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 diff --git a/PATCHSETS b/PATCHSETS index bd981ba1e..0cdaf13af 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -2435,3 +2435,4 @@ ( 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 diff --git a/configure.ac b/configure.ac index 07e0ed4f3..318fa4fe9 100644 --- a/configure.ac +++ b/configure.ac @@ -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= diff --git a/src/action.c b/src/action.c index 4798c3356..d807eecea 100644 --- a/src/action.c +++ b/src/action.c @@ -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");