[maemo-commits] [maemo-commits] r17733 - in projects/haf/trunk/gail: . gail
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Mar 18 20:04:52 EET 2009
- Previous message: [maemo-commits] r17732 - projects/haf/tags/hildon-welcome
- Next message: [maemo-commits] r17734 - in projects/haf/trunk/libmatchbox2: . debian matchbox/core
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: apinheiro Date: 2009-03-18 20:04:05 +0200 (Wed, 18 Mar 2009) New Revision: 17733 Modified: projects/haf/trunk/gail/ChangeLog projects/haf/trunk/gail/gail/gailtreeview.c Log: 2009-03-13 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) * Fixes: NB#105306 Modified: projects/haf/trunk/gail/ChangeLog =================================================================== --- projects/haf/trunk/gail/ChangeLog 2009-03-18 16:12:54 UTC (rev 17732) +++ projects/haf/trunk/gail/ChangeLog 2009-03-18 18:04:05 UTC (rev 17733) @@ -1,3 +1,11 @@ +2009-03-13 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) + * Fixes: NB#105306 + 2008-04-01 Attila Domokos <attila.domokos at nokia.com> * gail/gailbutton.c Modified: projects/haf/trunk/gail/gail/gailtreeview.c =================================================================== --- projects/haf/trunk/gail/gail/gailtreeview.c 2009-03-18 16:12:54 UTC (rev 17732) +++ projects/haf/trunk/gail/gail/gailtreeview.c 2009-03-18 18:04:05 UTC (rev 17733) @@ -812,6 +812,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); @@ -825,6 +828,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 */ @@ -833,7 +848,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* @@ -862,6 +881,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); @@ -877,6 +897,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);
- Previous message: [maemo-commits] r17732 - projects/haf/tags/hildon-welcome
- Next message: [maemo-commits] r17734 - in projects/haf/trunk/libmatchbox2: . debian matchbox/core
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]