I would like to clarify that I am very happy with the access elm_object_part_text_set. I do not question the API the problem is internal. I thinking about if things would be easier and more efficient, if we could provide a 'main edje' in elm_widget. And sure keep hooks
2011/7/6 michael bouchaud <michael.bouch...@gmail.com> > 2011/7/6 Tom Hacohen <tom.haco...@partner.samsung.com> > >> On 06/07/11 17:35, michael bouchaud wrote: >> > Hi, some of you seems really happy with the new elm_object_text_set >> > function, but it's not my case. I'm feeling very frustrated with it. The >> > implementation of this function is generic only because each widget >> knows >> > where is the edje_object and the name of the part to set. Today each >> widget >> > who use this hook do like this -> >> > >> > if (part == NULL) edje_object_part_text_set(mysmartdata->edje, >> > "my_label_part", label); >> > else don't do anything .... >> >> Not true, actionslider and bubble for example do more than that, they >> allow you to set specific locations. Generally, all the widgets that >> allow setting specific locations support specific locations. >> > >> > So, Why we can send a part name for argument, if we don't care. >> >> We do care, and we use it. It's not an edje part, it's a part of the >> widget. >> > >> > Surely we can make some widgets could set some extra label... And if >> they >> > does, each widget need to manage this with own code. Where is >> factorisation >> > of code ? And this become a huge work to done. >> >> Well, in elm_layout for example (which represents an edj file) it's >> "automatic" i.e you just use the name of the edje part, beacuse that's >> relevant name there, but otherwise, you can't really know. I can have a >> couple of edje files per widget, or even more than that, a couple of >> widgets combined to one widget (many examples for that). >> > >> > My problems is in fact, why hidden the power of edje in an elementary >> widget >> > ? I want to use it :'(. Emit signal set some label and swallow some >> parts... >> > And don't recode a widgets because, I can't do this. >> >> Again, no sane wane to do it, if you want, you can in your widget just >> pass it to edje as is. >> > >> > In exemple, I take an actionslider. We can set a label for each state >> (left, >> > right, middle). But we can't have a label for the slider button. >> Yes we can (tm), use elm_object_text_set or use elm_object_text_part_set >> with NULL or "default" as the part. >> > > Oops sorry I take a wrong exemple here. So I will fix it, now I want a > second label in the button slider. Different color, different size and > different font :D. The first label be the main label and the second could > indicate the state of the action slider. The main label was on the top of > button and the indicator state label at the bottom of button. How you can do > this ? > > >> >> > So, I need >> > to recode actionslider ? Still with actionslider, I want an icon in the >> > button but not always same. I have to make as many themes as I have >> icons ? >> > I have many exemple in mind, but I hope you can imagine some of them ... >> > (one of them is about a progressbar :p). >> >> Yes, there are many issues with elementary, and I (and others) think >> that elm_object_text_set solves some of them. >> > >> > Of course all widgets don't have an edje, but many of them have. So my >> idea >> > was to up one level the edje_object in widgets. >> > So each widget, who have an edje could provided it to elm_widget with a >> hook >> > or whatever. So, we can set uniformised functions to set label and more >> in >> > elm_widget. This is only a sugestion ... >> >> You can easily do it, but you need to define the hook per widget anyhow >> because it has to know where you keep the edj itself, and finally thanks >> to this function, it's possible. >> > What do you think about it ? >> >> I don't understand what you are complaining about, it seems that this >> solves all you need and more. :) >> >> -- >> Tom. >> >> >> ------------------------------------------------------------------------------ >> All of the data generated in your IT infrastructure is seriously valuable. >> Why? It contains a definitive record of application performance, security >> threats, fraudulent activity, and more. Splunk takes this data and makes >> sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-d2d-c2 >> _______________________________________________ >> enlightenment-devel mailing list >> enlightenment-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel >> > > > > -- > Michaël Bouchaud > > -- Michaël Bouchaud ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel