seoz pushed a commit to branch master.

commit babc7158a3c634acf1344c869c6a101334247b4d
Author: Daniel Juyung Seo <[email protected]>
Date:   Fri Aug 30 18:00:33 2013 +0900

    elc_popup.c: make popup handle general content set.
    
    Currently application can use "default", "title,icon", "button{n}" parts 
for content_set but this patch allows more flexible usage of content_set.
---
 src/lib/elc_popup.c | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c
index 87ed5c7..3d0d380 100644
--- a/src/lib/elc_popup.c
+++ b/src/lib/elc_popup.c
@@ -1171,34 +1171,32 @@ _elm_popup_smart_content_set(Eo *obj, void *_pd 
EINA_UNUSED, va_list *list)
    unsigned int i;
 
    if (!part || !strcmp(part, "default"))
-     {
-       int_ret = _content_set(obj, content);
-       goto end;
-     }
+     int_ret = _content_set(obj, content);
    else if (!strcmp(part, "title,icon"))
-     {
-        int_ret = _title_icon_set(obj, content);
-        goto end;
-     }
+     int_ret = _title_icon_set(obj, content);
    else if (!strncmp(part, "button", 6))
      {
         i = atoi(part + 6) - 1;
 
         if (i >= ELM_POPUP_ACTION_BUTTON_MAX)
-          goto err;
+          {
+             ERR("The part name is invalid! : popup=%p", obj);
+             int_ret = EINA_FALSE;
+             return;
+          }
 
         _action_button_set(obj, content, i);
 
         int_ret = EINA_TRUE;
-        goto end;
+     }
+   else
+     {
+        eo_do_super(obj, MY_CLASS,
+                    elm_obj_container_content_set(part, content, &int_ret));
      }
 
-err:
-   ERR("The part name is invalid! : popup=%p", obj);
-   int_ret = EINA_FALSE;
-
-end:
    if (ret) *ret = int_ret;
+   return;
 }
 
 static Evas_Object *

-- 

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk

Reply via email to