From f19c736318cfb048e157556e04efe1f1a2f2e348 Mon Sep 17 00:00:00 2001 From: Alfons Hoogervorst Date: Sun, 14 Sep 2003 15:29:05 +0000 Subject: [PATCH] * src/prefs_filtering_action.c o add proper message if empty execute command line o don't select first action item after registering a new action to prevent (what seems to be a GTK) bug #36, "filtering will only accept one action change per invocation". --- ChangeLog.claws | 9 +++++++++ configure.ac | 2 +- src/prefs_filtering_action.c | 15 +++++++++++---- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index e53070056..914edb87a 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,12 @@ +2003-04-14 [alfons] 0.9.5claws13 + + * src/prefs_filtering_action.c + o add proper message if empty execute command line + o don't select first action item after registering a + new action to prevent (what seems to be a GTK) bug + #36, "filtering will only accept one action change + per invocation". + 2003-04-14 [alfons] 0.9.5claws12 * src/prefs_filtering.c diff --git a/configure.ac b/configure.ac index bb9ed6ebb..e0fc6eb13 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=5 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=12 +EXTRA_VERSION=13 if test $EXTRA_VERSION -eq 0; then VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws else diff --git a/src/prefs_filtering_action.c b/src/prefs_filtering_action.c index aada4d75d..7c0818c84 100644 --- a/src/prefs_filtering_action.c +++ b/src/prefs_filtering_action.c @@ -159,7 +159,7 @@ static gint get_sel_from_list(GtkList *list) void * sel; GList * child; - if (list->selection == NULL) + if (list->selection == NULL) return -1; sel = list->selection->data; @@ -729,7 +729,9 @@ static FilteringAction * prefs_filtering_action_dialog_to_action(gboolean alert) destination = gtk_entry_get_text(GTK_ENTRY(filtering_action.dest_entry)); if (*destination == '\0') { if (alert) - alertpanel_error(_("Destination is not set.")); + alertpanel_error(action_id == ACTION_EXECUTE + ? _("Command line not set") + : _("Destination is not set.")); return NULL; } break; @@ -772,8 +774,13 @@ static void prefs_filtering_action_register_cb(void) prefs_filtering_action_clist_set_row(-1, action); filteringaction_free(action); - - prefs_filtering_action_reset_dialog(); + /* presumably gtk_list_select_item(), called by + * prefs_filtering_action_reset_dialog() activates + * what seems to be a bug. this causes any other + * list items to be unselectable */ + /* prefs_filtering_action_reset_dialog(); */ + gtk_list_select_item(GTK_LIST(filtering_action.account_list), 0); + gtk_entry_set_text(GTK_ENTRY(filtering_action.dest_entry), ""); prefs_filtering_action_update_hscrollbar(); } -- 2.25.1