[src/lib/elm_button.c] Code change to let the text change based on the current state...
authorRajeev Ranjan <rajeev.r@samsung.com>
Thu, 21 Oct 2010 04:38:35 +0000 (10:08 +0530)
committerRajeev Ranjan <rajeev.r@samsung.com>
Thu, 21 Oct 2010 04:38:35 +0000 (10:08 +0530)
Not setting maximum size hint to -1 in _sizing_eval as if set by the user then it should not be overwritten.

src/lib/elm_button.c

index 4e9d4bb..ffd7633 100644 (file)
@@ -87,10 +87,10 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
      {
        if(wd->statelabel[DEFAULT])
          _set_label(obj, wd->statelabel[DEFAULT]);
-#if 0
+//#if 0
        else
          _set_label(obj, wd->label);
-#endif
+//#endif
        edje_object_signal_emit(wd->btn, "elm,action,unfocus", "elm");
        evas_object_focus_set(wd->btn, EINA_FALSE);
      }
@@ -141,10 +141,10 @@ _disable_hook(Evas_Object *obj)
      {
        if(wd->statelabel[DEFAULT])
          _set_label(obj, wd->statelabel[DEFAULT]);
-#if 0
+//#if 0
        else
          _set_label(obj, wd->label);
-#endif
+//#endif
        edje_object_signal_emit(wd->btn, "elm,state,enabled", "elm");
      }
 }
@@ -166,7 +166,7 @@ _sizing_eval(Evas_Object *obj)
    if (h > minh) minh = h;
 
    evas_object_size_hint_min_set(obj, minw, minh);
-   evas_object_size_hint_max_set(obj, maxw, maxh);
+   //evas_object_size_hint_max_set(obj, maxw, maxh);
 }
 
 static void
@@ -207,9 +207,9 @@ _signal_clicked(void *data, Evas_Object *obj, const char *emission, const char *
      }
    wd->repeating = EINA_FALSE;
    evas_object_smart_callback_call(data, SIG_CLICKED, NULL);
-#if 0
+//#if 0
    _signal_unpressed(data, obj, emission, source); /* safe guard when the theme does not emit the 'unpress' signal */
-#endif
+//#endif
 }
 
 static Eina_Bool
@@ -268,10 +268,10 @@ _signal_default_text_set(void *data, Evas_Object *obj, const char *emission, con
    if (!wd) return;
    if(wd->statelabel[DEFAULT])
      _set_label(data, wd->statelabel[DEFAULT]);
-#if 0
+//#if 0
    else
      _set_label(data, wd->label);
-#endif
+//#endif
    return;
 }
 
@@ -282,10 +282,10 @@ _signal_unpressed(void *data, Evas_Object *obj __UNUSED__, const char *emission
    if (!wd) return;
    if(wd->statelabel[DEFAULT])
      _set_label(data, wd->statelabel[DEFAULT]);
-#if 0
+//#if 0
    else
      _set_label(data, wd->label);
-#endif
+//#endif
 
    if (wd->timer)
      {