[gtk+/wip/a11y: 2/10] Add gtk_notebook_accessible_get_n_children
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/a11y: 2/10] Add gtk_notebook_accessible_get_n_children
- Date: Sun, 13 Jan 2013 22:55:21 +0000 (UTC)
commit 9b933c2a0cd83ba99908702efe4aafbf59b54c11
Author: Mike Gorse <mgorse suse com>
Date: Mon Dec 31 06:33:31 2012 -0600
Add gtk_notebook_accessible_get_n_children
https://bugzilla.gnome.org/show_bug.cgi?id=577392
gtk/a11y/gtknotebookaccessible.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gtk/a11y/gtknotebookaccessible.c b/gtk/a11y/gtknotebookaccessible.c
index f3b40db..67d5acb 100644
--- a/gtk/a11y/gtknotebookaccessible.c
+++ b/gtk/a11y/gtknotebookaccessible.c
@@ -189,6 +189,18 @@ gtk_notebook_accessible_finalize (GObject *object)
G_OBJECT_CLASS (gtk_notebook_accessible_parent_class)->finalize (object);
}
+static gint
+gtk_notebook_accessible_get_n_children (AtkObject *obj)
+{
+ GtkWidget *widget;
+
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
+ if (widget == NULL)
+ return 0;
+
+ return gtk_notebook_get_n_pages (GTK_NOTEBOOK (widget));
+}
+
static AtkObject *
gtk_notebook_accessible_ref_child (AtkObject *obj,
gint i)
@@ -314,6 +326,7 @@ gtk_notebook_accessible_class_init (GtkNotebookAccessibleClass *klass)
gobject_class->finalize = gtk_notebook_accessible_finalize;
+ class->get_n_children = gtk_notebook_accessible_get_n_children;
class->ref_child = gtk_notebook_accessible_ref_child;
class->initialize = gtk_notebook_accessible_initialize;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]