[maemo-commits] [maemo-commits] r16189 - in projects/haf/trunk/gtk+: . gtk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Sep 23 15:04:35 EEST 2008
Author: kris
Date: 2008-09-23 15:04:33 +0300 (Tue, 23 Sep 2008)
New Revision: 16189

Modified:
   projects/haf/trunk/gtk+/ChangeLog
   projects/haf/trunk/gtk+/gtk/gtktreeview.c
Log:
2008-09-23  Kristian Rietveld  <kris at imendio.com>

	* gtk/gtktreeview.c (gtk_tree_view_tap_and_hold_query): special
	case normal mode.



Modified: projects/haf/trunk/gtk+/ChangeLog
===================================================================
--- projects/haf/trunk/gtk+/ChangeLog	2008-09-23 11:40:07 UTC (rev 16188)
+++ projects/haf/trunk/gtk+/ChangeLog	2008-09-23 12:04:33 UTC (rev 16189)
@@ -1,5 +1,10 @@
 2008-09-23  Kristian Rietveld  <kris at imendio.com>
 
+	* gtk/gtktreeview.c (gtk_tree_view_tap_and_hold_query): special
+	case normal mode.
+
+2008-09-23  Kristian Rietveld  <kris at imendio.com>
+
 	* gtk/gtkwidget.c (gtk_widget_class_init),
 	(gtk_widget_tap_and_hold_query_accumulator): implement a custom
 	boolean accumulator for the tap-and-hold-query signal that stops

Modified: projects/haf/trunk/gtk+/gtk/gtktreeview.c
===================================================================
--- projects/haf/trunk/gtk+/gtk/gtktreeview.c	2008-09-23 11:40:07 UTC (rev 16188)
+++ projects/haf/trunk/gtk+/gtk/gtktreeview.c	2008-09-23 12:04:33 UTC (rev 16189)
@@ -17176,6 +17176,7 @@
   gdouble x, y;
   gint new_y;
   gboolean sensitive;
+  HildonMode mode;
 
   if (!tree_view->priv->tree)
     return FALSE;
@@ -17190,9 +17191,26 @@
   if (node == NULL)
     return TRUE;
 
+  gtk_widget_style_get (widget,
+                        "hildon-mode", &mode,
+                        NULL);
+
   path = _gtk_tree_view_find_path (tree_view, tree, node);
-  sensitive = _gtk_tree_selection_row_is_selectable (tree_view->priv->selection,
-                                                     node, path);
+
+  if (mode == HILDON_FREMANTLE
+      && tree_view->priv->hildon_ui_mode == HILDON_UI_MODE_NORMAL)
+    {
+      /* The normal mode has no notion of selection, so we special-case
+       * it here.
+       */
+      sensitive = !row_is_separator (tree_view, NULL, NULL, path);
+    }
+  else
+    {
+      sensitive = _gtk_tree_selection_row_is_selectable (tree_view->priv->selection,
+                                                         node, path);
+    }
+
   gtk_tree_path_free (path);
 
   return !sensitive;


More information about the maemo-commits mailing list