[email protected] wrote:
> On Thu, Dec 3, 2009 at 4:41 AM, Enlightenment SVN
> <[email protected]> wrote:
>> Log:
>> Use proper config dialog window class, so that when the module gets
>> unloaded, any existing dialogs are killed. This stops a crash that was
>> happening if the module was unloaded while the dialog was shown.
>>
>
> the window class is used for remembering the config registry path to
> reopen dialogs after restart. I would suggest to revert these changes
> and use the registry path in e_config_dialog_get (where it was
> missing) instead. At least until there is better way for restoring
> dialogs.
>
Ahh so we are bastardizing the purpose of the window class todo
remembers ? That explains why the window class names were all goofy,
thanks :) Yea, Gonna revert all this and you the registry path to check
for config dialogs on module close. Thanks for the explanation :)
dh
>
>> Author: devilhorns
>> Date: 2009-12-02 19:41:24 -0800 (Wed, 02 Dec 2009)
>> New Revision: 44153
>>
>> Modified:
>> trunk/e/src/modules/conf_theme/e_int_config_theme.c
>> trunk/e/src/modules/conf_theme/e_mod_main.c
>>
>> Modified: trunk/e/src/modules/conf_theme/e_int_config_theme.c
>> ===================================================================
>> --- trunk/e/src/modules/conf_theme/e_int_config_theme.c 2009-12-03 02:41:09
>> UTC (rev 44152)
>> +++ trunk/e/src/modules/conf_theme/e_int_config_theme.c 2009-12-03 03:41:24
>> UTC (rev 44153)
>> @@ -6,14 +6,14 @@
>> #include "e_int_config_theme_import.h"
>> #include "e_int_config_theme_web.h"
>>
>> -static void *_create_data (E_Config_Dialog *cfd);
>> -static void _free_data (E_Config_Dialog *cfd,
>> E_Config_Dialog_Data *cfdata);
>> -static void _fill_data (E_Config_Dialog_Data
>> *cfdata);
>> -static int _basic_apply_data (E_Config_Dialog *cfd,
>> E_Config_Dialog_Data *cfdata);
>> -static Evas_Object *_basic_create_widgets (E_Config_Dialog *cfd, Evas
>> *evas, E_Config_Dialog_Data *cfdata);
>> -static int _advanced_apply_data (E_Config_Dialog *cfd,
>> E_Config_Dialog_Data *cfdata);
>> -static Evas_Object *_advanced_create_widgets (E_Config_Dialog *cfd, Evas
>> *evas, E_Config_Dialog_Data *cfdata);
>> -static Eina_List *_get_theme_categories_list (void);
>> +static void *_create_data(E_Config_Dialog *cfd);
>> +static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
>> +static void _fill_data(E_Config_Dialog_Data *cfdata);
>> +static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data
>> *cfdata);
>> +static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas,
>> E_Config_Dialog_Data *cfdata);
>> +static int _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data
>> *cfdata);
>> +static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas
>> *evas, E_Config_Dialog_Data *cfdata);
>> +static Eina_List *_get_theme_categories_list(void);
>>
>> struct _E_Config_Dialog_Data
>> {
>> @@ -31,43 +31,44 @@
>> /* Advanced */
>> Evas_Object *o_categories_ilist;
>> Evas_Object *o_files_ilist;
>> - int personal_file_count;
>> - Eina_List *theme_list;
>> - Eina_List *parts_list;
>> + int personal_file_count;
>> + Eina_List *theme_list;
>> + Eina_List *parts_list;
>>
>> /* Dialog */
>> - E_Win *win_import;
>> + E_Win *win_import;
>> E_Dialog *dia_web;
>> };
>>
>> -static const char *parts_list[] = {
>> - "about:e/widgets/about/main",
>> - "borders:e/widgets/border/default/border",
>> - "background:e/desktop/background",
>> - "configure:e/widgets/configure/main",
>> - "dialog:e/widgets/dialog/main",
>> - "dnd:ZZZ",
>> - "error:e/error/main",
>> - "exebuf:e/widgets/exebuf/main",
>> - "fileman:ZZZ",
>> - "gadman:e/gadman/control",
>> - "icons:ZZZ",
>> - "menus:ZZZ",
>> - "modules:ZZZ",
>> - "modules/pager:e/widgets/pager/popup",
>> - "modules/ibar:ZZZ",
>> - "modules/ibox:ZZZ",
>> - "modules/clock:e/modules/clock/main",
>> - "modules/battery:e/modules/battery/main",
>> - "modules/cpufreq:e/modules/cpufreq/main",
>> - "modules/start:e/modules/start/main",
>> - "modules/temperature:e/modules/temperature/main",
>> - "pointer:e/pointer",
>> - "shelf:e/shelf/default/base",
>> - "transitions:ZZZ",
>> - "widgets:ZZZ",
>> - "winlist:e/widgets/winlist/main",
>> - NULL
>> +static const char *parts_list[] =
>> +{
>> + "about:e/widgets/about/main",
>> + "borders:e/widgets/border/default/border",
>> + "background:e/desktop/background",
>> + "configure:e/widgets/configure/main",
>> + "dialog:e/widgets/dialog/main",
>> + "dnd:ZZZ",
>> + "error:e/error/main",
>> + "exebuf:e/widgets/exebuf/main",
>> + "fileman:ZZZ",
>> + "gadman:e/gadman/control",
>> + "icons:ZZZ",
>> + "menus:ZZZ",
>> + "modules:ZZZ",
>> + "modules/pager:e/widgets/pager/popup",
>> + "modules/ibar:ZZZ",
>> + "modules/ibox:ZZZ",
>> + "modules/clock:e/modules/clock/main",
>> + "modules/battery:e/modules/battery/main",
>> + "modules/cpufreq:e/modules/cpufreq/main",
>> + "modules/start:e/modules/start/main",
>> + "modules/temperature:e/modules/temperature/main",
>> + "pointer:e/pointer",
>> + "shelf:e/shelf/default/base",
>> + "transitions:ZZZ",
>> + "widgets:ZZZ",
>> + "winlist:e/widgets/winlist/main",
>> + NULL
>> };
>>
>> EAPI E_Config_Dialog *
>> @@ -76,19 +77,19 @@
>> E_Config_Dialog *cfd;
>> E_Config_Dialog_View *v;
>>
>> - if (e_config_dialog_find("E", "appearance/theme")) return NULL;
>> + if (e_config_dialog_find("E", "_config_theme_dialog")) return NULL;
>> v = E_NEW(E_Config_Dialog_View, 1);
>>
>> - v->create_cfdata = _create_data;
>> - v->free_cfdata = _free_data;
>> - v->basic.apply_cfdata = _basic_apply_data;
>> - v->basic.create_widgets = _basic_create_widgets;
>> - v->advanced.apply_cfdata = _advanced_apply_data;
>> + v->create_cfdata = _create_data;
>> + v->free_cfdata = _free_data;
>> + v->basic.apply_cfdata = _basic_apply_data;
>> + v->basic.create_widgets = _basic_create_widgets;
>> + v->advanced.apply_cfdata = _advanced_apply_data;
>> v->advanced.create_widgets = _advanced_create_widgets;
>> v->override_auto_apply = 1;
>> cfd = e_config_dialog_new(con,
>> _("Theme Selector"),
>> - "E", "appearance/theme",
>> + "E", "_config_theme_dialog",
>> "preferences-desktop-theme", 0, v, NULL);
>> return cfd;
>> }
>> @@ -130,7 +131,8 @@
>> e_widget_flist_path_set(cfdata->o_fm, path, "/");
>>
>> if (cfdata->o_preview)
>> - e_widget_preview_edje_set(cfdata->o_preview, cfdata->theme,
>> "e/desktop/background");
>> + e_widget_preview_edje_set(cfdata->o_preview, cfdata->theme,
>> + "e/desktop/background");
>> if (cfdata->o_fm) e_widget_change(cfdata->o_fm);
>> }
>>
>>
>> Modified: trunk/e/src/modules/conf_theme/e_mod_main.c
>> ===================================================================
>> --- trunk/e/src/modules/conf_theme/e_mod_main.c 2009-12-03 02:41:09 UTC (rev
>> 44152)
>> +++ trunk/e/src/modules/conf_theme/e_mod_main.c 2009-12-03 03:41:24 UTC (rev
>> 44153)
>> @@ -4,27 +4,13 @@
>> #include "e.h"
>> #include "e_mod_main.h"
>>
>> -/***************************************************************************/
>> -/**/
>> /* actual module specifics */
>> +static void _e_mod_run_cb(void *data, E_Menu *m, E_Menu_Item *mi);
>> +static void _e_mod_menu_add(void *data, E_Menu *m);
>>
>> -static void _e_mod_run_cb(void *data, E_Menu *m, E_Menu_Item *mi);
>> -static void _e_mod_menu_add(void *data, E_Menu *m);
>> -
>> static E_Module *conf_module = NULL;
>> static E_Int_Menu_Augmentation *maug = NULL;
>>
>> -/**/
>> -/***************************************************************************/
>> -
>> -/***************************************************************************/
>> -/**/
>> -
>> -/**/
>> -/***************************************************************************/
>> -
>> -/***************************************************************************/
>> -/**/
>> /* module setup */
>> EAPI E_Module_Api e_modapi =
>> {
>> @@ -35,10 +21,16 @@
>> EAPI void *
>> e_modapi_init(E_Module *m)
>> {
>> - e_configure_registry_category_add("appearance", 10, _("Look"), NULL,
>> "preferences-appearance");
>> - e_configure_registry_item_add("appearance/theme", 20, _("Theme"), NULL,
>> "preferences-desktop-theme", e_int_config_theme);
>> - maug = e_int_menus_menu_augmentation_add_sorted("config/1", _("Theme"),
>> _e_mod_menu_add, NULL, NULL, NULL);
>> + e_configure_registry_category_add("appearance", 10, _("Look"), NULL,
>> + "preferences-appearance");
>> + e_configure_registry_item_add("appearance/theme", 20, _("Theme"), NULL,
>> + "preferences-desktop-theme",
>> + e_int_config_theme);
>>
>> + maug =
>> + e_int_menus_menu_augmentation_add_sorted("config/1", _("Theme"),
>> + _e_mod_menu_add, NULL, NULL,
>> NULL);
>> +
>> conf_module = m;
>> e_module_delayed_set(m, 1);
>> return m;
>> @@ -48,13 +40,17 @@
>> e_modapi_shutdown(E_Module *m)
>> {
>> E_Config_Dialog *cfd;
>> +
>> /* remove module-supplied menu additions */
>> if (maug)
>> {
>> e_int_menus_menu_augmentation_del("config/1", maug);
>> maug = NULL;
>> }
>> - while ((cfd = e_config_dialog_get("E", "_config_theme_dialog")))
>> e_object_del(E_OBJECT(cfd));
>> +
>> + while ((cfd = e_config_dialog_get("E", "_config_theme_dialog")))
>> + e_object_del(E_OBJECT(cfd));
>> +
>> e_configure_registry_item_del("appearance/theme");
>> e_configure_registry_category_del("appearance");
>> conf_module = NULL;
=
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel