Commit 4a7a667f authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Drop GailSeparator

Instead, just set a suitable role on a GtkWidgetAccessible.
parent ab8d94d1
......@@ -42,7 +42,6 @@ gail_c_sources = \
gailscalebutton.c \
gailscrollbar.c \
gailscrolledwindow.c \
gailseparator.c \
gtkspinbuttonaccessible.c \
gailsubmenuitem.c \
gailstatusbar.c \
......@@ -97,7 +96,6 @@ gail_private_h_sources = \
gailscalebutton.h \
gailscrollbar.h \
gailscrolledwindow.h \
gailseparator.h \
gtkspinbuttonaccessible.h \
gailsubmenuitem.h \
gailstatusbar.h \
......
......@@ -51,7 +51,6 @@
#include "gailscalebutton.h"
#include "gailscrollbar.h"
#include "gailscrolledwindow.h"
#include "gailseparator.h"
#include "gailstatusbar.h"
#include "gailtextcell.h"
#include "gailtogglebutton.h"
......@@ -127,7 +126,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_SEPARATOR, GailSeparator, gail_separator, GTK_TYPE_SEPARATOR)
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)
......@@ -903,7 +901,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_SEPARATOR, gail_separator);
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 - 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 "gailseparator.h"
static void gail_separator_class_init (GailSeparatorClass *klass);
static void gail_separator_init (GailSeparator *accessible);
static void gail_separator_initialize (AtkObject *accessible,
gpointer data);
G_DEFINE_TYPE (GailSeparator, gail_separator, GAIL_TYPE_WIDGET)
static void
gail_separator_class_init (GailSeparatorClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
class->initialize = gail_separator_initialize;
}
static void
gail_separator_init (GailSeparator *accessible)
{
}
static void
gail_separator_initialize (AtkObject *accessible,
gpointer data)
{
ATK_OBJECT_CLASS (gail_separator_parent_class)->initialize (accessible, data);
accessible->role = ATK_ROLE_SEPARATOR;
}
/* 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_SEPARATOR_H__
#define __GAIL_SEPARATOR_H__
#include "gailwidget.h"
G_BEGIN_DECLS
#define GAIL_TYPE_SEPARATOR (gail_separator_get_type ())
#define GAIL_SEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAIL_TYPE_SEPARATOR, GailSeparator))
#define GAIL_SEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAIL_TYPE_SEPARATOR, GailSeparatorClass))
#define GAIL_IS_SEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIL_TYPE_SEPARATOR))
#define GAIL_IS_SEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_SEPARATOR))
#define GAIL_SEPARATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_SEPARATOR, GailSeparatorClass))
typedef struct _GailSeparator GailSeparator;
typedef struct _GailSeparatorClass GailSeparatorClass;
struct _GailSeparator
{
GailWidget parent;
};
GType gail_separator_get_type (void);
struct _GailSeparatorClass
{
GailWidgetClass parent_class;
};
G_END_DECLS
#endif /* __GAIL_SEPARATOR_H__ */
......@@ -72,6 +72,7 @@ static void gtk_separator_get_preferred_height
gint *natural);
static gboolean gtk_separator_draw (GtkWidget *widget,
cairo_t *cr);
static AtkObject *gtk_separator_get_accessible (GtkWidget *widget);
G_DEFINE_TYPE_WITH_CODE (GtkSeparator, gtk_separator, GTK_TYPE_WIDGET,
......@@ -91,7 +92,8 @@ gtk_separator_class_init (GtkSeparatorClass *class)
widget_class->get_preferred_width = gtk_separator_get_preferred_width;
widget_class->get_preferred_height = gtk_separator_get_preferred_height;
widget_class->draw = gtk_separator_draw;
widget_class->draw = gtk_separator_draw;
widget_class->get_accessible = gtk_separator_get_accessible;
g_object_class_override_property (object_class, PROP_ORIENTATION, "orientation");
......@@ -272,6 +274,18 @@ gtk_separator_draw (GtkWidget *widget,
return FALSE;
}
static AtkObject *
gtk_separator_get_accessible (GtkWidget *widget)
{
AtkObject *obj;
obj = GTK_WIDGET_CLASS (gtk_separator_parent_class)->get_accessible (widget);
atk_object_set_role (obj, ATK_ROLE_SEPARATOR);
return obj;
}
/**
* gtk_separator_new:
* @orientation: the separator's orientation.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment