[maemo-commits] [maemo-commits] r18684 - projects/haf/trunk/gtk+/modules/other/gail

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Jun 9 18:27:13 EEST 2009
Author: apinheiro
Date: 2009-06-09 18:27:01 +0300 (Tue, 09 Jun 2009)
New Revision: 18684

Modified:
   projects/haf/trunk/gtk+/modules/other/gail/ChangeLog
   projects/haf/trunk/gtk+/modules/other/gail/gailtreeview.c
Log:
2009-06-09 Alejandro Pinheiro <apinheiro at igalia.com>

	* gail/gailtreeview.c
	Exposed the new action area added to the treeview. This feature is
	only on MAEMO environments (using MAEMO_CHANGES macro, defined on
	gtk+-2.0.pc)

	Applying the patch related to bug NB#105306 (Embedded widgets on the
	gtktreeview are are not exposed) on the gtk trunk



Modified: projects/haf/trunk/gtk+/modules/other/gail/ChangeLog
===================================================================
--- projects/haf/trunk/gtk+/modules/other/gail/ChangeLog	2009-06-09 14:56:43 UTC (rev 18683)
+++ projects/haf/trunk/gtk+/modules/other/gail/ChangeLog	2009-06-09 15:27:01 UTC (rev 18684)
@@ -1,5 +1,15 @@
 2009-06-09 Alejandro Pinheiro <apinheiro at igalia.com>
 
+	* gail/gailtreeview.c
+	Exposed the new action area added to the treeview. This feature is
+	only on MAEMO environments (using MAEMO_CHANGES macro, defined on
+	gtk+-2.0.pc)
+
+	Applying the patch related to bug NB#105306 (Embedded widgets on the
+	gtktreeview are are not exposed) on the gtk trunk
+
+2009-06-09 Alejandro Pinheiro <apinheiro at igalia.com>
+
 	* gail/gailwidget.c:
 	(gail_widget_all_parents_visible): auxiliar function that checks
 	if all parent hierarchy is visible

Modified: projects/haf/trunk/gtk+/modules/other/gail/gailtreeview.c
===================================================================
--- projects/haf/trunk/gtk+/modules/other/gail/gailtreeview.c	2009-06-09 14:56:43 UTC (rev 18683)
+++ projects/haf/trunk/gtk+/modules/other/gail/gailtreeview.c	2009-06-09 15:27:01 UTC (rev 18684)
@@ -754,6 +754,9 @@
   GtkTreeView *tree_view;
   GtkTreeModel *tree_model;
   gint n_rows, n_cols;
+#ifdef MAEMO_CHANGES
+  gint extra;
+#endif
 
   gail_return_val_if_fail (GAIL_IS_TREE_VIEW (obj), 0);
 
@@ -767,6 +770,18 @@
   tree_view = GTK_TREE_VIEW (widget);
   tree_model = gtk_tree_view_get_model (tree_view);
 
+#ifdef MAEMO_CHANGES
+  /* On maemo: we get the action area */
+  if (hildon_tree_view_get_action_area_box (tree_view))
+    {
+      extra = 1;
+    }
+  else
+    {
+      extra = 0;
+    }
+#endif
+
   /*
    * We get the total number of rows including those which are collapsed
    */
@@ -775,7 +790,11 @@
    * We get the total number of columns including those which are not visible
    */
   n_cols = get_n_actual_columns (tree_view);
+#ifdef MAEMO_CHANGES
+  return (n_rows * n_cols) +  extra;
+#else
   return (n_rows * n_cols);
+#endif
 }
 
 static AtkObject*
@@ -804,6 +823,7 @@
   gboolean is_expander, is_expanded, retval;
   gboolean editable = FALSE;
   gint focus_index;
+  GtkWidget *action_area = NULL;
 
   g_return_val_if_fail (GAIL_IS_TREE_VIEW (obj), NULL);
   g_return_val_if_fail (i >= 0, NULL);
@@ -819,6 +839,20 @@
     return NULL;
 
   tree_view = GTK_TREE_VIEW (widget);
+
+#ifdef MAEMO_CHANGES
+  if (i == 0)
+    {
+      action_area = hildon_tree_view_get_action_area_box (tree_view);
+      child = gtk_widget_get_accessible (action_area);
+      if (child)
+        g_object_ref (child);
+      return child;
+    }
+
+  i--;
+#endif
+
   if (i < get_n_actual_columns (tree_view))
     {
       tv_col = gtk_tree_view_get_column (tree_view, i);


More information about the maemo-commits mailing list