diff options
author | Not Zed <NotZed@Ximian.com> | 2001-03-15 14:56:17 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-03-15 14:56:17 +0800 |
commit | 2f95668944daf2989a58abcd1328458d35f4bfdb (patch) | |
tree | f5411246d103a8bd8fad2b5aa4abc93b4855ba57 | |
parent | e8fad70e9ff924c66434cab62775478617550476 (diff) | |
download | gsoc2013-evolution-2f95668944daf2989a58abcd1328458d35f4bfdb.tar gsoc2013-evolution-2f95668944daf2989a58abcd1328458d35f4bfdb.tar.gz gsoc2013-evolution-2f95668944daf2989a58abcd1328458d35f4bfdb.tar.bz2 gsoc2013-evolution-2f95668944daf2989a58abcd1328458d35f4bfdb.tar.lz gsoc2013-evolution-2f95668944daf2989a58abcd1328458d35f4bfdb.tar.xz gsoc2013-evolution-2f95668944daf2989a58abcd1328458d35f4bfdb.tar.zst gsoc2013-evolution-2f95668944daf2989a58abcd1328458d35f4bfdb.zip |
If we click on the edit menu, then bring up a rule editor. If the user
2001-03-15 Not Zed <NotZed@Ximian.com>
* e-filter-bar.c (menubar_activated): If we click on the edit
menu, then bring up a rule editor. If the user adds/removes rules
though, they are neither saved, nor added to the menu's. sigh.
svn path=/trunk/; revision=8730
-rw-r--r-- | widgets/misc/ChangeLog | 6 | ||||
-rw-r--r-- | widgets/misc/e-filter-bar.c | 26 |
2 files changed, 32 insertions, 0 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 6f104db461..b3c1f1e04e 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,9 @@ +2001-03-15 Not Zed <NotZed@Ximian.com> + + * e-filter-bar.c (menubar_activated): If we click on the edit + menu, then bring up a rule editor. If the user adds/removes rules + though, they are neither saved, nor added to the menu's. sigh. + 2001-03-04 Damon Chaplin <damon@ximian.com> * e-cell-date-edit.c: pretty much working now. diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c index 6679059963..709a0dc837 100644 --- a/widgets/misc/e-filter-bar.c +++ b/widgets/misc/e-filter-bar.c @@ -29,6 +29,7 @@ #include "e-dropdown-button.h" #include "e-filter-bar.h" +#include "filter/rule-editor.h" #include <gal/widgets/e-unicode.h> #include <gal/widgets/e-gui-utils.h> @@ -58,6 +59,21 @@ static void rule_editor_destroyed(GtkWidget *w, EFilterBar *efb) e_search_bar_set_menu_sensitive((ESearchBar *)efb, E_FILTERBAR_SAVE_ID, TRUE); } +/* FIXME: need to update the popup menu to match any edited rules, sigh */ +static void full_rule_editor_clicked(GtkWidget *w, int button, void *data) +{ + EFilterBar *efb = data; + + switch (button) { + case 0: + rule_context_save(efb->context, efb->userrules); + case 1: + default: + gnome_dialog_close((GnomeDialog *)w); + case -1: + } +} + static void rule_editor_clicked(GtkWidget *w, int button, void *data) { EFilterBar *efb = data; @@ -121,6 +137,16 @@ menubar_activated (ESearchBar *esb, int id, void *data) gtk_object_set((GtkObject *)esb, "text", NULL, NULL); gtk_widget_set_sensitive(esb->entry, TRUE); break; + case E_FILTERBAR_EDIT_ID: + if (!efb->save_dialogue) { + GnomeDialog *gd; + + gd = (GnomeDialog *)rule_editor_new(efb->context, FILTER_SOURCE_INCOMING); + gtk_signal_connect((GtkObject *)gd, "clicked", full_rule_editor_clicked, efb); + gtk_signal_connect((GtkObject *)gd, "destroy", rule_editor_destroyed, efb); + gtk_widget_show((GtkWidget *)gd); + } + break; case E_FILTERBAR_SAVE_ID: if (efb->current_query && !efb->save_dialogue) { GtkWidget *w; |