]> Pileus Git - ~andy/gtk/commitdiff
Set the object name to the page title. Proposed by Eitan Isaacson
authorMatthias Clasen <matthiasc@src.gnome.org>
Tue, 17 Feb 2009 05:49:17 +0000 (05:49 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 17 Feb 2009 05:49:17 +0000 (05:49 +0000)
        * gtk/gtkassistant.c (gtk_assistant_accessible_ref_child): Set
        the object name to the page title. Proposed by Eitan Isaacson

svn path=/trunk/; revision=22345

ChangeLog
gtk/gtkassistant.c

index c953f339caf35ade9c265b124caa93b7d2ae87be..d3d186a065d89bb24c6a6ddbf9c7f68b9628809b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-16  MatthiasClasen  <mclasen@redhat.com>
+
+       Bug 572040 – GtkAssistant does not expose page titles
+
+       * gtk/gtkassistant.c (gtk_assistant_accessible_ref_child): Set
+       the object name to the page title. Proposed by Eitan Isaacson
+
 2009-02-16  MatthiasClasen  <mclasen@redhat.com>
 
        Bug 572041 – Focus should change when advancing forward in GtkAssistant
index 45748b695268610b445f78151f27f8799a12856b..e469b5a2822a8af895681cd5f5f41df1887b9fda 100644 (file)
@@ -2233,6 +2233,7 @@ gtk_assistant_accessible_ref_child (AtkObject *accessible,
   GtkWidget *widget, *child;
   gint n_pages;
   AtkObject *obj;
+  gchar *title;
 
   widget = GTK_ACCESSIBLE (accessible)->widget;
   if (!widget)
@@ -2249,16 +2250,21 @@ gtk_assistant_accessible_ref_child (AtkObject *accessible,
       GtkAssistantPage *page = g_list_nth_data (priv->pages, index / 2);
 
       child = page->page;
+      title = gtk_assistant_get_page_title (assistant, child);
     }
   else if (index == n_pages)
     {
       child = priv->action_area;
+      title = NULL;
     }
   else
     return NULL;
   
   obj = gtk_widget_get_accessible (child);
 
+  if (title)
+    atk_object_set_name (obj, title);
+
   return g_object_ref (obj);
 }