[elementary/datetime] Fixed module codes. The parent of ctxpopup should be a datetime.
authorWooHyun Jung <woohyun0705@gmail.com>
Fri, 16 Nov 2012 02:17:24 +0000 (02:17 +0000)
committerWooHyun Jung <woohyun0705@gmail.com>
Fri, 16 Nov 2012 02:17:24 +0000 (02:17 +0000)
And its location and size should be calculated with the top parent.

SVN revision: 79355

src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c

index dec9b2e..5773b26 100644 (file)
@@ -136,6 +136,8 @@ _field_clicked_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
    ctx_mod = (Ctxpopup_Module_Data *)data;
    if (!ctx_mod || !ctx_mod->ctxpopup) return;
 
+   elm_ctxpopup_hover_parent_set(ctx_mod->ctxpopup, elm_widget_top_get(obj));
+
    // because of the diskselector behaviour, it is being recreated
    diskselector = elm_diskselector_add(elm_widget_top_get(ctx_mod->mod_data.base));
    snprintf(buf, sizeof(buf), "datetime/%s", elm_object_style_get(obj));
@@ -316,7 +318,7 @@ obj_hook(Evas_Object *obj)
    ctx_mod = ELM_NEW(Ctxpopup_Module_Data);
    if (!ctx_mod) return NULL;
 
-   ctx_mod->ctxpopup = elm_ctxpopup_add(elm_widget_top_get(obj));
+   ctx_mod->ctxpopup = elm_ctxpopup_add(obj);
    snprintf(buf, sizeof(buf), "datetime/%s", elm_object_style_get(obj));
    elm_object_style_set(ctx_mod->ctxpopup, buf);
    elm_ctxpopup_horizontal_set(ctx_mod->ctxpopup, EINA_TRUE);