void ActivityScheduleScenarioView::showTimeRangePopup()
{
    pager_popup = elm_naviframe_add(parent);
    evas_object_show(pager_popup);

    spin_start_hours = spin_start_min = spin_start_sec = NULL;
    spin_end_hours = spin_end_min = spin_end_sec = NULL;

    createTimeSelectTypeList(NULL, NULL, "", "");

    //create popup
    popup = elm_ctxpopup_add(parent);
    elm_object_content_set(popup, pager_popup);
    elm_object_style_set(popup, "calaos");
    elm_ctxpopup_direction_priority_set(popup,
                                        ELM_CTXPOPUP_DIRECTION_DOWN,
                                        ELM_CTXPOPUP_DIRECTION_RIGHT,
                                        ELM_CTXPOPUP_DIRECTION_LEFT,
                                        ELM_CTXPOPUP_DIRECTION_UP);

    Evas_Coord x,y;
    evas_pointer_canvas_xy_get(evas, &x, &y);
    evas_object_move(popup, x, y);
    evas_object_show(popup);
}
static void
_list_item_cb2(void *data, Evas_Object *obj, void *event_info)
{
   Evas_Object *ctxpopup;
   Elm_Object_Item *it;
   Evas_Coord x,y;

   if (list_mouse_down > 0) return;

   ctxpopup = elm_ctxpopup_add(obj);
   evas_object_smart_callback_add(ctxpopup, "dismissed", _dismissed_cb, NULL);
   elm_ctxpopup_horizontal_set(ctxpopup, EINA_TRUE);

   item_new(ctxpopup, NULL, "home");
   item_new(ctxpopup, NULL, "file");
   item_new(ctxpopup, NULL, "delete");
   item_new(ctxpopup, NULL, "folder");
   it = item_new(ctxpopup, NULL, "edit");
   elm_object_item_disabled_set(it, EINA_TRUE);
   item_new(ctxpopup, NULL, "clock");

   evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
   evas_object_move(ctxpopup, x, y);
   evas_object_show(ctxpopup);

   elm_list_item_selected_set(event_info, EINA_FALSE);
}
static void startup(void)
{
	tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
	elm_init(0, NULL);
	main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
	evas_object_show(main_win);
	ctxpopup = elm_ctxpopup_add(main_win);
	evas_object_show(ctxpopup);
}
/**
 * @brief Negative test case of ug_init elm_ctxpopup_item_icon_set()
 */
static void utc_UIFW_elm_ctxpopup_item_icon_set_func_01(void)
{
	Evas_Object *ctxpopup = elm_ctxpopup_add(main_win);
	evas_object_show(ctxpopup);

	Elm_Object_Item *item = elm_ctxpopup_item_append(ctxpopup, "Test", NULL, NULL, NULL );
	elm_ctxpopup_item_icon_set( item, NULL);

	tet_result(TET_PASS);
}
/**
 * @brief Positive test case of elm_ctxpopup_hover_parent_set()
 */
static void utc_UIFW_elm_ctxpopup_hover_parent_set_func_01(void)
{
	int r = 0;

	Evas_Object *ctxpopup = elm_ctxpopup_add(main_win);
	elm_ctxpopup_item_append(ctxpopup, "TEST", NULL, NULL, NULL);
	evas_object_show(ctxpopup);

	Evas_Object *rect = evas_object_rectangle_add(evas_object_evas_get(main_win));
	evas_object_resize(rect, 400, 400);
	evas_object_show(rect);

	elm_ctxpopup_hover_parent_set(ctxpopup, rect);

	tet_result(TET_PASS);
}
Exemplo n.º 6
0
void ApplicationController::onMenuRebootClick()
{
    Evas_Object *table = createPaddingTable(evas, layout, 260, 200);

    Evas_Object *glist = elm_genlist_add(layout);
    elm_object_style_set(glist, "calaos");
    elm_genlist_select_mode_set(glist, ELM_OBJECT_SELECT_MODE_ALWAYS);
    evas_object_size_hint_fill_set(glist, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_size_hint_weight_set(glist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_show(glist);

    Evas_Object *popup = elm_ctxpopup_add(layout);
    elm_object_style_set(popup, "calaos");
    evas_object_size_hint_min_set(popup, 300, 240);

    GenlistItemSimple *item;

    item = new GenlistItemSimple(evas, glist, _("Restart application only"), true);
    item->Append(glist);
    item->item_selected.connect([this, popup](void *)
    {
        elm_ctxpopup_dismiss(popup);
        menuView->CloseLinkMenu();

        system("systemctl restart calaos-home");
    });

    item = new GenlistItemSimple(evas, glist, _("Reboot machine"), true);
    item->Append(glist);
    item->item_selected.connect([this, popup](void *)
    {
        elm_ctxpopup_dismiss(popup);
        menuView->CloseLinkMenu();

        system("sync");
        system("reboot");
    });

    elm_table_pack(table, glist, 1, 1, 1, 1);

    elm_object_content_set(popup, table);

    Evas_Coord x,y;
    evas_pointer_canvas_xy_get(evas, &x, &y);
    evas_object_move(popup, x, y);
    evas_object_show(popup);
}
Exemplo n.º 7
0
void ApplicationController::onMenuAddWidgetClick()
{
    Evas_Object *table = createPaddingTable(evas, layout, 260, 200);

    Evas_Object *glist = elm_genlist_add(layout);
    elm_object_style_set(glist, "calaos");
    elm_genlist_select_mode_set(glist, ELM_OBJECT_SELECT_MODE_ALWAYS);
    evas_object_size_hint_fill_set(glist, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_size_hint_weight_set(glist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_show(glist);

    Evas_Object *popup = elm_ctxpopup_add(layout);
    elm_object_style_set(popup, "calaos");
    evas_object_size_hint_min_set(popup, 300, 240);

    vector<ModuleDef> mods = ModuleManager::Instance().getAvailableModules();

    for (uint i = 0;i < mods.size();i++)
    {
        ModuleDef def = mods[i];
        GenlistItemWidget *item = new GenlistItemWidget(evas, glist, def);
        item->Append(glist);
        item->item_selected.connect([this,i,popup](void *)
        {
            vector<ModuleDef> m = ModuleManager::Instance().getAvailableModules();
            widgetsController->AddWidget(m[i], 200, 200);
            elm_ctxpopup_dismiss(popup);
            menuView->CloseLinkMenu();
        });
    }

    elm_table_pack(table, glist, 1, 1, 1, 1);

    elm_object_content_set(popup, table);

    Evas_Coord x,y;
    evas_pointer_canvas_xy_get(evas, &x, &y);
    evas_object_move(popup, x, y);
    evas_object_show(popup);
}
static void
_btn_clicked(void *data, Evas_Object *obj, void *event_info)
{
    Evas_Object *win = data;
    Evas_Object *ctxpopup;
    Evas_Coord x,y;

    ctxpopup = elm_ctxpopup_add(win);

    elm_object_style_set(ctxpopup, "1text.1icon");
    elm_object_signal_emit(ctxpopup, "elm,action,focus", "elm");
    item_new(ctxpopup, "Text List1", "home");
    item_new(ctxpopup, "Text List2", "file");
    item_new(ctxpopup, "Text List3", "delete");

    switch (dir) {
        case 0:
            elm_ctxpopup_direction_priority_set(ctxpopup,
                                                ELM_CTXPOPUP_DIRECTION_UP, 0, 0, 0);
            break;
        case 1:
            elm_ctxpopup_direction_priority_set(ctxpopup,
                                                ELM_CTXPOPUP_DIRECTION_DOWN, 0, 0, 0);
            break;
        case 2:
            elm_ctxpopup_direction_priority_set(ctxpopup,
                                                ELM_CTXPOPUP_DIRECTION_LEFT, 0, 0, 0);
            break;
        case 3:
            elm_ctxpopup_direction_priority_set(ctxpopup,
                                                ELM_CTXPOPUP_DIRECTION_RIGHT, 0, 0, 0);
            break;
    }

    evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
    evas_object_move(ctxpopup, x, y);
    evas_object_show(ctxpopup);
    eext_object_event_callback_add(ctxpopup, EEXT_CALLBACK_BACK, _ctxpopup_back_key_cb, NULL);
}
/**
 * @brief Positive test case of elm_ctxpopup_horizontal_set()
 */
static void utc_UIFW_elm_ctxpopup_horizontal_set_func_01(void)
{
	Evas_Object *obj = elm_ctxpopup_add(main_win);
	elm_ctxpopup_horizontal_set(obj, EINA_TRUE);
	tet_result(TET_PASS);
}
Exemplo n.º 10
0
void ActivityScenariosView::buttonPressed(void *data, Evas_Object *_edje, std::string emission, std::string source)
{
    if (source == "button.calendar")
    {
        Evas_Object *table = createPaddingTable(evas, parent, 330, 300, 10, 10);

        calendar = elm_calendar_add(parent);
        elm_object_style_set(calendar, "calaos");

        elm_calendar_first_day_of_week_set(calendar, ELM_DAY_MONDAY);

        const char *weekdays[] = { "DIM", "LUN", "MAR", "MER", "JEU", "VEN", "SAM" };
        elm_calendar_weekdays_names_set(calendar, weekdays);

        evas_object_smart_callback_add(calendar, "changed", _calendar_cb, this);

        //Mark sundays
        struct tm sunday = { 0, 0, 12, 7, 0, 0, 6, 0, -1, 0, NULL };
        elm_calendar_mark_add(calendar, "checked", &sunday, ELM_CALENDAR_WEEKLY);
        elm_calendar_marks_draw(calendar);

        evas_object_size_hint_fill_set(calendar, EVAS_HINT_FILL, EVAS_HINT_FILL);
        evas_object_size_hint_weight_set(calendar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_show(calendar);

        elm_table_pack(table, calendar, 1, 1, 1, 1);

        Evas_Object *popup = elm_ctxpopup_add(parent);
        elm_object_content_set(popup, table);
        elm_object_style_set(popup, "calaos");
        elm_ctxpopup_direction_priority_set(popup,
                                            ELM_CTXPOPUP_DIRECTION_DOWN,
                                            ELM_CTXPOPUP_DIRECTION_LEFT,
                                            ELM_CTXPOPUP_DIRECTION_RIGHT,
                                            ELM_CTXPOPUP_DIRECTION_UP);

        Evas_Coord x,y;
        evas_pointer_canvas_xy_get(evas, &x, &y);
        evas_object_move(popup, x, y);
        evas_object_show(popup);
    }
    else if (source == "button.calendar.today")
    {
        tzset(); //Force reload of timezone data
        time_t t = time(0);
        currDate = *localtime(&t);
        reloadCalendar();
    }
    else if (source == "button.create")
    {
        buttonCreatePressed.emit();
    }
    else if (source == "button.list.all")
    {
        view_mode = VIEW_MODE_ALL;
        loadScenarioList();
    }
    else if (source == "button.list.light")
    {
        view_mode = VIEW_MODE_LIGHT;
        loadScenarioList();
    }
    else if (source == "button.list.shutters")
    {
        view_mode = VIEW_MODE_SHUTTER;
        loadScenarioList();
    }
    else if (source == "button.list.schedule")
    {
        view_mode = VIEW_MODE_SCHEDULE;
        loadScenarioList();
    }
}
Exemplo n.º 11
0
#include "widget_preview_tmpl_head.c"

Evas_Object *o = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_resize(o, 200, 130);
evas_object_show(o);

Evas_Object *ctxpopup = elm_ctxpopup_add(o);

Evas_Object *ic = elm_icon_add(ctxpopup);
elm_icon_standard_set(ic, "home");
elm_icon_scale_set(ic, EINA_FALSE, EINA_FALSE);
elm_ctxpopup_item_append(ctxpopup, "Go to home folder", ic, NULL, NULL);

ic = elm_icon_add(ctxpopup);
elm_icon_standard_set(ic, "delete");
elm_icon_scale_set(ic, EINA_FALSE, EINA_FALSE);
elm_ctxpopup_item_append(ctxpopup, "Delete file", ic, NULL, NULL);

ic = elm_icon_add(ctxpopup);
elm_icon_standard_set(ic, "folder");
elm_icon_scale_set(ic, EINA_FALSE, EINA_FALSE);
Elm_Object_Item *it = elm_ctxpopup_item_append(ctxpopup, "Navigate to folder", ic, NULL, NULL);
elm_object_item_disabled_set(it, EINA_TRUE);

evas_object_size_hint_weight_set(ctxpopup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_move(ctxpopup, 0, 0);
evas_object_show(ctxpopup);

#include "widget_preview_tmpl_foot.c"
void ActivityScheduleScenarioView::reloadTimeRanges()
{
    elm_genlist_clear(schedule_list);

    vector<TimeRange> trange_sorted;
    auto sortTimeRange = [&trange_sorted](vector<TimeRange> &range, int day)
    {
        for (TimeRange &t: range)
        {
            auto it = std::find(trange_sorted.begin(), trange_sorted.end(), t);
            if (it != trange_sorted.end())
            {
                //timerange already in trange_sorted, add the day of week flag
                it->dayOfWeek.set(day);
            }
            else
            {
                TimeRange newtr = t;
                newtr.dayOfWeek.reset();
                newtr.dayOfWeek.set(day);
                trange_sorted.push_back(newtr);
            }
        }
    };

    sortTimeRange(range_infos.range_monday, 0);
    sortTimeRange(range_infos.range_tuesday, 1);
    sortTimeRange(range_infos.range_wednesday, 2);
    sortTimeRange(range_infos.range_thursday, 3);
    sortTimeRange(range_infos.range_friday, 4);
    sortTimeRange(range_infos.range_saturday, 5);
    sortTimeRange(range_infos.range_sunday, 6);

    for (TimeRange &t: trange_sorted)
    {
        GenlistItemScenarioScheduleTime *item = new GenlistItemScenarioScheduleTime(evas, parent, t);
        item->Append(schedule_list);
        item->edit_click.connect([=]()
        {
            is_edit = true;
            old_range = t;
            edit_range = t;
            editState = EDIT_START_TYPE;
            showTimeRangePopup();
        });
        item->del_click.connect([=]()
        {
            Evas_Object *table = createPaddingTable(evas, parent, 280, 260);

            Evas_Object *glist = elm_genlist_add(table);
            elm_object_style_set(glist, "calaos");
            elm_genlist_select_mode_set(glist, ELM_OBJECT_SELECT_MODE_ALWAYS);
            evas_object_size_hint_fill_set(glist, EVAS_HINT_FILL, EVAS_HINT_FILL);
            evas_object_size_hint_weight_set(glist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
            evas_object_show(glist);

            string title_label = _("Confirmation");
            title_label += "<br><small><light_blue>";
            title_label += _("Are you sure to delete this schedule?");
            title_label +=  "</light_blue></small>";
            GenlistItemBase *header = new GenlistItemSimpleHeader(evas, glist, title_label);
            header->Append(glist);

            Evas_Object *popup_del = elm_ctxpopup_add(parent);

            GenlistItemSimple *_item = new GenlistItemSimple(evas, parent, _("Yes, delete this schedule"), true);
            _item->Append(glist, header);
            _item->item_selected.connect([=](void *)
            {
                deleteTimeRange(t);
                elm_ctxpopup_dismiss(popup_del);
                reloadTimeRanges();
            });

            _item = new GenlistItemSimple(evas, parent, "Non", true);
            _item->Append(glist, header);
            _item->item_selected.connect([=](void *)
            {
                elm_ctxpopup_dismiss(popup_del);
            });

            elm_table_pack(table, glist, 1, 1, 1, 1);

            elm_object_content_set(popup_del, table);
            elm_object_style_set(popup_del, "calaos");
            elm_ctxpopup_direction_priority_set(popup_del,
                                                ELM_CTXPOPUP_DIRECTION_DOWN,
                                                ELM_CTXPOPUP_DIRECTION_UP,
                                                ELM_CTXPOPUP_DIRECTION_LEFT,
                                                ELM_CTXPOPUP_DIRECTION_RIGHT);

            Evas_Coord x,y;
            evas_pointer_canvas_xy_get(evas, &x, &y);
            evas_object_move(popup_del, x, y);
            evas_object_show(popup_del);
        });
    }

    //reload months
    if (range_infos.range_months.all())
    {
        //all months are selected

        item_all->setSelected(true);
        for (uint i = 0;i < items_months.size();i++)
            items_months[i]->setSelected(false);
    }
    else
    {
        item_all->setSelected(false);
        for (uint i = 0;i < items_months.size();i++)
            items_months[i]->setSelected(range_infos.range_months.test(i));
    }
}
void GenlistItemScenarioSchedule::buttonClickMore()
{
    if (!scenario) return;

    Evas_Object *table = createPaddingTable(evas, parent, 280, 260);

    Evas_Object *glist = elm_genlist_add(table);
    elm_object_style_set(glist, "calaos");
    elm_genlist_select_mode_set(glist, ELM_OBJECT_SELECT_MODE_ALWAYS);
    evas_object_size_hint_fill_set(glist, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_size_hint_weight_set(glist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_show(glist);

    string title_label = _("Scenario parameters<br><small><light_blue>Modify, add or delete a schedule.</light_blue></small>");
    GenlistItemBase *header = new GenlistItemSimpleHeader(evas, glist, title_label);
    header->Append(glist);

    GenlistItemSimple *_item;

    _item = new GenlistItemSimple(evas, glist, _("Modify the scenario"), true);
    _item->setIcon("calaos/icons/genlist/edit");
    _item->Append(glist, header);
    _item->item_selected.connect(sigc::mem_fun(*this, &GenlistItemScenarioSchedule::scenarioModify));

    _item = new GenlistItemSimple(evas, glist, _("Delete the scenario"), true);
    _item->setIcon("calaos/icons/genlist/trash");
    _item->Append(glist, header);
    _item->item_selected.connect(sigc::mem_fun(*this, &GenlistItemScenarioSchedule::scenarioDelete));

    _item = new GenlistItemSimple(evas, glist, _("Run the scenario now"), true);
    _item->setIcon("calaos/icons/genlist/play");
    _item->Append(glist, header);
    _item->item_selected.connect(sigc::mem_fun(*this, &GenlistItemScenarioSchedule::scenarioPlay));

    if (scenario->scenario_data.params["schedule"] == "false")
    {
        _item = new GenlistItemSimple(evas, glist, _("Add a schedule"), true);
        _item->setIcon("calaos/icons/genlist/plus");
        _item->Append(glist, header);
        _item->item_selected.connect(sigc::mem_fun(*this, &GenlistItemScenarioSchedule::scheduleAdd));
    }
    else
    {
        _item = new GenlistItemSimple(evas, glist, _("Schedule modification"), true);
        _item->setIcon("calaos/icons/genlist/clock");
        _item->Append(glist, header);
        _item->item_selected.connect(sigc::mem_fun(*this, &GenlistItemScenarioSchedule::scheduleModify));

        _item = new GenlistItemSimple(evas, glist, _("Delete schedule"), true);
        _item->setIcon("calaos/icons/genlist/trash");
        _item->Append(glist, header);
        _item->item_selected.connect(sigc::mem_fun(*this, &GenlistItemScenarioSchedule::scheduleDelete));
    }

    elm_table_pack(table, glist, 1, 1, 1, 1);

    pager_popup = elm_naviframe_add(parent);
    evas_object_show(pager_popup);

    popup = elm_ctxpopup_add(parent);
    elm_object_content_set(popup, pager_popup);
    elm_object_style_set(popup, "calaos");
    elm_ctxpopup_direction_priority_set(popup,
                                        ELM_CTXPOPUP_DIRECTION_DOWN,
                                        ELM_CTXPOPUP_DIRECTION_UP,
                                        ELM_CTXPOPUP_DIRECTION_LEFT,
                                        ELM_CTXPOPUP_DIRECTION_RIGHT);

    Evas_Coord x,y;
    evas_pointer_canvas_xy_get(evas, &x, &y);
    evas_object_move(popup, x, y);
    evas_object_show(popup);

    elm_naviframe_item_push(pager_popup, NULL, NULL, NULL, table, "calaos");
}
Exemplo n.º 14
0
void GenlistItemTrack::buttonClickMore()
{
        Evas_Object *table = createPaddingTable(evas, parent, 260, 200);

        Evas_Object *glist = elm_genlist_add(parent);
        elm_object_style_set(glist, "calaos");
        elm_genlist_select_mode_set(glist, ELM_OBJECT_SELECT_MODE_ALWAYS);
        evas_object_size_hint_fill_set(glist, EVAS_HINT_FILL, EVAS_HINT_FILL);
        evas_object_size_hint_weight_set(glist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_show(glist);

        string title_label = "Info de la <light_blue>piste #" + Utils::to_string(item_id + 1) + "</light_blue><br><small>Détails de la piste.</small>";
        GenlistItemBase *header = new GenlistItemSimpleHeader(evas, glist, title_label);
        header->Append(glist);

        string infolabel;
        if (item_infos["artist"] != "")
        {
                infolabel = item_infos["artist"];
                GenlistItemSimpleKeyValue *it = new GenlistItemSimpleKeyValue(evas, glist, "Artiste :", infolabel);
                it->Append(glist, header);
        }
        if (item_infos["album"] != "")
        {
                infolabel = item_infos["album"];
                GenlistItemSimpleKeyValue *it = new GenlistItemSimpleKeyValue(evas, glist, "Album :", infolabel);
                it->Append(glist, header);
        }
        if (item_infos["title"] != "")
        {
                infolabel = item_infos["title"];
                GenlistItemSimpleKeyValue *it = new GenlistItemSimpleKeyValue(evas, glist, "Titre :", infolabel);
                it->Append(glist, header);
        }
        if (item_infos["duration"] != "")
        {
                double dur;
                from_string(item_infos["duration"], dur);
                infolabel = Utils::time2string_digit((long)dur);
                GenlistItemSimpleKeyValue *it = new GenlistItemSimpleKeyValue(evas, glist, "Durée :", infolabel);
                it->Append(glist, header);
        }
        if (item_infos["genre"] != "")
        {
                infolabel = item_infos["genre"];
                GenlistItemSimpleKeyValue *it = new GenlistItemSimpleKeyValue(evas, glist, "Genre :", infolabel);
                it->Append(glist, header);
        }
        if (item_infos["type"] != "")
        {
                infolabel = item_infos["type"];
                GenlistItemSimpleKeyValue *it = new GenlistItemSimpleKeyValue(evas, glist, "Type de flux :", infolabel);
                it->Append(glist, header);
        }
        if (item_infos["bitrate"] != "")
        {
                infolabel = item_infos["bitrate"];
                GenlistItemSimpleKeyValue *it = new GenlistItemSimpleKeyValue(evas, glist, "Débit :", infolabel);
                it->Append(glist, header);
        }
        if (item_infos["filesize"] != "")
        {
                long int s;
                from_string(item_infos["filesize"], s);
                s /= 1024;
                s /= 1024;
                infolabel = Utils::to_string(s) + " Mo";
                GenlistItemSimpleKeyValue *it = new GenlistItemSimpleKeyValue(evas, glist, "Taille :", infolabel);
                it->Append(glist, header);
        }
        if (item_infos["samplerate"] != "")
        {
                infolabel = item_infos["samplerate"] + " Hz";
                GenlistItemSimpleKeyValue *it = new GenlistItemSimpleKeyValue(evas, glist, "Echantillonage :", infolabel);
                it->Append(glist, header);
        }
        if (item_infos["tagversion"] != "")
        {
                infolabel = item_infos["tagversion"];
                GenlistItemSimpleKeyValue *it = new GenlistItemSimpleKeyValue(evas, glist, "Version du tag :", infolabel);
                it->Append(glist, header);
        }
        if (item_infos["comment"] != "")
        {
                infolabel = item_infos["comment"];
                GenlistItemSimpleKeyValue *it = new GenlistItemSimpleKeyValue(evas, glist, "Commentaire :", infolabel);
                it->Append(glist, header);
        }

        elm_table_pack(table, glist, 1, 1, 1, 1);

        Evas_Object *popup_position = elm_ctxpopup_add(parent);
        elm_object_style_set(popup_position, "calaos");
        evas_object_size_hint_min_set(popup_position, 300, 240);

        elm_object_content_set(popup_position, table);

        Evas_Coord x,y;
        evas_pointer_canvas_xy_get(evas, &x, &y);
        evas_object_move(popup_position, x, y);
        evas_object_show(popup_position);
}