summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-09-13 20:11:19 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-09-13 20:38:52 +0900
commit3984148b8e540c788ac1538704f8f6c44365100d (patch)
tree9b6df4fdb41e309f4e3e642e893fb30ca5cf55e3 /src/modules
parentcca312d42ccfbb89779cd307b1cee9371225ba4f (diff)
efl.ui.clock: correct value_set/get & value_min/max APIs signature.
We could just pass Efl_Time value as copy by value to set time in setter APIs and return Efl_Time value in getter APIs. Thanks to @JackDanielZ for the report. Fixes T6008
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c b/src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c
index b3b90b6..d94a886 100644
--- a/src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c
+++ b/src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c
@@ -97,13 +97,13 @@ _diskselector_cb(void *data EINA_UNUSED, const Efl_Event *event)
97 disk_data = (DiskItem_Data *)elm_object_item_data_get(event->info); 97 disk_data = (DiskItem_Data *)elm_object_item_data_get(event->info);
98 if (!disk_data || !(disk_data->ctx_mod)) return; 98 if (!disk_data || !(disk_data->ctx_mod)) return;
99 99
100 efl_ui_clock_value_get(disk_data->ctx_mod->mod_data.base, &curr_time); 100 curr_time = efl_ui_clock_value_get(disk_data->ctx_mod->mod_data.base);
101 fmt = disk_data->ctx_mod->mod_data.field_format_get(disk_data->ctx_mod->mod_data.base, disk_data->sel_field_type); 101 fmt = disk_data->ctx_mod->mod_data.field_format_get(disk_data->ctx_mod->mod_data.base, disk_data->sel_field_type);
102 if ((disk_data->sel_field_type == EFL_UI_CLOCK_TYPE_HOUR) && ((!strncmp(fmt, "%I", FIELD_FORMAT_LEN)) || 102 if ((disk_data->sel_field_type == EFL_UI_CLOCK_TYPE_HOUR) && ((!strncmp(fmt, "%I", FIELD_FORMAT_LEN)) ||
103 (!strncmp(fmt, "%l", FIELD_FORMAT_LEN))) && (curr_time.tm_hour >= 12)) 103 (!strncmp(fmt, "%l", FIELD_FORMAT_LEN))) && (curr_time.tm_hour >= 12))
104 disk_data->sel_field_value += 12; 104 disk_data->sel_field_value += 12;
105 _field_value_set(&curr_time, disk_data->sel_field_type, disk_data->sel_field_value); 105 _field_value_set(&curr_time, disk_data->sel_field_type, disk_data->sel_field_value);
106 efl_ui_clock_value_set(disk_data->ctx_mod->mod_data.base, &curr_time); 106 efl_ui_clock_value_set(disk_data->ctx_mod->mod_data.base, curr_time);
107 evas_object_hide(disk_data->ctx_mod->ctxpopup); 107 evas_object_hide(disk_data->ctx_mod->ctxpopup);
108} 108}
109 109
@@ -116,10 +116,10 @@ _ampm_clicked_cb(void *data, const Efl_Event *event EINA_UNUSED)
116 ctx_mod = (Ctxpopup_Module_Data *)data; 116 ctx_mod = (Ctxpopup_Module_Data *)data;
117 if (!ctx_mod) return; 117 if (!ctx_mod) return;
118 118
119 efl_ui_clock_value_get(ctx_mod->mod_data.base, &curr_time); 119 curr_time = efl_ui_clock_value_get(ctx_mod->mod_data.base);
120 if (curr_time.tm_hour >= 12) curr_time.tm_hour -= 12; 120 if (curr_time.tm_hour >= 12) curr_time.tm_hour -= 12;
121 else curr_time.tm_hour += 12; 121 else curr_time.tm_hour += 12;
122 efl_ui_clock_value_set(ctx_mod->mod_data.base, &curr_time); 122 efl_ui_clock_value_set(ctx_mod->mod_data.base, curr_time);
123} 123}
124 124
125static void 125static void
@@ -169,7 +169,7 @@ _field_clicked_cb(void *data, const Efl_Event *event)
169 169
170 field_type = (Efl_Ui_Clock_Type )evas_object_data_get(event->object, "_field_type"); 170 field_type = (Efl_Ui_Clock_Type )evas_object_data_get(event->object, "_field_type");
171 fmt = ctx_mod->mod_data.field_format_get(ctx_mod->mod_data.base, field_type); 171 fmt = ctx_mod->mod_data.field_format_get(ctx_mod->mod_data.base, field_type);
172 efl_ui_clock_value_get(ctx_mod->mod_data.base, &time1); 172 time1 = efl_ui_clock_value_get(ctx_mod->mod_data.base);
173 val = _field_value_get(&time1, field_type); 173 val = _field_value_get(&time1, field_type);
174 ctx_mod->mod_data.field_limit_get(ctx_mod->mod_data.base, field_type, &min, &max); 174 ctx_mod->mod_data.field_limit_get(ctx_mod->mod_data.base, field_type, &min, &max);
175 175
@@ -283,7 +283,7 @@ field_value_display(Efl_Ui_Clock_Module_Data *module_data, Evas_Object *obj)
283 ctx_mod = (Ctxpopup_Module_Data *)module_data; 283 ctx_mod = (Ctxpopup_Module_Data *)module_data;
284 if (!ctx_mod || !obj) return; 284 if (!ctx_mod || !obj) return;
285 285
286 efl_ui_clock_value_get(ctx_mod->mod_data.base, &tim); 286 tim = efl_ui_clock_value_get(ctx_mod->mod_data.base);
287 field_type = (Efl_Ui_Clock_Type )evas_object_data_get(obj, "_field_type"); 287 field_type = (Efl_Ui_Clock_Type )evas_object_data_get(obj, "_field_type");
288 fmt = ctx_mod->mod_data.field_format_get(ctx_mod->mod_data.base, field_type); 288 fmt = ctx_mod->mod_data.field_format_get(ctx_mod->mod_data.base, field_type);
289 buf[0] = 0; 289 buf[0] = 0;