[gnome-builder] source-view: cleanup motion notify a bit



commit 415542d2ba0efde31408dc32753800316b7f0fc9
Author: Christian Hergert <christian hergert me>
Date:   Mon Mar 7 21:16:16 2016 -0800

    source-view: cleanup motion notify a bit

 libide/ide-source-view.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index 4b8cda0..aa0f7e4 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -2614,16 +2614,20 @@ static gboolean
 ide_source_view_real_motion_notify_event (GtkWidget      *widget,
                                           GdkEventMotion *event)
 {
-  IdeSourceView  *self = (IdeSourceView  *) widget;
+  IdeSourceView *self = (IdeSourceView *)widget;
   IdeSourceViewPrivate *priv = ide_source_view_get_instance_private (self);
-  GtkWidgetClass *klass = GTK_WIDGET_CLASS (ide_source_view_parent_class);
-  GtkTextIter iter, start_iter, end_iter;
-  gint buffer_x, buffer_y;
+  GtkTextIter iter;
+  GtkTextIter start_iter;
+  GtkTextIter end_iter;
+  gint buffer_x;
+  gint buffer_y;
   GtkTextWindowType window_type;
   DefinitionHighlightData *data;
   gboolean ret;
 
-  ret = klass->motion_notify_event (widget, event);
+  g_assert (IDE_IS_SOURCE_VIEW (self));
+
+  ret = GTK_WIDGET_CLASS (ide_source_view_parent_class)->motion_notify_event (widget, event);
 
   if ((event->state & DEFINITION_HIGHLIGHT_MODIFIER) == 0)
     {
@@ -2633,8 +2637,7 @@ ide_source_view_real_motion_notify_event (GtkWidget      *widget,
       return ret;
     }
 
-  window_type = gtk_text_view_get_window_type (GTK_TEXT_VIEW (self),
-                                               event->window);
+  window_type = gtk_text_view_get_window_type (GTK_TEXT_VIEW (self), event->window);
   gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (self),
                                          window_type,
                                          event->x,


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