seoz pushed a commit to branch master.

http://git.enlightenment.org/tools/elm-theme-viewer.git/commit/?id=b3104c22d2465a30cf5f7f0e105068b80c6ce990

commit b3104c22d2465a30cf5f7f0e105068b80c6ce990
Author: Daniel Juyung Seo <[email protected]>
Date:   Thu Aug 21 23:56:00 2014 +0900

    widget_option: added select_mode option to genlist.
---
 src/bin/widget.c        |  4 ++++
 src/bin/widget_option.c | 18 ++++++++++++++++++
 src/bin/widget_option.h |  1 +
 3 files changed, 23 insertions(+)

diff --git a/src/bin/widget.c b/src/bin/widget.c
index f38d00e..c3fff26 100644
--- a/src/bin/widget.c
+++ b/src/bin/widget.c
@@ -847,6 +847,10 @@ _widget_genlist_create(Evas_Object *parent, const char 
*orig_style, const char *
        !strncmp("tree_compress", token, 13))
      elm_genlist_mode_set(o, ELM_LIST_COMPRESS);
 
+   /* apply options */
+   if (wod)
+     elm_genlist_select_mode_set(o, wod->genlist_select_mode);
+
    /* check tree */
    if (!strncmp("tree", token, 4))
      item_type = ELM_GENLIST_ITEM_TREE;
diff --git a/src/bin/widget_option.c b/src/bin/widget_option.c
index b48d7dc..23e8956 100644
--- a/src/bin/widget_option.c
+++ b/src/bin/widget_option.c
@@ -124,6 +124,15 @@ const char *_text_len[] =
    NULL
 };
 
+const char *_select_mode[] =
+{
+   "DEFAULT",
+   "ALWAYS",
+   "NONE",
+   "DISPLAY_ONLY",
+   NULL
+};
+
 // actionslider
 WIDGET_OPTION_CHECK_CHANGED_CB(actslider_magnet_pos_left, 
wod->actslider_magnet_pos_left);
 WIDGET_OPTION_CHECK_CHANGED_CB(actslider_magnet_pos_center, 
wod->actslider_magnet_pos_center);
@@ -369,6 +378,8 @@ _widget_option_gengrid_create(Evas_Object *box)
 // genlist
 WIDGET_OPTION_HOVERSEL_CHANGED_CB(_genlist_text_len_changed_cb,
                                   _text_len, wod->genlist_text_len);
+WIDGET_OPTION_HOVERSEL_CHANGED_CB(_genlist_select_mode_changed_cb,
+                                  _select_mode, wod->genlist_select_mode);
 
 static void
 _genlist_content_type_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
@@ -400,6 +411,13 @@ _widget_option_genlist_create(Evas_Object *box)
    WIDGET_OPTION_RADIO_ADD("Button", 2, _genlist_content_type_changed_cb);
    elm_radio_group_add(o, rdg);
    elm_radio_value_set(rdg, wod->genlist_content_type);
+
+   WIDGET_OPTION_SEPARATOR_ADD();
+
+   // select mode
+   WIDGET_OPTION_LABEL_ADD(" &lt; Select Mode &gt; ");
+   WIDGET_OPTION_HOVERSEL_FULL_ADD(_select_mode, wod->genlist_select_mode,
+                                   _genlist_select_mode_changed_cb);
 }
 
 // notify
diff --git a/src/bin/widget_option.h b/src/bin/widget_option.h
index 730d7a4..b62daee 100644
--- a/src/bin/widget_option.h
+++ b/src/bin/widget_option.h
@@ -35,6 +35,7 @@ struct _Widget_Option_Data
    // genlist
    int genlist_text_len; // short (0), middle (1), long (2)
    int genlist_content_type; // icon (0), check (1), button (2)
+   int genlist_select_mode; // default (0), always (1), none (2), display_only 
(3)
 
    // notify
    Eina_Bool notify_event : 1; // disallow events(0), allow events (1)

-- 


Reply via email to