Index: modules/menu/desktop-menu-file.c =================================================================== RCS file: /var/cvs/xfce/xfce4/xfdesktop/modules/menu/desktop-menu-file.c,v retrieving revision 1.31 diff -u -r1.31 desktop-menu-file.c --- modules/menu/desktop-menu-file.c 17 Oct 2004 09:04:39 -0000 1.31 +++ modules/menu/desktop-menu-file.c 17 Nov 2004 09:03:11 -0000 @@ -82,7 +82,11 @@ MI_BUILTIN_QUIT = 1 }; +#if 0 G_MODULE_IMPORT void quit(gboolean force); +#else +static void (*builtin_quit)(gboolean) = NULL; +#endif struct MenuFileParserState { gboolean started; @@ -114,7 +118,22 @@ switch(type) { case MI_BUILTIN_QUIT: +#if 0 quit(FALSE); +#else + if(!builtin_quit) { + GModule *parent_exe = g_module_open(NULL, 0); + if(parent_exe) { + if(g_module_symbol(parent_exe, "quit", + (gpointer)&builtin_quit)) + { + builtin_quit(FALSE); + } else + g_warning("XfceDesktopMenu: Unable to find 'quit' symbol in parent executable."); + } else + g_warning("XfceDesktopMenu: Unable to dlopen() parent exe."); + } +#endif break; default: g_warning("XfceDesktopMenu: unknown builtin type (%d)\n", type);