summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2015-03-10 22:52:29 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2015-03-10 22:52:29 +0900
commit719867abbc9faac64ec450c457dbe983c62041ad (patch)
treeccd0e1680ee570644b66457815b07976c5d4d2e3
parent38f5a7c3b04ff17594062b143b664aeecc880f82 (diff)
elm: Use eo_isa() to check object types instead of manual string comparison.
-rw-r--r--src/lib/elc_fileselector_button.c2
-rw-r--r--src/lib/elc_multibuttonentry.c4
-rw-r--r--src/lib/elm_cnp.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/elc_fileselector_button.c b/src/lib/elc_fileselector_button.c
index 985c430e5..daf193765 100644
--- a/src/lib/elc_fileselector_button.c
+++ b/src/lib/elc_fileselector_button.c
@@ -103,7 +103,7 @@ _new_window_add(Elm_Fileselector_Button_Data *sd)
103static Evas_Object * 103static Evas_Object *
104_parent_win_get(Evas_Object *obj) 104_parent_win_get(Evas_Object *obj)
105{ 105{
106 while ((obj) && (strcmp(evas_object_type_get(obj), "elm_win"))) 106 while (eo_isa(obj, ELM_WIN_CLASS))
107 obj = elm_object_parent_widget_get(obj); 107 obj = elm_object_parent_widget_get(obj);
108 108
109 return obj; 109 return obj;
diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index 91aad0767..f1e5e6317 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -1183,7 +1183,7 @@ _box_min_size_calculate(Evas_Object *box,
1183 l_next = eina_list_next(l); 1183 l_next = eina_list_next(l);
1184 opt = eina_list_data_get(l_next); 1184 opt = eina_list_data_get(l_next);
1185 if (l_next && opt && opt->obj && 1185 if (l_next && opt && opt->obj &&
1186 !strcmp(elm_widget_type_get(opt->obj), "elm_entry")) 1186 eo_isa(opt->obj, ELM_ENTRY_CLASS))
1187 { 1187 {
1188 linew = 0; 1188 linew = 0;
1189 line_num++; 1189 line_num++;
@@ -1277,7 +1277,7 @@ _box_layout_cb(Evas_Object *o,
1277 if (linew > w) 1277 if (linew > w)
1278 { 1278 {
1279 opt = eina_list_data_get(l_next); 1279 opt = eina_list_data_get(l_next);
1280 if (opt && opt->obj && !strcmp(elm_widget_type_get(opt->obj), "elm_entry")) 1280 if (opt && opt->obj && eo_isa(opt->obj, ELM_ENTRY_CLASS))
1281 { 1281 {
1282 xx = x; 1282 xx = x;
1283 yy += hh; 1283 yy += hh;
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 5096e4aea..de9001860 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -1315,7 +1315,7 @@ _dropable_coords_adjust(Dropable *dropable, Evas_Coord *x, Evas_Coord *y)
1315 if (elm_widget_is(dropable->obj)) 1315 if (elm_widget_is(dropable->obj))
1316 { 1316 {
1317 win = elm_widget_top_get(dropable->obj); 1317 win = elm_widget_top_get(dropable->obj);
1318 if (win && !strcmp(evas_object_type_get(win), "elm_win")) 1318 if (win && eo_isa(win, ELM_WIN_CLASS))
1319 { 1319 {
1320 Evas_Coord x2, y2; 1320 Evas_Coord x2, y2;
1321 int rot = elm_win_rotation_get(win); 1321 int rot = elm_win_rotation_get(win);