static void main_window_response (GtkWidget *widget, gint response_id, AppearanceData *data) { if (response_id == GTK_RESPONSE_CLOSE || response_id == GTK_RESPONSE_DELETE_EVENT) { gtk_main_quit (); themes_shutdown (data); style_shutdown (data); desktop_shutdown (data); font_shutdown (data); support_shutdown (data); g_object_unref (data->thumb_factory); g_object_unref (data->settings); g_object_unref (data->wp_settings); g_object_unref (data->caja_settings); g_object_unref (data->interface_settings); g_object_unref (data->marco_settings); g_object_unref (data->mouse_settings); #ifdef HAVE_XFT2 g_object_unref (data->font_settings); #endif /* HAVE_XFT2 */ g_object_unref (data->ui); } else if (response_id == GTK_RESPONSE_HELP) { GtkNotebook *nb; gint pindex; nb = GTK_NOTEBOOK (appearance_capplet_get_widget (data, "main_notebook")); pindex = gtk_notebook_get_current_page (nb); switch (pindex) { case 0: /* theme */ capplet_help (GTK_WINDOW (widget), "goscustdesk-12"); break; case 1: /* background */ capplet_help (GTK_WINDOW (widget), "goscustdesk-7"); break; case 2: /* fonts */ capplet_help (GTK_WINDOW (widget), "goscustdesk-38"); break; case 3: /* interface */ capplet_help (GTK_WINDOW (widget), "goscustuserinter-2"); break; default: capplet_help (GTK_WINDOW (widget), "prefs-look-and-feel"); break; } } }
void plugin_reconfigure(bool force) { if (force || (FileExists(config_path_mainscript) && check_mainscript_filetime())) { _restart_specific_systems(); //Reload config file config_load(config_path_mainscript, &globalmodule); control_checklast(); } else { style_shutdown(); style_startup(); control_invalidate(); } }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //plugin_reconfigure //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static void _restart_specific_systems(void) { //Shutdown specific systems module_shutdown(); variables_shutdown(); control_shutdown(); agent_shutdown(); style_shutdown(); plugin_controls_shutdown(); plugin_agents_shutdown(); //Restart agent and control masters style_startup(); control_startup(); agent_startup(); plugin_controls_startup(); plugin_agents_startup(); module_startup(); variables_startup(); }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //plugin_shutdown //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void plugin_shutdown(bool save) { message_interpret(globalmodule.actions[MODULE_ACTION_ONUNLOAD], false, &globalmodule); //Save config settings if (save) config_save(config_path_mainscript); //Shutdown the message & dialog system message_shutdown(); dialog_shutdown(); //Shutdown agents and controls variables_shutdown(); module_shutdown(); control_shutdown(); agent_shutdown(); //Shutdown the windowing system window_shutdown(); //Shutdown the style system. style_shutdown(); //Shutdown control types plugin_controls_shutdown(); //Shutdown agents plugin_agents_shutdown(); tooltip_shutdown(); //Shutdown the configuration system config_shutdown(); menu_shutdown(); }