projects
/
framework
/
uifw
/
elementary.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[multibuttenentry] merged with opensource r75453.
[framework/uifw/elementary.git]
/
src
/
lib
/
elc_popup.c
diff --git
a/src/lib/elc_popup.c
b/src/lib/elc_popup.c
index
74aada0
..
18c6240
100644
(file)
--- a/
src/lib/elc_popup.c
+++ b/
src/lib/elc_popup.c
@@
-100,6
+100,8
@@
static void _button_remove(Evas_Object *obj, Evas_Object *content,
Eina_Bool delete);
static void _popup_show(void *data, Evas *e, Evas_Object *obj,
void *event_info);
Eina_Bool delete);
static void _popup_show(void *data, Evas *e, Evas_Object *obj,
void *event_info);
+static void _popup_hide(void *data, Evas *e, Evas_Object *obj,
+ void *event_info);
static const char SIG_BLOCK_CLICKED[] = "block,clicked";
static const char SIG_TIMEOUT[] = "timeout";
static const Evas_Smart_Cb_Description _signals[] = {
static const char SIG_BLOCK_CLICKED[] = "block,clicked";
static const char SIG_TIMEOUT[] = "timeout";
static const Evas_Smart_Cb_Description _signals[] = {
@@
-204,8
+206,8
@@
_theme_hook(Evas_Object *obj)
"item", elm_widget_style_get(obj));
if (item->label)
{
"item", elm_widget_style_get(obj));
if (item->label)
{
- edje_object_part_text_set(VIEW(item), "elm.text",
- item->label);
+ edje_object_part_text_
escaped_
set(VIEW(item), "elm.text",
+
item->label);
edje_object_signal_emit(VIEW(item),
"elm,state,item,text,visible", "elm");
}
edje_object_signal_emit(VIEW(item),
"elm,state,item,text,visible", "elm");
}
@@
-252,6
+254,7
@@
_sizing_eval(Evas_Object *obj)
Evas_Coord minw_box = 0, minh_box = 0;
Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord minw_box = 0, minh_box = 0;
Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Coord bx, by, bw, bh;
if (!wd) return;
if (wd->items)
if (!wd) return;
if (wd->items)
@@
-277,6
+280,11
@@
_sizing_eval(Evas_Object *obj)
evas_object_size_hint_min_set(obj, minw, minh);
evas_object_size_hint_max_set(obj, maxw, maxh);
elm_layout_sizing_eval(wd->base);
evas_object_size_hint_min_set(obj, minw, minh);
evas_object_size_hint_max_set(obj, maxw, maxh);
elm_layout_sizing_eval(wd->base);
+
+ // hack hack hack. this widget needs a ... redo.
+ evas_object_geometry_get(wd->base, &bx, &by, &bw, &bh);
+ evas_object_resize(obj, bw, bh);
+ evas_object_move(obj, bx, by);
}
static void
}
static void
@@
-1046,7
+1054,7
@@
static void
_item_text_set(Elm_Popup_Content_Item *item, const char *label)
{
if (!eina_stringshare_replace(&item->label, label)) return;
_item_text_set(Elm_Popup_Content_Item *item, const char *label)
{
if (!eina_stringshare_replace(&item->label, label)) return;
- edje_object_part_text_set(VIEW(item), "elm.text", label);
+ edje_object_part_text_
escaped_
set(VIEW(item), "elm.text", label);
if (item->label)
edje_object_signal_emit(VIEW(item),
"elm,state,item,text,visible", "elm");
if (item->label)
edje_object_signal_emit(VIEW(item),
"elm,state,item,text,visible", "elm");
@@
-1218,6
+1226,18
@@
_popup_show(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj,
evas_object_show(wd->notify);
}
evas_object_show(wd->notify);
}
+static void
+_popup_hide(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ Widget_Data *wd;
+
+ wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
+ evas_object_hide(wd->notify);
+}
+
EAPI Evas_Object *
elm_popup_add(Evas_Object *parent)
{
EAPI Evas_Object *
elm_popup_add(Evas_Object *parent)
{
@@
-1256,6
+1276,8
@@
elm_popup_add(Evas_Object *parent)
_notify_resize, obj);
evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _popup_show,
NULL);
_notify_resize, obj);
evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _popup_show,
NULL);
+ evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _popup_hide,
+ NULL);
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESTACK, _restack, NULL);
wd->base = elm_layout_add(obj);
evas_object_size_hint_weight_set(wd->base, EVAS_HINT_EXPAND,
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESTACK, _restack, NULL);
wd->base = elm_layout_add(obj);
evas_object_size_hint_weight_set(wd->base, EVAS_HINT_EXPAND,