forked from AuroraMiddleware/gtk
Remove GailBox
It was only setting a role, and we can do that just as well in get_accessible().
This commit is contained in:
parent
6aedf8f066
commit
1ef996ca3c
@ -8,7 +8,6 @@ gail_c_sources = \
|
|||||||
gailadjustment.c \
|
gailadjustment.c \
|
||||||
gtkarrowaccessible.c \
|
gtkarrowaccessible.c \
|
||||||
gailbooleancell.c \
|
gailbooleancell.c \
|
||||||
gailbox.c \
|
|
||||||
gailbutton.c \
|
gailbutton.c \
|
||||||
gailcell.c \
|
gailcell.c \
|
||||||
gailcellparent.c \
|
gailcellparent.c \
|
||||||
@ -60,7 +59,6 @@ gail_private_h_sources = \
|
|||||||
gailadjustment.h \
|
gailadjustment.h \
|
||||||
gtkarrowaccessible.h \
|
gtkarrowaccessible.h \
|
||||||
gailbooleancell.h \
|
gailbooleancell.h \
|
||||||
gailbox.h \
|
|
||||||
gailbutton.h \
|
gailbutton.h \
|
||||||
gailcell.h \
|
gailcell.h \
|
||||||
gailcellparent.h \
|
gailcellparent.h \
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include <gtk/gtkx.h>
|
#include <gtk/gtkx.h>
|
||||||
#include "gailadjustment.h"
|
#include "gailadjustment.h"
|
||||||
#include "gailbooleancell.h"
|
#include "gailbooleancell.h"
|
||||||
#include "gailbox.h"
|
|
||||||
#include "gailbutton.h"
|
#include "gailbutton.h"
|
||||||
#include "gailcell.h"
|
#include "gailcell.h"
|
||||||
#include "gailcheckmenuitem.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_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_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_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_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_PANED, GailPaned, gail_paned, GTK_TYPE_PANED)
|
||||||
GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SCROLLBAR, GailScrollbar, gail_scrollbar, GTK_TYPE_SCROLLBAR)
|
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_PIXBUF, gail_image_cell);
|
||||||
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CELL_RENDERER, gail_renderer_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_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_SCROLLED_WINDOW, gail_scrolled_window);
|
||||||
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_PANED, gail_paned);
|
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_PANED, gail_paned);
|
||||||
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_SCROLLBAR, gail_scrollbar);
|
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_SCROLLBAR, gail_scrollbar);
|
||||||
|
@ -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;
|
|
||||||
}
|
|
@ -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__ */
|
|
16
gtk/gtkbox.c
16
gtk/gtkbox.c
@ -198,6 +198,9 @@ static void gtk_box_get_preferred_height_for_width (GtkWidget
|
|||||||
gint *minimum_height,
|
gint *minimum_height,
|
||||||
gint *natural_height);
|
gint *natural_height);
|
||||||
|
|
||||||
|
static AtkObject *gtk_box_get_accessible (GtkWidget *widget);
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GtkBox, gtk_box, GTK_TYPE_CONTAINER,
|
G_DEFINE_TYPE_WITH_CODE (GtkBox, gtk_box, GTK_TYPE_CONTAINER,
|
||||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE,
|
G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE,
|
||||||
NULL))
|
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->get_preferred_width_for_height = gtk_box_get_preferred_width_for_height;
|
||||||
widget_class->compute_expand = gtk_box_compute_expand;
|
widget_class->compute_expand = gtk_box_compute_expand;
|
||||||
widget_class->direction_changed = gtk_box_direction_changed;
|
widget_class->direction_changed = gtk_box_direction_changed;
|
||||||
|
widget_class->get_accessible = gtk_box_get_accessible;
|
||||||
|
|
||||||
container_class->add = gtk_box_add;
|
container_class->add = gtk_box_add;
|
||||||
container_class->remove = gtk_box_remove;
|
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);
|
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:
|
* gtk_box_new:
|
||||||
* @orientation: the box's orientation.
|
* @orientation: the box's orientation.
|
||||||
|
Loading…
Reference in New Issue
Block a user