[gnome-photos/wip/rishi/zoom: 1/6] preview-view: Shuffle some code around



commit f534e2d0a4a707620dc9b101d3f4e37ad2e31926
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue May 16 17:44:10 2017 +0200

    preview-view: Shuffle some code around
    
    This will make the subsequent commit easier to read.

 src/photos-preview-view.c |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/src/photos-preview-view.c b/src/photos-preview-view.c
index 220efb2..1dd9073 100644
--- a/src/photos-preview-view.c
+++ b/src/photos-preview-view.c
@@ -74,6 +74,23 @@ G_DEFINE_TYPE (PhotosPreviewView, photos_preview_view, GTK_TYPE_BIN);
 static GtkWidget *photos_preview_view_create_view_with_container (PhotosPreviewView *self);
 
 
+static GtkWidget *
+photos_preview_view_get_view_from_view_container (GtkWidget *view_container)
+{
+  GtkWidget *child;
+  GtkWidget *view;
+
+  child = gtk_bin_get_child (GTK_BIN (view_container));
+
+  if (GTK_IS_VIEWPORT (child))
+    view = gtk_bin_get_child (GTK_BIN (child));
+  else
+    view = child;
+
+  return view;
+}
+
+
 static gboolean
 photos_preview_view_button_press_event (PhotosPreviewView *self, GdkEvent *event)
 {
@@ -176,23 +193,6 @@ photos_preview_view_get_invisible_child (PhotosPreviewView *self)
 }
 
 
-static GtkWidget *
-photos_preview_view_get_view_from_view_container (GtkWidget *view_container)
-{
-  GtkWidget *child;
-  GtkWidget *view;
-
-  child = gtk_bin_get_child (GTK_BIN (view_container));
-
-  if (GTK_IS_VIEWPORT (child))
-    view = gtk_bin_get_child (GTK_BIN (child));
-  else
-    view = child;
-
-  return view;
-}
-
-
 static gboolean
 photos_preview_view_motion_notify_event (PhotosPreviewView *self, GdkEvent *event)
 {


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