[evolution-patches] Patch to fix #341525 (evolution/shell)



Hi,

Here is a patch to fix #341525. I think it is no need to emit
BUTTON_SELECTED signal when the button is already selected.


Regards,
Li
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1575
diff -u -r1.1575 ChangeLog
--- ChangeLog	30 Apr 2006 03:22:56 -0000	1.1575
+++ ChangeLog	12 May 2006 07:41:40 -0000
@@ -1,3 +1,10 @@
+2006-05-12  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.
+
 2006-04-30  Nancy Cai <nancy cai sun com>
  
         Fixes #323853
Index: e-sidebar.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-sidebar.c,v
retrieving revision 1.12
diff -u -r1.12 e-sidebar.c
--- e-sidebar.c	16 May 2005 04:46:40 -0000	1.12
+++ e-sidebar.c	12 May 2006 07:41:41 -0000
@@ -136,6 +136,7 @@
 			 ESidebar *sidebar)
 {
 	int id = 0;
+	gboolean is_actived = FALSE;
 	GSList *p;
 
 	if (sidebar->priv->in_toggle)
@@ -143,6 +144,9 @@
 
 	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 @@
 
 	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);
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]