almanah r111 - in trunk: . data src src/links
- From: pwithnall svn gnome org
- To: svn-commits-list gnome org
- Subject: almanah r111 - in trunk: . data src src/links
- Date: Sun, 16 Nov 2008 19:23:06 +0000 (UTC)
Author: pwithnall
Date: Sun Nov 16 19:23:06 2008
New Revision: 111
URL: http://svn.gnome.org/viewvc/almanah?rev=111&view=rev
Log:
2008-11-16 Philip Withnall <philip tecnocode co uk>
* configure.ac:
* data/almanah.ui:
* src/links/uri.c (uri_build_dialog):
* src/preferences-dialog.c (almanah_preferences_dialog_new):
Add accessibility information to the UI, so that it is navigable
in
both Accerciser and GOK. Note: adds a depencency on ATK.
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/data/almanah.ui
trunk/src/links/uri.c
trunk/src/preferences-dialog.c
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sun Nov 16 19:23:06 2008
@@ -68,7 +68,7 @@
AM_PROG_LIBTOOL
AM_GCONF_SOURCE_2
-PKG_CHECK_MODULES(STANDARD, glib-2.0 gtk+-2.0 >= 2.14 gmodule-2.0 gio-2.0 sqlite3 cairo gconf-2.0)
+PKG_CHECK_MODULES(STANDARD, glib-2.0 gtk+-2.0 >= 2.14 gmodule-2.0 gio-2.0 sqlite3 cairo gconf-2.0 atk)
AC_SUBST(STANDARD_CFLAGS)
AC_SUBST(STANDARD_LIBS)
Modified: trunk/data/almanah.ui
==============================================================================
--- trunk/data/almanah.ui (original)
+++ trunk/data/almanah.ui Sun Nov 16 19:23:06 2008
@@ -234,6 +234,11 @@
<property name="has-focus">True</property>
<property name="wrap-mode">GTK_WRAP_WORD</property>
<signal name="focus-out-event" handler="mw_entry_view_focus_out_event_cb"/>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="a11y-dry_mw_entry_view">
+ <property name="AtkObject::accessible-name" translatable="yes">Entry editing area</property>
+ </object>
+ </child>
</object>
</child>
</object>
@@ -249,6 +254,9 @@
<child>
<object class="GtkLabel" id="dry_mw_calendar_label">
<property name="label" translatable="yes">Calendar</property>
+ <accessibility>
+ <relation target="dry_mw_calendar" type="label-for"/>
+ </accessibility>
</object>
<packing>
<property name="expand">False</property>
@@ -260,6 +268,14 @@
<property name="can-focus">True</property>
<signal name="day-selected" handler="mw_calendar_day_selected_cb"/>
<signal name="month-changed" handler="almanah_calendar_month_changed_cb"/>
+ <accessibility>
+ <relation target="dry_mw_calendar_label" type="labelled-by"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="a11y-dry_mw_calendar">
+ <property name="AtkObject::accessible-name" translatable="yes">Calendar</property>
+ </object>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -268,6 +284,9 @@
<child>
<object class="GtkLabel" id="dry_mw_attached_links_label">
<property name="label" translatable="yes">Attached Links</property>
+ <accessibility>
+ <relation target="dry_mw_links_tree_view" type="label-for"/>
+ </accessibility>
</object>
<packing>
<property name="expand">False</property>
@@ -285,6 +304,14 @@
<property name="can-focus">True</property>
<property name="headers-visible">False</property>
<signal name="row-activated" handler="mw_links_tree_view_row_activated_cb"/>
+ <accessibility>
+ <relation target="dry_mw_attached_links_label" type="labelled-by"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="a11y-dry_mw_links_tree_view">
+ <property name="AtkObject::accessible-name" translatable="yes">Link List</property>
+ </object>
+ </child>
<child>
<object class="GtkTreeViewColumn" id="column3">
<child>
@@ -313,6 +340,11 @@
<property name="use-stock">True</property>
<property name="label">gtk-add</property>
<signal name="clicked" handler="mw_add_button_clicked_cb"/>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="a11y-dry_mw_add_button">
+ <property name="AtkObject::accessible-name" translatable="yes">Add Link</property>
+ </object>
+ </child>
</object>
</child>
<child>
@@ -320,6 +352,11 @@
<property name="use-stock">True</property>
<property name="label">gtk-remove</property>
<signal name="clicked" handler="mw_remove_button_clicked_cb"/>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="a11y-dry_mw_remove_button">
+ <property name="AtkObject::accessible-name" translatable="yes">Remove Link</property>
+ </object>
+ </child>
</object>
</child>
<child>
@@ -327,6 +364,11 @@
<property name="image">dry_mw_view_button_image</property>
<property name="label" translatable="yes">View</property>
<signal name="clicked" handler="mw_view_button_clicked_cb"/>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="a11y-dry_mw_view_button">
+ <property name="AtkObject::accessible-name" translatable="yes">View Link</property>
+ </object>
+ </child>
</object>
</child>
</object>
@@ -342,14 +384,6 @@
</child>
</object>
</child>
- <child>
- <object class="GtkStatusbar" id="dry_mw_statusbar">
- <property name="spacing">2</property>
- </object>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
</object>
</child>
</object>
@@ -377,6 +411,9 @@
<object class="GtkLabel" id="dry_ald_type_label">
<property name="xalign">0</property>
<property name="label" translatable="yes">Link Type</property>
+ <accessibility>
+ <relation target="dry_ald_type_combo_box" type="label-for"/>
+ </accessibility>
</object>
<packing>
<property name="left-attach">1</property>
@@ -390,6 +427,9 @@
<object class="GtkComboBox" id="dry_ald_type_combo_box">
<property name="model">dry_ald_type_store</property>
<signal name="changed" handler="ald_type_combo_box_changed_cb"/>
+ <accessibility>
+ <relation target="dry_ald_type_label" type="labelled-by"/>
+ </accessibility>
<child>
<object class="GtkCellRendererPixbuf" id="renderer5"/>
<attributes>
@@ -469,6 +509,14 @@
<child>
<object class="GtkEntry" id="dry_sd_search_entry">
<property name="activates-default">True</property>
+ <accessibility>
+ <relation target="dry_sd_search_button" type="labelled-by"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="a11y-dry_sd_search_entry">
+ <property name="AtkObject::accessible-name" translatable="yes">Search entry</property>
+ </object>
+ </child>
</object>
</child>
<child>
@@ -478,6 +526,9 @@
<property name="can-default">True</property>
<property name="has-default">True</property>
<signal name="clicked" handler="sd_search_button_clicked_cb"/>
+ <accessibility>
+ <relation target="dry_sd_search_entry" type="label-for"/>
+ </accessibility>
</object>
<packing>
<property name="expand">False</property>
@@ -491,6 +542,9 @@
<child>
<object class="GtkLabel" id="dry_sd_results_label">
<property name="label" translatable="yes">Results</property>
+ <accessibility>
+ <relation target="dry_sd_results_tree_view" type="label-for"/>
+ </accessibility>
</object>
<packing>
<property name="expand">False</property>
@@ -506,6 +560,14 @@
<property name="model">dry_sd_results_store</property>
<property name="headers-visible">False</property>
<signal name="row-activated" handler="sd_results_tree_view_row_activated_cb"/>
+ <accessibility>
+ <relation target="dry_sd_results_label" type="labelled-by"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="a11y-dry_sd_results_tree_view">
+ <property name="AtkObject::accessible-name" translatable="yes">Result List</property>
+ </object>
+ </child>
<child>
<object class="GtkTreeViewColumn" id="column0">
<child>
Modified: trunk/src/links/uri.c
==============================================================================
--- trunk/src/links/uri.c (original)
+++ trunk/src/links/uri.c Sun Nov 16 19:23:06 2008
@@ -19,6 +19,7 @@
#include <glib.h>
#include <glib/gi18n.h>
+#include <atk/atk.h>
#include "uri.h"
#include "../link.h"
@@ -94,6 +95,7 @@
uri_build_dialog (AlmanahLink *link, GtkVBox *parent_vbox)
{
GtkWidget *label, *hbox;
+ AtkObject *a11y_label, *a11y_entry;
AlmanahURILinkPrivate *priv = ALMANAH_URI_LINK (link)->priv;
hbox = gtk_hbox_new (FALSE, 5);
@@ -106,6 +108,12 @@
gtk_entry_set_activates_default (GTK_ENTRY (priv->entry), TRUE);
gtk_box_pack_start (GTK_BOX (hbox), priv->entry, TRUE, TRUE, 0);
+ /* Set up the accessibility relationships */
+ a11y_label = gtk_widget_get_accessible (GTK_WIDGET (label));
+ a11y_entry = gtk_widget_get_accessible (GTK_WIDGET (priv->entry));
+ atk_object_add_relationship (a11y_label, ATK_RELATION_LABEL_FOR, a11y_entry);
+ atk_object_add_relationship (a11y_entry, ATK_RELATION_LABELLED_BY, a11y_label);
+
gtk_box_pack_start (GTK_BOX (parent_vbox), hbox, TRUE, TRUE, 0);
gtk_widget_show_all (GTK_WIDGET (parent_vbox));
}
Modified: trunk/src/preferences-dialog.c
==============================================================================
--- trunk/src/preferences-dialog.c (original)
+++ trunk/src/preferences-dialog.c Sun Nov 16 19:23:06 2008
@@ -26,6 +26,7 @@
#include <libcryptui/cryptui-key-combo.h>
#include <libcryptui/cryptui-keyset.h>
#include <libcryptui/cryptui.h>
+#include <atk/atk.h>
#endif /* ENABLE_ENCRYPTION */
#include "preferences-dialog.h"
@@ -99,6 +100,7 @@
GtkBuilder *builder;
#ifdef ENABLE_ENCRYPTION
GtkWidget *label, *button;
+ AtkObject *a11y_label, *a11y_key_combo;
GtkTable *table;
gchar *key;
#endif /* ENABLE_ENCRYPTION */
@@ -155,6 +157,12 @@
gtk_table_attach_defaults (table, GTK_WIDGET (priv->key_combo), 2, 3, 1, 2);
+ /* Set up the accessibility relationships */
+ a11y_label = gtk_widget_get_accessible (GTK_WIDGET (label));
+ a11y_key_combo = gtk_widget_get_accessible (GTK_WIDGET (priv->key_combo));
+ atk_object_add_relationship (a11y_label, ATK_RELATION_LABEL_FOR, a11y_key_combo);
+ atk_object_add_relationship (a11y_key_combo, ATK_RELATION_LABELLED_BY, a11y_label);
+
/* Set the selected key combo value */
key = gconf_client_get_string (almanah->gconf_client, ENCRYPTION_KEY_GCONF_PATH, NULL);
if (*key == '\0') {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]