forked from enlightenment/enlightenment
If a module has a config dialogue, destroy it on module shutdown
SVN revision: 19575
This commit is contained in:
parent
0507be1d85
commit
b1d75321d1
|
@ -40,6 +40,7 @@ _config_battery_module(E_Container *con, Battery *bat)
|
|||
v.advanced.create_widgets = _advanced_create_widgets;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Battery Configuration"), NULL, 0, &v, bat);
|
||||
bat->config_dialog = cfd;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -95,9 +95,15 @@ e_modapi_shutdown(E_Module *m)
|
|||
m->config_menu = NULL;
|
||||
|
||||
e = m->data;
|
||||
if (e)
|
||||
_battery_shutdown(e);
|
||||
|
||||
if (e)
|
||||
{
|
||||
if (e->config_dialog)
|
||||
{
|
||||
e_object_del(E_OBJECT(e->config_dialog));
|
||||
e->config_dialog = NULL;
|
||||
}
|
||||
_battery_shutdown(e);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ struct _Battery
|
|||
int battery_prev_drain;
|
||||
int battery_prev_ac;
|
||||
int battery_prev_battery;
|
||||
E_Config_Dialog *config_dialog;
|
||||
};
|
||||
|
||||
struct _Battery_Face
|
||||
|
|
|
@ -38,6 +38,7 @@ _config_clock_module(E_Container *con, Clock_Face *c)
|
|||
|
||||
/* Create The Dialog */
|
||||
cfd = e_config_dialog_new(con, _("Clock Configuration"), NULL, 0, &v, c);
|
||||
c->config_dialog = cfd;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -62,9 +62,10 @@ e_modapi_shutdown(E_Module *module)
|
|||
module->config_menu = NULL;
|
||||
|
||||
clock = module->data;
|
||||
if (clock)
|
||||
_clock_shutdown(clock);
|
||||
|
||||
if (clock)
|
||||
{
|
||||
_clock_shutdown(clock);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -295,6 +296,11 @@ _clock_face_new(E_Container *con)
|
|||
static void
|
||||
_clock_face_free(Clock_Face *face)
|
||||
{
|
||||
if (face->config_dialog)
|
||||
{
|
||||
e_object_del(E_OBJECT(face->config_dialog));
|
||||
face->config_dialog = NULL;
|
||||
}
|
||||
e_object_unref(E_OBJECT(face->con));
|
||||
e_object_del(E_OBJECT(face->gmc));
|
||||
evas_object_del(face->clock_object);
|
||||
|
|
|
@ -42,6 +42,7 @@ struct _Clock_Face
|
|||
Evas_Object *event_object;
|
||||
|
||||
E_Gadman_Client *gmc;
|
||||
E_Config_Dialog *config_dialog;
|
||||
};
|
||||
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
|
|
@ -40,6 +40,7 @@ _config_dropshadow_module(E_Container *con, Dropshadow *ds)
|
|||
v.advanced.create_widgets = NULL;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Dropshadow Configuration"), NULL, 0, &v, ds);
|
||||
ds->config_dialog = cfd;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -129,7 +129,15 @@ e_modapi_shutdown(E_Module *m)
|
|||
Dropshadow *ds;
|
||||
|
||||
ds = m->data;
|
||||
if (ds) _ds_shutdown(ds);
|
||||
if (ds)
|
||||
{
|
||||
if (ds->config_dialog)
|
||||
{
|
||||
e_object_del(E_OBJECT(ds->config_dialog));
|
||||
ds->config_dialog = NULL;
|
||||
}
|
||||
_ds_shutdown(ds);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ struct _Dropshadow
|
|||
|
||||
E_Config_DD *conf_edd;
|
||||
Config *conf;
|
||||
E_Config_Dialog *config_dialog;
|
||||
|
||||
struct {
|
||||
unsigned char *gauss;
|
||||
|
|
|
@ -45,6 +45,7 @@ _config_ibar_module(E_Container *con, IBar *ibar)
|
|||
|
||||
/* Create The Dialog */
|
||||
cfd = e_config_dialog_new(con, _("IBar Configuration"), NULL, 0, &v, ibar);
|
||||
ibar->config_dialog = cfd;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -125,8 +125,15 @@ e_modapi_shutdown(E_Module *m)
|
|||
m->config_menu = NULL;
|
||||
|
||||
ib = m->data;
|
||||
if (ib)
|
||||
_ibar_free(ib);
|
||||
if (ib)
|
||||
{
|
||||
if (ib->config_dialog)
|
||||
{
|
||||
e_object_del(E_OBJECT(ib->config_dialog));
|
||||
ib->config_dialog = NULL;
|
||||
}
|
||||
_ibar_free(ib);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ struct _IBar
|
|||
E_Menu *config_menu;
|
||||
|
||||
Config *conf;
|
||||
E_Config_Dialog *config_dialog;
|
||||
};
|
||||
|
||||
struct _IBar_Bar
|
||||
|
|
Loading…
Reference in New Issue