diff options
author | Milan Crha <mcrha@redhat.com> | 2009-07-30 00:56:14 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-08-11 04:27:28 +0800 |
commit | 7eee013e97aa3d1d28112f5b25744035941ec23c (patch) | |
tree | f4f7e9cf39c2340a3efb0f3e17402c1af029341b /plugins/publish-calendar/publish-calendar.c | |
parent | 141966f9922f7a38d59e73316eb3b9d876fcd07e (diff) | |
download | gsoc2013-evolution-7eee013e97aa3d1d28112f5b25744035941ec23c.tar gsoc2013-evolution-7eee013e97aa3d1d28112f5b25744035941ec23c.tar.gz gsoc2013-evolution-7eee013e97aa3d1d28112f5b25744035941ec23c.tar.bz2 gsoc2013-evolution-7eee013e97aa3d1d28112f5b25744035941ec23c.tar.lz gsoc2013-evolution-7eee013e97aa3d1d28112f5b25744035941ec23c.tar.xz gsoc2013-evolution-7eee013e97aa3d1d28112f5b25744035941ec23c.tar.zst gsoc2013-evolution-7eee013e97aa3d1d28112f5b25744035941ec23c.zip |
Bug #317290 - [Publish-Calendar] Cancel setup should cancel
, not continue
Diffstat (limited to 'plugins/publish-calendar/publish-calendar.c')
-rw-r--r-- | plugins/publish-calendar/publish-calendar.c | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c index 27ab11ce3c..e63f4bca4c 100644 --- a/plugins/publish-calendar/publish-calendar.c +++ b/plugins/publish-calendar/publish-calendar.c @@ -540,21 +540,22 @@ url_add_clicked (GtkButton *button, PublishUIData *ui) model = gtk_tree_view_get_model (GTK_TREE_VIEW (ui->treeview)); url_editor = url_editor_dialog_new (model, NULL); - url_editor_dialog_run ((UrlEditorDialog *) url_editor); - uri = URL_EDITOR_DIALOG (url_editor)->uri; - if (uri->location) { - gtk_list_store_append (GTK_LIST_STORE (model), &iter); - gtk_list_store_set (GTK_LIST_STORE (model), &iter, + if (url_editor_dialog_run ((UrlEditorDialog *) url_editor)) { + uri = URL_EDITOR_DIALOG (url_editor)->uri; + if (uri->location) { + gtk_list_store_append (GTK_LIST_STORE (model), &iter); + gtk_list_store_set (GTK_LIST_STORE (model), &iter, URL_LIST_ENABLED_COLUMN, uri->enabled, URL_LIST_LOCATION_COLUMN, uri->location, URL_LIST_URL_COLUMN, uri, -1); - url_list_changed (ui); - publish_uris = g_slist_prepend (publish_uris, uri); - add_timeout (uri); - publish_uri_async (uri); - } else { - g_free (uri); + url_list_changed (ui); + publish_uris = g_slist_prepend (publish_uris, uri); + add_timeout (uri); + publish_uri_async (uri); + } else { + g_free (uri); + } } gtk_widget_destroy (url_editor); } @@ -574,19 +575,22 @@ url_edit_clicked (GtkButton *button, PublishUIData *ui) gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 2, &uri, -1); url_editor = url_editor_dialog_new (model, uri); - url_editor_dialog_run ((UrlEditorDialog *) url_editor); - gtk_list_store_set (GTK_LIST_STORE (model), &iter, + if (url_editor_dialog_run ((UrlEditorDialog *) url_editor)) { + gtk_list_store_set (GTK_LIST_STORE (model), &iter, URL_LIST_ENABLED_COLUMN, uri->enabled, URL_LIST_LOCATION_COLUMN, uri->location, URL_LIST_URL_COLUMN, uri, -1); - id = GPOINTER_TO_UINT (g_hash_table_lookup (uri_timeouts, uri)); - if (id) - g_source_remove (id); - add_timeout (uri); - url_list_changed (ui); - publish_uri_async (uri); + id = GPOINTER_TO_UINT (g_hash_table_lookup (uri_timeouts, uri)); + if (id) + g_source_remove (id); + add_timeout (uri); + url_list_changed (ui); + publish_uri_async (uri); + } + + gtk_widget_destroy (url_editor); } } |