Elm: Make all the widgets accept "default" as the default.

SVN revision: 61002
This commit is contained in:
Tom Hacohen 2011-07-04 10:52:23 +00:00
parent c49985083a
commit fc6c3c3fc8
16 changed files with 32 additions and 32 deletions

View 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);
}

View 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);
}

View 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);
}

View 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);
}

View 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);
}

View 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;
}

View 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;
}

View 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;
}

View 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;
}

View 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;

View 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;
}

View 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;
}

View 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;
}

View 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;
}

View 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;
}

View 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;
}