diff options
author | Chidambar Zinnoury <illogict@online.fr> | 2008-10-19 10:59:20 +0000 |
---|---|---|
committer | Chidambar Zinnoury <illogict@online.fr> | 2008-10-19 10:59:20 +0000 |
commit | 21b4c9ef1f0f530f06dbc056e717ef5e4f675db3 (patch) | |
tree | 7f4253e2e1a93c1c0d55fa2ed32307c1da48fe63 /src/modules | |
parent | 67ba54726e0c51e7eed02eade04c67b517b6fa43 (diff) | |
download | enlightenment-21b4c9ef1f0f530f06dbc056e717ef5e4f675db3.tar.gz |
Work on battery module:
- popup texts are set by the module, not the theme;
- remove resize func as it does nothing more than default.
SVN revision: 36808
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/battery/e_mod_main.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/modules/battery/e_mod_main.c b/src/modules/battery/e_mod_main.c index 2fc1316c77..4b5ee6f201 100644 --- a/src/modules/battery/e_mod_main.c +++ b/src/modules/battery/e_mod_main.c @@ -46,7 +46,6 @@ static void _battery_face_cb_menu_configure(void *data, E_Menu *m, E_Menu_Item * static int _battery_cb_warning_popup_timeout(void *data); static void _battery_cb_warning_popup_hide(void *data, Evas *e, Evas_Object *obj, void *event); -static void _battery_warning_popup_resize(Evas_Object *obj, int *w, int *h); static void _battery_warning_popup_destroy(Instance *inst); static void _battery_warning_popup(Instance *inst, int time, double percent); @@ -290,16 +289,6 @@ _battery_warning_popup_destroy(Instance *inst) } static void -_battery_warning_popup_resize(Evas_Object *obj, int *w, int *h) -{ - int mw, mh; - - edje_object_size_min_get(obj,&mw,&mh); - if (w) *w = mw; - if (h) *h = mh; -} - -static void _battery_warning_popup(Instance *inst, int time, double percent) { Evas *e = NULL; @@ -309,7 +298,7 @@ _battery_warning_popup(Instance *inst, int time, double percent) if ((!inst) || (inst->warning)) return; inst->warning = - e_gadcon_popup_new(inst->gcc, _battery_warning_popup_resize); + e_gadcon_popup_new(inst->gcc, NULL); if (!inst->warning) return; e = inst->warning->win->evas; @@ -330,6 +319,11 @@ _battery_warning_popup(Instance *inst, int time, double percent) "e/modules/battery/main"); edje_object_part_swallow(popup_bg, "battery", inst->popup_battery); + edje_object_part_text_set(popup_bg, "e.text.title", + _("Your battery is low!")); + edje_object_part_text_set(popup_bg, "e.text.label", + _("AC power is recommended.")); + e_gadcon_popup_content_set(inst->warning, popup_bg); e_gadcon_popup_show(inst->warning); |