[gtk+] Remove GailBox



commit 1ef996ca3ca94a2c9b925ae9ce1edc5b02a73670
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jun 26 21:52:35 2011 -0400

    Remove GailBox
    
    It was only setting a role, and we can do that just as well
    in get_accessible().

 gtk/a11y/Makefile.am |    2 -
 gtk/a11y/gail.c      |    3 --
 gtk/a11y/gailbox.c   |   52 --------------------------------------------------
 gtk/a11y/gailbox.h   |   51 -------------------------------------------------
 gtk/gtkbox.c         |   16 +++++++++++++++
 5 files changed, 16 insertions(+), 108 deletions(-)
---
diff --git a/gtk/a11y/Makefile.am b/gtk/a11y/Makefile.am
index 109064c..6031514 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 dad5bc8..ed1b3e8 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/gtkbox.c b/gtk/gtkbox.c
index c36b4df..e3fb707 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.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]