On Wed, 7 Mar 2012 18:31:49 +0900 Daniel Juyung Seo <seojuyu...@gmail.com> wrote:
> On Wed, Mar 7, 2012 at 5:45 PM, Enlightenment SVN > <no-re...@enlightenment.org> wrote: > > Log: > > elementary/dayselector - trivial changes > > > > > > > > Author: hermet > > Date: 2012-03-07 00:45:49 -0800 (Wed, 07 Mar 2012) > > New Revision: 68903 > > Trac: http://trac.enlightenment.org/e/changeset/68903 > > > > Modified: > > trunk/elementary/data/themes/widgets/dayselector.edc > > trunk/elementary/src/lib/elc_dayselector.c > > trunk/elementary/src/lib/elc_dayselector.h > > > > Modified: trunk/elementary/data/themes/widgets/dayselector.edc > > =================================================================== > > --- trunk/elementary/data/themes/widgets/dayselector.edc 2012-03-07 > > 08:44:54 UTC (rev 68902) +++ > > trunk/elementary/data/themes/widgets/dayselector.edc 2012-03-07 > > 08:45:49 UTC (rev 68903) @@ -59,9 +59,9 @@ name: "bg"; > > type: RECT; > > mouse_events: 0; > > - scale: 1; > > clip_to: "clipper"; > > Hello Thanks for you job. > > > - description { state: "default" 0.0; > > + description { > > + state: "default" 0.0; > > But why did you change this? > As far as I know, "description { state: "default" 0.0;" is normal. > > Daniel Juyung Seo (SeoZ) he is hermet. he does what he wants. > > > > rel1 { > > relative: 0.5 0.0; > > to: "day0"; > > @@ -78,16 +78,16 @@ > > type: SWALLOW; > > scale: 1; > > clip_to: "clipper"; > > - description { state: "default" 0.0; > > + description { > > + state: "default" 0.0; > > visible: 0; > > min: 0 0; > > align: 0.0 0.5; > > fixed: 1 0; > > - rel2 { > > - relative: 0.0 1.0; > > - } > > + rel2.relative: 0.0 1.0; > > } > > - description { state: "visible" 0.0; > > + description { > > + state: "visible" 0.0; > > inherit: "default" 0.0; > > visible: 1; > > min: 40 25; > > @@ -102,18 +102,14 @@ > > part { > > name: "clipper"; > > type: RECT; > > - description { state: "default" 0.0; > > - rel1 { > > - relative: 0.0 0.0; > > - to: "day0"; > > - } > > - rel2 { > > - relative: 1.0 1.0; > > - to: "day6"; > > - } > > + description { > > + state: "default" 0.0; > > + rel1.to: "day0"; > > + rel2.to: "day6"; > > color: 255 255 255 255; > > } > > - description { state: "visible" 0.0; > > + description { > > + state: "visible" 0.0; > > inherit: "default" 0.0; > > color: 200 200 200 255; > > } > > @@ -121,11 +117,13 @@ > > part { > > name: "disabler"; > > type: RECT; > > - description { state: "default" 0.0; > > + description { > > + state: "default" 0.0; > > color: 0 0 0 0; > > visible: 0; > > } > > - description { state: "visible" 0.0; > > + description { > > + state: "visible" 0.0; > > inherit: "default" 0.0; > > visible: 1; > > } > > @@ -185,46 +183,42 @@ > > public check_state = DAYSELECOR_DAY_STATE_DEFAULT; // Default, > > Pressed, Selected. > > > > public check_bg_show() { > > - if(get_int(check_pos) == DAYSELECOR_DAY_POS_LEFT) > > - { > > - if(get_int(check_state) == DAYSELECOR_DAY_STATE_DEFAULT) > > - set_state(PART:"bg", "default_left", 0.0); > > - else if(get_int(check_state) == DAYSELECOR_DAY_STATE_PRESSED) > > - set_state(PART:"bg", "pressed_left", 0.0); > > - else if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED) > > - set_state(PART:"bg", "selected_left", 0.0); > > + if(get_int(check_pos) == DAYSELECOR_DAY_POS_LEFT) { > > + if(get_int(check_state) == DAYSELECOR_DAY_STATE_DEFAULT) > > + set_state(PART:"bg", "default_left", 0.0); > > + else if(get_int(check_state) == DAYSELECOR_DAY_STATE_PRESSED) > > + set_state(PART:"bg", "pressed_left", 0.0); > > + else if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED) > > + set_state(PART:"bg", "selected_left", 0.0); > > } > > - else if(get_int(check_pos) == DAYSELECOR_DAY_POS_RIGHT) > > - { > > - if(get_int(check_state) == DAYSELECOR_DAY_STATE_DEFAULT) > > - set_state(PART:"bg", "default_right", 0.0); > > - else if(get_int(check_state) == DAYSELECOR_DAY_STATE_PRESSED) > > - set_state(PART:"bg", "pressed_right", 0.0); > > - else if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED) > > - set_state(PART:"bg", "selected_right", 0.0); > > + else if(get_int(check_pos) == DAYSELECOR_DAY_POS_RIGHT) { > > + if(get_int(check_state) == DAYSELECOR_DAY_STATE_DEFAULT) > > + set_state(PART:"bg", "default_right", 0.0); > > + else if(get_int(check_state) == DAYSELECOR_DAY_STATE_PRESSED) > > + set_state(PART:"bg", "pressed_right", 0.0); > > + else if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED) > > + set_state(PART:"bg", "selected_right", 0.0); > > } > > - else if(get_int(check_pos) == DAYSELECOR_DAY_POS_MIDDLE) > > - { > > - if(get_int(check_state) == DAYSELECOR_DAY_STATE_DEFAULT) > > - set_state(PART:"bg", "default_middle", 0.0); > > - else if(get_int(check_state) == DAYSELECOR_DAY_STATE_PRESSED) > > - set_state(PART:"bg", "pressed_middle", 0.0); > > - else if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED) > > - set_state(PART:"bg", "selected_middle", 0.0); > > + else if(get_int(check_pos) == DAYSELECOR_DAY_POS_MIDDLE) { > > + if(get_int(check_state) == DAYSELECOR_DAY_STATE_DEFAULT) > > + set_state(PART:"bg", "default_middle", 0.0); > > + else if(get_int(check_state) == DAYSELECOR_DAY_STATE_PRESSED) > > + set_state(PART:"bg", "pressed_middle", 0.0); > > + else if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED) > > + set_state(PART:"bg", "selected_middle", 0.0); > > } > > } > > public check_text_show() { > > - if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED) > > - set_state(PART:"elm.text", "selected", 0.0); > > - else > > - { > > - if(get_int(check_type) == DAYSELECOR_DAY_TYPE_WEEKDAY) > > + if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED) > > + set_state(PART:"elm.text", "selected", 0.0); > > + else { > > + if(get_int(check_type) == DAYSELECOR_DAY_TYPE_WEEKDAY) > > set_state(PART:"elm.text", "default", 0.0); > > - else if (get_int(check_type) == > > DAYSELECOR_DAY_TYPE_WEEKEND_DEFAULT) > > + else if (get_int(check_type) == > > DAYSELECOR_DAY_TYPE_WEEKEND_DEFAULT) set_state(PART:"elm.text", > > "weekend_default", 0.0); > > - else if (get_int(check_type) == > > DAYSELECOR_DAY_TYPE_WEEKEND_STYLE1) > > + else if (get_int(check_type) == > > DAYSELECOR_DAY_TYPE_WEEKEND_STYLE1) set_state(PART:"elm.text", > > "weekend_style1", 0.0); > > - } > > + } > > } > > } > > parts { > > @@ -360,12 +354,12 @@ > > description { > > state: "weekend_default" 0.0; > > inherit: "default" 0.0; > > - color: 8 96 170 255; > > + color: 225 49 8 255; > > } > > description { > > state: "weekend_style1" 0.0; > > inherit: "default" 0.0; > > - color: 225 49 8 255; > > + color: 8 96 170 255; > > } > > description { > > state: "selected" 0.0; > > @@ -379,12 +373,8 @@ > > ignore_flags: ON_HOLD; > > description { > > state: "default" 0.0; > > - rel1 { > > - to: "bg"; > > - } > > - rel2 { > > - to: "bg"; > > - } > > + rel1.to: "bg"; > > + rel2.to: "bg"; > > color: 0 0 0 0; > > } > > } > > > > Modified: trunk/elementary/src/lib/elc_dayselector.c > > =================================================================== > > --- trunk/elementary/src/lib/elc_dayselector.c 2012-03-07 08:44:54 UTC > > (rev 68902) +++ trunk/elementary/src/lib/elc_dayselector.c 2012-03-07 > > 08:45:49 UTC (rev 68903) @@ -36,19 +36,25 @@ > > Evas_Object *obj __UNUSED__, void *event_info __UNUSED__); > > static void _disable_hook(Evas_Object *obj); > > static Eina_Bool _focus_next_hook(const Evas_Object *obj, > > - Elm_Focus_Direction dir __UNUSED__, Evas_Object **next > > __UNUSED__); > > + Elm_Focus_Direction dir __UNUSED__, > > + Evas_Object **next __UNUSED__); > > static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl); > > static void _translate_hook(Evas_Object *obj); > > static void _theme_hook(Evas_Object *obj); > > -static void _item_text_set_hook(Evas_Object *obj, const char *item, const > > char *label); -static const char *_item_text_get_hook(const Evas_Object > > *obj, const char *item); -static void _content_set_hook(Evas_Object *obj, > > const char *item, Evas_Object *content); +static void > > _item_text_set_hook(Evas_Object *obj, const char *item, > > + const char *label); > > +static const char *_item_text_get_hook(const Evas_Object *obj, > > + const char *item); > > +static void _content_set_hook(Evas_Object *obj, const char *item, > > + Evas_Object *content); > > static Evas_Object *_content_get_hook(const Evas_Object *obj, const char > > *item); static Evas_Object *_content_unset_hook(Evas_Object *obj, const > > char *item); static void _signal_emit_cb(void *data, Evas_Object *obj, > > const char *emission, > > - const char *source __UNUSED__); > > -static void _item_clicked_cb(void *data, Evas_Object *obj, void > > *event_info __UNUSED__); -static Elm_Dayselector_Item * _item_find(const > > Evas_Object *obj, Elm_Dayselector_Day day); > > + const char *source __UNUSED__); > > +static void _item_clicked_cb(void *data, Evas_Object *obj, > > + void *event_info __UNUSED__); > > +static Elm_Dayselector_Item * _item_find(const Evas_Object *obj, > > + Elm_Dayselector_Day day); > > static void _items_style_set(Evas_Object *obj); > > static void _update_items(Evas_Object *obj); > > static void _create_items(Evas_Object *obj); > > @@ -74,7 +80,6 @@ > > eina_stringshare_del(it->day_style); > > elm_widget_item_free(it); > > } > > - > > free(wd); > > } > > > > @@ -164,7 +169,8 @@ > > > > _elm_widget_mirrored_reload(obj); > > _mirrored_set(obj, elm_widget_mirrored_get(obj)); > > - _elm_theme_object_set(obj, wd->base, "dayselector", "base", > > elm_widget_style_get(obj)); > > + _elm_theme_object_set(obj, wd->base, "dayselector", "base", > > + elm_widget_style_get(obj)); > > > > EINA_LIST_FOREACH(wd->items, l, it) > > { > > @@ -385,11 +391,9 @@ > > > > EINA_LIST_FOREACH(wd->items, l, it) > > { > > - if (obj == VIEW(it)) > > - { > > - evas_object_smart_callback_call(data, SIG_CHANGED, (void > > *)it->day); > > - return ; > > - } > > + if (obj != VIEW(it)) continue; > > + evas_object_smart_callback_call(data, SIG_CHANGED, (void > > *)it->day); > > + return; > > } > > } > > > > @@ -426,16 +430,20 @@ > > if (weekend_last >= wd->weekend_start) > > { > > if ((it->day >= wd->weekend_start) && (it->day <= > > weekend_last)) > > - eina_stringshare_replace(&it->day_style, > > ITEM_TYPE_WEEKEND_DEFAULT); > > + eina_stringshare_replace(&it->day_style, > > + ITEM_TYPE_WEEKEND_DEFAULT); > > else > > - eina_stringshare_replace(&it->day_style, > > ITEM_TYPE_WEEKDAY_DEFAULT); > > + eina_stringshare_replace(&it->day_style, > > + ITEM_TYPE_WEEKDAY_DEFAULT); > > } > > else > > { > > if ((it->day >= wd->weekend_start) || (it->day <= > > weekend_last)) > > - eina_stringshare_replace(&it->day_style, > > ITEM_TYPE_WEEKEND_DEFAULT); > > + eina_stringshare_replace(&it->day_style, > > + ITEM_TYPE_WEEKEND_DEFAULT); > > else > > - eina_stringshare_replace(&it->day_style, > > ITEM_TYPE_WEEKDAY_DEFAULT); > > + eina_stringshare_replace(&it->day_style, > > + ITEM_TYPE_WEEKDAY_DEFAULT); > > } > > } > > } > > @@ -486,6 +494,7 @@ > > > > t = time(NULL); > > localtime_r(&t, &time_daysel); > > + > > for (idx = 0; idx < ELM_DAYSELECTOR_MAX; idx++) > > { > > it = elm_widget_item_new(obj, Elm_Dayselector_Item); > > @@ -503,12 +512,18 @@ > > edje_object_part_swallow(wd->base, buf, VIEW(it)); > > snprintf(buf, sizeof(buf), "day%d,visible", idx); > > edje_object_signal_emit(wd->base, buf, "elm"); > > - evas_object_smart_callback_add(VIEW(it), "changed", > > _item_clicked_cb, obj); > > - evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_DEL, > > _item_del_cb, obj); > > - elm_object_signal_callback_add(VIEW(it), > > ITEM_TYPE_WEEKDAY_DEFAULT, "", _signal_emit_cb, obj); > > - elm_object_signal_callback_add(VIEW(it), ITEM_TYPE_WEEKDAY_STYLE1, > > "", _signal_emit_cb, obj); > > - elm_object_signal_callback_add(VIEW(it), > > ITEM_TYPE_WEEKEND_DEFAULT, "", _signal_emit_cb, obj); > > - elm_object_signal_callback_add(VIEW(it), ITEM_TYPE_WEEKEND_STYLE1, > > "", _signal_emit_cb, obj); > > + evas_object_smart_callback_add(VIEW(it), "changed", > > _item_clicked_cb, > > + obj); > > + evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_DEL, > > + _item_del_cb, obj); > > + elm_object_signal_callback_add(VIEW(it), > > ITEM_TYPE_WEEKDAY_DEFAULT, "", > > + _signal_emit_cb, obj); > > + elm_object_signal_callback_add(VIEW(it), ITEM_TYPE_WEEKDAY_STYLE1, > > "", > > + _signal_emit_cb, obj); > > + elm_object_signal_callback_add(VIEW(it), > > ITEM_TYPE_WEEKEND_DEFAULT, "", > > + _signal_emit_cb, obj); > > + elm_object_signal_callback_add(VIEW(it), ITEM_TYPE_WEEKEND_STYLE1, > > "", > > + _signal_emit_cb, obj); > > } > > _items_style_set(obj); > > _update_items(obj); > > @@ -537,6 +552,7 @@ > > elm_widget_content_set_hook_set(obj, _content_set_hook); > > elm_widget_content_get_hook_set(obj, _content_get_hook); > > elm_widget_content_unset_hook_set(obj, _content_unset_hook); > > + > > wd->base = edje_object_add(e); > > _elm_theme_object_set(obj, wd->base, "dayselector", "base", "default"); > > elm_object_style_set(wd->base, "dayselector"); > > @@ -545,9 +561,11 @@ > > wd->week_start = _elm_config->week_start; > > wd->weekend_start = _elm_config->weekend_start; > > wd->weekend_len = _elm_config->weekend_len; > > + printf("%d %d %d\n", wd->week_start, wd->weekend_start, > > wd->weekend_len); _create_items(obj); > > > > - evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, > > _dayselector_resize, obj); > > + evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, > > + _dayselector_resize, obj); > > evas_object_smart_callbacks_descriptions_set(obj, _signals); > > _mirrored_set(obj, elm_widget_mirrored_get(obj)); > > _sizing_eval(obj); > > @@ -589,6 +607,7 @@ > > EINA_LIST_FOREACH(wd->items, l, it) > > { > > loc = (ELM_DAYSELECTOR_MAX - wd->week_start + it->day) % > > ELM_DAYSELECTOR_MAX; > > + printf("%d\n", loc); > > snprintf(buf, sizeof(buf), "day%d", loc); > > edje_object_part_swallow(wd->base, buf, VIEW(it)); > > } > > > > Modified: trunk/elementary/src/lib/elc_dayselector.h > > =================================================================== > > --- trunk/elementary/src/lib/elc_dayselector.h 2012-03-07 08:44:54 UTC > > (rev 68902) +++ trunk/elementary/src/lib/elc_dayselector.h 2012-03-07 > > 08:45:49 UTC (rev 68903) @@ -51,12 +51,11 @@ > > * the different check styles for individual days. > > * > > * The widget emits the following signals: > > + * @li "dayselector,changed" - when the user changes the state of a day. > > + * @li "language,changed" - the program's launguage changed > > * > > - * <b>"dayselector,changed"</b> - This signal is emitted when the user > > changes > > - * the state of a day. > > - * > > * Available styles for dayselector are: > > - * - <b>@c default </b> > > + * @li default > > * > > * This example shows the usage of the widget. > > * @li @ref dayselector_example > > > > > > ------------------------------------------------------------------------------ > > Virtualization & Cloud Management Using Capacity Planning > > Cloud computing makes use of virtualization - but cloud computing > > also focuses on allowing computing to be delivered as a service. > > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > _______________________________________________ > > enlightenment-svn mailing list > > enlightenment-...@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel