Elm: Make all the widgets accept "default" as the default.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 4 Jul 2011 10:52:23 +0000 (10:52 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 4 Jul 2011 10:52:23 +0000 (10:52 +0000)
git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@61002 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

16 files changed:
src/lib/elc_anchorblock.c
src/lib/elc_anchorview.c
src/lib/elc_fileselector_button.c
src/lib/elc_fileselector_entry.c
src/lib/elc_hoversel.c
src/lib/elm_actionslider.c
src/lib/elm_bubble.c
src/lib/elm_button.c
src/lib/elm_check.c
src/lib/elm_entry.c
src/lib/elm_frame.c
src/lib/elm_label.c
src/lib/elm_progressbar.c
src/lib/elm_radio.c
src/lib/elm_slider.c
src/lib/elm_toggle.c

index df2ae56..cfeab47 100644 (file)
@@ -186,7 +186,7 @@ _elm_anchorblock_text_set(Evas_Object *obj, const char *item, const char *text)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    if (!wd) return;
    elm_entry_entry_set(wd->entry, text);
    if (wd->hover) evas_object_del(wd->hover);
@@ -201,7 +201,7 @@ _elm_anchorblock_text_get(const Evas_Object *obj, const char *item)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    if (!wd) return NULL;
    return elm_entry_entry_get(wd->entry);
 }
index 303cd37..3288808 100644 (file)
@@ -180,7 +180,7 @@ _elm_anchorview_text_set(Evas_Object *obj, const char *item, const char *text)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    if (!wd) return;
    elm_entry_entry_set(wd->entry, text);
    if (wd->hover) evas_object_del(wd->hover);
@@ -195,7 +195,7 @@ _elm_anchorview_text_get(const Evas_Object *obj, const char *item)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    if (!wd) return NULL;
    return elm_entry_entry_get(wd->entry);
 }
index b83903f..8dbacc0 100644 (file)
@@ -259,7 +259,7 @@ _elm_fileselector_button_label_set(Evas_Object *obj, const char *item,
                                   const char  *label)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
    elm_object_text_set(wd->btn, label);
@@ -270,7 +270,7 @@ _elm_fileselector_button_label_get(const Evas_Object *obj, const char *item)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    if (!wd) return NULL;
    return elm_object_text_get(wd->btn);
 }
index 1707b29..86f5191 100644 (file)
@@ -217,7 +217,7 @@ _elm_fileselector_entry_button_label_set(Evas_Object *obj, const char *item, con
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    if (!wd) return;
    elm_object_text_set(wd->button, label);
 }
@@ -227,7 +227,7 @@ _elm_fileselector_entry_button_label_get(const Evas_Object *obj, const char *ite
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    if (!wd) return NULL;
    return elm_object_text_get(wd->button);
 }
index 321d098..75b0e85 100644 (file)
@@ -272,7 +272,7 @@ _elm_hoversel_label_set(Evas_Object *obj, const char *item, const char *label)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    if (!wd) return;
    elm_object_text_set(wd->btn, label);
 }
@@ -282,7 +282,7 @@ _elm_hoversel_label_get(const Evas_Object *obj, const char *item)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    if ((!wd) || (!wd->btn)) return NULL;
    return elm_object_text_get(wd->btn);
 }
index 16fffea..6387476 100644 (file)
@@ -327,7 +327,7 @@ _elm_actionslider_label_set(Evas_Object *obj, const char *item, const char *labe
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
 
-   if (!item)
+   if (!item || !strcmp(item, "default"))
      {
         eina_stringshare_replace(&wd->indicator_label, label);
         edje_object_part_text_set(wd->as, "elm.text.indicator",
@@ -371,7 +371,7 @@ _elm_actionslider_label_get(const Evas_Object *obj, const char *item)
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return NULL;
 
-   if (!item)
+   if (!item || !strcmp(item, "default"))
      {
         return wd->indicator_label;
      }
index fcbd8da..5c8c5d9 100644 (file)
@@ -143,7 +143,7 @@ _elm_bubble_label_set(Evas_Object *obj, const char *item, const char *label)
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
 
-   if (!item)
+   if (!item || !strcmp(item, "default"))
      {
         eina_stringshare_replace(&wd->label, label);
         edje_object_part_text_set(wd->bbl, "elm.text", label);
@@ -170,7 +170,7 @@ _elm_bubble_label_get(const Evas_Object *obj, const char *item)
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return NULL;
 
-   if (!item)
+   if (!item || !strcmp(item, "default"))
      {
         return wd->label;
      }
index b71c716..1a4ae1d 100644 (file)
@@ -294,7 +294,7 @@ _elm_button_label_set(Evas_Object *obj, const char *item, const char *label)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    if (!wd) return;
    eina_stringshare_replace(&wd->label, label);
    if (label)
@@ -311,7 +311,7 @@ _elm_button_label_get(const Evas_Object *obj, const char *item)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    if (!wd) return NULL;
    return wd->label;
 }
index 9f8bd20..c7ae60e 100644 (file)
@@ -236,7 +236,7 @@ _elm_check_label_set(Evas_Object *obj, const char *item, const char *label)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    if (!wd) return;
    eina_stringshare_replace(&wd->label, label);
    if (label)
@@ -253,7 +253,7 @@ _elm_check_label_get(const Evas_Object *obj, const char *item)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    if (!wd) return NULL;
    return wd->label;
 }
index e0432f3..d3ab236 100644 (file)
@@ -1861,7 +1861,7 @@ _elm_entry_text_set(Evas_Object *obj, const char *item, const char *entry)
 {
    int len = 0;
    ELM_CHECK_WIDTYPE(obj, widtype);
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
    if (!entry) entry = "";
@@ -1906,7 +1906,7 @@ _elm_entry_text_get(const Evas_Object *obj, const char *item)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    const char *text;
    if (!wd) return NULL;
    if (wd->text) return wd->text;
index 06ee8d4..43587ac 100644 (file)
@@ -114,7 +114,7 @@ _elm_frame_label_set(Evas_Object *obj, const char *item, const char *label)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    if (!wd) return;
    eina_stringshare_replace(&(wd->label), label);
    edje_object_part_text_set(wd->frm, "elm.text", wd->label);
@@ -126,7 +126,7 @@ _elm_frame_label_get(const Evas_Object *obj, const char *item)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    if (!wd) return NULL;
    return wd->label;
 }
index 348f223..889ba70 100644 (file)
@@ -521,7 +521,7 @@ _elm_label_label_set(Evas_Object *obj, const char *item, const char *label)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    if (!label) label = "";
    eina_stringshare_replace(&wd->label, label);
    edje_object_part_text_set(wd->lbl, "elm.text", wd->format);
@@ -535,7 +535,7 @@ _elm_label_label_get(const Evas_Object *obj, const char *item)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    if (!wd) return NULL;
    return wd->label;
 }
index 7486045..5585857 100644 (file)
@@ -192,7 +192,7 @@ _elm_progressbar_label_set(Evas_Object *obj, const char *item, const char *label
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    if (!wd) return;
    eina_stringshare_replace(&wd->label, label);
    if (label)
@@ -214,7 +214,7 @@ _elm_progressbar_label_get(const Evas_Object *obj, const char *item)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    if (!wd) return NULL;
    return wd->label;
 }
index b91cd64..2087fb5 100644 (file)
@@ -278,7 +278,7 @@ _elm_radio_label_set(Evas_Object *obj, const char *item, const char *label)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    if (!wd) return;
    eina_stringshare_replace(&wd->label, label);
    if (label)
@@ -300,7 +300,7 @@ _elm_radio_label_get(const Evas_Object *obj, const char *item)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    if (!wd) return NULL;
    return wd->label;
 }
index a8bdfed..3680670 100644 (file)
@@ -487,7 +487,7 @@ _elm_slider_label_set(Evas_Object *obj, const char *item, const char *label)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    if (!wd) return;
    eina_stringshare_replace(&wd->label, label);
    if (label)
@@ -509,7 +509,7 @@ _elm_slider_label_get(const Evas_Object *obj, const char *item)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    if (!wd) return NULL;
    return wd->label;
 }
index 5a341a8..33b09fe 100644 (file)
@@ -206,7 +206,7 @@ _elm_toggle_label_set(Evas_Object *obj, const char *item, const char *label)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return;
+   if (item && strcmp(item, "default")) return;
    if (!wd) return;
    eina_stringshare_replace(&wd->label, label);
    if (label)
@@ -223,7 +223,7 @@ _elm_toggle_label_get(const Evas_Object *obj, const char *item)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (item) return NULL;
+   if (item && strcmp(item, "default")) return NULL;
    if (!wd) return NULL;
    return wd->label;
 }