diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-06-26 21:52:35 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-07-05 16:08:53 -0400 |
commit | 1ef996ca3ca94a2c9b925ae9ce1edc5b02a73670 (patch) | |
tree | 6e8efd0fc8ee4a774f82098cb9838feefc3c1947 /gtk | |
parent | 6aedf8f0669b8727aed0db92eda5ccb4fff2fd35 (diff) | |
download | gtk+-1ef996ca3ca94a2c9b925ae9ce1edc5b02a73670.tar.gz |
Remove GailBox
It was only setting a role, and we can do that just as well
in get_accessible().
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/a11y/Makefile.am | 2 | ||||
-rw-r--r-- | gtk/a11y/gail.c | 3 | ||||
-rw-r--r-- | gtk/a11y/gailbox.c | 52 | ||||
-rw-r--r-- | gtk/a11y/gailbox.h | 51 | ||||
-rw-r--r-- | gtk/gtkbox.c | 16 |
5 files changed, 16 insertions, 108 deletions
diff --git a/gtk/a11y/Makefile.am b/gtk/a11y/Makefile.am index 109064cb33..6031514c67 100644 --- a/gtk/a11y/Makefile.am +++ b/gtk/a11y/Makefile.am @@ -8,7 +8,6 @@ gail_c_sources = \ gailadjustment.c \ gtkarrowaccessible.c \ gailbooleancell.c \ - gailbox.c \ gailbutton.c \ gailcell.c \ gailcellparent.c \ @@ -60,7 +59,6 @@ gail_private_h_sources = \ gailadjustment.h \ gtkarrowaccessible.h \ gailbooleancell.h \ - gailbox.h \ gailbutton.h \ gailcell.h \ gailcellparent.h \ diff --git a/gtk/a11y/gail.c b/gtk/a11y/gail.c index dad5bc8c05..ed1b3e841e 100644 --- a/gtk/a11y/gail.c +++ b/gtk/a11y/gail.c @@ -25,7 +25,6 @@ #include <gtk/gtkx.h> #include "gailadjustment.h" #include "gailbooleancell.h" -#include "gailbox.h" #include "gailbutton.h" #include "gailcell.h" #include "gailcheckmenuitem.h" @@ -124,7 +123,6 @@ GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_PROGRESS_BAR, GailProgressBar, gail_progress_b GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_TREE_VIEW, GailTreeView, gail_tree_view, GTK_TYPE_TREE_VIEW) GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_FRAME, GailFrame, gail_frame, GTK_TYPE_FRAME) GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_RADIO_BUTTON, GailRadioButton, gail_radio_button, GTK_TYPE_RADIO_BUTTON) -GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_BOX, GailBox, gail_box, GTK_TYPE_BOX) GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SCROLLED_WINDOW, GailScrolledWindow, gail_scrolled_window, GTK_TYPE_SCROLLED_WINDOW) GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_PANED, GailPaned, gail_paned, GTK_TYPE_PANED) GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SCROLLBAR, GailScrollbar, gail_scrollbar, GTK_TYPE_SCROLLBAR) @@ -898,7 +896,6 @@ gail_accessibility_module_init (void) GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CELL_RENDERER_PIXBUF, gail_image_cell); GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CELL_RENDERER, gail_renderer_cell); GAIL_WIDGET_SET_FACTORY (GTK_TYPE_RADIO_BUTTON, gail_radio_button); - GAIL_WIDGET_SET_FACTORY (GTK_TYPE_BOX, gail_box); GAIL_WIDGET_SET_FACTORY (GTK_TYPE_SCROLLED_WINDOW, gail_scrolled_window); GAIL_WIDGET_SET_FACTORY (GTK_TYPE_PANED, gail_paned); GAIL_WIDGET_SET_FACTORY (GTK_TYPE_SCROLLBAR, gail_scrollbar); diff --git a/gtk/a11y/gailbox.c b/gtk/a11y/gailbox.c deleted file mode 100644 index f9d05b18df..0000000000 --- a/gtk/a11y/gailbox.c +++ /dev/null @@ -1,52 +0,0 @@ -/* GAIL - The GNOME Accessibility Enabling Library - * Copyright 2001 Sun Microsystems Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include <gtk/gtk.h> -#include "gailbox.h" - -static void gail_box_class_init (GailBoxClass *klass); -static void gail_box_init (GailBox *box); -static void gail_box_initialize (AtkObject *accessible, - gpointer data); - -G_DEFINE_TYPE (GailBox, gail_box, GAIL_TYPE_CONTAINER) - -static void -gail_box_class_init (GailBoxClass *klass) -{ - AtkObjectClass *class = ATK_OBJECT_CLASS (klass); - - class->initialize = gail_box_initialize; -} - -static void -gail_box_init (GailBox *box) -{ -} - -static void -gail_box_initialize (AtkObject *accessible, - gpointer data) -{ - ATK_OBJECT_CLASS (gail_box_parent_class)->initialize (accessible, data); - - accessible->role = ATK_ROLE_FILLER; -} diff --git a/gtk/a11y/gailbox.h b/gtk/a11y/gailbox.h deleted file mode 100644 index 57d81d090e..0000000000 --- a/gtk/a11y/gailbox.h +++ /dev/null @@ -1,51 +0,0 @@ -/* GAIL - The GNOME Accessibility Implementation Library - * Copyright 2001 Sun Microsystems Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GAIL_BOX_H__ -#define __GAIL_BOX_H__ - -#include "gailcontainer.h" - -G_BEGIN_DECLS - -#define GAIL_TYPE_BOX (gail_box_get_type ()) -#define GAIL_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAIL_TYPE_BOX, GailBox)) -#define GAIL_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAIL_TYPE_BOX, GailBoxClass)) -#define GAIL_IS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIL_TYPE_BOX)) -#define GAIL_IS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_BOX)) -#define GAIL_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_BOX, GailBoxClass)) - -typedef struct _GailBox GailBox; -typedef struct _GailBoxClass GailBoxClass; - -struct _GailBox -{ - GailContainer parent; -}; - -GType gail_box_get_type (void); - -struct _GailBoxClass -{ - GailContainerClass parent_class; -}; - -G_END_DECLS - -#endif /* __GAIL_BOX_H__ */ diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c index c36b4df039..e3fb70788c 100644 --- a/gtk/gtkbox.c +++ b/gtk/gtkbox.c @@ -198,6 +198,9 @@ static void gtk_box_get_preferred_height_for_width (GtkWidget gint *minimum_height, gint *natural_height); +static AtkObject *gtk_box_get_accessible (GtkWidget *widget); + + G_DEFINE_TYPE_WITH_CODE (GtkBox, gtk_box, GTK_TYPE_CONTAINER, G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)) @@ -219,6 +222,7 @@ gtk_box_class_init (GtkBoxClass *class) widget_class->get_preferred_width_for_height = gtk_box_get_preferred_width_for_height; widget_class->compute_expand = gtk_box_compute_expand; widget_class->direction_changed = gtk_box_direction_changed; + widget_class->get_accessible = gtk_box_get_accessible; container_class->add = gtk_box_add; container_class->remove = gtk_box_remove; @@ -1350,6 +1354,18 @@ gtk_box_get_preferred_height_for_width (GtkWidget *widget, gtk_box_compute_size_for_orientation (box, width, minimum_height, natural_height); } +static AtkObject * +gtk_box_get_accessible (GtkWidget *widget) +{ + AtkObject *obj; + + obj = GTK_WIDGET_CLASS (gtk_box_parent_class)->get_accessible (widget); + + atk_object_set_role (obj, ATK_ROLE_FILLER); + + return obj; +} + /** * gtk_box_new: * @orientation: the box's orientation. |