[gnome-games] libgames-support: Merge games-atk-utils.c into games-frame.c
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] libgames-support: Merge games-atk-utils.c into games-frame.c
- Date: Sun, 1 Jan 2012 03:23:04 +0000 (UTC)
commit dd00c36009052c5dce2307eeb0bde0012d794e52
Author: Robert Ancell <robert ancell canonical com>
Date: Sun Jan 1 14:22:50 2012 +1100
libgames-support: Merge games-atk-utils.c into games-frame.c
libgames-support/Makefile.am | 2 -
libgames-support/games-atk-utils.c | 51 ------------------------------------
libgames-support/games-atk-utils.h | 33 -----------------------
libgames-support/games-frame.c | 20 ++++++++++++--
4 files changed, 17 insertions(+), 89 deletions(-)
---
diff --git a/libgames-support/Makefile.am b/libgames-support/Makefile.am
index 0b57ec2..32a6664 100644
--- a/libgames-support/Makefile.am
+++ b/libgames-support/Makefile.am
@@ -19,8 +19,6 @@ libgames_support_la_SOURCES = \
nodist_libgames_support_la_SOURCES = $(BUILT_SOURCES)
libgames_support_la_SOURCES += \
- games-atk-utils.c \
- games-atk-utils.h \
games-clock.c \
games-clock.h \
games-preimage.c \
diff --git a/libgames-support/games-frame.c b/libgames-support/games-frame.c
index 0fbe35a..0696e83 100644
--- a/libgames-support/games-frame.c
+++ b/libgames-support/games-frame.c
@@ -22,7 +22,6 @@
#include <gtk/gtk.h>
#include "games-frame.h"
-#include "games-atk-utils.h"
enum {
PROP_0,
@@ -71,6 +70,21 @@ games_frame_init (GamesFrame * frame)
}
static void
+add_atk_relation (GtkWidget *widget, GtkWidget *other, AtkRelationType type)
+{
+ AtkRelationSet *set;
+ AtkRelation *relation;
+ AtkObject *object;
+
+ object = gtk_widget_get_accessible (other);
+ set = atk_object_ref_relation_set (gtk_widget_get_accessible (widget));
+ relation = atk_relation_new (&object, 1, type);
+ atk_relation_set_add (set, relation);
+ g_object_unref (relation);
+ g_object_unref (set);
+}
+
+static void
games_frame_add (GtkContainer *container,
GtkWidget *child)
{
@@ -78,8 +92,8 @@ games_frame_add (GtkContainer *container,
gtk_container_add (GTK_CONTAINER (frame->priv->alignment), child);
- games_atk_util_add_atk_relation (frame->priv->label, child, ATK_RELATION_LABEL_FOR);
- games_atk_util_add_atk_relation (child, frame->priv->label, ATK_RELATION_LABELLED_BY);
+ add_atk_relation (frame->priv->label, child, ATK_RELATION_LABEL_FOR);
+ add_atk_relation (child, frame->priv->label, ATK_RELATION_LABELLED_BY);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]