diff options
Diffstat (limited to 'src/core/main.c')
-rw-r--r-- | src/core/main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/main.c b/src/core/main.c index 81724cce..f2a16d7f 100644 --- a/src/core/main.c +++ b/src/core/main.c | |||
@@ -94,6 +94,13 @@ static void * shutdownCode(void * unused) { | |||
94 | return NULL; | 94 | return NULL; |
95 | } | 95 | } |
96 | 96 | ||
97 | static void gnunet_gtk_main_quit() { | ||
98 | setCustomLogProc(NULL); | ||
99 | run_with_save_calls(&shutdownCode, | ||
100 | NULL); | ||
101 | gtk_main_quit(); | ||
102 | } | ||
103 | |||
97 | int main(int argc, | 104 | int main(int argc, |
98 | char *argv[]) { | 105 | char *argv[]) { |
99 | GtkWidget * root; | 106 | GtkWidget * root; |
@@ -116,7 +123,7 @@ int main(int argc, | |||
116 | bind_textdomain_codeset("gnunet-gtk", "UTF-8"); | 123 | bind_textdomain_codeset("gnunet-gtk", "UTF-8"); |
117 | #endif | 124 | #endif |
118 | startCron(); | 125 | startCron(); |
119 | initGNUnetGTKCommon(); | 126 | initGNUnetGTKCommon(&gnunet_gtk_main_quit); |
120 | root | 127 | root |
121 | = glade_xml_get_widget(getMainXML(), | 128 | = glade_xml_get_widget(getMainXML(), |
122 | "mainWindow"); | 129 | "mainWindow"); |
@@ -127,9 +134,6 @@ int main(int argc, | |||
127 | gdk_threads_enter(); | 134 | gdk_threads_enter(); |
128 | gtk_main(); | 135 | gtk_main(); |
129 | gdk_threads_leave(); | 136 | gdk_threads_leave(); |
130 | setCustomLogProc(NULL); | ||
131 | run_with_save_calls(&shutdownCode, | ||
132 | NULL); | ||
133 | doneGNUnetGTKCommon(); | 137 | doneGNUnetGTKCommon(); |
134 | doneUtil(); | 138 | doneUtil(); |
135 | 139 | ||