summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2013-07-05 16:52:05 +0200
committerLaurent Ghigonis <laurent@p1sec.com>2013-07-05 16:52:05 +0200
commit32e12841a096fea0ed0ac05fe43a19221b5c5814 (patch)
tree74ef9a66385184dac07772de5b212701770c8a13
parentf7aa8876cc54aca4d55f572332755b443c986276 (diff)
targettrack: printf only on debug mode
-rw-r--r--targettrack.c18
-rw-r--r--targettrack.h1
2 files changed, 13 insertions, 6 deletions
diff --git a/targettrack.c b/targettrack.c
index ddd49c4..5416de7 100644
--- a/targettrack.c
+++ b/targettrack.c
@@ -60,7 +60,8 @@ _targettrack_free(Egraph_Targettrack *track)
60 Eina_List *l; 60 Eina_List *l;
61 Evas_Object *t; 61 Evas_Object *t;
62 62
63 printf("_targettrack_free\n"); 63 if (track->debug)
64 printf("_targettrack_free\n");
64 evas_object_event_callback_del_full(track->origin, EVAS_CALLBACK_FREE, 65 evas_object_event_callback_del_full(track->origin, EVAS_CALLBACK_FREE,
65 _cb_obj_free, track); 66 _cb_obj_free, track);
66 evas_object_event_callback_del_full(track->target, EVAS_CALLBACK_FREE, 67 evas_object_event_callback_del_full(track->target, EVAS_CALLBACK_FREE,
@@ -96,8 +97,9 @@ _cb_targettrack(void *data, double pos)
96 Evas_Coord x, y; 97 Evas_Coord x, y;
97 double pct; 98 double pct;
98 99
99 printf("_cb_targettrack pos %f\n", pos);
100 track = data; 100 track = data;
101 if (track->debug)
102 printf("_cb_targettrack pos %f\n", pos);
101 _update_coords(track); 103 _update_coords(track);
102 104
103 pct = ecore_animator_pos_map(pos, track->map, 0.0, 0.0); 105 pct = ecore_animator_pos_map(pos, track->map, 0.0, 0.0);
@@ -136,20 +138,24 @@ _cb_obj_free(void *data, Evas *e, Evas_Object *obj, void *event_info)
136 Eina_List *l, *l_next; 138 Eina_List *l, *l_next;
137 Evas_Object *t; 139 Evas_Object *t;
138 140
139 printf("_cb_obj_free\n");
140 track = data; 141 track = data;
142 if (track->debug)
143 printf("_cb_obj_free\n");
141 if (obj == track->origin) { 144 if (obj == track->origin) {
142 printf(" origin\n"); 145 if (track->debug)
146 printf(" origin\n");
143 track->origin = NULL; 147 track->origin = NULL;
144 } 148 }
145 if (obj == track->target) { 149 if (obj == track->target) {
146 printf(" target\n"); 150 if (track->debug)
151 printf(" target\n");
147 track->target = NULL; 152 track->target = NULL;
148 } 153 }
149 EINA_LIST_FOREACH_SAFE(track->next_targets, l, l_next, t) { 154 EINA_LIST_FOREACH_SAFE(track->next_targets, l, l_next, t) {
150 if (obj == t) { 155 if (obj == t) {
151 track->next_targets = eina_list_remove(track->next_targets, t); 156 track->next_targets = eina_list_remove(track->next_targets, t);
152 printf(" next_target\n"); 157 if (track->debug)
158 printf(" next_target\n");
153 } 159 }
154 } 160 }
155} 161}
diff --git a/targettrack.h b/targettrack.h
index c25c988..61ed8bf 100644
--- a/targettrack.h
+++ b/targettrack.h
@@ -6,6 +6,7 @@ typedef void (*Egraph_Targettrack_End_Cb)(Evas_Object *obj);
6 6
7typedef struct Egraph_Targettrack Egraph_Targettrack; 7typedef struct Egraph_Targettrack Egraph_Targettrack;
8struct Egraph_Targettrack { 8struct Egraph_Targettrack {
9 int debug;
9 double total_time; 10 double total_time;
10 Ecore_Pos_Map map; 11 Ecore_Pos_Map map;
11 Evas_Object *obj; 12 Evas_Object *obj;