[gtk+/a11y] Drop GailSeparator
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/a11y] Drop GailSeparator
- Date: Mon, 27 Jun 2011 01:40:07 +0000 (UTC)
commit 0f869e323d1dc9c2aeec16f80b6f04d7a6d95fc1
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jun 26 21:36:11 2011 -0400
Drop GailSeparator
Instead, just set a suitable role on a GtkWidgetAccessible.
gtk/a11y/Makefile.am | 2 -
gtk/a11y/gail.c | 3 --
gtk/a11y/gailseparator.c | 52 ----------------------------------------------
gtk/a11y/gailseparator.h | 51 ---------------------------------------------
gtk/gtkseparator.c | 16 +++++++++++++-
5 files changed, 15 insertions(+), 109 deletions(-)
---
diff --git a/gtk/a11y/Makefile.am b/gtk/a11y/Makefile.am
index 8674a26..ab3212b 100644
--- a/gtk/a11y/Makefile.am
+++ b/gtk/a11y/Makefile.am
@@ -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 \
diff --git a/gtk/a11y/gail.c b/gtk/a11y/gail.c
index 31fd181..7ca070b 100644
--- a/gtk/a11y/gail.c
+++ b/gtk/a11y/gail.c
@@ -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);
diff --git a/gtk/gtkseparator.c b/gtk/gtkseparator.c
index e285a40..d67ab2e 100644
--- a/gtk/gtkseparator.c
+++ b/gtk/gtkseparator.c
@@ -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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]