diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-07-09 04:30:39 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-07-09 04:30:39 +0800 |
commit | b749cf077233687b34a5ae0aed1ee33d23b76471 (patch) | |
tree | 10a22b8ca8086da27c989c9a94776ce04003ac55 | |
parent | 85fd85a496325ed0643bb3c70d79d132069808d4 (diff) | |
download | gsoc2013-evolution-b749cf077233687b34a5ae0aed1ee33d23b76471.tar.gz gsoc2013-evolution-b749cf077233687b34a5ae0aed1ee33d23b76471.tar.zst gsoc2013-evolution-b749cf077233687b34a5ae0aed1ee33d23b76471.zip |
Make the sound type for (play-sound ) a "file" type rather than "string"
2002-07-08 Jeffrey Stedfast <fejj@ximian.com>
* filtertypes.xml: Make the sound type for (play-sound ) a "file"
type rather than "string" since users will want to use a filesel
to select it most likely. Fixes bug #26921.
* filter-file.c (validate): If the type is "file" check that it is
a valid file, otheriwse if it is a command-line just ignore it for
now.
* filter-element.c (filter_element_new_type_name): A filter type
of "file" should also use the filter-file object.
svn path=/trunk/; revision=17385
-rw-r--r-- | filter/ChangeLog | 13 | ||||
-rw-r--r-- | filter/filter-element.c | 2 | ||||
-rw-r--r-- | filter/filter-file.c | 4 | ||||
-rw-r--r-- | filter/filtertypes.xml | 4 |
4 files changed, 20 insertions, 3 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index 833ee6f369..84448c091f 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,16 @@ +2002-07-08 Jeffrey Stedfast <fejj@ximian.com> + + * filtertypes.xml: Make the sound type for (play-sound ) a "file" + type rather than "string" since users will want to use a filesel + to select it most likely. Fixes bug #26921. + + * filter-file.c (validate): If the type is "file" check that it is + a valid file, otheriwse if it is a command-line just ignore it for + now. + + * filter-element.c (filter_element_new_type_name): A filter type + of "file" should also use the filter-file object. + 2002-05-24 Ettore Perazzoli <ettore@ximian.com> * filter-rule.c (get_widget): Fix English grammar. diff --git a/filter/filter-element.c b/filter/filter-element.c index db50013a39..cbdab0409f 100644 --- a/filter/filter-element.c +++ b/filter/filter-element.c @@ -277,6 +277,8 @@ filter_element_new_type_name (const char *type) return (FilterElement *)filter_source_new (); } else if (!strcmp (type, "command")) { return (FilterElement *) filter_file_new_type_name (type); + } else if (!strcmp (type, "file")) { + return (FilterElement *) filter_file_new_type_name (type); } else if (!strcmp (type, "label")) { return (FilterElement *) filter_label_new (); } else { diff --git a/filter/filter-file.c b/filter/filter-file.c index 87a6328ec0..7a0d1468e6 100644 --- a/filter/filter-file.c +++ b/filter/filter-file.c @@ -179,7 +179,9 @@ validate (FilterElement *fe) return FALSE; } - if (strcmp (file->type, "command") != 0) { + /* FIXME: validate command-lines? */ + + if (strcmp (file->type, "file") != 0) { if (stat (file->path, &st) == -1 || !S_ISREG (st.st_mode)) { char *errmsg; diff --git a/filter/filtertypes.xml b/filter/filtertypes.xml index 65fdb292e0..75cbfa7efb 100644 --- a/filter/filtertypes.xml +++ b/filter/filtertypes.xml @@ -680,12 +680,12 @@ <part name="play-sound"> <title>Play Sound</title> <code>(play-sound ${sound})</code> - <input type="string" name="sound"/> + <input type="file" name="sound"/> </part> <part name="shell-exec"> <title>Execute Shell Command</title> <code>(shell-exec ${command})</code> - <input type="string" name="command"/> + <input type="command" name="command"/> </part> </actionset> </filterdescription> |