Fix the toolbar cannot be unselected when it's mode is ELM_OBJECT_SELECT_MODE_ALWAYS.
authorJaehwan Kim <jae.hwan.kim@samsung.com>
Fri, 8 Mar 2013 08:21:38 +0000 (17:21 +0900)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Fri, 8 Mar 2013 08:21:38 +0000 (17:21 +0900)
ChangeLog
NEWS
src/lib/elm_toolbar.c

index f900e10..fa4492e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
         * Add elm_widget_newest_focus_order_get for knowing the last object(and its focus order) which got focus.
         * After elm_win is created, if there is no manual focus setting, only elm_win should get focus when focus state is changed.
+
+2013-03-08  Jaehwan Kim
+
+        * Fix the toolbar cannot be unselected when it's mode is ELM_OBJECT_SELECT_MODE_ALWAYS.
diff --git a/NEWS b/NEWS
index ca97638..924ae0e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -177,6 +177,7 @@ Fixes:
    * Fix elm_conform didn't set size hint when keypad on.
    * Fix elm_conform didn't change indicator mode when create.
    * After elm_win is created, if there is no manual focus setting, only elm_win should get focus when focus state is changed.
+   * Fix the toolbar cannot be unselected when it's mode is ELM_OBJECT_SELECT_MODE_ALWAYS.
    
 Removals:
 
index d0f6759..b741706 100644 (file)
@@ -1843,10 +1843,16 @@ _access_activate_cb(void *data __UNUSED__,
 {
    Elm_Toolbar_Item *it;
    it = (Elm_Toolbar_Item *)item;
+   ELM_TOOLBAR_DATA_GET(WIDGET(it), sd);
 
    if (elm_widget_item_disabled_get(it)) return;
 
-   if (!it->selected)
+   if (it->selected && (sd->select_mode != ELM_OBJECT_SELECT_MODE_ALWAYS))
+     {
+        _elm_access_say(E_("Unselected"));
+        _item_unselect(it);
+     }
+   else
      {
         _elm_access_say(E_("Selected"));
         _item_select(it);