aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-03-14 14:04:23 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-03-14 14:27:15 -0400
commitdbb63f890d6e143fd5d41fc10446c6c9c48d3175 (patch)
tree38d9b91bb772400b391c5d4095353d372d4db582
parentunify client post_updates management code into single function (diff)
downloadenlightenment-dbb63f890d6e143fd5d41fc10446c6c9c48d3175.tar.gz
improve time gadget screen positioning
-rw-r--r--src/modules/time/clock.c4
-rw-r--r--src/modules/time/clock.h2
-rw-r--r--src/modules/time/config.c6
3 files changed, 7 insertions, 5 deletions
diff --git a/src/modules/time/clock.c b/src/modules/time/clock.c
index 0f8f1e8bd..b97fa1c92 100644
--- a/src/modules/time/clock.c
+++ b/src/modules/time/clock.c
@@ -342,7 +342,7 @@ static Evas_Object *
_clock_gadget_configure(Evas_Object *g)
{
Instance *inst = evas_object_data_get(g, "clock");
- return config_clock(inst->cfg);
+ return config_clock(inst->cfg, e_comp_object_util_zone_get(g));
}
static void
@@ -466,7 +466,7 @@ clock_wizard(E_Gadget_Wizard_End_Cb cb, void *data, Eina_Bool digital)
ci = _conf_item_get(&id, digital);
wi->id = ci->id;
- evas_object_event_callback_add(config_clock(ci), EVAS_CALLBACK_DEL, _wizard_end, wi);
+ evas_object_event_callback_add(config_clock(ci, NULL), EVAS_CALLBACK_DEL, _wizard_end, wi);
}
EINTERN void
diff --git a/src/modules/time/clock.h b/src/modules/time/clock.h
index 990d42b56..912aa730a 100644
--- a/src/modules/time/clock.h
+++ b/src/modules/time/clock.h
@@ -68,7 +68,7 @@ struct _Instance
Config_Item *cfg;
};
-EINTERN Evas_Object *config_clock(Config_Item *);
+EINTERN Evas_Object *config_clock(Config_Item *, E_Zone*);
EINTERN void config_timezone_populate(Evas_Object *obj, const char *name);
void clock_instances_redo(void);
diff --git a/src/modules/time/config.c b/src/modules/time/config.c
index 5f393fd19..564af4ed7 100644
--- a/src/modules/time/config.c
+++ b/src/modules/time/config.c
@@ -423,13 +423,14 @@ _config_advanced_changed(void *data, Evas_Object *obj, void *event_info EINA_UNU
}
EINTERN Evas_Object *
-config_clock(Config_Item *ci)
+config_clock(Config_Item *ci, E_Zone *zone)
{
Evas_Object *popup, *tb, *o, *bx;
int i, row = 0;
char daynames[7][64];
struct tm tm;
+ if (!zone) zone = e_zone_current_get();
memset(&tm, 0, sizeof(struct tm));
for (i = 0; i < 7; i++)
{
@@ -559,7 +560,8 @@ config_clock(Config_Item *ci)
popup = e_comp_object_util_add(popup, E_COMP_OBJECT_TYPE_NONE);
evas_object_layer_set(popup, E_LAYER_POPUP);
- evas_object_resize(popup, e_zone_current_get()->w / 4, e_zone_current_get()->h / 3);
+ evas_object_move(popup, zone->x, zone->y);
+ evas_object_resize(popup, zone->w / 4, zone->h / 3);
e_comp_object_util_center(popup);
evas_object_show(popup);
e_comp_object_util_autoclose(popup, NULL, e_comp_object_util_autoclose_on_escape, NULL);