If a module has a config dialogue, destroy it on module shutdown

SVN revision: 19576
This commit is contained in:
Christopher Michael 2006-01-06 21:45:57 +00:00
parent b1d75321d1
commit 6bf7badbe5
9 changed files with 36 additions and 10 deletions

View File

@ -44,6 +44,7 @@ _config_ibox_module(E_Container *con, IBox *ibox)
/* Create The Dialog */
cfd = e_config_dialog_new(con, _("IBox Configuration"), NULL, 0, &v, ibox);
ibox->config_dialog = cfd;
}
static void

View File

@ -111,8 +111,15 @@ e_modapi_shutdown(E_Module *m)
m->config_menu = NULL;
ib = m->data;
if (ib)
_ibox_free(ib);
if (ib)
{
if (ib->config_dialog)
{
e_object_del(E_OBJECT(ib->config_dialog));
ib->config_dialog = NULL;
}
_ibox_free(ib);
}
return 1;
}

View File

@ -34,6 +34,7 @@ struct _IBox
E_Menu *config_menu;
Config *conf;
E_Config_Dialog *config_dialog;
};
struct _IBox_Box

View File

@ -41,6 +41,7 @@ _config_pager_module(E_Container *con, Pager *pager)
v.advanced.create_widgets = _advanced_create_widgets;
cfd = e_config_dialog_new(con, _("Pager Configuration"), NULL, 0, &v, pager);
pager->config_dialog = cfd;
}
static void

View File

@ -118,9 +118,15 @@ e_modapi_shutdown(E_Module *module)
module->config_menu = NULL;
pager = module->data;
if (pager)
_pager_free(pager);
if (pager)
{
if (pager->config_dialog)
{
e_object_del(E_OBJECT(pager->config_dialog));
pager->config_dialog = NULL;
}
_pager_free(pager);
}
return 1;
}

View File

@ -68,6 +68,8 @@ struct _Pager
Ecore_Event_Handler *ev_handler_zone_desk_count_set;
Ecore_Event_Handler *ev_handler_desk_show;
Ecore_Event_Handler *ev_handler_desk_name_change;
E_Config_Dialog *config_dialog;
};
struct _Pager_Face

View File

@ -63,6 +63,7 @@ _config_temperature_module(E_Container *con, Temperature *temp)
v.advanced.create_widgets = _advanced_create_widgets;
cfd = e_config_dialog_new(con, _("Temperature Configuration"), NULL, 0, &v, temp);
temp->config_dialog = cfd;
}
static void

View File

@ -65,8 +65,15 @@ e_modapi_shutdown(E_Module *m)
m->config_menu = NULL;
e = m->data;
if (e)
_temperature_free(e);
if (e)
{
if (e->config_dialog)
{
e_object_del(E_OBJECT(e->config_dialog));
e->config_dialog = NULL;
}
_temperature_free(e);
}
return 1;
}

View File

@ -41,13 +41,13 @@ struct _Temperature
Config *conf;
Ecore_Timer *temperature_check_timer;
unsigned char have_temp;
E_Config_Dialog *config_dialog;
unsigned char have_temp;
};
struct _Temperature_Face
{
Temperature *temp;
Temperature *temp;
E_Container *con;
E_Menu *menu;
Config_Face *conf;