tracker r1122 - in trunk: . src/libtracker-gtk
- From: richb svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1122 - in trunk: . src/libtracker-gtk
- Date: Fri, 8 Feb 2008 15:41:43 +0000 (GMT)
Author: richb
Date: Fri Feb 8 15:41:42 2008
New Revision: 1122
URL: http://svn.gnome.org/viewvc/tracker?rev=1122&view=rev
Log:
* src/libtracker-gtk/tracker-utils.h:
src/libtracker-gtk/tracker-utils.c:
src/libtracker-gtk/tracker-tag-bar.c:
Fix for bug #494892 - Label for/labeled by relation missing for
add tag button.
Modified:
trunk/ChangeLog
trunk/src/libtracker-gtk/tracker-tag-bar.c
trunk/src/libtracker-gtk/tracker-utils.c
trunk/src/libtracker-gtk/tracker-utils.h
Modified: trunk/src/libtracker-gtk/tracker-tag-bar.c
==============================================================================
--- trunk/src/libtracker-gtk/tracker-tag-bar.c (original)
+++ trunk/src/libtracker-gtk/tracker-tag-bar.c Fri Feb 8 15:41:42 2008
@@ -27,6 +27,7 @@
#include <glib/gi18n-lib.h>
#include "tracker-tag-bar.h"
+#include "tracker-utils.h"
#define TRACKER_TAG_BAR_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_TAG_BAR, TrackerTagBarPrivate))
@@ -300,7 +301,12 @@
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
gtk_box_pack_start (GTK_BOX(box), button, FALSE, FALSE, 0);
-
+
+ tracker_set_atk_relationship(button, ATK_RELATION_LABELLED_BY,
+ label);
+ tracker_set_atk_relationship(label, ATK_RELATION_LABEL_FOR,
+ button);
+
g_signal_connect (G_OBJECT (button), "button-press-event",
G_CALLBACK (_on_tag_button_press_event), bar);
@@ -370,7 +376,12 @@
gtk_box_pack_start (GTK_BOX(tag_bar), button, FALSE, FALSE, 0);
gtk_button_set_image (GTK_BUTTON (button), image);
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
-
+
+ tracker_set_atk_relationship(button, ATK_RELATION_LABELLED_BY,
+ label);
+ tracker_set_atk_relationship(label, ATK_RELATION_LABEL_FOR,
+ button);
+
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (_on_add_tag_clicked), tag_bar);
@@ -419,14 +430,3 @@
priv->client = client;
return tag_bar;
}
-
-
-
-
-
-
-
-
-
-
-
Modified: trunk/src/libtracker-gtk/tracker-utils.c
==============================================================================
--- trunk/src/libtracker-gtk/tracker-utils.c (original)
+++ trunk/src/libtracker-gtk/tracker-utils.c Fri Feb 8 15:41:42 2008
@@ -95,3 +95,20 @@
return GTK_TREE_MODEL (store);
}
+
+void
+tracker_set_atk_relationship(GtkWidget *obj1, int relation_type,
+ GtkWidget *obj2)
+{
+ AtkObject *atk_obj1, *atk_obj2, *targets[1];
+ AtkRelationSet *atk_rel_set;
+ AtkRelation *atk_rel;
+
+ atk_obj1 = gtk_widget_get_accessible (GTK_WIDGET (obj1));
+ atk_obj2 = gtk_widget_get_accessible (GTK_WIDGET (obj2));
+ atk_rel_set = atk_object_ref_relation_set (atk_obj1);
+ targets[0] = atk_obj2;
+ atk_rel = atk_relation_new (targets, 1, relation_type);
+ atk_relation_set_add (atk_rel_set, atk_rel);
+ g_object_unref (G_OBJECT (atk_rel));
+}
Modified: trunk/src/libtracker-gtk/tracker-utils.h
==============================================================================
--- trunk/src/libtracker-gtk/tracker-utils.h (original)
+++ trunk/src/libtracker-gtk/tracker-utils.h Fri Feb 8 15:41:42 2008
@@ -32,5 +32,6 @@
GList * tracker_keyword_array_to_glist (gchar **array);
GList * tracker_get_all_keywords (TrackerClient *tracker_client);
GtkTreeModel * tracker_create_simple_keyword_liststore (const GList *list);
-
+void tracker_set_atk_relationship(GtkWidget *obj1, int relation_type,
+ GtkWidget *obj2);
#endif /* TRACKER_UTILS_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]