forked from enlightenment/efl
elementary: Fix warnings in multibuttonentry
CC libelementary_la-elc_multibuttonentry.lo elc_multibuttonentry.c: In function ‘_set_vis_guidetext’: elc_multibuttonentry.c:309:20: warning: unused variable ‘en_width’ elc_multibuttonentry.c: In function ‘_resize_button’: elc_multibuttonentry.c:741:16: warning: unused variable ‘button_text’ elc_multibuttonentry.c: In function ‘_add_button_item’: elc_multibuttonentry.c:772:40: warning: unused variable ‘h_btn’ elc_multibuttonentry.c: In function ‘_entry_resized_cb’: elc_multibuttonentry.c:1064:86: warning: unused parameter ‘event_info’ elc_multibuttonentry.c: In function ‘elm_multibuttonentry_item_select’: elc_multibuttonentry.c:1531:12: warning: suggest explicit braces to avoid ambiguous ‘else’ elc_multibuttonentry.c: In function ‘_resize_button’: elc_multibuttonentry.c:747:37: warning: ‘padding_inner’ is used uninitialized in this function ^Cmake: *** [libelementary_la-elc_multibuttonentry.lo] Error 1 Signed-off-by: Mike McCormack <mj.mccormack@samsung.com> SVN revision: 65550
This commit is contained in:
parent
905f9ec84a
commit
b3e0c80cfa
|
@ -306,7 +306,6 @@ _set_vis_guidetext(Evas_Object *obj)
|
|||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord en_width = 0;
|
||||
evas_object_hide(wd->guidetext);
|
||||
elm_box_pack_end(wd->box, wd->entry);
|
||||
evas_object_show(wd->entry);
|
||||
|
@ -731,15 +730,13 @@ static void
|
|||
_resize_button(Evas_Object *btn, Evas_Coord *realw, Evas_Coord *vieww)
|
||||
{
|
||||
Evas_Coord rw, vw;
|
||||
Evas_Coord w_text, h_btn, padding_outer, padding_inner;
|
||||
Evas_Coord w_text, h_btn, padding_outer, padding_inner = 0;
|
||||
Evas_Coord w_btn = 0, button_max_width = 0;
|
||||
const char *size_str;
|
||||
|
||||
size_str = edje_object_data_get(btn, "button_max_size");
|
||||
if (size_str) button_max_width = (Evas_Coord)atoi(size_str);
|
||||
|
||||
const char *button_text = edje_object_part_text_get(btn, "elm.btn.text");
|
||||
|
||||
// decide the size of button
|
||||
edje_object_part_geometry_get(btn, "elm.base", NULL, NULL, NULL, &h_btn);
|
||||
edje_object_part_geometry_get(btn, "elm.btn.text", NULL, NULL, &w_text, NULL);
|
||||
|
@ -769,7 +766,7 @@ _add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, co
|
|||
Eina_List *l;
|
||||
|
||||
Evas_Object *btn;
|
||||
Evas_Coord width = -1, height = -1, h_btn = -1;
|
||||
Evas_Coord width = -1, height = -1;
|
||||
char *str_utf8 = NULL;
|
||||
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
|
@ -1061,7 +1058,7 @@ _entry_changed_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN
|
|||
}
|
||||
|
||||
static void
|
||||
_entry_resized_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
|
||||
_entry_resized_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Evas_Coord en_x, en_y, en_w, en_h;
|
||||
Evas_Coord bx_x, bx_y;
|
||||
|
@ -1529,10 +1526,12 @@ elm_multibuttonentry_item_select(Elm_Multibuttonentry_Item *item, Eina_Bool sele
|
|||
EINA_LIST_FOREACH(wd->items, l, _item)
|
||||
{
|
||||
if (_item == item)
|
||||
if(selected)
|
||||
_select_button(item->multibuttonentry, item->button);
|
||||
else
|
||||
_select_button(item->multibuttonentry, NULL);
|
||||
{
|
||||
if (selected)
|
||||
_select_button(item->multibuttonentry, item->button);
|
||||
else
|
||||
_select_button(item->multibuttonentry, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue