From 3852673e3fb1b962046eb8f294cd9ed2087491fc Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Tue, 9 Mar 2010 16:34:39 +0000 Subject: [PATCH] Add check_changed to conf_exebuf. NB: works great in Basic, but not in Advanced...not sure why. K-S, can you have a look please ? SVN revision: 47083 --- src/modules/conf_exebuf/e_int_config_exebuf.c | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/modules/conf_exebuf/e_int_config_exebuf.c b/src/modules/conf_exebuf/e_int_config_exebuf.c index 0fd8db200..ac011333b 100644 --- a/src/modules/conf_exebuf/e_int_config_exebuf.c +++ b/src/modules/conf_exebuf/e_int_config_exebuf.c @@ -6,8 +6,10 @@ static void _fill_data(E_Config_Dialog_Data *cfdata); static void _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata); static int _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata); static Evas_Object *_basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata); +static int _basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata); static int _adv_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata); static Evas_Object *_adv_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata); +static int _adv_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata); static void _cb_animate_changed(void *data, Evas_Object *obj __UNUSED__); struct _E_Config_Dialog_Data @@ -39,8 +41,10 @@ e_int_config_exebuf(E_Container *con, const char *params __UNUSED__) v->free_cfdata = _free_data; v->basic.create_widgets = _basic_create; v->basic.apply_cfdata = _basic_apply; + v->basic.check_changed = _basic_check_changed; v->advanced.create_widgets = _adv_create; v->advanced.apply_cfdata = _adv_apply; + v->advanced.check_changed = _adv_check_changed; cfd = e_config_dialog_new(con, _("Run Command Settings"), "E", "advanced/run_command", "system-run", 0, v, NULL); @@ -129,6 +133,22 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data return o; } +static int +_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) +{ +#define CHK_CHG(_e_config, _cfdata) \ + if (e_config->exebuf_##_e_config != cfdata->_cfdata) return 1; + + CHK_CHG(max_exe_list, max_exe_list); + CHK_CHG(max_eap_list, max_eap_list); + CHK_CHG(max_hist_list, max_hist_list); + CHK_CHG(scroll_animate, scroll_animate); + +#undef CHK_CHG + + return 0; +} + static int _adv_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) { @@ -238,6 +258,30 @@ _adv_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *c return otb; } +static int +_adv_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) +{ +#define CHK_CHG(_e_config, _cfdata) \ + if (e_config->exebuf_##_e_config != cfdata->_cfdata) return 1; + + CHK_CHG(max_exe_list, max_exe_list); + CHK_CHG(max_eap_list, max_eap_list); + CHK_CHG(max_hist_list, max_hist_list); + CHK_CHG(scroll_animate, scroll_animate); + CHK_CHG(scroll_speed, scroll_speed); + CHK_CHG(pos_align_x, pos_align_x); + CHK_CHG(pos_align_y, pos_align_y); + CHK_CHG(pos_min_w, pos_min_w); + CHK_CHG(pos_min_h, pos_min_h); + CHK_CHG(pos_max_w, pos_max_w); + CHK_CHG(pos_max_h, pos_max_h); + + if (strcmp(e_config->exebuf_term_cmd, cfdata->term_cmd)) return 1; +#undef CHK_CHG + + return 0; +} + static void _cb_animate_changed(void *data, Evas_Object *obj __UNUSED__) {