aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNotZed <NotZed@HelixCode.com>2000-05-17 04:25:40 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-05-17 04:25:40 +0800
commit28bf3e5f3d74c14bf66aab5cfc9d1c0a26a3daac (patch)
tree11ba672456e82afb47b89566cadc574b519dbbef
parent2ae6b020ab335b7483fe29b8aae38d3c72fc4e16 (diff)
downloadgsoc2013-evolution-28bf3e5f3d74c14bf66aab5cfc9d1c0a26a3daac.tar
gsoc2013-evolution-28bf3e5f3d74c14bf66aab5cfc9d1c0a26a3daac.tar.gz
gsoc2013-evolution-28bf3e5f3d74c14bf66aab5cfc9d1c0a26a3daac.tar.bz2
gsoc2013-evolution-28bf3e5f3d74c14bf66aab5cfc9d1c0a26a3daac.tar.lz
gsoc2013-evolution-28bf3e5f3d74c14bf66aab5cfc9d1c0a26a3daac.tar.xz
gsoc2013-evolution-28bf3e5f3d74c14bf66aab5cfc9d1c0a26a3daac.tar.zst
gsoc2013-evolution-28bf3e5f3d74c14bf66aab5cfc9d1c0a26a3daac.zip
Simple driver program for testing, so i can fix all this really broken
2000-05-16 NotZed <NotZed@HelixCode.com> * filter-editor.c (main): Simple driver program for testing, so i can fix all this really broken code *sigh* svn path=/trunk/; revision=3097
-rw-r--r--filter/ChangeLog5
-rw-r--r--filter/filter-editor.c27
2 files changed, 30 insertions, 2 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog
index ace9116829..78b6a0823d 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-16 NotZed <NotZed@HelixCode.com>
+
+ * filter-editor.c (main): Simple driver program for testing, so i
+ can fix all this really broken code *sigh*
+
2000-05-15 NotZed <NotZed@HelixCode.com>
* filter-editor.c (filter_editor_set_rule_files): filename based
diff --git a/filter/filter-editor.c b/filter/filter-editor.c
index d65398872b..af064b32eb 100644
--- a/filter/filter-editor.c
+++ b/filter/filter-editor.c
@@ -341,14 +341,15 @@ filter_editor_set_rules(FilterEditor *e, GList *rules, GList *systemoptions, GLi
void
filter_editor_set_rule_files(FilterEditor *e, const char *systemrules, const char *userrules)
{
- GList *rules, *options, *options2;
+ GList *rules, *options = NULL, *options2;
xmlDocPtr doc, out, optionset, filteroptions;
doc = xmlParseFile(systemrules);
rules = filter_load_ruleset(doc);
options2 = filter_load_optionset(doc, rules);
out = xmlParseFile(userrules);
- options = filter_load_optionset(out, rules);
+ if (out)
+ options = filter_load_optionset(out, rules);
filter_editor_set_rules(e, rules, options2, options);
}
@@ -358,3 +359,25 @@ filter_editor_save_rules(FilterEditor *e, const char *userrules)
{
return filter_write_optionset_file(userrules, e->useroptions);
}
+
+#ifdef STANDALONE
+
+int main(int argc, char **argv)
+{
+ FilterEditor *fe;
+
+ gnome_init("Test", "0.0", argc, argv);
+ gdk_rgb_init ();
+ gtk_widget_set_default_colormap (gdk_rgb_get_cmap ());
+ gtk_widget_set_default_visual (gdk_rgb_get_visual ());
+
+ fe = filter_editor_new();
+ filter_editor_set_rule_files(fe, "/home/notzed/gnome/evolution/filter/filterdescription.xml", "/home/notzed/filters.xml");
+ gtk_widget_show(fe);
+
+ gtk_main();
+
+ return 0;
+}
+
+#endif