forked from enlightenment/enlightenment
parent
c0430f9e9d
commit
3ed23f7688
|
@ -8,9 +8,9 @@ struct _E_Config_Dialog_Data
|
||||||
|
|
||||||
static void *_create_data(E_Config_Dialog *cfd);
|
static void *_create_data(E_Config_Dialog *cfd);
|
||||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||||
static void _fill_data(E_Config_Dialog_Data *cfdata);
|
|
||||||
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||||
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||||
|
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_conf_module(E_Container *con, const char *params __UNUSED__)
|
e_int_config_conf_module(E_Container *con, const char *params __UNUSED__)
|
||||||
|
@ -29,6 +29,7 @@ e_int_config_conf_module(E_Container *con, const char *params __UNUSED__)
|
||||||
v->free_cfdata = _free_data;
|
v->free_cfdata = _free_data;
|
||||||
v->basic.create_widgets = _basic_create;
|
v->basic.create_widgets = _basic_create;
|
||||||
v->basic.apply_cfdata = _basic_apply;
|
v->basic.apply_cfdata = _basic_apply;
|
||||||
|
v->basic.check_changed = _basic_check_changed;
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s/e-module-conf.edj", conf->module->dir);
|
snprintf(buf, sizeof(buf), "%s/e-module-conf.edj", conf->module->dir);
|
||||||
cfd = e_config_dialog_new(con, _("Configuration Panel"), "Conf",
|
cfd = e_config_dialog_new(con, _("Configuration Panel"), "Conf",
|
||||||
|
@ -41,10 +42,9 @@ e_int_config_conf_module(E_Container *con, const char *params __UNUSED__)
|
||||||
static void *
|
static void *
|
||||||
_create_data(E_Config_Dialog *cfd __UNUSED__)
|
_create_data(E_Config_Dialog *cfd __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog_Data *cfdata = NULL;
|
E_Config_Dialog_Data *cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
||||||
|
if (!cfdata) return NULL;
|
||||||
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
cfdata->menu_augmentation = conf->menu_augmentation;
|
||||||
_fill_data(cfdata);
|
|
||||||
return cfdata;
|
return cfdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,25 +55,16 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
E_FREE(cfdata);
|
E_FREE(cfdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_fill_data(E_Config_Dialog_Data *cfdata)
|
|
||||||
{
|
|
||||||
cfdata->menu_augmentation = conf->menu_augmentation;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Evas_Object *
|
static Evas_Object *
|
||||||
_basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata)
|
_basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
{
|
{
|
||||||
Evas_Object *o = NULL, *of = NULL, *ow = NULL;
|
Evas_Object *o, *ow;
|
||||||
|
|
||||||
o = e_widget_list_add(evas, 0, 0);
|
o = e_widget_list_add(evas, 0, 0);
|
||||||
|
|
||||||
of = e_widget_framelist_add(evas, _("General"), 0);
|
|
||||||
e_widget_framelist_content_align_set(of, 0.0, 0.0);
|
|
||||||
ow = e_widget_check_add(evas, _("Show configurations in menu"),
|
ow = e_widget_check_add(evas, _("Show configurations in menu"),
|
||||||
&(cfdata->menu_augmentation));
|
&(cfdata->menu_augmentation));
|
||||||
e_widget_framelist_object_append(of, ow);
|
e_widget_list_object_append(o, ow, 1, 0, 0.5);
|
||||||
e_widget_list_object_append(o, of, 1, 0, 0.5);
|
|
||||||
|
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
@ -98,3 +89,9 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
e_config_save_queue();
|
e_config_save_queue();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
|
{
|
||||||
|
return (conf->menu_augmentation != cfdata->menu_augmentation);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue