aboutsummaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-03-26 13:10:04 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-03-26 13:10:04 +0800
commit28e3d6dc45dd4ab5e0d34078fdf86f1923d0e177 (patch)
tree5720e069c633f890b1a390fa96fb3826f7c537bd /filter
parentaebeb2ef7010d8f72508a6a6f4541f05a942853a (diff)
downloadgsoc2013-evolution-28e3d6dc45dd4ab5e0d34078fdf86f1923d0e177.tar.gz
gsoc2013-evolution-28e3d6dc45dd4ab5e0d34078fdf86f1923d0e177.tar.zst
gsoc2013-evolution-28e3d6dc45dd4ab5e0d34078fdf86f1923d0e177.zip
return the added option. (clone): make sure we set the current option
2004-03-26 Not Zed <NotZed@Ximian.com> * filter-option.c (filter_option_add): return the added option. (clone): make sure we set the current option properly on the new copy. See #56028. * filtertypes.xml: s/pipe to shell command/pipe to program/ s/shell command/run program/, cleans up the UI a lot. svn path=/trunk/; revision=25194
Diffstat (limited to 'filter')
-rw-r--r--filter/ChangeLog9
-rw-r--r--filter/filter-option.c10
-rw-r--r--filter/filter-option.h2
-rw-r--r--filter/filtertypes.xml6
-rw-r--r--filter/libfilter-i18n.h4
5 files changed, 22 insertions, 9 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog
index 67c256df5d..9a4485315e 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,3 +1,12 @@
+2004-03-26 Not Zed <NotZed@Ximian.com>
+
+ * filter-option.c (filter_option_add): return the added option.
+ (clone): make sure we set the current option properly on the new
+ copy. See #56028.
+
+ * filtertypes.xml: s/pipe to shell command/pipe to program/
+ s/shell command/run program/, cleans up the UI a lot.
+
2004-03-20 Danilo Ĺ egan <dsegan@gmx.net>
* filter-datespec.c (set_button): Use ngettext for handling plurals.
diff --git a/filter/filter-option.c b/filter/filter-option.c
index 249e79c98b..7d1530620d 100644
--- a/filter/filter-option.c
+++ b/filter/filter-option.c
@@ -163,7 +163,7 @@ filter_option_set_current (FilterOption *option, const char *name)
}
/* used by implementers to add additional options */
-void
+struct _filter_option *
filter_option_add(FilterOption *fo, const char *value, const char *title, const char *code)
{
struct _filter_option *op;
@@ -179,6 +179,8 @@ filter_option_add(FilterOption *fo, const char *value, const char *title, const
fo->options = g_list_append(fo->options, op);
if (fo->current == NULL)
fo->current = op;
+
+ return op;
}
static int
@@ -349,7 +351,7 @@ clone (FilterElement *fe)
{
FilterOption *fo = (FilterOption *)fe, *new;
GList *l;
- struct _filter_option *op;
+ struct _filter_option *op, *newop;
d(printf ("cloning option\n"));
@@ -357,7 +359,9 @@ clone (FilterElement *fe)
l = fo->options;
while (l) {
op = l->data;
- filter_option_add (new, op->value, op->title, op->code);
+ newop = filter_option_add (new, op->value, op->title, op->code);
+ if (fo->current == op)
+ new->current = newop;
l = l->next;
}
diff --git a/filter/filter-option.h b/filter/filter-option.h
index 39418868ab..50c132f775 100644
--- a/filter/filter-option.h
+++ b/filter/filter-option.h
@@ -64,6 +64,6 @@ FilterOption *filter_option_new (void);
/* methods */
void filter_option_set_current (FilterOption *option, const char *name);
-void filter_option_add (FilterOption *fo, const char *name, const char *title, const char *code);
+struct _filter_option *filter_option_add (FilterOption *fo, const char *name, const char *title, const char *code);
#endif /* ! _FILTER_OPTION_H */
diff --git a/filter/filtertypes.xml b/filter/filtertypes.xml
index 9dc7fed678..45c1c1d22d 100644
--- a/filter/filtertypes.xml
+++ b/filter/filtertypes.xml
@@ -585,7 +585,7 @@
</part>
<part name="pipe">
- <title>Pipe Message to Shell Command</title>
+ <title>Pipe to Program</title>
<input type="command" name="command"/>
<input type="optionlist" name="retval-type">
<option value="is">
@@ -733,12 +733,12 @@
<input type="file" name="sound"/>
</part>
<part name="shell">
- <title>Shell Command</title>
+ <title>Run Program</title>
<code>(shell "/bin/sh" "-c" ${command})</code>
<input type="command" name="command"/>
</part>
<part name="pipe">
- <title>Pipe Message to Shell Command</title>
+ <title>Pipe to Program</title>
<code>(pipe-message "/bin/sh" "-c" ${command})</code>
<input type="command" name="command"/>
</part>
diff --git a/filter/libfilter-i18n.h b/filter/libfilter-i18n.h
index 0546be1579..2f5a65ebe7 100644
--- a/filter/libfilter-i18n.h
+++ b/filter/libfilter-i18n.h
@@ -41,7 +41,7 @@ char *s = N_("Message Header");
char *s = N_("Message is Junk");
char *s = N_("Message is not Junk");
char *s = N_("Move to Folder");
-char *s = N_("Pipe Message to Shell Command");
+char *s = N_("Pipe to Program");
char *s = N_("Play Sound");
char *s = N_("Read");
char *s = N_("Recipients");
@@ -50,10 +50,10 @@ char *s = N_("Replied to");
char *s = N_("returns");
char *s = N_("returns greater than");
char *s = N_("returns less than");
+char *s = N_("Run Program");
char *s = N_("Score");
char *s = N_("Sender");
char *s = N_("Set Status");
-char *s = N_("Shell Command");
char *s = N_("Size (kB)");
char *s = N_("sounds like");
char *s = N_("Source Account");