[nautilus] a11y: remove now unused code



commit d9fafc1f0f53139bbc3eef432c98ede145b6724d
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Jun 7 14:50:30 2012 -0400

    a11y: remove now unused code
    
    eel_accessibility_create_derived_gtype() is now unused.

 eel/eel-accessibility.c |   86 -----------------------------------------------
 eel/eel-accessibility.h |    6 ---
 2 files changed, 0 insertions(+), 92 deletions(-)
---
diff --git a/eel/eel-accessibility.c b/eel/eel-accessibility.c
index 95cbdaa..2e8a321 100644
--- a/eel/eel-accessibility.c
+++ b/eel/eel-accessibility.c
@@ -42,74 +42,6 @@ eel_accessibility_set_up_label_widget_relation (GtkWidget *label, GtkWidget *wid
 	atk_object_add_relationship (atk_widget, ATK_RELATION_LABELLED_BY, atk_label);
 }
 
-/*
- * Hacks to make re-using gail somewhat easier.
- */
-
-/**
- * eel_accessibility_create_derived_type:
- * @type_name: the name for the new accessible type eg. NautilusIconCanvasItemAccessible
- * @existing_gobject_with_proxy: the GType of an object that has a registered factory that
- *      manufactures the type we want to inherit from. ie. to inherit from a GailCanvasItem
- *      we need to pass GNOME_TYPE_CANVAS_ITEM - since GailCanvasItem is registered against
- *      that type.
- * @opt_gail_parent_class: the name of the Gail class to derive from eg. GailCanvasItem
- * @class_init: the init function to run for this class
- * 
- * This should be run to register the type, it can subsequently be run with
- * the same name and will not re-register it, but simply return it.
- *
- * NB. to do instance init, you prolly want to override AtkObject::initialize
- * 
- * Return value: the registered type, or 0 on failure.
- **/
-GType
-eel_accessibility_create_derived_type (const char *type_name,
-				       GType existing_gobject_with_proxy,
-				       EelAccessibilityClassInitFn class_init)
-{
-	GType type;
-	GType parent_atk_type;
-	GTypeInfo tinfo = { 0 };
-	GTypeQuery query;
-	AtkObjectFactory *factory;
-
-	if ((type = g_type_from_name (type_name))) {
-		return type;
-	}
-
-	factory = atk_registry_get_factory
-		(atk_get_default_registry (),
-		 existing_gobject_with_proxy);
-	if (!factory) {
-		return G_TYPE_INVALID;
-	}
-	
-	parent_atk_type = atk_object_factory_get_accessible_type (factory);
-	if (!parent_atk_type) {
-		return G_TYPE_INVALID;
-	}
-
-	/*
-	 * Figure out the size of the class and instance 
-	 * we are deriving from
-	 */
-	g_type_query (parent_atk_type, &query);
-
-	if (class_init) {
-		tinfo.class_init = (GClassInitFunc) class_init;
-	}
-
-	tinfo.class_size    = query.class_size;
-	tinfo.instance_size = query.instance_size;
-
-	/* Register the type */
-	type = g_type_register_static (
-		parent_atk_type, type_name, &tinfo, 0);
-
-	return type;
-}
-
 GType
 eel_accessibility_create_accessible_gtype (const char *type_name,
 					   GtkWidget *widget,
@@ -191,24 +123,6 @@ eel_accessibility_get_atk_object (gpointer object)
 }
 
 /**
- * eel_accessibilty_for_object:
- * @object: a GObject of some sort
- * 
- * gets an AtkObject associated with a GObject and if it doesn't
- * exist creates a suitable accessible object.
- * 
- * Return value: an associated accessible.
- **/
-AtkObject *
-eel_accessibility_for_object (gpointer object)
-{
-	if (GTK_IS_WIDGET (object))
-		return gtk_widget_get_accessible (object);
-
-	return atk_gobject_accessible_for_object (object);
-}
-
-/**
  * eel_accessibility_get_gobject:
  * @object: an AtkObject
  * 
diff --git a/eel/eel-accessibility.h b/eel/eel-accessibility.h
index 408ea1a..8a00000 100644
--- a/eel/eel-accessibility.h
+++ b/eel/eel-accessibility.h
@@ -33,16 +33,10 @@
 
 void eel_accessibility_set_up_label_widget_relation (GtkWidget *label, GtkWidget *widget);
 
-typedef void     (*EelAccessibilityClassInitFn)    (AtkObjectClass *klass);
-
 AtkObject    *eel_accessibility_get_atk_object        (gpointer              object);
-AtkObject    *eel_accessibility_for_object            (gpointer              object);
 gpointer      eel_accessibility_get_gobject           (AtkObject            *object);
 AtkObject    *eel_accessibility_set_atk_object_return (gpointer              object,
 						       AtkObject            *atk_object);
-GType         eel_accessibility_create_derived_type   (const char           *type_name,
-						       GType                 existing_gobject_with_proxy,
-						       EelAccessibilityClassInitFn class_init);
 GType         eel_accessibility_create_accessible_gtype (const char *type_name,
 							 GtkWidget *widget,
 							 GClassInitFunc class_init);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]