From ae4b94569da10fa4aa9134ccee1553a5ca3763aa Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 4 Jul 2011 10:52:23 +0000 Subject: [PATCH] Elm: Make all the widgets accept "default" as the default. SVN revision: 61002 --- src/lib/elc_anchorblock.c | 4 ++-- src/lib/elc_anchorview.c | 4 ++-- src/lib/elc_fileselector_button.c | 4 ++-- src/lib/elc_fileselector_entry.c | 4 ++-- src/lib/elc_hoversel.c | 4 ++-- src/lib/elm_actionslider.c | 4 ++-- src/lib/elm_bubble.c | 4 ++-- src/lib/elm_button.c | 4 ++-- src/lib/elm_check.c | 4 ++-- src/lib/elm_entry.c | 4 ++-- src/lib/elm_frame.c | 4 ++-- src/lib/elm_label.c | 4 ++-- src/lib/elm_progressbar.c | 4 ++-- src/lib/elm_radio.c | 4 ++-- src/lib/elm_slider.c | 4 ++-- src/lib/elm_toggle.c | 4 ++-- 16 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/lib/elc_anchorblock.c b/src/lib/elc_anchorblock.c index df2ae56..cfeab47 100644 --- a/src/lib/elc_anchorblock.c +++ b/src/lib/elc_anchorblock.c @@ -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); } diff --git a/src/lib/elc_anchorview.c b/src/lib/elc_anchorview.c index 303cd37..3288808 100644 --- a/src/lib/elc_anchorview.c +++ b/src/lib/elc_anchorview.c @@ -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); } diff --git a/src/lib/elc_fileselector_button.c b/src/lib/elc_fileselector_button.c index b83903f..8dbacc0 100644 --- a/src/lib/elc_fileselector_button.c +++ b/src/lib/elc_fileselector_button.c @@ -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); } diff --git a/src/lib/elc_fileselector_entry.c b/src/lib/elc_fileselector_entry.c index 1707b29..86f5191 100644 --- a/src/lib/elc_fileselector_entry.c +++ b/src/lib/elc_fileselector_entry.c @@ -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); } diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 321d098..75b0e85 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -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); } diff --git a/src/lib/elm_actionslider.c b/src/lib/elm_actionslider.c index 16fffea..6387476 100644 --- a/src/lib/elm_actionslider.c +++ b/src/lib/elm_actionslider.c @@ -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; } diff --git a/src/lib/elm_bubble.c b/src/lib/elm_bubble.c index fcbd8da..5c8c5d9 100644 --- a/src/lib/elm_bubble.c +++ b/src/lib/elm_bubble.c @@ -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; } diff --git a/src/lib/elm_button.c b/src/lib/elm_button.c index b71c716..1a4ae1d 100644 --- a/src/lib/elm_button.c +++ b/src/lib/elm_button.c @@ -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; } diff --git a/src/lib/elm_check.c b/src/lib/elm_check.c index 9f8bd20..c7ae60e 100644 --- a/src/lib/elm_check.c +++ b/src/lib/elm_check.c @@ -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; } diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index e0432f3..d3ab236 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -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; diff --git a/src/lib/elm_frame.c b/src/lib/elm_frame.c index 06ee8d4..43587ac 100644 --- a/src/lib/elm_frame.c +++ b/src/lib/elm_frame.c @@ -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; } diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c index 348f223..889ba70 100644 --- a/src/lib/elm_label.c +++ b/src/lib/elm_label.c @@ -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; } diff --git a/src/lib/elm_progressbar.c b/src/lib/elm_progressbar.c index 7486045..5585857 100644 --- a/src/lib/elm_progressbar.c +++ b/src/lib/elm_progressbar.c @@ -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; } diff --git a/src/lib/elm_radio.c b/src/lib/elm_radio.c index b91cd64..2087fb5 100644 --- a/src/lib/elm_radio.c +++ b/src/lib/elm_radio.c @@ -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; } diff --git a/src/lib/elm_slider.c b/src/lib/elm_slider.c index a8bdfed..3680670 100644 --- a/src/lib/elm_slider.c +++ b/src/lib/elm_slider.c @@ -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; } diff --git a/src/lib/elm_toggle.c b/src/lib/elm_toggle.c index 5a341a8..33b09fe 100644 --- a/src/lib/elm_toggle.c +++ b/src/lib/elm_toggle.c @@ -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; } -- 2.7.4