Hi all,

Unfortunately today I had to look into elc_popup.c and it's disgusting. In
many ways, what one would expect to be a thin layer on top of layout is not.

It tries to be a list, it tries to be a scroller... it's insane.

And when you look at its theme_hook() it will RESET the theme of all items!
Shameful, look at this:

   if (wd->button_count)
     {
        snprintf(buf, sizeof(buf), "buttons%u", wd->button_count);
        elm_layout_theme_set(wd->action_area, "popup", buf,
                             elm_widget_style_get(obj));
        for (i = 0; i < ELM_POPUP_ACTION_BUTTON_MAX; i++)
          {
             if (!wd->buttons[i]) continue;
             elm_object_style_set(wd->buttons[i]->btn, buf);
          }
     }
   elm_layout_theme_set(wd->content_area, "popup", "content",
                        elm_widget_style_get(obj));


and this:
static void
_content_set_hook(Evas_Object *obj, const char *part,
                                 Evas_Object *content)
{
   ELM_CHECK_WIDTYPE(obj, widtype);
   char buff[3];
   unsigned int i;
   Widget_Data *wd = elm_widget_data_get(obj);

   if (!wd) return;
   if (!part || !strcmp(part, "default"))
     _content_set(obj, content);
   else if (!strcmp(part, "title,icon"))
     _title_icon_set(obj, content);
   else if (!strncmp(part, "button", 6))
     {
        part += 6;
        for (i = 0; i < ELM_POPUP_ACTION_BUTTON_MAX; i++)
          {
             snprintf(buff, sizeof(buff), "%u", i+1);
             if (!strncmp(part, buff, sizeof(buff)))
               {
                  _action_button_set(obj, content, i+1);
                  break;
               }
          }
      }
   else
     WRN("The part name is invalid! : popup=%p", obj);
}


So I wonder: if we ever manage to fix elc_popup.c, what to do with this
insanity? Is it considered "part of the api"?

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [email protected]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to