removed icon only style
authorshilpa singh <shilpa.singh@samsung.com>
Mon, 30 Aug 2010 03:44:14 +0000 (12:44 +0900)
committershilpa singh <shilpa.singh@samsung.com>
Mon, 30 Aug 2010 03:44:14 +0000 (12:44 +0900)
src/lib/elm_navigationbar.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 8d27ce1..d753e87
@@ -106,52 +106,20 @@ _theme_hook(Evas_Object *obj)
        edje_object_scale_set(wd->base, elm_widget_scale_get(obj) * _elm_config->scale);
         EINA_LIST_FOREACH(wd->stack, list, it)
        {
-               const char *text = NULL;
-               Evas_Object *ic = NULL;
                if(it->fn_btn1)
-                       {
-                       text = elm_button_label_get(it->fn_btn1);
-                       ic =  elm_button_icon_get(it->fn_btn1);
-                       if(text)
-                               {
-                                       snprintf(buf_fn, sizeof(buf_fn), "navigationbar_functionbutton/text_only/%s", elm_widget_style_get(obj));
-                                       elm_object_style_set(it->fn_btn1, buf_fn);      
-                               }
-                       else if(ic)
-                               {
-                                       snprintf(buf_fn, sizeof(buf_fn), "navigationbar_functionbutton/icon_only/%s", elm_widget_style_get(obj));
-                                       elm_object_style_set(it->fn_btn1, buf_fn);      
-                               }
+                       {       
+                               snprintf(buf_fn, sizeof(buf_fn), "navigationbar_functionbutton/%s", elm_widget_style_get(obj));
+                               elm_object_style_set(it->fn_btn1, buf_fn);                              
                        }
                if(it->fn_btn2)
-                       {
-                       text = elm_button_label_get(it->fn_btn2);
-                       ic =  elm_button_icon_get(it->fn_btn2);
-                       if(text)
-                               {
-                                       snprintf(buf_fn, sizeof(buf_fn), "navigationbar_functionbutton/text_only/%s", elm_widget_style_get(obj));
-                                       elm_object_style_set(it->fn_btn2, buf_fn);      
-                               }
-                       else if(ic)
-                               {
-                                       snprintf(buf_fn, sizeof(buf_fn), "navigationbar_functionbutton/icon_only/%s", elm_widget_style_get(obj));
-                                       elm_object_style_set(it->fn_btn2, buf_fn);      
-                               }
+                       {                       
+                               snprintf(buf_fn, sizeof(buf_fn), "navigationbar_functionbutton/%s", elm_widget_style_get(obj));
+                               elm_object_style_set(it->fn_btn2, buf_fn);                                      
                        }
                if(it->fn_btn3)
                        {
-                       text = elm_button_label_get(it->fn_btn3);
-                       ic =  elm_button_icon_get(it->fn_btn3);
-                       if(text)
-                               {
-                                       snprintf(buf_fn, sizeof(buf_fn), "navigationbar_functionbutton/text_only/%s", elm_widget_style_get(obj));
-                                       elm_object_style_set(it->fn_btn3, buf_fn);      
-                               }
-                       else if(ic)
-                               {
-                                       snprintf(buf_fn, sizeof(buf_fn), "navigationbar_functionbutton/icon_only/%s", elm_widget_style_get(obj));
-                                       elm_object_style_set(it->fn_btn3, buf_fn);      
-                               }
+                               snprintf(buf_fn, sizeof(buf_fn), "navigationbar_functionbutton/%s", elm_widget_style_get(obj));
+                               elm_object_style_set(it->fn_btn3, buf_fn);                              
                        }
                snprintf(buf_bk, sizeof(buf_bk), "navigationbar_backbutton/%s", elm_widget_style_get(obj));
                elm_object_style_set(it->back_btn, buf_bk);
@@ -387,21 +355,9 @@ _button_set(Evas_Object *obj, Evas_Object *prev_btn, Evas_Object *new_btn, Eina_
                                elm_object_style_set(new_btn, buf);
                        }
                else 
-                       {
-                               const char *text = NULL;
-                               Evas_Object *ic = NULL;
-                               text = elm_button_label_get(new_btn);
-                               ic =  elm_button_icon_get(new_btn);
-                               if (text)
-                                       {
-                                               snprintf(buf, sizeof(buf), "navigationbar_functionbutton/text_only/%s", elm_widget_style_get(obj));
-                                               elm_object_style_set(new_btn, buf);
-                                       }
-                               else if (ic)
-                                       {
-                                               snprintf(buf, sizeof(buf), "navigationbar_functionbutton/icon_only/%s", elm_widget_style_get(obj));
-                                               elm_object_style_set(new_btn, buf);
-                                       }
+                       {                               
+                               snprintf(buf, sizeof(buf), "navigationbar_functionbutton/%s", elm_widget_style_get(obj));
+                               elm_object_style_set(new_btn, buf);                                     
                        }
                elm_widget_sub_object_add(obj, new_btn);
                changed = TRUE;
@@ -1260,12 +1216,12 @@ elm_navigationbar_subtitle_label_set(Evas_Object *obj,
                                                        Evas_Object *content, 
                                                        const char *subtitle)
 {
-       ELM_CHECK_WIDTYPE(obj, widtype);
+       ELM_CHECK_WIDTYPE(obj, widtype) NULL;
        Widget_Data *wd = elm_widget_data_get(obj);
        Eina_List *ll;
        Item *it;
 
-       if (!wd) return;
+       if (!wd) return NULL;
        
         EINA_LIST_FOREACH(wd->stack, ll, it)
        {