diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-06 04:29:23 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-06 04:29:23 +0800 |
commit | cb9a7d783e6d479789267bc4a4e75addf6b6173a (patch) | |
tree | b7bfbfeecff77e8b23971a2366383293c6709688 /mail/em-vfolder-rule.c | |
parent | ed94c3461ea6a4df6dc0bd8eba31952650690e4d (diff) | |
download | gsoc2013-evolution-cb9a7d783e6d479789267bc4a4e75addf6b6173a.tar.gz gsoc2013-evolution-cb9a7d783e6d479789267bc4a4e75addf6b6173a.tar.zst gsoc2013-evolution-cb9a7d783e6d479789267bc4a4e75addf6b6173a.zip |
EMVFolderRule: Use the new folder URI format.
Diffstat (limited to 'mail/em-vfolder-rule.c')
-rw-r--r-- | mail/em-vfolder-rule.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c index 22c0690c79..2abd99ef9e 100644 --- a/mail/em-vfolder-rule.c +++ b/mail/em-vfolder-rule.c @@ -526,21 +526,19 @@ select_source_with_changed (GtkWidget *widget, struct _source_data *data) } /* attempt to make a 'nice' folder name out of the raw uri */ -static gchar *format_source (const gchar *euri) +static gchar * +format_source (const gchar *uri) { CamelURL *url; GString *out; - gchar *res, *uri; + gchar *res; /* This should really probably base it on the account name? */ - uri = em_uri_to_camel (euri); url = camel_url_new (uri, NULL); /* bad uri */ if (url == NULL) - return uri; - - g_free (uri); + return g_strdup (uri); out = g_string_new (url->protocol); g_string_append_c (out, ':'); @@ -561,31 +559,34 @@ static gchar *format_source (const gchar *euri) } static void -vfr_folder_response (GtkWidget *dialog, gint button, struct _source_data *data) +vfr_folder_response (EMFolderSelector *selector, + gint button, + struct _source_data *data) { - const gchar *uri = em_folder_selector_get_selected_uri ((EMFolderSelector *)dialog); + const gchar *uri; + + uri = em_folder_selector_get_selected_uri (selector); if (button == GTK_RESPONSE_OK && uri != NULL) { - gchar *urinice, *euri; + gchar *urinice; GtkTreeSelection *selection; GtkTreeIter iter; - euri = em_uri_from_camel (uri); - - data->vr->sources = g_list_append (data->vr->sources, euri); + data->vr->sources = g_list_append ( + data->vr->sources, g_strdup (uri)); gtk_list_store_append (data->model, &iter); - urinice = format_source (euri); - gtk_list_store_set (data->model, &iter, 0, urinice, 1, euri, -1); + urinice = format_source (uri); + gtk_list_store_set (data->model, &iter, 0, urinice, 1, uri, -1); g_free (urinice); selection = gtk_tree_view_get_selection (data->list); gtk_tree_selection_select_iter (selection, &iter); - data->current = euri; + data->current = uri; set_sensitive (data); } - gtk_widget_destroy (dialog); + gtk_widget_destroy (GTK_WIDGET (selector)); } static void |