aboutsummaryrefslogtreecommitdiffstats
path: root/filter/vfolder-rule.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-04-05 04:03:02 +0800
committerDan Winship <danw@src.gnome.org>2002-04-05 04:03:02 +0800
commitf99f9d948846af22726a5d8d68617366ab267310 (patch)
treed48050a70ebd2180e4fa15ddd8e45d3f0ad9b75b /filter/vfolder-rule.c
parentb064051f5ff3c148c54c9fc11efc6078fea8157c (diff)
downloadgsoc2013-evolution-f99f9d948846af22726a5d8d68617366ab267310.tar.gz
gsoc2013-evolution-f99f9d948846af22726a5d8d68617366ab267310.tar.zst
gsoc2013-evolution-f99f9d948846af22726a5d8d68617366ab267310.zip
Remove the #ifndef SHELL part. Use an EvolutionFolderSelectorButton.
* filter-folder.c: Remove the #ifndef SHELL part. Use an EvolutionFolderSelectorButton. Remove FilterFolder->name since it's no longer needed. * filter-context.c (filter_rename_uri): Update for removal of FilterFolder->name. * filter-element.c (filter_element_copy_value): Likewise. * vfolder-rule.c (source_add): Update for evolution_shell_client_user_select_folder API change. svn path=/trunk/; revision=16354
Diffstat (limited to 'filter/vfolder-rule.c')
-rw-r--r--filter/vfolder-rule.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/filter/vfolder-rule.c b/filter/vfolder-rule.c
index 818b303366..36b381eb06 100644
--- a/filter/vfolder-rule.c
+++ b/filter/vfolder-rule.c
@@ -352,7 +352,8 @@ select_source_with(GtkWidget *w, struct _source_data *data)
static void
source_add(GtkWidget *widget, struct _source_data *data)
{
- const char *allowed_types[] = { "mail", NULL };
+ static const char *allowed_types[] = { "mail", NULL };
+ GNOME_Evolution_Folder *folder;
char *def, *uri;
GtkListItem *item;
GList *l;
@@ -363,16 +364,18 @@ source_add(GtkWidget *widget, struct _source_data *data)
evolution_shell_client_user_select_folder (global_shell_client,
GTK_WINDOW (gtk_widget_get_toplevel (widget)),
_("Select Folder"),
- def, allowed_types, NULL, &uri);
+ def, allowed_types, &folder);
if (GTK_OBJECT_DESTROYED(widget)) {
- g_free(uri);
+ if (folder)
+ CORBA_free (folder);
return;
}
gtk_widget_set_sensitive(widget, TRUE);
- if (uri != NULL && uri[0] != '\0') {
+ if (folder) {
+ uri = g_strdup (folder->physicalUri);
data->vr->sources = g_list_append(data->vr->sources, uri);
l = NULL;
@@ -385,9 +388,8 @@ source_add(GtkWidget *widget, struct _source_data *data)
gtk_list_append_items(data->list, l);
gtk_list_select_child(data->list, (GtkWidget *)item);
data->current = uri;
- } else {
- g_free(uri);
}
+ CORBA_free (folder);
set_sensitive(data);
}