From 0d6efd18c9b4b5d12cb31f69bbf8dc1d548d953d Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Thu, 3 Dec 2009 04:00:34 +0000 Subject: [PATCH] Fix E crash when module is unloaded while dialog is up. ATTN Devs: -------------------------- SOMEONE changed all the window class settings for these modules, so now when a module gets unloaded, the respective config dialogs are not closed, leading to E crashes. An Example if someone wants to tackle changing all these cause I don't have the time right now: e_modapi_shutdown -------------------------- while ((cfd = e_config_dialog_find("E", "_config_desk_dialog"))) e_object_del(E_OBJECT(cfd)); You will see a ton of these lines in e/src/modules. Basically, when the config dialog gets created, we assign a icccm name & class to that dialog: e_config_dialog_new(con, _("Label"), "E", "_config_desk_dialog"); The class needs to match what is used in e_modapi_shutdown !!! In just about every existing module in e/src/modules/, the class names are not set correctly when the dialog gets created. This needs fixing badly !!! SVN revision: 44156 --- src/modules/conf_borders/e_int_config_borders.c | 4 ++-- src/modules/conf_borders/e_mod_main.c | 14 -------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/modules/conf_borders/e_int_config_borders.c b/src/modules/conf_borders/e_int_config_borders.c index 6254b38..37c5274 100644 --- a/src/modules/conf_borders/e_int_config_borders.c +++ b/src/modules/conf_borders/e_int_config_borders.c @@ -28,7 +28,7 @@ e_int_config_borders(E_Container *con, const char *params __UNUSED__) v = _config_view_new(); if (!v) return NULL; cfd = e_config_dialog_new(con, _("Default Border Style"), - "E", "appearance/borders", + "E", "_config_border_style_dialog", "preferences-system-windows", 0, v, con); return cfd; } @@ -48,7 +48,7 @@ e_int_config_borders_border(E_Container *con __UNUSED__, const char *params) if (!v) return NULL; cfd = e_config_dialog_new(bd->zone->container, _("Window Border Selection"), - "E", "internal/borders_border", + "E", "_config_border_border_style_dialog", "preferences-system-windows", 0, v, bd); bd->border_border_dialog = cfd; return cfd; diff --git a/src/modules/conf_borders/e_mod_main.c b/src/modules/conf_borders/e_mod_main.c index 3ab22b8..d1c9f1a 100644 --- a/src/modules/conf_borders/e_mod_main.c +++ b/src/modules/conf_borders/e_mod_main.c @@ -4,23 +4,9 @@ #include "e.h" #include "e_mod_main.h" -/***************************************************************************/ -/**/ /* actual module specifics */ - static E_Module *conf_module = NULL; -/**/ -/***************************************************************************/ - -/***************************************************************************/ -/**/ - -/**/ -/***************************************************************************/ - -/***************************************************************************/ -/**/ /* module setup */ EAPI E_Module_Api e_modapi = { -- 2.7.4