On Thu, Jan 5, 2012 at 10:55 PM, Steven Falken <btwo...@googlemail.com> wrote: > 2012/1/5 Bruno Dilly <bdi...@profusion.mobi>: >> On Thu, Jan 5, 2012 at 5:11 PM, Steven Falken <btwo...@googlemail.com> wrote: >>> 2012/1/5 Gustavo Sverzut Barbieri <barbi...@profusion.mobi> >>>> >>>> On Thu, Jan 5, 2012 at 11:03 AM, Bruno Dilly <bdi...@profusion.mobi> wrote: >>>> > On Thu, Jan 5, 2012 at 10:37 AM, Raphael Kubo da Costa >>>> > <k...@profusion.mobi> wrote: >>>> >> Steven Falken <btwo...@googlemail.com> writes: >>>> >> >>>> >>> hi, >>>> >>> http://sprunge.us/ZWSg <- allows you to set the useragent, use a >>>> >>> standard >>>> >>> useragent >>>> >>> or a useragent for mobile devices; I also added a test for >>>> >>> elementary_test >>>> >>> thx for comments >>>> > >>>> > I'll would keep the add function and add wrapper functions for >>>> > ewk_view_setting_user_agent_set/get. >>>> > Something like elm_web_useragent_set/get >>>> > >>>> > This way you could simply add a new elm_web and set the useragent as you >>>> > wish. >>>> >>>> I managed to review the patch and totally agree with Bruno. Just allow >>>> user to set/get the user agent string, nothing more. >>>> >>>> The other pieces of the patch, like the mobile, is too specific and >>>> will not work for most cases, thus useless to have in elementary. >>>> >>> >>> thx for your comments - now: http://sprunge.us/ZEWf >>> I again added code for elementary_test, but this time I used userdata >>> for _new_window_hook. >> >> Much better. Nice work. >> A very quick review: >> >> 1) no need for define changes, right ? >> 2) don't forget ELM_CHECK_WIDTYPE on set / get functions >> 3) I suppose ewk_view_setting_user_agent_get needs wd->ewk_view, not obj > > newest version: http://sprunge.us/ZhFS > 1) I removed the new define - I just didn't like that elm_web was > using mobile websites as default. > 2) I added ELM_CHECK_WIDTYPE and EAPI > 3) now, wd->ewk_view and not obj - moreover I added a printf in > test_web to test elm_web_useragent_get >
Hi Steven, OK, thank you for your contribution. Committed on rev 66938 with a few changes (ifdef ELM_WEB, ELM_CHECK_WIDTYPE return, check for wd). > one more thing: I don't like that ewk_view_setting_user_agent_set is > called two times - in my opinion > my first solution was a bit more clean You have a good point, calling the same function twice isn't good. On the other side, we are trying to keep a simple, consistent API. We have lots of relevant properties for each widget that is set with some default value on add() and later the user can set it as intended. For example, we have a clock, we can set if it's am/pm or 24h, if it show seconds or not, ... If we add new add() functions for each property, and possible combinations (otherwise we would have to choose some default properties anyway), we would have a bloated API, hard to understand and use. For example: elm_clock_24_show_seconds_add() elm_clock_24_no_seconds_add() elm_clock_am_pm_show_seconds_add() elm_clock_am_pm_no_seconds_add() It wouldn't scale, imho. Do you agree ? Best regards > > Regards > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Bruno Dilly Senior Developer ProFUSION embedded systems http://profusion.mobi ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel