summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2013-10-18 20:33:47 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2013-10-18 20:33:47 +0900
commit4a990e0c6d24150510758ff9a4272023a2d13365 (patch)
treee6778b909f3289b0c51dd67120e6a00a1ab87348
parent4790c97621e4ab535a94e60fc5cd49e76c0a51b9 (diff)
elm_photo: Do not call clicked callback when drag and drop started.
-rw-r--r--src/lib/elm_photo.c7
-rw-r--r--src/lib/elm_widget_photo.h4
2 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/elm_photo.c b/src/lib/elm_photo.c
index c3a018922..7c0d384b7 100644
--- a/src/lib/elm_photo.c
+++ b/src/lib/elm_photo.c
@@ -111,8 +111,11 @@ static void
111_drag_done_cb(void *unused __UNUSED__, 111_drag_done_cb(void *unused __UNUSED__,
112 Evas_Object *obj) 112 Evas_Object *obj)
113{ 113{
114 ELM_PHOTO_DATA_GET(obj, sd);
115
114 elm_object_scroll_freeze_pop(obj); 116 elm_object_scroll_freeze_pop(obj);
115 evas_object_smart_callback_call(obj, SIG_DRAG_END, NULL); 117 evas_object_smart_callback_call(obj, SIG_DRAG_END, NULL);
118 sd->drag_started = EINA_FALSE;
116} 119}
117 120
118static void 121static void
@@ -174,6 +177,7 @@ _long_press_cb(void *obj)
174 { 177 {
175 elm_object_scroll_freeze_push(obj); 178 elm_object_scroll_freeze_push(obj);
176 evas_object_smart_callback_call(obj, SIG_DRAG_START, NULL); 179 evas_object_smart_callback_call(obj, SIG_DRAG_START, NULL);
180 sd->drag_started = EINA_TRUE;
177 } 181 }
178 } 182 }
179 183
@@ -213,7 +217,8 @@ _mouse_up(void *data,
213 217
214 ELM_SAFE_FREE(sd->long_press_timer, ecore_timer_del); 218 ELM_SAFE_FREE(sd->long_press_timer, ecore_timer_del);
215 219
216 evas_object_smart_callback_call(data, SIG_CLICKED, NULL); 220 if (!sd->drag_started)
221 evas_object_smart_callback_call(data, SIG_CLICKED, NULL);
217} 222}
218 223
219static inline int 224static inline int
diff --git a/src/lib/elm_widget_photo.h b/src/lib/elm_widget_photo.h
index 50b9db2a1..a4d32e839 100644
--- a/src/lib/elm_widget_photo.h
+++ b/src/lib/elm_widget_photo.h
@@ -23,7 +23,6 @@ struct _Elm_Photo_Smart_Data
23{ 23{
24 Evas_Object *icon; 24 Evas_Object *icon;
25 int size; 25 int size;
26 Eina_Bool fill_inside;
27 Ecore_Timer *long_press_timer; 26 Ecore_Timer *long_press_timer;
28 27
29#ifdef HAVE_ELEMENTARY_ETHUMB 28#ifdef HAVE_ELEMENTARY_ETHUMB
@@ -36,6 +35,9 @@ struct _Elm_Photo_Smart_Data
36 } file, thumb; 35 } file, thumb;
37 } thumb; 36 } thumb;
38#endif 37#endif
38
39 Eina_Bool fill_inside: 1;
40 Eina_Bool drag_started: 1; /*<< set true when drag started */
39}; 41};
40 42
41/** 43/**