From b884816bda198706789cc343557996a7aa76db01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Wed, 22 Aug 2012 21:37:13 -0400 Subject: [PATCH] Fixed GcalToolbar behavior. --- src/gcal-toolbar.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/gcal-toolbar.c b/src/gcal-toolbar.c index ab8af294..f20b886b 100644 --- a/src/gcal-toolbar.c +++ b/src/gcal-toolbar.c @@ -473,6 +473,21 @@ gcal_toolbar_view_changed (GtkWidget *button, priv = GCAL_TOOLBAR (user_data)->priv; + if (priv->active_view_button == button && + ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button))) + { + g_signal_handlers_block_by_func (priv->active_view_button, + gcal_toolbar_view_changed, + user_data); + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON (priv->active_view_button), + TRUE); + g_signal_handlers_unblock_by_func (priv->active_view_button, + gcal_toolbar_view_changed, + user_data); + return; + } + if (priv->active_view_button != NULL) { g_signal_handlers_block_by_func (priv->active_view_button,