[maemo-commits] [maemo-commits] r9186 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Jan 19 13:00:44 EET 2007
Author: kris
Date: 2007-01-19 13:00:41 +0200 (Fri, 19 Jan 2007)
New Revision: 9186

Modified:
   projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog
   projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtktreeview.c
Log:
2007-01-19  Kristian Rietveld  <kris at imendio.com>

	* gtk/gtktreeview.c (gtk_tree_view_motion_bin_window),
	(add_scroll_timeout), (gtk_tree_view_drag_motion): factor out
	add_scroll_timeout().  (Backfolded to upstream).



Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog
===================================================================
--- projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog	2007-01-19 10:58:27 UTC (rev 9185)
+++ projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog	2007-01-19 11:00:41 UTC (rev 9186)
@@ -1,3 +1,9 @@
+2007-01-19  Kristian Rietveld  <kris at imendio.com>
+
+	* gtk/gtktreeview.c (gtk_tree_view_motion_bin_window),
+	(add_scroll_timeout), (gtk_tree_view_drag_motion): factor out
+	add_scroll_timeout().  (Backfolded to upstream).
+
 2007-01-18  Michael Natterer  <mitch at imendio.com>
 
 	* gtk/gtkcheckbutton.c

Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtktreeview.c
===================================================================
--- projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtktreeview.c	2007-01-19 10:58:27 UTC (rev 9185)
+++ projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtktreeview.c	2007-01-19 11:00:41 UTC (rev 9186)
@@ -459,8 +459,9 @@
 						      gint        *tx,
 						      gint        *ty);
 
-static gint scroll_row_timeout                       (gpointer     data);
-static void remove_scroll_timeout                    (GtkTreeView *tree_view);
+static gboolean scroll_row_timeout                   (gpointer     data);
+static void     add_scroll_timeout                   (GtkTreeView *tree_view);
+static void     remove_scroll_timeout                (GtkTreeView *tree_view);
 
 /* MAEMO START */
 static gboolean gtk_tree_view_tap_and_hold_query (GtkWidget *widget,
@@ -3953,10 +3954,7 @@
     {
       gtk_tree_view_update_rubber_band (tree_view);
 
-      if (tree_view->priv->scroll_timeout == 0)
-        {
-	  tree_view->priv->scroll_timeout = g_timeout_add (150, scroll_row_timeout, tree_view);
-	}
+      add_scroll_timeout (tree_view);
     }
 
   /* only check for an initiated drag when a button is pressed */
@@ -6659,6 +6657,16 @@
 #endif /* 0 */
 
 static void
+add_scroll_timeout (GtkTreeView *tree_view)
+{
+  if (tree_view->priv->scroll_timeout == 0)
+    {
+      tree_view->priv->scroll_timeout =
+	g_timeout_add (150, scroll_row_timeout, tree_view);
+    }
+}
+
+static void
 remove_scroll_timeout (GtkTreeView *tree_view)
 {
   if (tree_view->priv->scroll_timeout != 0)
@@ -7204,10 +7212,9 @@
           tree_view->priv->open_dest_timeout =
             g_timeout_add (AUTO_EXPAND_TIMEOUT, open_row_timeout, tree_view);
         }
-      else if (tree_view->priv->scroll_timeout == 0)
+      else
         {
-	  tree_view->priv->scroll_timeout =
-	    g_timeout_add (150, scroll_row_timeout, tree_view);
+	  add_scroll_timeout (tree_view);
 	}
 
       if (target == gdk_atom_intern_static_string ("GTK_TREE_MODEL_ROW"))


More information about the maemo-commits mailing list