diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2012-11-13 13:40:31 +0000 |
---|---|---|
committer | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2012-11-13 13:40:31 +0000 |
commit | c2ef62e4b561fffd005223b8316c2dc81c924e77 (patch) | |
tree | f11e2ff6d8edc3cbdb909f7cc9091594aa3aca64 /src/modules/clock | |
parent | 0906b365d138e722bbf8aa4a1be723f4bc7c5f5e (diff) | |
download | enlightenment-c2ef62e4b561fffd005223b8316c2dc81c924e77.tar.gz |
fix bug where changing config in one clock gadget would reset all clock gadgets
SVN revision: 79229
Diffstat (limited to 'src/modules/clock')
-rw-r--r-- | src/modules/clock/e_mod_config.c | 4 | ||||
-rw-r--r-- | src/modules/clock/e_mod_main.c | 9 | ||||
-rw-r--r-- | src/modules/clock/e_mod_main.h | 3 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/modules/clock/e_mod_config.c b/src/modules/clock/e_mod_config.c index cc8dc54533..40aaf2792c 100644 --- a/src/modules/clock/e_mod_config.c +++ b/src/modules/clock/e_mod_config.c @@ -161,7 +161,9 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, ci = cfd->data; memcpy(ci, &(cfdata->cfg), sizeof(Config_Item)); - e_int_clock_instances_redo(); + ci->changed = EINA_TRUE; + e_int_clock_instances_redo(EINA_FALSE); + ci->changed = EINA_FALSE; e_config_save_queue(); return 1; } diff --git a/src/modules/clock/e_mod_main.c b/src/modules/clock/e_mod_main.c index 7d3a2ce5c4..b4ede9210e 100644 --- a/src/modules/clock/e_mod_main.c +++ b/src/modules/clock/e_mod_main.c @@ -459,7 +459,7 @@ _eval_instance_size(Instance *inst) } void -e_int_clock_instances_redo(void) +e_int_clock_instances_redo(Eina_Bool all) { Eina_List *l; Instance *inst; @@ -469,6 +469,7 @@ e_int_clock_instances_redo(void) { Evas_Object *o = inst->o_clock; + if ((!all) && (!inst->cfg->changed)) continue; _todaystr_eval(inst, todaystr, sizeof(todaystr) - 1); if (inst->cfg->digital_clock) e_theme_edje_object_set(o, "base/theme/modules/clock", @@ -529,7 +530,7 @@ _update_today_timer(void *data __UNUSED__) const struct tm *now; struct tm today; - e_int_clock_instances_redo(); + e_int_clock_instances_redo(EINA_TRUE); if (!clock_instances) { update_today = NULL; @@ -793,7 +794,7 @@ _e_mod_action_cb_mouse(E_Object *obj __UNUSED__, const char *params, Ecore_Event static Eina_Bool _clock_eio_update(void *d __UNUSED__, int type __UNUSED__, void *event __UNUSED__) { - e_int_clock_instances_redo(); + e_int_clock_instances_redo(EINA_TRUE); return ECORE_CALLBACK_RENEW; } @@ -811,7 +812,7 @@ _clock_fd_update(void *d __UNUSED__, Ecore_Fd_Handler *fdh) char buf[64]; read(ecore_main_fd_handler_fd_get(fdh), buf, sizeof(buf)); - e_int_clock_instances_redo(); + e_int_clock_instances_redo(EINA_TRUE); return EINA_TRUE; } diff --git a/src/modules/clock/e_mod_main.h b/src/modules/clock/e_mod_main.h index d844b589b1..66614a6da5 100644 --- a/src/modules/clock/e_mod_main.h +++ b/src/modules/clock/e_mod_main.h @@ -31,10 +31,11 @@ struct _Config_Item int digital_24h; int show_seconds; int show_date; + Eina_Bool changed; }; void e_int_config_clock_module(E_Container *con, Config_Item *ci); -void e_int_clock_instances_redo(void); +void e_int_clock_instances_redo(Eina_Bool all); extern Config *clock_config; |