Mercurial > audlegacy
annotate audacious/pluginenum.c @ 2308:458c3462da11 trunk
[svn] - put a stub in for 1.3 news here
author | nenolod |
---|---|
date | Wed, 10 Jan 2007 04:55:56 -0800 |
parents | 329fb2453c87 |
children |
rev | line source |
---|---|
2253 | 1 /* Audacious - Cross-platform multimedia player |
2 * Copyright (C) 2005-2007 Audacious development team | |
3 * | |
4 * Based on BMP: | |
5 * Copyright (C) 2003-2004 BMP development team | |
0 | 6 * |
7 * Based on XMMS: | |
2253 | 8 * Copyright (C) 1998-2003 XMMS development team |
0 | 9 * |
10 * This program is free software; you can redistribute it and/or modify | |
1460 | 11 * it under the terms of the GNU General Public License as published by |
2105
f18a5b617c34
[svn] - move to GPLv2-only. Based on my interpretation of the license, we are
nenolod
parents:
2098
diff
changeset
|
12 * the Free Software Foundation; under version 2 of the License. |
0 | 13 * |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
1459 | 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
0 | 22 */ |
23 | |
24 #ifdef HAVE_CONFIG_H | |
25 # include "config.h" | |
26 #endif | |
27 | |
1631 | 28 #ifndef SHARED_SUFFIX |
29 # define SHARED_SUFFIX G_MODULE_SUFFIX | |
30 #endif | |
31 | |
0 | 32 #include "pluginenum.h" |
33 | |
34 #include <glib.h> | |
35 #include <gmodule.h> | |
36 #include <glib/gprintf.h> | |
37 #include <string.h> | |
38 | |
39 #include "controlsocket.h" | |
40 #include "main.h" | |
2237 | 41 #include "ui_main.h" |
538
e4e897d20791
[svn] remove libaudcore, we never did anything with it
nenolod
parents:
380
diff
changeset
|
42 #include "playback.h" |
0 | 43 #include "playlist.h" |
44 #include "util.h" | |
45 | |
46 #include "effect.h" | |
47 #include "general.h" | |
48 #include "input.h" | |
49 #include "output.h" | |
50 #include "visualization.h" | |
51 | |
52 const gchar *plugin_dir_list[] = { | |
53 PLUGINSUBS, | |
54 NULL | |
55 }; | |
56 | |
57 GHashTable *plugin_matrix = NULL; | |
1563 | 58 GList *lowlevel_list = NULL; |
0 | 59 |
60 static gint | |
61 inputlist_compare_func(gconstpointer a, gconstpointer b) | |
62 { | |
63 const InputPlugin *ap = a, *bp = b; | |
64 return strcasecmp(ap->description, bp->description); | |
65 } | |
66 | |
67 static gint | |
68 outputlist_compare_func(gconstpointer a, gconstpointer b) | |
69 { | |
70 const OutputPlugin *ap = a, *bp = b; | |
71 return strcasecmp(ap->description, bp->description); | |
72 } | |
73 | |
74 static gint | |
75 effectlist_compare_func(gconstpointer a, gconstpointer b) | |
76 { | |
77 const EffectPlugin *ap = a, *bp = b; | |
78 return strcasecmp(ap->description, bp->description); | |
79 } | |
80 | |
81 static gint | |
82 generallist_compare_func(gconstpointer a, gconstpointer b) | |
83 { | |
84 const GeneralPlugin *ap = a, *bp = b; | |
85 return strcasecmp(ap->description, bp->description); | |
86 } | |
87 | |
88 static gint | |
89 vislist_compare_func(gconstpointer a, gconstpointer b) | |
90 { | |
91 const VisPlugin *ap = a, *bp = b; | |
92 return strcasecmp(ap->description, bp->description); | |
93 } | |
94 | |
95 static gboolean | |
96 plugin_is_duplicate(const gchar * filename) | |
97 { | |
98 GList *l; | |
99 const gchar *basename = g_basename(filename); | |
100 | |
101 /* FIXME: messy stuff */ | |
102 | |
103 for (l = ip_data.input_list; l; l = g_list_next(l)) | |
104 if (!strcmp(basename, g_basename(INPUT_PLUGIN(l->data)->filename))) | |
105 return TRUE; | |
106 | |
107 for (l = op_data.output_list; l; l = g_list_next(l)) | |
108 if (!strcmp(basename, g_basename(OUTPUT_PLUGIN(l->data)->filename))) | |
109 return TRUE; | |
110 | |
111 for (l = ep_data.effect_list; l; l = g_list_next(l)) | |
112 if (!strcmp(basename, g_basename(EFFECT_PLUGIN(l->data)->filename))) | |
113 return TRUE; | |
114 | |
115 for (l = gp_data.general_list; l; l = g_list_next(l)) | |
116 if (!strcmp(basename, g_basename(GENERAL_PLUGIN(l->data)->filename))) | |
117 return TRUE; | |
118 | |
119 for (l = vp_data.vis_list; l; l = g_list_next(l)) | |
120 if (!strcmp(basename, g_basename(VIS_PLUGIN(l->data)->filename))) | |
121 return TRUE; | |
122 | |
1563 | 123 for (l = lowlevel_list; l; l = g_list_next(l)) |
124 if (!strcmp(basename, g_basename(VIS_PLUGIN(l->data)->filename))) | |
125 return TRUE; | |
126 | |
0 | 127 return FALSE; |
128 } | |
129 | |
130 | |
131 #define PLUGIN_GET_INFO(x) ((PluginGetInfoFunc)(x))() | |
132 typedef Plugin * (*PluginGetInfoFunc) (void); | |
133 | |
134 static void | |
135 input_plugin_init(Plugin * plugin) | |
136 { | |
137 InputPlugin *p = INPUT_PLUGIN(plugin); | |
138 | |
139 p->get_vis_type = input_get_vis_type; | |
140 p->add_vis_pcm = input_add_vis_pcm; | |
141 | |
142 /* Pretty const casts courtesy of XMMS's plugin.h legacy. Anyone | |
143 else thinks we could use a CONST macro to solve the warnings? | |
144 - descender */ | |
2098
425963ded156
[svn] - provide the old ABI for plugins (intermediate layer).
nenolod
parents:
2079
diff
changeset
|
145 p->set_info = (void (*)(gchar *, gint, gint, gint, gint)) playlist_set_info_old_abi; |
0 | 146 p->set_info_text = (void (*)(gchar *)) input_set_info_text; |
1273
3b990c26fc46
[svn] - Support for the buffer indicator in playpaus.png that was apparently
nhjm449
parents:
906
diff
changeset
|
147 p->set_status_buffering = (void (*)(gboolean)) input_set_status_buffering; |
3b990c26fc46
[svn] - Support for the buffer indicator in playpaus.png that was apparently
nhjm449
parents:
906
diff
changeset
|
148 |
0 | 149 ip_data.input_list = g_list_append(ip_data.input_list, p); |
150 | |
151 g_hash_table_replace(plugin_matrix, g_path_get_basename(p->filename), | |
152 GINT_TO_POINTER(1)); | |
153 } | |
154 | |
155 static void | |
156 output_plugin_init(Plugin * plugin) | |
157 { | |
158 OutputPlugin *p = OUTPUT_PLUGIN(plugin); | |
159 op_data.output_list = g_list_append(op_data.output_list, p); | |
160 } | |
161 | |
162 static void | |
163 effect_plugin_init(Plugin * plugin) | |
164 { | |
165 EffectPlugin *p = EFFECT_PLUGIN(plugin); | |
166 ep_data.effect_list = g_list_append(ep_data.effect_list, p); | |
167 } | |
168 | |
169 static void | |
170 general_plugin_init(Plugin * plugin) | |
171 { | |
172 GeneralPlugin *p = GENERAL_PLUGIN(plugin); | |
173 p->xmms_session = ctrlsocket_get_session_id(); | |
174 gp_data.general_list = g_list_append(gp_data.general_list, p); | |
175 } | |
176 | |
177 static void | |
178 vis_plugin_init(Plugin * plugin) | |
179 { | |
180 VisPlugin *p = VIS_PLUGIN(plugin); | |
181 p->xmms_session = ctrlsocket_get_session_id(); | |
182 p->disable_plugin = vis_disable_plugin; | |
183 vp_data.vis_list = g_list_append(vp_data.vis_list, p); | |
184 } | |
185 | |
1563 | 186 static void |
187 lowlevel_plugin_init(Plugin * plugin) | |
188 { | |
189 LowlevelPlugin *p = LOWLEVEL_PLUGIN(plugin); | |
190 lowlevel_list = g_list_append(lowlevel_list, p); | |
191 } | |
0 | 192 |
193 /* FIXME: Placed here (hopefully) temporarily - descender */ | |
194 | |
195 typedef struct { | |
196 const gchar *name; | |
197 const gchar *id; | |
198 void (*init)(Plugin *); | |
199 } PluginType; | |
200 | |
201 static PluginType plugin_types[] = { | |
202 { "input" , "get_iplugin_info", input_plugin_init }, | |
203 { "output" , "get_oplugin_info", output_plugin_init }, | |
204 { "effect" , "get_eplugin_info", effect_plugin_init }, | |
205 { "general" , "get_gplugin_info", general_plugin_init }, | |
206 { "visualization", "get_vplugin_info", vis_plugin_init }, | |
1563 | 207 { "lowlevel" , "get_lplugin_info", lowlevel_plugin_init }, |
0 | 208 { NULL, NULL, NULL } |
209 }; | |
210 | |
211 static void | |
212 add_plugin(const gchar * filename) | |
213 { | |
214 PluginType *type; | |
215 GModule *module; | |
216 gpointer func; | |
217 | |
218 if (plugin_is_duplicate(filename)) | |
219 return; | |
220 | |
1970
94a720c9bfef
[svn] - only GModule would be so dumb to push all symbols to the global
nenolod
parents:
1653
diff
changeset
|
221 if (!(module = g_module_open(filename, G_MODULE_BIND_LOCAL))) { |
12 | 222 printf("Failed to load plugin (%s): %s\n", |
0 | 223 filename, g_module_error()); |
224 return; | |
225 } | |
226 | |
227 for (type = plugin_types; type->name; type++) | |
228 { | |
229 if (g_module_symbol(module, type->id, &func)) { | |
230 Plugin *plugin = PLUGIN_GET_INFO(func); | |
231 | |
232 plugin->handle = module; | |
233 plugin->filename = g_strdup(filename); | |
234 type->init(PLUGIN_GET_INFO(func)); | |
235 | |
236 return; | |
237 } | |
238 } | |
239 | |
12 | 240 printf("Invalid plugin (%s)\n", filename); |
0 | 241 g_module_close(module); |
242 } | |
243 | |
244 static gboolean | |
245 scan_plugin_func(const gchar * path, const gchar * basename, gpointer data) | |
246 { | |
1631 | 247 if (!str_has_suffix_nocase(basename, SHARED_SUFFIX)) |
0 | 248 return FALSE; |
249 | |
250 if (!g_file_test(path, G_FILE_TEST_IS_REGULAR)) | |
251 return FALSE; | |
252 | |
253 add_plugin(path); | |
254 | |
255 return FALSE; | |
256 } | |
257 | |
258 static void | |
259 scan_plugins(const gchar * path) | |
260 { | |
261 dir_foreach(path, scan_plugin_func, NULL, NULL); | |
262 } | |
263 | |
264 void | |
265 plugin_system_init(void) | |
266 { | |
267 gchar *dir, **disabled; | |
268 GList *node; | |
269 OutputPlugin *op; | |
270 InputPlugin *ip; | |
1566 | 271 LowlevelPlugin *lp; |
0 | 272 gint dirsel = 0, i = 0; |
273 | |
274 if (!g_module_supported()) { | |
781
12c47704b4b5
[svn] Add error reporting for many places, patch by external contributor Derek
nenolod
parents:
687
diff
changeset
|
275 report_error("Module loading not supported! Plugins will not be loaded.\n"); |
0 | 276 return; |
277 } | |
278 | |
279 plugin_matrix = g_hash_table_new_full(g_str_hash, g_int_equal, g_free, | |
280 NULL); | |
281 | |
282 #ifndef DISABLE_USER_PLUGIN_DIR | |
283 scan_plugins(bmp_paths[BMP_PATH_USER_PLUGIN_DIR]); | |
284 /* | |
285 * This is in a separate loop so if the user puts them in the | |
286 * wrong dir we'll still get them in the right order (home dir | |
287 * first) - Zinx | |
288 */ | |
289 while (plugin_dir_list[dirsel]) { | |
290 dir = g_build_filename(bmp_paths[BMP_PATH_USER_PLUGIN_DIR], | |
291 plugin_dir_list[dirsel++], NULL); | |
292 scan_plugins(dir); | |
293 g_free(dir); | |
294 } | |
295 dirsel = 0; | |
296 #endif | |
297 | |
298 while (plugin_dir_list[dirsel]) { | |
299 dir = g_build_filename(PLUGIN_DIR, plugin_dir_list[dirsel++], NULL); | |
300 scan_plugins(dir); | |
301 g_free(dir); | |
302 } | |
303 | |
304 op_data.output_list = g_list_sort(op_data.output_list, outputlist_compare_func); | |
305 if (!op_data.current_output_plugin | |
306 && g_list_length(op_data.output_list)) { | |
307 op_data.current_output_plugin = op_data.output_list->data; | |
308 } | |
309 | |
310 ip_data.input_list = g_list_sort(ip_data.input_list, inputlist_compare_func); | |
311 | |
312 ep_data.effect_list = g_list_sort(ep_data.effect_list, effectlist_compare_func); | |
313 ep_data.enabled_list = NULL; | |
314 | |
315 gp_data.general_list = g_list_sort(gp_data.general_list, generallist_compare_func); | |
316 gp_data.enabled_list = NULL; | |
317 | |
318 vp_data.vis_list = g_list_sort(vp_data.vis_list, vislist_compare_func); | |
319 vp_data.enabled_list = NULL; | |
320 | |
321 general_enable_from_stringified_list(cfg.enabled_gplugins); | |
322 vis_enable_from_stringified_list(cfg.enabled_vplugins); | |
323 effect_enable_from_stringified_list(cfg.enabled_eplugins); | |
324 | |
325 g_free(cfg.enabled_gplugins); | |
326 cfg.enabled_gplugins = NULL; | |
327 | |
328 g_free(cfg.enabled_vplugins); | |
329 cfg.enabled_vplugins = NULL; | |
330 | |
331 g_free(cfg.enabled_eplugins); | |
332 cfg.enabled_eplugins = NULL; | |
333 | |
334 for (node = op_data.output_list; node; node = g_list_next(node)) { | |
335 op = OUTPUT_PLUGIN(node->data); | |
336 /* | |
337 * Only test basename to avoid problems when changing | |
338 * prefix. We will only see one plugin with the same | |
339 * basename, so this is usually what the user want. | |
340 */ | |
341 if (!strcmp(g_basename(cfg.outputplugin), g_basename(op->filename))) | |
342 op_data.current_output_plugin = op; | |
343 if (op->init) | |
344 op->init(); | |
345 } | |
346 | |
347 for (node = ip_data.input_list; node; node = g_list_next(node)) { | |
348 ip = INPUT_PLUGIN(node->data); | |
349 if (ip->init) | |
350 ip->init(); | |
351 } | |
352 | |
1566 | 353 for (node = lowlevel_list; node; node = g_list_next(node)) { |
354 lp = LOWLEVEL_PLUGIN(node->data); | |
355 if (lp->init) | |
356 lp->init(); | |
357 } | |
358 | |
0 | 359 if (cfg.disabled_iplugins) { |
360 disabled = g_strsplit(cfg.disabled_iplugins, ":", 0); | |
361 while (disabled[i]) { | |
362 g_hash_table_replace(plugin_matrix, disabled[i], | |
363 GINT_TO_POINTER(FALSE)); | |
364 i++; | |
365 } | |
366 | |
367 g_free(disabled); | |
368 | |
369 g_free(cfg.disabled_iplugins); | |
370 cfg.disabled_iplugins = NULL; | |
371 } | |
372 } | |
373 | |
374 void | |
375 plugin_system_cleanup(void) | |
376 { | |
377 InputPlugin *ip; | |
378 OutputPlugin *op; | |
379 EffectPlugin *ep; | |
380 GeneralPlugin *gp; | |
381 VisPlugin *vp; | |
1563 | 382 LowlevelPlugin *lp; |
0 | 383 GList *node; |
384 | |
385 g_message("Shutting down plugin system"); | |
386 | |
2228
894f7aa46f83
[svn] - bmp_playback_* -> playback_* -- i knew something smelled rotten here, hmm.
nenolod
parents:
2159
diff
changeset
|
387 if (playback_get_playing()) { |
906 | 388 ip_data.stop = TRUE; |
2228
894f7aa46f83
[svn] - bmp_playback_* -> playback_* -- i knew something smelled rotten here, hmm.
nenolod
parents:
2159
diff
changeset
|
389 playback_stop(); |
906 | 390 ip_data.stop = FALSE; |
391 } | |
0 | 392 |
393 for (node = get_input_list(); node; node = g_list_next(node)) { | |
394 ip = INPUT_PLUGIN(node->data); | |
395 if (ip && ip->cleanup) { | |
396 ip->cleanup(); | |
397 GDK_THREADS_LEAVE(); | |
2159
35bdfcd17ba7
[svn] - change the cleanup order in mainwin_quit_cb() to avoid freeze on quit.
yaz
parents:
2105
diff
changeset
|
398 while (g_main_context_iteration(NULL, FALSE)); |
0 | 399 GDK_THREADS_ENTER(); |
400 } | |
401 g_module_close(ip->handle); | |
402 } | |
403 | |
404 if (ip_data.input_list) | |
405 g_list_free(ip_data.input_list); | |
406 | |
407 for (node = get_output_list(); node; node = g_list_next(node)) { | |
408 op = OUTPUT_PLUGIN(node->data); | |
309 | 409 if (op && op->cleanup) { |
410 op->cleanup(); | |
411 GDK_THREADS_LEAVE(); | |
2159
35bdfcd17ba7
[svn] - change the cleanup order in mainwin_quit_cb() to avoid freeze on quit.
yaz
parents:
2105
diff
changeset
|
412 while (g_main_context_iteration(NULL, FALSE)); |
309 | 413 GDK_THREADS_ENTER(); |
414 } | |
0 | 415 g_module_close(op->handle); |
416 } | |
417 | |
418 if (op_data.output_list) | |
419 g_list_free(op_data.output_list); | |
420 | |
421 for (node = get_effect_list(); node; node = g_list_next(node)) { | |
422 ep = EFFECT_PLUGIN(node->data); | |
423 if (ep && ep->cleanup) { | |
424 ep->cleanup(); | |
425 GDK_THREADS_LEAVE(); | |
2159
35bdfcd17ba7
[svn] - change the cleanup order in mainwin_quit_cb() to avoid freeze on quit.
yaz
parents:
2105
diff
changeset
|
426 while (g_main_context_iteration(NULL, FALSE)); |
0 | 427 GDK_THREADS_ENTER(); |
428 } | |
429 g_module_close(ep->handle); | |
430 } | |
431 | |
432 if (ep_data.effect_list) | |
433 g_list_free(ep_data.effect_list); | |
434 | |
2079
78002535143b
[svn] remove plugin-reactivation loops for general and visualization plugins
yaz
parents:
1970
diff
changeset
|
435 #if 0 |
0 | 436 for (node = get_general_enabled_list(); node; node = g_list_next(node)) { |
437 gp = GENERAL_PLUGIN(node->data); | |
438 enable_general_plugin(g_list_index(gp_data.general_list, gp), FALSE); | |
439 } | |
440 | |
441 if (gp_data.enabled_list) | |
442 g_list_free(gp_data.enabled_list); | |
443 | |
444 GDK_THREADS_LEAVE(); | |
2159
35bdfcd17ba7
[svn] - change the cleanup order in mainwin_quit_cb() to avoid freeze on quit.
yaz
parents:
2105
diff
changeset
|
445 while (g_main_context_iteration(NULL, FALSE)); |
0 | 446 GDK_THREADS_ENTER(); |
2079
78002535143b
[svn] remove plugin-reactivation loops for general and visualization plugins
yaz
parents:
1970
diff
changeset
|
447 #endif |
0 | 448 |
449 for (node = get_general_list(); node; node = g_list_next(node)) { | |
450 gp = GENERAL_PLUGIN(node->data); | |
650
980d651da2fc
[svn] Actually use the cleanup hooks on general & visualization plugins.
chainsaw
parents:
538
diff
changeset
|
451 if (gp && gp->cleanup) { |
980d651da2fc
[svn] Actually use the cleanup hooks on general & visualization plugins.
chainsaw
parents:
538
diff
changeset
|
452 gp->cleanup(); |
980d651da2fc
[svn] Actually use the cleanup hooks on general & visualization plugins.
chainsaw
parents:
538
diff
changeset
|
453 GDK_THREADS_LEAVE(); |
2159
35bdfcd17ba7
[svn] - change the cleanup order in mainwin_quit_cb() to avoid freeze on quit.
yaz
parents:
2105
diff
changeset
|
454 while (g_main_context_iteration(NULL, FALSE)); |
650
980d651da2fc
[svn] Actually use the cleanup hooks on general & visualization plugins.
chainsaw
parents:
538
diff
changeset
|
455 GDK_THREADS_ENTER(); |
980d651da2fc
[svn] Actually use the cleanup hooks on general & visualization plugins.
chainsaw
parents:
538
diff
changeset
|
456 } |
0 | 457 g_module_close(gp->handle); |
458 } | |
459 | |
460 if (gp_data.general_list) | |
461 g_list_free(gp_data.general_list); | |
462 | |
2079
78002535143b
[svn] remove plugin-reactivation loops for general and visualization plugins
yaz
parents:
1970
diff
changeset
|
463 #if 0 |
0 | 464 for (node = get_vis_enabled_list(); node; node = g_list_next(node)) { |
465 vp = VIS_PLUGIN(node->data); | |
466 enable_vis_plugin(g_list_index(vp_data.vis_list, vp), FALSE); | |
467 } | |
468 | |
469 if (vp_data.enabled_list) | |
470 g_list_free(vp_data.enabled_list); | |
471 | |
472 GDK_THREADS_LEAVE(); | |
2159
35bdfcd17ba7
[svn] - change the cleanup order in mainwin_quit_cb() to avoid freeze on quit.
yaz
parents:
2105
diff
changeset
|
473 while (g_main_context_iteration(NULL, FALSE)); |
0 | 474 GDK_THREADS_ENTER(); |
2079
78002535143b
[svn] remove plugin-reactivation loops for general and visualization plugins
yaz
parents:
1970
diff
changeset
|
475 #endif |
0 | 476 |
477 for (node = get_vis_list(); node; node = g_list_next(node)) { | |
478 vp = VIS_PLUGIN(node->data); | |
650
980d651da2fc
[svn] Actually use the cleanup hooks on general & visualization plugins.
chainsaw
parents:
538
diff
changeset
|
479 if (vp && vp->cleanup) { |
980d651da2fc
[svn] Actually use the cleanup hooks on general & visualization plugins.
chainsaw
parents:
538
diff
changeset
|
480 vp->cleanup(); |
980d651da2fc
[svn] Actually use the cleanup hooks on general & visualization plugins.
chainsaw
parents:
538
diff
changeset
|
481 GDK_THREADS_LEAVE(); |
2159
35bdfcd17ba7
[svn] - change the cleanup order in mainwin_quit_cb() to avoid freeze on quit.
yaz
parents:
2105
diff
changeset
|
482 while (g_main_context_iteration(NULL, FALSE)); |
650
980d651da2fc
[svn] Actually use the cleanup hooks on general & visualization plugins.
chainsaw
parents:
538
diff
changeset
|
483 GDK_THREADS_ENTER(); |
980d651da2fc
[svn] Actually use the cleanup hooks on general & visualization plugins.
chainsaw
parents:
538
diff
changeset
|
484 } |
0 | 485 g_module_close(vp->handle); |
486 } | |
487 | |
488 if (vp_data.vis_list) | |
489 g_list_free(vp_data.vis_list); | |
1563 | 490 |
491 for (node = lowlevel_list; node; node = g_list_next(node)) { | |
492 lp = LOWLEVEL_PLUGIN(node->data); | |
493 if (lp && lp->cleanup) { | |
494 lp->cleanup(); | |
495 GDK_THREADS_LEAVE(); | |
2159
35bdfcd17ba7
[svn] - change the cleanup order in mainwin_quit_cb() to avoid freeze on quit.
yaz
parents:
2105
diff
changeset
|
496 while (g_main_context_iteration(NULL, FALSE)); |
1563 | 497 GDK_THREADS_ENTER(); |
498 } | |
499 g_module_close(lp->handle); | |
500 } | |
501 | |
502 if (lowlevel_list) | |
503 g_list_free(lowlevel_list); | |
0 | 504 } |