[empathy: 5/18] Factor out empathy_call_window_get_preview_position()



commit c3b3b11b227dd8add44c83c264b79b8c9168f94d
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Tue Aug 9 15:34:44 2011 +0100

    Factor out empathy_call_window_get_preview_position()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656268

 src/empathy-call-window.c |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 25fa04c..3ea6a3d 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -650,13 +650,10 @@ empathy_call_window_preview_on_drag_begin_cb (ClutterDragAction *action,
   empathy_call_window_show_preview_rectangles (self, TRUE);
 }
 
-static void
-empathy_call_window_preview_on_drag_end_cb (ClutterDragAction *action,
-    ClutterActor *actor,
+static PreviewPosition
+empathy_call_window_get_preview_position (EmpathyCallWindow *self,
     gfloat event_x,
-    gfloat event_y,
-    ClutterModifierType modifiers,
-    EmpathyCallWindow *self)
+    gfloat event_y)
 {
   ClutterGeometry box;
   PreviewPosition pos = PREVIEW_POS_NONE;
@@ -692,6 +689,21 @@ empathy_call_window_preview_on_drag_end_cb (ClutterDragAction *action,
       pos = PREVIEW_POS_BOTTOM_RIGHT;
     }
 
+  return pos;
+}
+
+static void
+empathy_call_window_preview_on_drag_end_cb (ClutterDragAction *action,
+    ClutterActor *actor,
+    gfloat event_x,
+    gfloat event_y,
+    ClutterModifierType modifiers,
+    EmpathyCallWindow *self)
+{
+  PreviewPosition pos;
+
+  pos = empathy_call_window_get_preview_position (self, event_x, event_y);
+
   if (pos != PREVIEW_POS_NONE)
     empathy_call_window_move_video_preview (self, pos);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]