[Commits] mainwindow.c 1.274.2.346 1.274.2.347

colin at claws-mail.org colin at claws-mail.org
Thu Aug 23 13:09:40 CEST 2012


Update of /home/claws-mail/claws/src
In directory srv:/tmp/cvs-serv7754/src

Modified Files:
      Tag: gtk2
	mainwindow.c 
Log Message:
2012-08-23 [colin]	3.8.1cvs34

	* src/mainwindow.c
		Fix --offline asking if one wants to sync,
		due to re-entering. Thanks <ebik at ucw.cz>.

Index: mainwindow.c
===================================================================
RCS file: /home/claws-mail/claws/src/mainwindow.c,v
retrieving revision 1.274.2.346
retrieving revision 1.274.2.347
diff -u -d -r1.274.2.346 -r1.274.2.347
--- mainwindow.c	2 Jun 2012 08:57:10 -0000	1.274.2.346
+++ mainwindow.c	23 Aug 2012 11:09:38 -0000	1.274.2.347
@@ -4226,12 +4226,21 @@
 void main_window_toggle_work_offline (MainWindow *mainwin, gboolean offline,
 					gboolean ask_sync)
 {
+	static gboolean switching = FALSE;
+
+	if (switching)
+		return;
+
+	switching = TRUE;
+
 	offline_ask_sync = ask_sync;
 	if (offline)
 		online_switch_clicked (GTK_BUTTON(mainwin->online_switch), mainwin);
 	else
 		online_switch_clicked (GTK_BUTTON(mainwin->offline_switch), mainwin);
 	offline_ask_sync = TRUE;
+
+	switching = FALSE;
 }
 
 static void toggle_work_offline_cb (GtkAction *action, gpointer data)



More information about the Commits mailing list