diff options
author | Li Yuan <li.yuan@sun.com> | 2006-05-15 18:20:33 +0800 |
---|---|---|
committer | Li Yuan <liyuan@src.gnome.org> | 2006-05-15 18:20:33 +0800 |
commit | fe716726ac285b908e5e4b83c6361306e9e218c2 (patch) | |
tree | 7b5ead4163a69b0738d5f660c202da24ea6e7e5f /shell/e-sidebar.c | |
parent | acc06a2f7838d9b42b8d2063ecf864d53da6dafc (diff) | |
download | gsoc2013-evolution-fe716726ac285b908e5e4b83c6361306e9e218c2.tar.gz gsoc2013-evolution-fe716726ac285b908e5e4b83c6361306e9e218c2.tar.zst gsoc2013-evolution-fe716726ac285b908e5e4b83c6361306e9e218c2.zip |
Fixes #341525
2006-05-15 Li Yuan <li.yuan@sun.com>
Fixes #341525
* e-sidebar.c: (button_toggled_callback):
If the button has been selected, it is no need to emit the signal.
svn path=/trunk/; revision=31986
Diffstat (limited to 'shell/e-sidebar.c')
-rw-r--r-- | shell/e-sidebar.c | 7 |
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); } |