aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-01-18 14:34:27 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-18 14:34:27 +0800
commit04656c360e73801ff0cb7eab6c3bc104cb755e4d (patch)
tree415216aceb4f6e1a65a880e75ecc2e0d5368ec7e
parentdd1454293b3592aaacb56859ddfa63832255c88d (diff)
downloadgsoc2013-evolution-04656c360e73801ff0cb7eab6c3bc104cb755e4d.tar.gz
gsoc2013-evolution-04656c360e73801ff0cb7eab6c3bc104cb755e4d.tar.zst
gsoc2013-evolution-04656c360e73801ff0cb7eab6c3bc104cb755e4d.zip
Er, don't set the button insensitive if there is *1* action, set it
2001-01-18 Jeffrey Stedfast <fejj@ximian.com> * filter-filter.c (less_parts): Er, don't set the button insensitive if there is *1* action, set it insensitive if there are less than or equal to *1* actions. Doh! (more_parts): Only set the remove button sensitive if there is more than 1 action. (get_widget): Here too. svn path=/trunk/; revision=7616
-rw-r--r--filter/ChangeLog9
-rw-r--r--filter/filter-filter.c10
2 files changed, 15 insertions, 4 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog
index abce136c7b..656a9043ff 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,3 +1,12 @@
+2001-01-18 Jeffrey Stedfast <fejj@ximian.com>
+
+ * filter-filter.c (less_parts): Er, don't set the button
+ insensitive if there is *1* action, set it insensitive if there
+ are less than or equal to *1* actions. Doh!
+ (more_parts): Only set the remove button sensitive if there is
+ more than 1 action.
+ (get_widget): Here too.
+
2001-01-16 Jason Leach <jasonleach@usa.net>
* e-search-bar.[ch]: Moved ESearchBar to $(toplevel)/widgets/misc,
diff --git a/filter/filter-filter.c b/filter/filter-filter.c
index 88c8c76a02..bcd92d8534 100644
--- a/filter/filter-filter.c
+++ b/filter/filter-filter.c
@@ -355,7 +355,7 @@ less_parts (GtkWidget *button, struct _rule_data *data)
gtk_container_remove (GTK_CONTAINER (data->parts), w);
/* if there's only 1 action, we can't remove anymore so set insensitive */
- if (g_list_length (((FilterFilter *)data->fr)->actions) == 1)
+ if (g_list_length (((FilterFilter *)data->fr)->actions) <= 1)
gtk_widget_set_sensitive (button, FALSE);
}
@@ -375,8 +375,10 @@ more_parts (GtkWidget *button, struct _rule_data *data)
}
/* set the "Remove action" button sensitive */
- w = gtk_object_get_data (GTK_OBJECT (button), "remove");
- gtk_widget_set_sensitive (w, TRUE);
+ if (g_list_length (((FilterFilter *)data->fr)->actions) > 1) {
+ w = gtk_object_get_data (GTK_OBJECT (button), "remove");
+ gtk_widget_set_sensitive (w, TRUE);
+ }
}
static GtkWidget *
@@ -424,7 +426,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
gtk_box_pack_start (GTK_BOX (hbox), remove, FALSE, FALSE, 3);
/* if we only have 1 action, then we can't remove any more so disable this */
- if (g_list_length (ff->actions) == 1)
+ if (g_list_length (ff->actions) <= 1)
gtk_widget_set_sensitive (remove, FALSE);
gtk_box_pack_start (GTK_BOX (inframe), hbox, FALSE, FALSE, 3);