diff options
author | Carsten Haitzler <raster@rasterman.com> | 2011-12-31 14:35:05 +0000 |
---|---|---|
committer | Carsten Haitzler <raster@rasterman.com> | 2011-12-31 14:35:05 +0000 |
commit | 0078d30bdc46fccfefba6a8ad47df34aa48648cd (patch) | |
tree | c32aacba5e2940bcfc42ec19f35976b0a2db0bb3 | |
parent | b4e855e5ccee3bfa823731155f24e817a020180b (diff) | |
download | enlightenment-0078d30bdc46fccfefba6a8ad47df34aa48648cd.tar.gz |
segv's waiting to happen wrong api calls on wrong object types - check
to protect.
SVN revision: 66707
-rw-r--r-- | src/bin/e.h | 4 | ||||
-rw-r--r-- | src/bin/e_box.c | 20 | ||||
-rw-r--r-- | src/bin/e_editable.c | 34 | ||||
-rw-r--r-- | src/bin/e_entry.c | 10 | ||||
-rw-r--r-- | src/bin/e_flowlayout.c | 23 | ||||
-rw-r--r-- | src/bin/e_fm.c | 33 | ||||
-rw-r--r-- | src/bin/e_icon.c | 24 | ||||
-rw-r--r-- | src/bin/e_layout.c | 7 | ||||
-rw-r--r-- | src/bin/e_spectrum.c | 4 | ||||
-rw-r--r-- | src/bin/e_table.c | 9 | ||||
-rw-r--r-- | src/bin/e_thumb.c | 13 |
11 files changed, 179 insertions, 2 deletions
diff --git a/src/bin/e.h b/src/bin/e.h index f7b07f6338..a787c355ea 100644 --- a/src/bin/e.h +++ b/src/bin/e.h @@ -245,4 +245,8 @@ extern EAPI Eina_Bool x_fatal; extern EAPI unsigned long e_alert_composite_win; +//#define SMARTERR(args...) abort() +#define SMARTERRNR() return +#define SMARTERR(x) return x + #endif diff --git a/src/bin/e_box.c b/src/bin/e_box.c index 423d06ed69..a82062d9fe 100644 --- a/src/bin/e_box.c +++ b/src/bin/e_box.c @@ -71,6 +71,7 @@ e_box_freeze(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; sd->frozen++; @@ -82,6 +83,7 @@ e_box_thaw(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; sd->frozen--; @@ -94,6 +96,7 @@ e_box_orientation_set(Evas_Object *obj, int horizontal) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if (sd->horizontal == horizontal) return; @@ -107,6 +110,7 @@ e_box_orientation_get(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; return sd->horizontal; @@ -117,6 +121,7 @@ e_box_homogenous_set(Evas_Object *obj, int homogenous) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if (sd->homogenous == homogenous) return; @@ -131,6 +136,7 @@ e_box_pack_start(Evas_Object *obj, Evas_Object *child) E_Smart_Data *sd; if (!child) return 0; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; _e_box_smart_adopt(sd, child); @@ -146,10 +152,11 @@ e_box_pack_end(Evas_Object *obj, Evas_Object *child) E_Smart_Data *sd; if (!child) return 0; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; _e_box_smart_adopt(sd, child); - sd->items = eina_list_append(sd->items, child); + sd->items = eina_list_append(sd->items, child); sd->changed = 1; if (sd->frozen <= 0) _e_box_smart_reconfigure(sd); return eina_list_count(sd->items) - 1; @@ -164,6 +171,7 @@ e_box_pack_before(Evas_Object *obj, Evas_Object *child, Evas_Object *before) Evas_Object *item; if (!child) return 0; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; _e_box_smart_adopt(sd, child); @@ -187,6 +195,7 @@ e_box_pack_after(Evas_Object *obj, Evas_Object *child, Evas_Object *after) Evas_Object *item; if (!child) return 0; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; _e_box_smart_adopt(sd, child); @@ -207,6 +216,7 @@ e_box_pack_count_get(Evas_Object *obj) E_Smart_Data *sd; sd = evas_object_smart_data_get(obj); + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); if (!sd) return 0; return eina_list_count(sd->items); } @@ -216,6 +226,7 @@ e_box_pack_object_nth(Evas_Object *obj, int n) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(NULL); sd = evas_object_smart_data_get(obj); if (!sd) return NULL; return eina_list_nth(sd->items, n); @@ -226,6 +237,7 @@ e_box_pack_object_first(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(NULL); sd = evas_object_smart_data_get(obj); if (!sd) return NULL; return eina_list_data_get(sd->items); @@ -236,6 +248,7 @@ e_box_pack_object_last(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(NULL); sd = evas_object_smart_data_get(obj); if (!sd) return NULL; return eina_list_data_get(eina_list_last(sd->items)); @@ -284,6 +297,7 @@ e_box_size_min_get(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if (sd->changed) _e_box_smart_extents_calculate(sd); @@ -296,6 +310,7 @@ e_box_size_max_get(Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if (sd->changed) _e_box_smart_extents_calculate(sd); @@ -308,6 +323,7 @@ e_box_align_get(Evas_Object *obj, double *ax, double *ay) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if (ax) *ax = sd->align.x; @@ -319,6 +335,7 @@ e_box_align_set(Evas_Object *obj, double ax, double ay) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if ((sd->align.x == ax) && (sd->align.y == ay)) return; @@ -336,6 +353,7 @@ e_box_align_pixel_offset_get(Evas_Object *obj, int *x, int *y) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if (x) *x = (sd->min.w - sd->w) * (1.0 - sd->align.x); diff --git a/src/bin/e_editable.c b/src/bin/e_editable.c index d25a9231e7..e29a08f052 100644 --- a/src/bin/e_editable.c +++ b/src/bin/e_editable.c @@ -114,6 +114,7 @@ e_editable_theme_set(Evas_Object *editable, const char *category, const char *gr char *obj_group; const char *data; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; if ((!category) || (!group)) return; @@ -165,6 +166,7 @@ e_editable_password_set(Evas_Object *editable, int password_mode) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; if (sd->password_mode == password_mode) return; @@ -185,6 +187,7 @@ e_editable_password_get(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERR(0); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return 0; return sd->password_mode; @@ -201,6 +204,7 @@ e_editable_text_set(Evas_Object *editable, const char *text) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; @@ -237,6 +241,7 @@ e_editable_text_get(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERR(NULL); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return NULL; return sd->text; @@ -258,6 +263,7 @@ e_editable_text_range_get(Evas_Object *editable, int start, int end) char *range; int start_id = 0, end_id = 0, i; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERR(NULL); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return NULL; @@ -293,6 +299,7 @@ e_editable_text_length_get(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERR(0); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return 0; return sd->unicode_length; @@ -312,6 +319,7 @@ e_editable_insert(Evas_Object *editable, int pos, const char *text) E_Editable_Smart_Data *sd; int unicode_length; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERR(0); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return 0; @@ -342,6 +350,7 @@ e_editable_delete(Evas_Object *editable, int start, int end) E_Editable_Smart_Data *sd; int unicode_length; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERR(0); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return 0; @@ -373,6 +382,7 @@ e_editable_cursor_pos_set(Evas_Object *editable, int pos) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; @@ -394,6 +404,7 @@ e_editable_cursor_pos_get(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERR(0); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return 0; return sd->cursor_pos; @@ -413,6 +424,7 @@ e_editable_cursor_geometry_get(Evas_Object *editable, Evas_Coord *cx, Evas_Coord { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; @@ -427,6 +439,7 @@ e_editable_cursor_geometry_get(Evas_Object *editable, Evas_Coord *cx, Evas_Coord EAPI void e_editable_cursor_move_to_start(Evas_Object *editable) { + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if (!editable) return; e_editable_cursor_pos_set(editable, 0); @@ -442,6 +455,7 @@ e_editable_cursor_move_to_end(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; e_editable_cursor_pos_set(editable, sd->unicode_length); @@ -457,6 +471,7 @@ e_editable_cursor_move_left(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; e_editable_cursor_pos_set(editable, sd->cursor_pos - 1); @@ -472,6 +487,7 @@ e_editable_cursor_move_right(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; e_editable_cursor_pos_set(editable, sd->cursor_pos + 1); @@ -487,6 +503,7 @@ e_editable_cursor_show(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; if (sd->cursor_visible) return; @@ -509,6 +526,7 @@ e_editable_cursor_hide(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; if (!sd->cursor_visible) return; @@ -528,6 +546,7 @@ e_editable_selection_pos_set(Evas_Object *editable, int pos) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; @@ -549,6 +568,7 @@ e_editable_selection_pos_get(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERR(0); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return 0; return sd->selection_pos; @@ -562,6 +582,7 @@ e_editable_selection_pos_get(Evas_Object *editable) EAPI void e_editable_selection_move_to_start(Evas_Object *editable) { + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if (!editable) return; e_editable_selection_pos_set(editable, 0); @@ -577,6 +598,7 @@ e_editable_selection_move_to_end(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; e_editable_selection_pos_set(editable, sd->unicode_length); @@ -592,6 +614,7 @@ e_editable_selection_move_left(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; e_editable_selection_pos_set(editable, sd->selection_pos - 1); @@ -607,6 +630,7 @@ e_editable_selection_move_right(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; e_editable_selection_pos_set(editable, sd->selection_pos + 1); @@ -622,7 +646,7 @@ e_editable_selection_move_right(Evas_Object *editable) EAPI void e_editable_select_all(Evas_Object *editable) { - if (!editable) return; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); e_editable_selection_move_to_start(editable); e_editable_cursor_move_to_end(editable); } @@ -638,6 +662,7 @@ e_editable_unselect_all(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; e_editable_selection_pos_set(editable, sd->cursor_pos); @@ -652,6 +677,7 @@ e_editable_select_word(Evas_Object *editable, int index) E_Editable_Smart_Data *sd; int spos = 0, epos = -1, i = 0, pos = 0; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; if ((index < 0) || (index >= sd->unicode_length)) return; @@ -685,6 +711,7 @@ e_editable_selection_show(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; if (sd->selection_visible) return; @@ -704,6 +731,7 @@ e_editable_selection_hide(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; if (!sd->selection_visible) return; @@ -733,6 +761,7 @@ e_editable_pos_get_from_coords(Evas_Object *editable, Evas_Coord x, Evas_Coord y int index, pos, i, j; const char *text; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERR(0); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return 0; if (!(text_obj = edje_object_part_object_get(sd->text_object, "e.text.text"))) @@ -797,6 +826,7 @@ e_editable_char_size_get(Evas_Object *editable, int *w, int *h) if (w) *w = 0; if (h) *h = 0; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(evas = evas_object_evas_get(editable)))) return; if (!(sd = evas_object_smart_data_get(editable))) return; @@ -829,6 +859,7 @@ e_editable_enable(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; @@ -840,6 +871,7 @@ e_editable_disable(Evas_Object *editable) { E_Editable_Smart_Data *sd; + if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR(); if ((!editable) || (!(sd = evas_object_smart_data_get(editable)))) return; diff --git a/src/bin/e_entry.c b/src/bin/e_entry.c index 944bcd30f2..4c1860c98b 100644 --- a/src/bin/e_entry.c +++ b/src/bin/e_entry.c @@ -130,6 +130,7 @@ e_entry_text_set(Evas_Object *entry, const char *text) { E_Entry_Smart_Data *sd; + if (evas_object_smart_smart_get(entry) != _e_entry_smart) SMARTERRNR(); if ((!entry) || (!(sd = evas_object_smart_data_get(entry)))) return; @@ -148,6 +149,7 @@ e_entry_text_get(Evas_Object *entry) { E_Entry_Smart_Data *sd; + if (evas_object_smart_smart_get(entry) != _e_entry_smart) SMARTERR(NULL); if ((!entry) || (!(sd = evas_object_smart_data_get(entry)))) return NULL; return e_editable_text_get(sd->editable_object); @@ -161,6 +163,7 @@ e_entry_text_get(Evas_Object *entry) EAPI void e_entry_clear(Evas_Object *entry) { + if (evas_object_smart_smart_get(entry) != _e_entry_smart) SMARTERRNR(); e_entry_text_set(entry, ""); } @@ -177,6 +180,7 @@ e_entry_editable_object_get(Evas_Object *entry) { E_Entry_Smart_Data *sd; + if (evas_object_smart_smart_get(entry) != _e_entry_smart) SMARTERR(NULL); if ((!entry) || (!(sd = evas_object_smart_data_get(entry)))) return NULL; return sd->editable_object; @@ -194,6 +198,7 @@ e_entry_password_set(Evas_Object *entry, int password_mode) { E_Entry_Smart_Data *sd; + if (evas_object_smart_smart_get(entry) != _e_entry_smart) SMARTERRNR(); if ((!entry) || (!(sd = evas_object_smart_data_get(entry)))) return; e_editable_password_set(sd->editable_object, password_mode); @@ -217,6 +222,7 @@ e_entry_size_min_get(Evas_Object *entry, Evas_Coord *minw, Evas_Coord *minh) { E_Entry_Smart_Data *sd; + if (evas_object_smart_smart_get(entry) != _e_entry_smart) SMARTERRNR(); if ((!entry) || (!(sd = evas_object_smart_data_get(entry)))) return; @@ -236,6 +242,7 @@ e_entry_focus(Evas_Object *entry) { E_Entry_Smart_Data *sd; + if (evas_object_smart_smart_get(entry) != _e_entry_smart) SMARTERRNR(); if ((!entry) || (!(sd = evas_object_smart_data_get(entry)))) return; if (sd->focused) @@ -277,6 +284,7 @@ e_entry_unfocus(Evas_Object *entry) { E_Entry_Smart_Data *sd; + if (evas_object_smart_smart_get(entry) != _e_entry_smart) SMARTERRNR(); if ((!entry) || (!(sd = evas_object_smart_data_get(entry)))) return; if (!sd->focused) @@ -306,6 +314,7 @@ e_entry_enable(Evas_Object *entry) { E_Entry_Smart_Data *sd; + if (evas_object_smart_smart_get(entry) != _e_entry_smart) SMARTERRNR(); if ((!entry) || (!(sd = evas_object_smart_data_get(entry)))) return; if (sd->enabled) @@ -329,6 +338,7 @@ e_entry_disable(Evas_Object *entry) { E_Entry_Smart_Data *sd; + if (evas_object_smart_smart_get(entry) != _e_entry_smart) SMARTERRNR(); if ((!entry) || (!(sd = evas_object_smart_data_get(entry)))) return; if (!sd->enabled) diff --git a/src/bin/e_flowlayout.c b/src/bin/e_flowlayout.c index 24f9da02f3..f80a6bda4f 100644 --- a/src/bin/e_flowlayout.c +++ b/src/bin/e_flowlayout.c @@ -76,6 +76,7 @@ e_flowlayout_freeze(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; sd->frozen++; @@ -87,6 +88,7 @@ e_flowlayout_thaw(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; sd->frozen--; @@ -99,6 +101,7 @@ e_flowlayout_orientation_set(Evas_Object *obj, int horizontal) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if (((sd->horizontal) && (horizontal)) || @@ -113,6 +116,7 @@ e_flowlayout_orientation_get(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; return sd->horizontal; @@ -123,6 +127,7 @@ e_flowlayout_flowdirection_set(Evas_Object *obj, int right, int bottom) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if ((((sd->flowbottom) && (bottom)) || @@ -140,6 +145,7 @@ e_flowlayout_flowdirection_get(Evas_Object *obj, int *right, int *bottom) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if (right) *right = sd->flowright; @@ -151,6 +157,7 @@ e_flowlayout_homogenous_set(Evas_Object *obj, int homogenous) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if (sd->homogenous == homogenous) return; @@ -164,6 +171,7 @@ e_flowlayout_homogenous_get(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; return sd->homogenous; @@ -174,6 +182,7 @@ e_flowlayout_fill_set(Evas_Object *obj, int fill) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if (sd->fill == fill) return; @@ -187,6 +196,7 @@ e_flowlayout_fill_get(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; return sd->fill; @@ -198,6 +208,7 @@ e_flowlayout_pack_start(Evas_Object *obj, Evas_Object *child) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; _e_flowlayout_smart_adopt(sd, child); @@ -212,6 +223,7 @@ e_flowlayout_pack_end(Evas_Object *obj, Evas_Object *child) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; _e_flowlayout_smart_adopt(sd, child); @@ -229,6 +241,7 @@ e_flowlayout_pack_before(Evas_Object *obj, Evas_Object *child, Evas_Object *befo Eina_List *l; Evas_Object *item; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; _e_flowlayout_smart_adopt(sd, child); @@ -251,6 +264,7 @@ e_flowlayout_pack_after(Evas_Object *obj, Evas_Object *child, Evas_Object *after Eina_List *l; Evas_Object *item; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; _e_flowlayout_smart_adopt(sd, child); @@ -270,6 +284,7 @@ e_flowlayout_pack_count_get(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; return eina_list_count(sd->items); @@ -280,6 +295,7 @@ e_flowlayout_pack_object_nth(Evas_Object *obj, int n) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(NULL); sd = evas_object_smart_data_get(obj); if (!sd) return NULL; return eina_list_nth(sd->items, n); @@ -290,6 +306,7 @@ e_flowlayout_pack_object_first(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(NULL); sd = evas_object_smart_data_get(obj); if (!sd) return NULL; return eina_list_data_get(sd->items); @@ -300,6 +317,7 @@ e_flowlayout_pack_object_last(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(NULL); sd = evas_object_smart_data_get(obj); if (!sd) return NULL; return eina_list_data_get(eina_list_last(sd->items)); @@ -347,6 +365,7 @@ e_flowlayout_size_min_get(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if (sd->changed) _e_flowlayout_smart_extents_calcuate(sd); @@ -359,6 +378,7 @@ e_flowlayout_size_max_get(Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if (sd->changed) _e_flowlayout_smart_extents_calcuate(sd); @@ -371,6 +391,7 @@ e_flowlayout_max_children(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return -1; if (!sd->homogenous) return -1; @@ -381,6 +402,7 @@ e_flowlayout_align_get(Evas_Object *obj, double *ax, double *ay) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if (ax) *ax = sd->align.x; @@ -392,6 +414,7 @@ e_flowlayout_align_set(Evas_Object *obj, double ax, double ay) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; if ((sd->align.x == ax) && (sd->align.y == ay)) return; diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index 56909edcea..5228edcfae 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -918,6 +918,7 @@ e_fm2_path_set(Evas_Object *obj, const char *dev, const char *path) E_Fm2_Smart_Data *sd; const char *realpath; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd || !path) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1049,6 +1050,7 @@ e_fm2_underlay_show(Evas_Object *obj) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1061,6 +1063,7 @@ e_fm2_underlay_hide(Evas_Object *obj) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1073,6 +1076,7 @@ e_fm2_all_unsel(Evas_Object *obj) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1085,6 +1089,7 @@ e_fm2_all_sel(Evas_Object *obj) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1097,6 +1102,7 @@ e_fm2_custom_theme_set(Evas_Object *obj, const char *path) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1117,6 +1123,7 @@ e_fm2_custom_theme_content_set(Evas_Object *obj, const char *content) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1137,6 +1144,7 @@ e_fm2_path_get(Evas_Object *obj, const char **dev, const char **path) if (dev) *dev = NULL; if (path) *path = NULL; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1286,6 +1294,7 @@ e_fm2_refresh(Evas_Object *obj) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1315,6 +1324,7 @@ e_fm2_has_parent_get(Evas_Object *obj) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; // safety if (!evas_object_type_get(obj)) return 0; // safety @@ -1329,6 +1339,7 @@ e_fm2_real_path_get(Evas_Object *obj) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERR(NULL); sd = evas_object_smart_data_get(obj); if (!sd) return NULL; // safety if (!evas_object_type_get(obj)) return NULL; // safety @@ -1342,6 +1353,7 @@ e_fm2_parent_go(Evas_Object *obj) E_Fm2_Smart_Data *sd; char *p, *path; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1363,6 +1375,7 @@ e_fm2_config_set(Evas_Object *obj, E_Fm2_Config *cfg) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1384,6 +1397,7 @@ e_fm2_config_get(Evas_Object *obj) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERR(NULL); sd = evas_object_smart_data_get(obj); if (!sd) return NULL; // safety if (!evas_object_type_get(obj)) return NULL; // safety @@ -1398,6 +1412,7 @@ e_fm2_selected_list_get(Evas_Object *obj) Eina_List *list = NULL, *l; E_Fm2_Icon *ic; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERR(NULL); sd = evas_object_smart_data_get(obj); if (!sd) return NULL; // safety if (!evas_object_type_get(obj)) return NULL; // safety @@ -1417,6 +1432,7 @@ e_fm2_all_list_get(Evas_Object *obj) Eina_List *list = NULL, *l; E_Fm2_Icon *ic; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERR(NULL); sd = evas_object_smart_data_get(obj); if (!sd) return NULL; // safety if (!evas_object_type_get(obj)) return NULL; // safety @@ -1435,6 +1451,7 @@ e_fm2_select_set(Evas_Object *obj, const char *file, int select) Eina_List *l; E_Fm2_Icon *ic; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1462,6 +1479,7 @@ e_fm2_file_show(Evas_Object *obj, const char *file) Eina_List *l; E_Fm2_Icon *ic; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1481,6 +1499,7 @@ e_fm2_icon_menu_replace_callback_set(Evas_Object *obj, E_Fm_Cb func, void *data) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1494,6 +1513,7 @@ e_fm2_icon_menu_start_extend_callback_set(Evas_Object *obj, E_Fm_Cb func, void * { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1507,6 +1527,7 @@ e_fm2_icon_menu_end_extend_callback_set(Evas_Object *obj, E_Fm_Cb func, void *da { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1520,6 +1541,7 @@ e_fm2_icon_menu_flags_set(Evas_Object *obj, E_Fm2_Menu_Flags flags) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1532,6 +1554,7 @@ e_fm2_icon_menu_flags_get(Evas_Object *obj) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; // safety if (!evas_object_type_get(obj)) return 0; // safety @@ -1543,6 +1566,8 @@ EAPI void e_fm2_view_flags_set(Evas_Object *obj, E_Fm2_View_Flags flags) { E_Fm2_Smart_Data *sd = evas_object_smart_data_get(obj); + + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety if (strcmp(evas_object_type_get(obj), "e_fm")) return; // safety @@ -1553,6 +1578,8 @@ EAPI E_Fm2_View_Flags e_fm2_view_flags_get(Evas_Object *obj) { E_Fm2_Smart_Data *sd = evas_object_smart_data_get(obj); + + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERR(0); if (!sd) return 0; // safety if (!evas_object_type_get(obj)) return 0; // safety if (strcmp(evas_object_type_get(obj), "e_fm")) return 0; // safety @@ -1565,6 +1592,7 @@ e_fm2_window_object_set(Evas_Object *obj, E_Object *eobj) E_Fm2_Smart_Data *sd; const char *drop[] = { "enlightenment/desktop", "enlightenment/border", "text/uri-list" }; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1591,6 +1619,7 @@ e_fm2_icons_update(Evas_Object *obj) char buf[PATH_MAX], *pfile; int bufused, buffree; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1647,6 +1676,7 @@ e_fm2_pan_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1667,6 +1697,7 @@ e_fm2_pan_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1681,6 +1712,7 @@ e_fm2_pan_max_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y) E_Fm2_Smart_Data *sd; Evas_Coord mx, my; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety @@ -1698,6 +1730,7 @@ e_fm2_pan_child_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) { E_Fm2_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (!sd) return; // safety if (!evas_object_type_get(obj)) return; // safety diff --git a/src/bin/e_icon.c b/src/bin/e_icon.c index 3dac5d830d..16504b4719 100644 --- a/src/bin/e_icon.c +++ b/src/bin/e_icon.c @@ -226,6 +226,7 @@ e_icon_file_set(Evas_Object *obj, const char *file) int len; if (!file) return EINA_FALSE; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); if (!(sd = evas_object_smart_data_get(obj))) return EINA_FALSE; @@ -300,6 +301,7 @@ e_icon_file_key_set(Evas_Object *obj, const char *file, const char *key) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); if (!(sd = evas_object_smart_data_get(obj))) return EINA_FALSE; @@ -342,6 +344,7 @@ e_icon_file_edje_set(Evas_Object *obj, const char *file, const char *part) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); if (!(sd = evas_object_smart_data_get(obj))) return EINA_FALSE; @@ -377,6 +380,7 @@ e_icon_fdo_icon_set(Evas_Object *obj, const char *icon) int len; if (!icon) return EINA_TRUE; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); if (icon[0] == '/') return e_icon_file_set(obj, icon); if (!(sd = evas_object_smart_data_get(obj))) @@ -422,6 +426,7 @@ e_icon_object_set(Evas_Object *obj, Evas_Object *o) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(); if (!(sd = evas_object_smart_data_get(obj))) return; if (sd->timer) ecore_timer_del(sd->timer); @@ -444,6 +449,7 @@ e_icon_file_get(const Evas_Object *obj) E_Smart_Data *sd; const char *file; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(NULL); if (!(sd = evas_object_smart_data_get(obj))) return NULL; #ifdef USE_ICON_CACHE if (sd->file) return sd->file; @@ -462,6 +468,7 @@ e_icon_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); if (!(sd = evas_object_smart_data_get(obj))) return; if (!strcmp(evas_object_type_get(sd->obj), "edje")) return; evas_object_image_smooth_scale_set(sd->obj, smooth); @@ -472,6 +479,7 @@ e_icon_smooth_scale_get(const Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); if (!(sd = evas_object_smart_data_get(obj))) return EINA_FALSE; if (!strcmp(evas_object_type_get(sd->obj), "edje")) return EINA_FALSE; @@ -483,6 +491,7 @@ e_icon_alpha_set(Evas_Object *obj, Eina_Bool alpha) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); if (!(sd = evas_object_smart_data_get(obj))) return; if (!strcmp(evas_object_type_get(sd->obj), "edje")) return; evas_object_image_alpha_set(sd->obj, alpha); @@ -493,6 +502,7 @@ e_icon_alpha_get(const Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); if (!(sd = evas_object_smart_data_get(obj))) return EINA_FALSE; if (!strcmp(evas_object_type_get(sd->obj), "edje")) return EINA_FALSE; return evas_object_image_alpha_get(sd->obj); @@ -503,6 +513,7 @@ e_icon_preload_set(Evas_Object *obj, Eina_Bool preload) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); if (!(sd = evas_object_smart_data_get(obj))) return; sd->preload = preload; } @@ -512,6 +523,7 @@ e_icon_preload_get(const Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); if (!(sd = evas_object_smart_data_get(obj))) return EINA_FALSE; return sd->preload; } @@ -521,6 +533,7 @@ e_icon_size_get(const Evas_Object *obj, int *w, int *h) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); if (!(sd = evas_object_smart_data_get(obj))) { if (w) *w = 0; @@ -535,6 +548,7 @@ e_icon_fill_inside_get(const Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); if (!(sd = evas_object_smart_data_get(obj))) return EINA_FALSE; return sd->fill_inside; } @@ -544,6 +558,7 @@ e_icon_fill_inside_set(Evas_Object *obj, Eina_Bool fill_inside) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); if (!(sd = evas_object_smart_data_get(obj))) return; fill_inside = !!fill_inside; if (sd->fill_inside == fill_inside) return; @@ -556,6 +571,7 @@ e_icon_scale_up_get(const Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); if (!(sd = evas_object_smart_data_get(obj))) return EINA_FALSE; return sd->scale_up; } @@ -565,6 +581,7 @@ e_icon_scale_up_set(Evas_Object *obj, Eina_Bool scale_up) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); if (!(sd = evas_object_smart_data_get(obj))) return; scale_up = !!scale_up; if (sd->scale_up == scale_up) return; @@ -577,6 +594,7 @@ e_icon_data_set(Evas_Object *obj, void *data, int w, int h) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); if (!(sd = evas_object_smart_data_get(obj))) return; if (!strcmp(evas_object_type_get(sd->obj), "edje")) return; evas_object_image_size_set(sd->obj, w, h); @@ -588,6 +606,7 @@ e_icon_data_get(const Evas_Object *obj, int *w, int *h) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(NULL); if (!(sd = evas_object_smart_data_get(obj))) return NULL; if (!strcmp(evas_object_type_get(sd->obj), "edje")) return NULL; evas_object_image_size_get(sd->obj, w, h); @@ -599,6 +618,7 @@ e_icon_scale_size_set(Evas_Object *obj, int size) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); if (!(sd = evas_object_smart_data_get(obj))) return; sd->size = size; if (!strcmp(evas_object_type_get(sd->obj), "edje")) @@ -611,6 +631,7 @@ e_icon_scale_size_get(const Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); if (!(sd = evas_object_smart_data_get(obj))) return 0; return sd->size; } @@ -620,6 +641,7 @@ e_icon_selected_set(const Evas_Object *obj, Eina_Bool selected) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); if (!(sd = evas_object_smart_data_get(obj))) return; if (strcmp(evas_object_type_get(sd->obj), "edje")) return; if (selected) @@ -768,6 +790,8 @@ _e_icon_smart_del(Evas_Object *obj) if (sd->file) eina_stringshare_del(sd->file); #endif if (sd->timer) ecore_timer_del(sd->timer); + evas_object_smart_data_set(obj, NULL); + memset(sd, 0, sizeof(*sd)); free(sd); } diff --git a/src/bin/e_layout.c b/src/bin/e_layout.c index 687a5eb8c8..d6660758b3 100644 --- a/src/bin/e_layout.c +++ b/src/bin/e_layout.c @@ -58,6 +58,7 @@ e_layout_freeze(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); sd->frozen++; return sd->frozen; @@ -68,6 +69,7 @@ e_layout_thaw(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); sd->frozen--; if (sd->frozen <= 0) _e_layout_smart_reconfigure(sd); @@ -79,6 +81,7 @@ e_layout_virtual_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (w < 1) w = 1; if (h < 1) h = 1; @@ -94,6 +97,7 @@ e_layout_virtual_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (w) *w = sd->vw; if (h) *h = sd->vh; @@ -104,6 +108,7 @@ e_layout_coord_canvas_to_virtual(Evas_Object *obj, Evas_Coord cx, Evas_Coord cy, { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (vx) *vx = (cx - sd->x) * ((double)(sd->vw) / sd->w); @@ -115,6 +120,7 @@ e_layout_coord_virtual_to_canvas(Evas_Object *obj, Evas_Coord vx, Evas_Coord vy, { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (cx) *cx = vx * ((double)(sd->w) / sd->vw) + sd->x; @@ -127,6 +133,7 @@ e_layout_pack(Evas_Object *obj, Evas_Object *child) E_Smart_Data *sd; E_Layout_Item *li; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); _e_layout_smart_adopt(sd, child); sd->items = eina_list_append(sd->items, child); diff --git a/src/bin/e_spectrum.c b/src/bin/e_spectrum.c index 4193bdc213..2ff1ba0ad5 100644 --- a/src/bin/e_spectrum.c +++ b/src/bin/e_spectrum.c @@ -345,6 +345,7 @@ e_spectrum_mode_set(Evas_Object *o, E_Color_Component mode) { E_Spectrum *sp; + if (evas_object_smart_smart_get(o) != _e_spectrum_smart) SMARTERRNR(); sp = evas_object_smart_data_get(o); if (!sp) return; @@ -358,6 +359,7 @@ e_spectrum_mode_get(Evas_Object *o) { E_Spectrum *sp; + if (evas_object_smart_smart_get(o) != _e_spectrum_smart) SMARTERR(0); sp = evas_object_smart_data_get(o); if (!sp) return -1; @@ -369,6 +371,7 @@ e_spectrum_color_value_set(Evas_Object *o, E_Color *cv) { E_Spectrum *sp; + if (evas_object_smart_smart_get(o) != _e_spectrum_smart) SMARTERRNR(); sp = evas_object_smart_data_get(o); if (!sp) return; @@ -381,6 +384,7 @@ e_spectrum_update(Evas_Object *o) { E_Spectrum *sp; + if (evas_object_smart_smart_get(o) != _e_spectrum_smart) SMARTERRNR(); sp = evas_object_smart_data_get(o); if (!sp) return; diff --git a/src/bin/e_table.c b/src/bin/e_table.c index e717c4f2bd..f33ca58654 100644 --- a/src/bin/e_table.c +++ b/src/bin/e_table.c @@ -74,6 +74,7 @@ e_table_freeze(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); sd->frozen++; return sd->frozen; @@ -84,6 +85,7 @@ e_table_thaw(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); sd->frozen--; if (sd->frozen <= 0) _e_table_smart_reconfigure(sd); @@ -95,6 +97,7 @@ e_table_homogenous_set(Evas_Object *obj, int homogenous) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (sd->homogenous == homogenous) return; sd->homogenous = homogenous; @@ -108,6 +111,7 @@ e_table_pack(Evas_Object *obj, Evas_Object *child, int col, int row, int colspan E_Smart_Data *sd; E_Table_Item *ti; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); _e_table_smart_adopt(sd, child); sd->items = eina_list_append(sd->items, child); @@ -166,6 +170,7 @@ e_table_col_row_size_get(Evas_Object *obj, int *cols, int *rows) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (sd->changed) _e_table_smart_extents_calcuate(sd); if (cols) *cols = sd->size.cols; @@ -177,6 +182,7 @@ e_table_size_min_get(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (sd->changed) _e_table_smart_extents_calcuate(sd); if (minw) *minw = sd->min.w; @@ -188,6 +194,7 @@ e_table_size_max_get(Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (sd->changed) _e_table_smart_extents_calcuate(sd); if (maxw) *maxw = sd->max.w; @@ -199,6 +206,7 @@ e_table_align_get(Evas_Object *obj, double *ax, double *ay) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (ax) *ax = sd->align.x; if (ay) *ay = sd->align.y; @@ -209,6 +217,7 @@ e_table_align_set(Evas_Object *obj, double ax, double ay) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if ((sd->align.x == ax) && (sd->align.y == ay)) return; sd->align.x = ax; diff --git a/src/bin/e_thumb.c b/src/bin/e_thumb.c index cceccb8929..3758fd7d2a 100644 --- a/src/bin/e_thumb.c +++ b/src/bin/e_thumb.c @@ -423,5 +423,18 @@ _e_thumb_cb_exe_event_del(void *data __UNUSED__, int type __UNUSED__, void *even break; } } + if ((!_thumbnailers_exe) && (_thumb_queue)) + { + while ((int) eina_list_count(_thumbnailers_exe) < _num_thumbnailers) + { + Ecore_Exe *exe; + char buf[4096]; + + snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_thumb --nice=%d", e_prefix_lib_get(), + e_config->thumb_nice); + exe = ecore_exe_run(buf, NULL); + _thumbnailers_exe = eina_list_append(_thumbnailers_exe, exe); + } + } return ECORE_CALLBACK_PASS_ON; } |