aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/publish-calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-12-15 01:56:51 +0800
committerMilan Crha <mcrha@redhat.com>2009-12-15 01:56:51 +0800
commit21f06130998918efef046b260cca6db150fdb42c (patch)
tree2f825049d50b1305af3c4e8a261e24e6a28be6c8 /plugins/publish-calendar
parent1407aa3c9b14ea6e6156e54b90b871ddeef28188 (diff)
downloadgsoc2013-evolution-21f06130998918efef046b260cca6db150fdb42c.tar
gsoc2013-evolution-21f06130998918efef046b260cca6db150fdb42c.tar.gz
gsoc2013-evolution-21f06130998918efef046b260cca6db150fdb42c.tar.bz2
gsoc2013-evolution-21f06130998918efef046b260cca6db150fdb42c.tar.lz
gsoc2013-evolution-21f06130998918efef046b260cca6db150fdb42c.tar.xz
gsoc2013-evolution-21f06130998918efef046b260cca6db150fdb42c.tar.zst
gsoc2013-evolution-21f06130998918efef046b260cca6db150fdb42c.zip
Bug #604512 - Calendar publishing tab misses button label
Diffstat (limited to 'plugins/publish-calendar')
-rw-r--r--plugins/publish-calendar/publish-calendar.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c
index 346e62c98c..69e42bb5fc 100644
--- a/plugins/publish-calendar/publish-calendar.c
+++ b/plugins/publish-calendar/publish-calendar.c
@@ -590,11 +590,10 @@ url_list_changed (PublishUIData *ui)
static void
update_url_enable_button (EPublishUri *url, GtkWidget *url_enable)
{
- g_return_if_fail (url != NULL);
g_return_if_fail (url_enable != NULL);
g_return_if_fail (GTK_IS_BUTTON (url_enable));
- gtk_button_set_label (GTK_BUTTON (url_enable), url->enabled ? _("_Disable") : _("E_nable"));
+ gtk_button_set_label (GTK_BUTTON (url_enable), url && url->enabled ? _("_Disable") : _("E_nable"));
}
static void
@@ -639,13 +638,13 @@ selection_changed (GtkTreeSelection *selection, PublishUIData *ui)
gtk_widget_set_sensitive (ui->url_edit, TRUE);
gtk_widget_set_sensitive (ui->url_remove, TRUE);
gtk_widget_set_sensitive (ui->url_enable, TRUE);
-
- update_url_enable_button (url, ui->url_enable);
} else {
gtk_widget_set_sensitive (ui->url_edit, FALSE);
gtk_widget_set_sensitive (ui->url_remove, FALSE);
gtk_widget_set_sensitive (ui->url_enable, FALSE);
}
+
+ update_url_enable_button (url, ui->url_enable);
}
static void
@@ -759,6 +758,8 @@ url_remove_clicked (GtkButton *button, PublishUIData *ui)
gtk_widget_set_sensitive (ui->url_edit, FALSE);
gtk_widget_set_sensitive (ui->url_remove, FALSE);
gtk_widget_set_sensitive (ui->url_enable, FALSE);
+
+ update_url_enable_button (NULL, ui->url_enable);
}
publish_uris = g_slist_remove (publish_uris, url);
@@ -841,6 +842,7 @@ publish_calendar_locations (EPlugin *epl, EConfigHookItemFactoryData *data)
ui->url_edit = e_builder_get_widget (builder, "url edit");
ui->url_remove = e_builder_get_widget (builder, "url remove");
ui->url_enable = e_builder_get_widget (builder, "url enable");
+ update_url_enable_button (NULL, ui->url_enable);
g_signal_connect (G_OBJECT (ui->url_add), "clicked", G_CALLBACK (url_add_clicked), ui);
g_signal_connect (G_OBJECT (ui->url_edit), "clicked", G_CALLBACK (url_edit_clicked), ui);
g_signal_connect (G_OBJECT (ui->url_remove), "clicked", G_CALLBACK (url_remove_clicked), ui);