From e649486e581393068dc82ab25f276257b1faaf4f Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Thu, 8 Jan 2015 18:54:30 +0900 Subject: [PATCH] [spinner] use strncmp, not strcmp to support styles starting with vertical Summary: Use strncpm, not strcmp to support styles starting with vertical Test Plan: Define spinner style which has 'vertcial' as a prefix Reviewers: raster, cedric, seoz, woohyun, jaehwan, Hermet, jpeg Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D1839 --- legacy/elementary/src/lib/elm_spinner.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/elementary/src/lib/elm_spinner.c b/legacy/elementary/src/lib/elm_spinner.c index 7043b39594..135f586028 100644 --- a/legacy/elementary/src/lib/elm_spinner.c +++ b/legacy/elementary/src/lib/elm_spinner.c @@ -590,7 +590,7 @@ _access_activate_cb(void *data, Evas_Object *eo, *inc_btn; const char* increment_part; - if (!strcmp(elm_widget_style_get(data), "vertical")) + if (!strncmp(elm_widget_style_get(data), "vertical", 8)) increment_part = "up_bt"; else increment_part = "right_bt"; @@ -632,7 +632,7 @@ _access_spinner_register(Evas_Object *obj, Eina_Bool is_access) const char* increment_part; const char* decrement_part; - if (!strcmp(elm_widget_style_get(obj), "vertical")) + if (!strncmp(elm_widget_style_get(obj), "vertical", 8)) { increment_part = "up_bt"; decrement_part = "down_bt"; @@ -807,7 +807,7 @@ _elm_spinner_elm_widget_focus_next(Eo *obj, Elm_Spinner_Data *_pd EINA_UNUSED, E const char* increment_part; const char* decrement_part; - if (!strcmp(elm_widget_style_get(obj), "vertical")) + if (!strncmp(elm_widget_style_get(obj), "vertical", 8)) { increment_part = "up_bt"; decrement_part = "down_bt";