2012년 9월 12일 수요일에 Mike Blumenkrantz님이 작성: > This seems like you don't actually need the number of items in the signal > itself since the user can get it from the item... >
I want to change something (ex. the font size) in widget theme automatically according the number of item, NOT in an application. And the code don't effect other actions of toolbar because it's just signal. > Enlightenment SVN <[email protected] <javascript:;>> wrote: > > >Log: > >When the number of item is changed, the toolbar emits the signal to > >theme. > > The theme can be changed something according the number of item. > > > > > > > >Author: jaehwan > >Date: 2012-09-11 22:15:43 -0700 (Tue, 11 Sep 2012) > >New Revision: 76487 > >Trac: http://trac.enlightenment.org/e/changeset/76487 > > > >Modified: > > trunk/elementary/ChangeLog trunk/elementary/src/lib/elm_toolbar.c > > > >Modified: trunk/elementary/ChangeLog > >=================================================================== > >--- trunk/elementary/ChangeLog 2012-09-12 04:34:08 UTC (rev 76486) > >+++ trunk/elementary/ChangeLog 2012-09-12 05:15:43 UTC (rev 76487) > >@@ -456,3 +456,8 @@ > > > > * Even if the top item is inserted into the naviframe. Any > transition > > wouldn't be launched. > >+ > >+2012-09-12 Jaehwan Kim > >+ > >+ * When the number of item is changed, the toolbar emits the signal > >to theme. > >+ The theme can be changed something according the number of item. > > > >Modified: trunk/elementary/src/lib/elm_toolbar.c > >=================================================================== > >--- trunk/elementary/src/lib/elm_toolbar.c 2012-09-12 04:34:08 UTC > (rev > >76486) > >+++ trunk/elementary/src/lib/elm_toolbar.c 2012-09-12 05:15:43 UTC > (rev > >76487) > >@@ -776,6 +776,32 @@ > > } > > > > static void > >+_inform_item_number(Evas_Object *obj) > >+{ > >+ ELM_TOOLBAR_DATA_GET(obj, sd); > >+ Elm_Toolbar_Item *it; > >+ char buf[sizeof("elm,action,click,") + 3]; > >+ static int scount = 0; > >+ int count = 0; > >+ > >+ EINA_INLIST_FOREACH(sd->items, it) > >+ { > >+ if (!it->separator) count++; > >+ } > >+ if (scount != count) > >+ { > >+ scount = count; > >+ sprintf(buf, "elm,number,item,%d", count); > >+ > >+ EINA_INLIST_FOREACH(sd->items, it) > >+ { > >+ if (!it->separator && !it->object) > >+ edje_object_signal_emit(VIEW(it), buf, "elm"); > >+ } > >+ } > >+} > >+ > >+static void > > _sizing_eval(Evas_Object *obj) > > { > > Evas_Coord minw = -1, minh = -1, minw_bx = -1, minh_bx = -1; > >@@ -835,6 +861,8 @@ > > evas_object_resize(sd->more, w, h); > > evas_object_size_hint_min_set(obj, minw, minh); > > evas_object_size_hint_max_set(obj, -1, -1); > >+ > >+ _inform_item_number(obj); > > } > > > > static Eina_Bool > > > > > > >------------------------------------------------------------------------------ > >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-svn mailing list > >[email protected] <javascript:;> > >https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > > ------------------------------------------------------------------------------ > 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] <javascript:;> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > ------------------------------------------------------------------------------ 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
