From cdd89ef2902202c3fe535d0f24ecebc5ee93a134 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 9 Mar 2011 11:52:31 +0100 Subject: Bug #641939 - [publish-calendar] Doesn't read online state on start --- plugins/publish-calendar/publish-calendar.c | 4 +++- plugins/publish-calendar/publish-calendar.ui | 21 +++++++++++++++++++++ plugins/publish-calendar/url-editor-dialog.c | 11 ++++++++++- 3 files changed, 34 insertions(+), 2 deletions(-) (limited to 'plugins/publish-calendar') diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c index da9306331d..3ea3747108 100644 --- a/plugins/publish-calendar/publish-calendar.c +++ b/plugins/publish-calendar/publish-calendar.c @@ -934,8 +934,10 @@ e_plugin_lib_enable (EPlugin *ep, gint enable) if (shell) { g_signal_handlers_disconnect_by_func (shell, G_CALLBACK (online_state_changed), NULL); - if (enable) + if (enable) { + online = e_shell_get_online (shell); g_signal_connect (shell, "notify::online", G_CALLBACK (online_state_changed), NULL); + } } if (enable) { diff --git a/plugins/publish-calendar/publish-calendar.ui b/plugins/publish-calendar/publish-calendar.ui index 43205237b2..efd9613aec 100644 --- a/plugins/publish-calendar/publish-calendar.ui +++ b/plugins/publish-calendar/publish-calendar.ui @@ -401,6 +401,8 @@ 0 + False + False @@ -436,6 +438,8 @@ 1 + False + False @@ -471,16 +475,21 @@ 2 + False + False 1 + False + False False + False 1 @@ -543,6 +552,7 @@ False + True end 1 @@ -550,6 +560,8 @@ 0 + False + False @@ -578,6 +590,7 @@ False + True end 1 @@ -585,6 +598,8 @@ 1 + False + False @@ -614,6 +629,7 @@ False + True end 1 @@ -621,6 +637,8 @@ 2 + False + False @@ -642,11 +660,14 @@ 1 + False + False False + False 3 diff --git a/plugins/publish-calendar/url-editor-dialog.c b/plugins/publish-calendar/url-editor-dialog.c index 4af662def4..9c49dcb104 100644 --- a/plugins/publish-calendar/url-editor-dialog.c +++ b/plugins/publish-calendar/url-editor-dialog.c @@ -209,7 +209,8 @@ publish_service_changed (GtkComboBox *combo, UrlEditorDialog *dialog) break; case TYPE_URI: gtk_label_set_text_with_mnemonic (GTK_LABEL (dialog->server_label), "_Location (URI):"); - gtk_entry_set_text (GTK_ENTRY (dialog->server_entry), ""); + if (uri->service_type != TYPE_URI) + gtk_entry_set_text (GTK_ENTRY (dialog->server_entry), ""); gtk_widget_hide (dialog->file_hbox); gtk_widget_hide (dialog->optional_label); gtk_widget_hide (dialog->port_hbox); @@ -319,6 +320,9 @@ set_from_uri (UrlEditorDialog *dialog) if (euri->path) gtk_entry_set_text (GTK_ENTRY (dialog->file_entry), euri->path); + if (uri->service_type == TYPE_URI) + gtk_entry_set_text (GTK_ENTRY (dialog->server_entry), uri->location); + gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->publish_service), uri->service_type); e_uri_free (euri); @@ -426,6 +430,7 @@ url_editor_dialog_construct (UrlEditorDialog *dialog) if (uri->location && strlen (uri->location)) { set_from_uri (dialog); } + gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->publish_frequency), uri->publish_frequency); gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->type_selector), uri->publish_format); @@ -443,6 +448,10 @@ url_editor_dialog_construct (UrlEditorDialog *dialog) gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->fb_duration_spin), uri->fb_duration_value); gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->fb_duration_combo), uri->fb_duration_type); + type_selector_changed (GTK_COMBO_BOX (dialog->type_selector), dialog); + frequency_changed_cb (GTK_COMBO_BOX (dialog->publish_frequency), dialog); + publish_service_changed (GTK_COMBO_BOX (dialog->publish_service), dialog); + g_signal_connect (G_OBJECT (dialog->publish_service), "changed", G_CALLBACK (publish_service_changed), dialog); g_signal_connect (G_OBJECT (dialog->type_selector), "changed", G_CALLBACK (type_selector_changed), dialog); g_signal_connect (G_OBJECT (dialog->publish_frequency), "changed", G_CALLBACK (frequency_changed_cb), dialog); -- cgit v1.2.3