{
Evas_Object* parent = getParentWindow();
+ if (!parent)
+ return false;
+
if (m_popup)
return false;
{
Evas_Object* parent = getParentWindow();
+ if (!parent)
+ return false;
+
if (m_popup)
return false;
{
Evas_Object* parent = getParentWindow();
- if (m_popup)
- return false;
-
if (!parent)
return false;
- Evas_Object* conformant = elm_conformant_add(parent);
- elm_win_conformant_set(parent, EINA_TRUE);
- elm_win_resize_object_add(parent, conformant);
- evas_object_size_hint_weight_set(conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(conformant, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(conformant);
-
- Evas_Object* content = elm_layout_add(conformant);
- elm_object_content_set(conformant, content);
+ if (m_popup)
+ return false;
- m_popup = elm_popup_add(content);
+ m_popup = elm_popup_add(parent);
+ if (!m_popup)
+ return false;
if (message)
elm_object_part_text_set(m_popup, "title,text", message);
Evas_Object* JavaScriptPopup::getParentWindow()
{
Evas_Object* parent = elm_object_parent_widget_get(m_ewkView);
- Evas_Object* win = parent;
+ Evas_Object* content = parent;
while (parent) {
const char* type = elm_object_widget_type_get(parent);
if (type) {
- if (!strncmp(type, "elm_win", strlen("elm_win"))) {
- win = parent;
+ if (!strncmp(type, "elm_conformant", strlen("elm_conformant"))) {
+ content = elm_object_content_get(parent);
break;
}
}
parent = elm_object_parent_widget_get(parent);
}
- if (!win)
- win = m_ewkView;
+ if (!content)
+ return 0;
- return win;
+ return content;
}
void JavaScriptPopup::close()