seoz pushed a commit to branch master. http://git.enlightenment.org/tools/elm-theme-viewer.git/commit/?id=c077829fc2cec1e571820a27bbf343b68ad393b6
commit c077829fc2cec1e571820a27bbf343b68ad393b6 Author: Daniel Juyung Seo <seojuyu...@gmail.com> Date: Sun Aug 17 01:56:25 2014 +0900 widget_option: added allow_event option to notify. --- src/bin/widget.c | 13 ++++++++----- src/bin/widget_option.c | 12 ++++++++++++ src/bin/widget_option.h | 3 +++ 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/bin/widget.c b/src/bin/widget.c index 1a94d77..5326090 100644 --- a/src/bin/widget.c +++ b/src/bin/widget.c @@ -1428,13 +1428,16 @@ _widget_notify_launch(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, o = elm_notify_add(gd->win); evas_object_smart_callback_add(o, "block,clicked", _widget_notify_response_cb, NULL); - - elm_notify_allow_events_set(o, EINA_FALSE); evas_object_show(o); - //elm_notify_align_set - //elm_notify_timeout_set - //elm_notify_allow_events_set + if (wod) + { + elm_notify_allow_events_set(o, wod->notify_event); + //elm_notify_align_set + //elm_notify_timeout_set + //elm_notify_allow_events_set + + } box = elm_box_add(o); elm_object_content_set(o, box); diff --git a/src/bin/widget_option.c b/src/bin/widget_option.c index 742a673..6acb3a4 100644 --- a/src/bin/widget_option.c +++ b/src/bin/widget_option.c @@ -402,6 +402,17 @@ _widget_option_genlist_create(Evas_Object *box) elm_radio_value_set(rdg, wod->genlist_content_type); } +// notify +WIDGET_OPTION_CHECK_CHANGED_CB(notify_event, wod->notify_event); + +static void +_widget_option_notify_create(Evas_Object *box) +{ + Evas_Object *o = NULL; + + WIDGET_OPTION_CHECK_ADD("Allow background events", wod->notify_event, _notify_event_changed_cb); +} + // popup const char *_popup_content_type[] = { @@ -682,6 +693,7 @@ widget_option_content_update(Widget_Type type) WIDGET_OPTION(entry, ETV_ID_ENTRY) WIDGET_OPTION(gengrid, ETV_ID_GENGRID) WIDGET_OPTION(genlist, ETV_ID_GENLIST) + WIDGET_OPTION(notify, ETV_ID_NOTIFY) WIDGET_OPTION(popup, ETV_ID_POPUP) WIDGET_OPTION(progressbar, ETV_ID_PROGRESSBAR) WIDGET_OPTION(radio, ETV_ID_RADIO) diff --git a/src/bin/widget_option.h b/src/bin/widget_option.h index bee2a20..5e749e4 100644 --- a/src/bin/widget_option.h +++ b/src/bin/widget_option.h @@ -36,6 +36,9 @@ struct _Widget_Option_Data int genlist_text_len; // short (0), middle (1), long (2) int genlist_content_type; // icon (0), check (1), button (2) + // notify + Eina_Bool notify_event : 1; // disallow events(0), allow events (1) + // popup int pop_content_type; // content: short text (0), long text (1), button (2) and etc. int pop_button; // number of popup buttons (1 ~ 3) --