diff options
author | 8 <NotZed@Ximian.com> | 2001-10-28 14:20:33 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-10-28 14:20:33 +0800 |
commit | 3a3fa91ac32ebbee54e7f335379564e587513dcb (patch) | |
tree | 42af838f84bb19eb4646dc4fa47812490a481a49 /filter/rule-editor.h | |
parent | 2fb3703a51b3da5b833fe9a77b0bdc7778ef7876 (diff) | |
download | gsoc2013-evolution-3a3fa91ac32ebbee54e7f335379564e587513dcb.tar gsoc2013-evolution-3a3fa91ac32ebbee54e7f335379564e587513dcb.tar.gz gsoc2013-evolution-3a3fa91ac32ebbee54e7f335379564e587513dcb.tar.bz2 gsoc2013-evolution-3a3fa91ac32ebbee54e7f335379564e587513dcb.tar.lz gsoc2013-evolution-3a3fa91ac32ebbee54e7f335379564e587513dcb.tar.xz gsoc2013-evolution-3a3fa91ac32ebbee54e7f335379564e587513dcb.tar.zst gsoc2013-evolution-3a3fa91ac32ebbee54e7f335379564e587513dcb.zip |
Add undo for move. (rule_editor_add_undo): Add extra rank item.
2001-10-28 <NotZed@Ximian.com>
* rule-editor.c (rule_move): Add undo for move.
(rule_editor_add_undo): Add extra rank item.
(rule_editor_play_undo): handle rank case.
(rule_editor_finalise): Clean up any hanging over undo log.
(editor_clicked): Only enable 'undo' if we have
EVOLUTION_RULE_UNDO enabled. Code still a bit flakey.
(rule_editor_construct): Only enable a cancel button if
EVOLUTION_RULE_UNDO is set.
* filter-rule.c (filter_rule_set_name): Emit a changed event if it
changes.
(filter_rule_set_source): Same.
2001-10-26 <NotZed@Ximian.com>
* rule-context.c (rule_context_find_rank_rule): Find a rule at a
specific rank/source.
* rule-editor.c (add_editor_clicked): Log the added object.
(rule_editor_add_undo): New function to add an undo record to the
rule editor.
(edit_editor_clicked): Log the changed object.
(rule_delete): Add undo object.
(rule_editor_play_undo): Play an undo log back.
svn path=/trunk/; revision=14281
Diffstat (limited to 'filter/rule-editor.h')
-rw-r--r-- | filter/rule-editor.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/filter/rule-editor.h b/filter/rule-editor.h index b981a61b65..f054023c87 100644 --- a/filter/rule-editor.h +++ b/filter/rule-editor.h @@ -30,6 +30,7 @@ typedef struct _RuleEditor RuleEditor; typedef struct _RuleEditorClass RuleEditorClass; +typedef struct _RuleEditorUndo RuleEditorUndo; struct _RuleEditor { GnomeDialog parent; @@ -43,6 +44,9 @@ struct _RuleEditor { char *source; + struct _RuleEditorUndo *undo_log; /* cancel/undo log */ + unsigned int undo_active:1; /* we're performing undo */ + struct _RuleEditorPrivate *priv; }; @@ -58,6 +62,22 @@ struct _RuleEditorClass { /* signals */ }; +enum { + RULE_EDITOR_LOG_EDIT, + RULE_EDITOR_LOG_ADD, + RULE_EDITOR_LOG_REMOVE, + RULE_EDITOR_LOG_RANK, +}; + +struct _RuleEditorUndo { + struct _RuleEditorUndo *next; + + unsigned int type; + struct _FilterRule *rule; + int rank; + int newrank; +}; + struct _GladeXML; struct _RuleContext; |