summaryrefslogtreecommitdiff
path: root/gtk/gtkseparator.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-06-26 21:36:11 -0400
committerMatthias Clasen <mclasen@redhat.com>2011-07-05 16:08:10 -0400
commit4a7a667f5ff510ea9b898896076038cec7bcba3c (patch)
treeb39a78e44c9117ae02efa01e7e177ff0132d348e /gtk/gtkseparator.c
parentab8d94d195ef456c04db7f21e106647941eb338e (diff)
downloadgtk+-4a7a667f5ff510ea9b898896076038cec7bcba3c.tar.gz
Drop GailSeparator
Instead, just set a suitable role on a GtkWidgetAccessible.
Diffstat (limited to 'gtk/gtkseparator.c')
-rw-r--r--gtk/gtkseparator.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gtk/gtkseparator.c b/gtk/gtkseparator.c
index e285a40e74..d67ab2ec6f 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.