[maemo-commits] [maemo-commits] r18683 - projects/haf/trunk/gtk+/modules/other/gail
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Jun 9 17:56:50 EEST 2009
- Previous message: [maemo-commits] r18682 - projects/haf/tags/osso-af-utils
- Next message: [maemo-commits] r18684 - projects/haf/trunk/gtk+/modules/other/gail
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: apinheiro Date: 2009-06-09 17:56:43 +0300 (Tue, 09 Jun 2009) New Revision: 18683 Modified: projects/haf/trunk/gtk+/modules/other/gail/ChangeLog projects/haf/trunk/gtk+/modules/other/gail/gailwidget.c Log: 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 (gail_widget_ref_state_set): checks parent visibility in order to add the state ATK_STATE_SHOWING to the current state set Applying the patch related to bug NB#76325 (SPI_STATE_SHOWING flag is used for element of Bookmark menu incorrectly) on the gtk trunk Maemo solution while upstream bug #509650 is not solved Modified: projects/haf/trunk/gtk+/modules/other/gail/ChangeLog =================================================================== --- projects/haf/trunk/gtk+/modules/other/gail/ChangeLog 2009-06-09 14:10:50 UTC (rev 18682) +++ projects/haf/trunk/gtk+/modules/other/gail/ChangeLog 2009-06-09 14:56:43 UTC (rev 18683) @@ -1,5 +1,18 @@ 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 + (gail_widget_ref_state_set): checks parent visibility in order + to add the state ATK_STATE_SHOWING to the current state set + + Applying the patch related to bug NB#76325 (SPI_STATE_SHOWING flag + is used for element of Bookmark menu incorrectly) on the gtk trunk + + Maemo solution while upstream bug #509650 is not solved + +2009-06-09 Alejandro Pinheiro <apinheiro at igalia.com> + * modules/other/gail/Makefile.am: make public gailrenderercell.h, gailcell.h and gailcellparent.h if MAEMO-CHANGES is available Modified: projects/haf/trunk/gtk+/modules/other/gail/gailwidget.c =================================================================== --- projects/haf/trunk/gtk+/modules/other/gail/gailwidget.c 2009-06-09 14:10:50 UTC (rev 18682) +++ projects/haf/trunk/gtk+/modules/other/gail/gailwidget.c 2009-06-09 14:56:43 UTC (rev 18683) @@ -103,6 +103,9 @@ gpointer data); static GtkWidget* gail_widget_find_viewport (GtkWidget *widget); static gboolean gail_widget_on_screen (GtkWidget *widget); +#ifdef MAEMO_CHANGES +static gboolean gail_widget_all_parents_visible(GtkWidget *widget); +#endif G_DEFINE_TYPE_WITH_CODE (GailWidget, gail_widget, GTK_TYPE_ACCESSIBLE, G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init)) @@ -515,7 +518,11 @@ if (GTK_WIDGET_VISIBLE (widget)) { atk_state_set_add_state (state_set, ATK_STATE_VISIBLE); +#ifdef MAEMO_CHANGES + if (gail_widget_on_screen (widget) && gail_widget_all_parents_visible (widget) && +#else if (gail_widget_on_screen (widget) && +#endif GTK_WIDGET_MAPPED (widget)) { atk_state_set_add_state (state_set, ATK_STATE_SHOWING); @@ -1076,3 +1083,33 @@ return return_value; } + + +#ifdef MAEMO_CHANGES +/** + * gail_widget_all_parents_visible: + * @widget: + * + * Checks if the parent widget, and his parent, etc is all visible + * Used to check the + * + * Return value: TRUE if all the parent hierarchy is visible, FALSE otherwise + **/ +static gboolean gail_widget_all_parents_visible(GtkWidget *widget) +{ + GtkWidget *iter_parent = NULL; + gboolean result = TRUE; + + for ( iter_parent = gtk_widget_get_parent(widget); iter_parent; + iter_parent = gtk_widget_get_parent(iter_parent)) + { + if (!GTK_WIDGET_VISIBLE(iter_parent)) + { + result = FALSE; + break; + } + } + + return result; +} +#endif
- Previous message: [maemo-commits] r18682 - projects/haf/tags/osso-af-utils
- Next message: [maemo-commits] r18684 - projects/haf/trunk/gtk+/modules/other/gail
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]