diff options
author | Dan Winship <danw@src.gnome.org> | 2000-07-10 07:24:02 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-07-10 07:24:02 +0800 |
commit | 7ffeca2735c0d928be4f5379de136e0606ccb652 (patch) | |
tree | 1558695ee9b2c7e0822b33b7d7b5b2b7c8a0a223 /filter/filter-arg-types.c | |
parent | 90d51074c9c7c5284e3ff3e0a0eb4b5f5d96761f (diff) | |
download | gsoc2013-evolution-7ffeca2735c0d928be4f5379de136e0606ccb652.tar gsoc2013-evolution-7ffeca2735c0d928be4f5379de136e0606ccb652.tar.gz gsoc2013-evolution-7ffeca2735c0d928be4f5379de136e0606ccb652.tar.bz2 gsoc2013-evolution-7ffeca2735c0d928be4f5379de136e0606ccb652.tar.lz gsoc2013-evolution-7ffeca2735c0d928be4f5379de136e0606ccb652.tar.xz gsoc2013-evolution-7ffeca2735c0d928be4f5379de136e0606ccb652.tar.zst gsoc2013-evolution-7ffeca2735c0d928be4f5379de136e0606ccb652.zip |
add a "string" type
* filter-xml.[ch]: add a "string" type
* filtertype.xml, vfoldertypes.xml: Use type="string" rather than
"folder" for subject/body matching.
* filter-arg-types.c: Update some strings for "text" input. Fix
some warnings (including one that pointed out a real bug).
* filter-arg.c, filter-druid.c, filter-format.c: fix warnings
svn path=/trunk/; revision=4025
Diffstat (limited to 'filter/filter-arg-types.c')
-rw-r--r-- | filter/filter-arg-types.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/filter/filter-arg-types.c b/filter/filter-arg-types.c index 578eeee64e..5d09b4817b 100644 --- a/filter/filter-arg-types.c +++ b/filter/filter-arg-types.c @@ -73,7 +73,7 @@ arg_string_write_text(FilterArg *argin, GString *string) l = argin->values; if (l == NULL) { - g_string_append(string, "folder"); + g_string_append(string, "text"); } while (l) { a = l->data; @@ -105,7 +105,7 @@ arg_string_edit_value (FilterArg *arg, int index) dialogue = (GnomeDialog *)gnome_dialog_new ("Edit value", "Ok", "Cancel", 0); hbox = gtk_hbox_new (FALSE, 0); - label = gtk_label_new ("Option value"); + label = gtk_label_new ("Text"); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); entry = gtk_entry_new(); gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); @@ -420,8 +420,10 @@ arg_address_get_value_as_string(FilterArg *argin, void *data) } static void -arg_address_free_value(FilterArg *arg, struct filter_arg_address *a) +arg_address_free_value(FilterArg *arg, void *v) { + struct filter_arg_address *a = v; + g_free(a->name); g_free(a->email); g_free(a); @@ -573,7 +575,7 @@ arg_folder_edit_value (FilterArg *arg, int index) if (physical_uri != NULL && physical_uri[0] != '\0') { GList *node; - if (index >= 0 && (node = g_list_index (arg->values, index))) + if (index >= 0 && (node = g_list_nth (arg->values, index))) node->data = physical_uri; else arg->values = g_list_append (arg->values, physical_uri); @@ -748,6 +750,8 @@ filter_arg_folder_class_init (FilterArgFolderClass *class) filter_class->values_get_xml = arg_folder_values_get_xml; filter_class->values_add_xml = arg_folder_values_add_xml; + + filter_class->get_value_as_string = arg_folder_get_value_as_string; } static void |