[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24923 - gnunet-gtk/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24923 - gnunet-gtk/src/fs |
Date: |
Tue, 13 Nov 2012 03:31:25 +0100 |
Author: LRN
Date: 2012-11-13 03:31:25 +0100 (Tue, 13 Nov 2012)
New Revision: 24923
Modified:
gnunet-gtk/src/fs/gnunet-fs-gtk.c
Log:
Make sure scheduler is shut down on exit
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk.c 2012-11-13 02:06:47 UTC (rev 24922)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk.c 2012-11-13 02:31:25 UTC (rev 24923)
@@ -205,7 +205,8 @@
shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
GNUNET_GTK_tray_icon_destroy ();
- GNUNET_GTK_main_loop_quit (ml);
+ if (NULL != ml)
+ GNUNET_GTK_main_loop_quit (ml);
ml = NULL;
if (fs != NULL)
{
@@ -245,6 +246,15 @@
{
struct GNUNET_GTK_MainWindowContext *main_context = user_data;
+ /* GNUNET_FS_GTK_delete_event_cb will eventually be called if we shut down
+ * the scheduler, because shutting it down will make GTK delete the main
+ * window. On the other hand, deleting the main window first (clicking on X
+ * button) will not trigger scheduler shutdown, unlike
+ * GNUNET_FS_GTK_menu_quit_activate_cb(). So we shut it down here again,
+ * just to be sure it is dead (if it isn't, application will hang up).
+ */
+ GNUNET_SCHEDULER_shutdown ();
+
GNUNET_GTK_tray_icon_destroy ();
GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE,
&shutdown_task, NULL);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24923 - gnunet-gtk/src/fs,
gnunet <=