[nautilus] canvas-container: use gtk_widget_class_set_accessible_type()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] canvas-container: use gtk_widget_class_set_accessible_type()
- Date: Thu, 3 Jan 2013 18:40:30 +0000 (UTC)
commit fff281bb18d58f921c680d2560c26017355632b7
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Jan 3 18:16:51 2013 +0100
canvas-container: use gtk_widget_class_set_accessible_type()
libnautilus-private/nautilus-canvas-container.c | 22 +++-------------------
1 files changed, 3 insertions(+), 19 deletions(-)
---
diff --git a/libnautilus-private/nautilus-canvas-container.c b/libnautilus-private/nautilus-canvas-container.c
index 98b35f3..3fffae5 100644
--- a/libnautilus-private/nautilus-canvas-container.c
+++ b/libnautilus-private/nautilus-canvas-container.c
@@ -138,8 +138,7 @@ typedef struct {
char *action_descriptions[LAST_ACTION];
} NautilusCanvasContainerAccessiblePrivate;
-static AtkObject * get_accessible (GtkWidget *widget);
-
+static GType nautilus_canvas_container_accessible_get_type (void);
static void preview_selected_items (NautilusCanvasContainer *container);
static void activate_selected_items (NautilusCanvasContainer *container);
static void activate_selected_items_alternate (NautilusCanvasContainer *container,
@@ -5062,11 +5061,12 @@ nautilus_canvas_container_class_init (NautilusCanvasContainerClass *class)
widget_class->popup_menu = popup_menu;
widget_class->style_updated = style_updated;
widget_class->grab_notify = grab_notify_cb;
- widget_class->get_accessible = get_accessible;
canvas_class = EEL_CANVAS_CLASS (class);
canvas_class->draw_background = draw_canvas_background;
+ gtk_widget_class_set_accessible_type (widget_class, nautilus_canvas_container_accessible_get_type ());
+
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boolean ("activate_prelight_icon_label",
"Activate Prelight Icon Label",
@@ -8032,8 +8032,6 @@ nautilus_canvas_container_accessible_ref_child (AtkObject *accessible, int i)
}
}
-static GType nautilus_canvas_container_accessible_get_type (void);
-
G_DEFINE_TYPE_WITH_CODE (NautilusCanvasContainerAccessible, nautilus_canvas_container_accessible,
eel_canvas_accessible_get_type (),
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, nautilus_canvas_container_accessible_action_interface_init)
@@ -8112,20 +8110,6 @@ nautilus_canvas_container_accessible_class_init (NautilusCanvasContainerAccessib
g_type_class_add_private (klass, sizeof (NautilusCanvasContainerAccessiblePrivate));
}
-static AtkObject *
-get_accessible (GtkWidget *widget)
-{
- AtkObject *accessible;
-
- if ((accessible = eel_accessibility_get_atk_object (widget))) {
- return accessible;
- }
-
- accessible = g_object_new (nautilus_canvas_container_accessible_get_type (), "widget", widget, NULL);
-
- return eel_accessibility_set_atk_object_return (widget, accessible);
-}
-
gboolean
nautilus_canvas_container_is_layout_rtl (NautilusCanvasContainer *container)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]