Hi Mr Kim, Please check my comments below.
> > Date: Sun, 19 Aug 2012 15:47:19 +0900 > > From: Kim Shinwoo <[email protected]> > > Subject: [E-devel] [patch][elementary] datetime - _datetime_item_get() has > > problem. > > To: Enlightenment developer list > > <[email protected]> > > Message-ID: > > <cap-c0nhq1z5b07nb6p7duqhfz8tkqnohvj_zejhgzur6ki4...@mail.gmail.com> > > Content-Type: text/plain; charset="iso-8859-1" > > dear all, hello > > datetime items which have format and visibility are retrieved for the > > elm_widget_focus_list_next_get(); > > FYI.. datetime field(item) has type such as YEAR, MONTH, DATE(?), HOUR, > > MINUTE, and one more. > > and each types have different location according to its format. in > > elementary_test, the datetime types has location as following > > > > YEAR(type): 4 (location) > > MONTH(type): 0 (location) > > DATE(type) 1(location) > > HOUR(type): 2(location) > > MINUTE(type): 3(location) > > > > then, it comes as below.. (you can check this on the elementary_test() > > > > - Aug 19 2012 > > - 15 : 20 > > - Aug 19 15 : 20 2012 > > > > the location looks like priority to display the field. > > > > anyhow problem is.. > > datetime _datetime_items_get() just counts the number of item which have > > format and visibility. > > and the counting number is used to compare with item location. > > > > in the second case (15:20), the counting number is '2', and datetime just > > check YEAR and MONTH whether its location is equal to the counting number. > > so.. the 15(HOUR) and 20(MINUTE) cannot be a member of focus_list. > > As you can see in _datetime_items_get() fn, first, there is a count for the number of displayed items and then each displayed item is checked for field type (internal “for loop” runs from ELM_DATETIME_YEAR to ELM_DATETIME_AMPM) and accordingly adds up the item_object. So for (15:20), outer loop runs for 2 times, each time checking from ELM_DATETIME_YEAR to ELM_DATETIME_AMPM to add the corresponding field_object (since field_obj are fixed). > > please check the attached patch to resolve this issue and give feedback. In the earlier code, the complexity is O(n^2) for worst case but the best/average cases are definitely less than that. (say, in above example, it is a total of 2x6 = 12 times) But in the attached patch, the loop always runs for O(n^2) times which was already optimized earlier. > > thanks. > > > > cordially, > > shinwoo kim. Regards, Sumanth > Date: Mon, 20 Aug 2012 17:12:16 +0900 > From: Carsten Haitzler (The Rasterman) <[email protected]> > Subject: Re: [E-devel] [patch][elementary] datetime - > _datetime_item_get() has problem. > To: Enlightenment developer list > <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset=US-ASCII > On Sun, 19 Aug 2012 15:47:19 +0900 Kim Shinwoo <[email protected]> said: > > it seems i mixed up your patches and put in this instead of an accessibility > one. anyway. they are BOTH in now! :) > > > dear all, hello > > > > datetime items which have format and visibility are retrieved for the > > elm_widget_focus_list_next_get(); > > > > FYI.. datetime field(item) has type such as YEAR, MONTH, DATE(?), HOUR, > > MINUTE, and one more. > > and each types have different location according to its format. in > > elementary_test, the datetime types has location as following > > > > YEAR(type): 4 (location) > > MONTH(type): 0 (location) > > DATE(type) 1(location) > > HOUR(type): 2(location) > > MINUTE(type): 3(location) > > > > then, it comes as below.. (you can check this on the elementary_test() > > > > - Aug 19 2012 > > - 15 : 20 > > - Aug 19 15 : 20 2012 > > > > the location looks like priority to display the field. > > > > anyhow problem is.. > > datetime _datetime_items_get() just counts the number of item which have > > format and visibility. > > and the counting number is used to compare with item location. > > > > in the second case (15:20), the counting number is '2', and datetime just > > check YEAR and MONTH whether its location is equal to the counting number. > > so.. the 15(HOUR) and 20(MINUTE) cannot be a member of focus_list. > > > > please check the attached patch to resolve this issue and give feedback. > > thanks. > > > > cordially, > > shinwoo kim. ------------------------------------------------------------------------------ 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
