[gtk+/gtk-2-20] Implement action interface for gailcell.



commit 5d6ebcc17703e20560d55e34c8bef87d27ef0127
Author: Mike Gorse <mgorse novell com>
Date:   Fri May 21 10:40:46 2010 -0400

        Implement action interface for gailcell.
    
        Bug #580889.

 modules/other/gail/gailbooleancell.c |    3 +--
 modules/other/gail/gailcell.c        |   13 +++----------
 2 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/modules/other/gail/gailbooleancell.c b/modules/other/gail/gailbooleancell.c
index 5c86d04..0aefcfa 100644
--- a/modules/other/gail/gailbooleancell.c
+++ b/modules/other/gail/gailbooleancell.c
@@ -36,8 +36,7 @@ gchar *gail_boolean_cell_property_list[] = {
   NULL
 };
 
-G_DEFINE_TYPE_WITH_CODE (GailBooleanCell, gail_boolean_cell, GAIL_TYPE_RENDERER_CELL,
-                         gail_cell_type_add_action_interface (g_define_type_id))
+G_DEFINE_TYPE (GailBooleanCell, gail_boolean_cell, GAIL_TYPE_RENDERER_CELL)
 
 static void 
 gail_boolean_cell_class_init (GailBooleanCellClass *klass)
diff --git a/modules/other/gail/gailcell.c b/modules/other/gail/gailcell.c
index 35e531e..bc8dd13 100644
--- a/modules/other/gail/gailcell.c
+++ b/modules/other/gail/gailcell.c
@@ -37,7 +37,7 @@ static gint         gail_cell_get_index_in_parent (AtkObject           *obj);
 
 /* AtkAction */
 
-static void         gail_cell_atk_action_interface_init 
+static void         atk_action_interface_init 
                                                   (AtkActionIface      *iface);
 static ActionInfo * _gail_cell_get_action_info    (GailCell            *cell,
 			                           gint                index);
@@ -76,6 +76,7 @@ static void         gail_cell_get_extents         (AtkComponent        *componen
 static gboolean     gail_cell_grab_focus         (AtkComponent        *component);
 
 G_DEFINE_TYPE_WITH_CODE (GailCell, gail_cell, ATK_TYPE_OBJECT,
+                         G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init))
 
 static void	 
@@ -285,7 +286,7 @@ gail_cell_get_index_in_parent (AtkObject *obj)
 }
 
 static void
-gail_cell_atk_action_interface_init (AtkActionIface *iface)
+atk_action_interface_init (AtkActionIface *iface)
 {
   iface->get_n_actions = gail_cell_action_get_n_actions;
   iface->do_action = gail_cell_action_do_action;
@@ -298,14 +299,6 @@ gail_cell_atk_action_interface_init (AtkActionIface *iface)
 void
 gail_cell_type_add_action_interface (GType type)
 {
-  const GInterfaceInfo atk_action_info =
-  {
-    (GInterfaceInitFunc) gail_cell_atk_action_interface_init,
-    (GInterfaceFinalizeFunc) NULL,
-    NULL
-  };
-  g_type_add_interface_static (type, ATK_TYPE_ACTION,
-                                 &atk_action_info);
 }
 
 gboolean



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