aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-sidebar.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-sidebar.c')
-rw-r--r--shell/e-sidebar.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/shell/e-sidebar.c b/shell/e-sidebar.c
index c483543971..6c3499c98f 100644
--- a/shell/e-sidebar.c
+++ b/shell/e-sidebar.c
@@ -136,6 +136,7 @@ button_toggled_callback (GtkToggleButton *toggle_button,
ESidebar *sidebar)
{
int id = 0;
+ gboolean is_actived = FALSE;
GSList *p;
if (sidebar->priv->in_toggle)
@@ -143,6 +144,9 @@ button_toggled_callback (GtkToggleButton *toggle_button,
sidebar->priv->in_toggle = TRUE;
+ if (gtk_toggle_button_get_active (toggle_button))
+ is_actived = TRUE;
+
for (p = sidebar->priv->buttons; p != NULL; p = p->next) {
Button *button = p->data;
@@ -156,7 +160,8 @@ button_toggled_callback (GtkToggleButton *toggle_button,
sidebar->priv->in_toggle = FALSE;
- g_signal_emit (sidebar, signals[BUTTON_SELECTED], 0, id);
+ if (is_actived)
+ g_signal_emit (sidebar, signals[BUTTON_SELECTED], 0, id);
}