XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL

Erik Harrison erikharrison at xfce.org
Mon Sep 26 04:32:44 CEST 2005


For the new panel, is it necessary to have the plugin author drag in
all of stdlib just to get exit()? Wouldn't it be better to simply
gtk_main_quit() and fall off of main()? Something like

void xfce_panel_plugin_exit () {
    while (gtk_main_level()) {
        gtk_main_quit();
}

and register that as the callback instead of exit().

The only advantage I see to using exit directly is that the plugin
author can register stuff to run atexit - but that's a little hacky to
me anyway, since it doesn't work for internal plugins. A "finalize"
signal or similar might be better - which could eliminate the loop
with gtk_main_level by giving plugin authors the chance to kill any
additional mainloops themselves, and just use gtk_main_quit() as the
callback directly.

--
Erik

"If Beethoven had been killed in a plane crash at the age of 22, it
would have changed the history of music... and of aviation."



More information about the Xfce4-dev mailing list