diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-10-24 23:17:18 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-10-25 20:27:20 +0800 |
commit | e1d072684fa81c8ed7cb9656f02b278e9b2f7014 (patch) | |
tree | 45afb2ba275569f3099a2a52b27af8c86c15e59b /plugins/publish-calendar/url-editor-dialog.c | |
parent | 6e24f4303dc630fea846debed9b41c7029ffa0d8 (diff) | |
download | gsoc2013-evolution-e1d072684fa81c8ed7cb9656f02b278e9b2f7014.tar gsoc2013-evolution-e1d072684fa81c8ed7cb9656f02b278e9b2f7014.tar.gz gsoc2013-evolution-e1d072684fa81c8ed7cb9656f02b278e9b2f7014.tar.bz2 gsoc2013-evolution-e1d072684fa81c8ed7cb9656f02b278e9b2f7014.tar.lz gsoc2013-evolution-e1d072684fa81c8ed7cb9656f02b278e9b2f7014.tar.xz gsoc2013-evolution-e1d072684fa81c8ed7cb9656f02b278e9b2f7014.tar.zst gsoc2013-evolution-e1d072684fa81c8ed7cb9656f02b278e9b2f7014.zip |
ESourceSelector cleanups.
Diffstat (limited to 'plugins/publish-calendar/url-editor-dialog.c')
-rw-r--r-- | plugins/publish-calendar/url-editor-dialog.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/plugins/publish-calendar/url-editor-dialog.c b/plugins/publish-calendar/url-editor-dialog.c index c672e94de3..04bbe5d9f9 100644 --- a/plugins/publish-calendar/url-editor-dialog.c +++ b/plugins/publish-calendar/url-editor-dialog.c @@ -110,7 +110,7 @@ static void check_input (UrlEditorDialog *dialog) { gint n = 0; - GSList *sources; + GList *sources; EPublishUri *uri; uri = dialog->uri; @@ -126,8 +126,10 @@ check_input (UrlEditorDialog *dialog) } if (gtk_widget_get_sensitive (dialog->events_selector)) { - sources = e_source_selector_get_selection (E_SOURCE_SELECTOR (dialog->events_selector)); - n += g_slist_length (sources); + sources = e_source_selector_get_selection ( + E_SOURCE_SELECTOR (dialog->events_selector)); + n += g_list_length (sources); + g_list_free_full (sources, (GDestroyNotify) g_object_unref); } if (n == 0) goto fail; @@ -586,7 +588,7 @@ url_editor_dialog_run (UrlEditorDialog *dialog) response = gtk_dialog_run (GTK_DIALOG (dialog)); if (response == GTK_RESPONSE_OK) { - GSList *l, *p; + GList *list, *link; if (dialog->uri->password) g_free (dialog->uri->password); @@ -606,16 +608,20 @@ url_editor_dialog_run (UrlEditorDialog *dialog) e_passwords_forget_password (dialog->uri->location); } - l = e_source_selector_get_selection (E_SOURCE_SELECTOR (dialog->events_selector)); - for (p = l; p; p = g_slist_next (p)) { + list = e_source_selector_get_selection ( + E_SOURCE_SELECTOR (dialog->events_selector)); + + for (link = list; link != NULL; link = g_list_next (link)) { ESource *source; const gchar *uid; - source = E_SOURCE (p->data); + source = E_SOURCE (link->data); uid = e_source_get_uid (source); dialog->uri->events = g_slist_append ( dialog->uri->events, g_strdup (uid)); } + + g_list_free_full (list, (GDestroyNotify) g_object_unref); } gtk_widget_hide (GTK_WIDGET (dialog)); |