summaryrefslogtreecommitdiff
path: root/atk/atkhyperlink.c
diff options
context:
space:
mode:
authorPadraig O'Briain <padraig.obriain@sun.com>2003-12-01 12:59:25 +0000
committerPadraig O'Briain <padraigo@src.gnome.org>2003-12-01 12:59:25 +0000
commit0b2c017c9eef2dfe3c95b6b9423336fec0da3342 (patch)
tree8ad99e6fe7654ca8b108bb8028ff89f70889a61d /atk/atkhyperlink.c
parent97af614e5990927c4e23dc9ba7d50515862f8278 (diff)
downloadatk-0b2c017c9eef2dfe3c95b6b9423336fec0da3342.tar.gz
Make nicks and blurbs of properties translatable. Add new property
2003-12-03 Padraig O'Briain <padraig.obriain@sun.com> * atk/atkobject.c: (atk_object_class_init): Make nicks and blurbs of properties translatable. Add new property "accessible-hypertext-nlinks". (atk_object_real_get_property): Add support for new property "accessible-hypertext-nlinks". * atk/atkhyperlink.h: Remove unnecessary comments. Add signal link_activated. * atk/atkhyperlink.c: aAdd signals link_activated and new properties "number-of-anchors, end-index and start-index. This fixes bug #112390.
Diffstat (limited to 'atk/atkhyperlink.c')
-rwxr-xr-xatk/atkhyperlink.c65
1 files changed, 63 insertions, 2 deletions
diff --git a/atk/atkhyperlink.c b/atk/atkhyperlink.c
index 0b61853..6307c3b 100755
--- a/atk/atkhyperlink.c
+++ b/atk/atkhyperlink.c
@@ -18,12 +18,23 @@
*/
#include "atkhyperlink.h"
+#include "atkintl.h"
+
+enum
+{
+ LINK_ACTIVATED,
+
+ LAST_SIGNAL
+};
enum
{
PROP_0, /* gobject convention */
PROP_SELECTED_LINK,
+ PROP_NUMBER_ANCHORS,
+ PROP_END_INDEX,
+ PROP_START_INDEX,
PROP_LAST
};
@@ -38,6 +49,8 @@ static void atk_hyperlink_real_get_property (GObject *object,
static void atk_hyperlink_action_iface_init (AtkActionIface *iface);
+static guint atk_hyperlink_signals[LAST_SIGNAL] = { 0, };
+
static gpointer parent_class = NULL;
GType
@@ -82,13 +95,52 @@ atk_hyperlink_class_init (AtkHyperlinkClass *klass)
gobject_class->get_property = atk_hyperlink_real_get_property;
+ klass->link_activated = NULL;
+
g_object_class_install_property (gobject_class,
PROP_SELECTED_LINK,
g_param_spec_boolean ("selected-link",
- "Selected Link",
- "Specifies whether the AtkHyperlink object is selected",
+ _("Selected Link"),
+ _("Specifies whether the AtkHyperlink object is selected"),
FALSE,
G_PARAM_READABLE));
+ g_object_class_install_property (gobject_class,
+ PROP_NUMBER_ANCHORS,
+ g_param_spec_int ("number-of-anchors",
+ _("Number of Anchors"),
+ _("The number of anchors associated with the AtkHyperlink object"),
+ 0,
+ G_MAXINT,
+ 0,
+ G_PARAM_READABLE));
+ g_object_class_install_property (gobject_class,
+ PROP_END_INDEX,
+ g_param_spec_int ("end-index",
+ _("End index"),
+ _("The end index of the AtkHyperlink object"),
+ 0,
+ G_MAXINT,
+ 0,
+ G_PARAM_READABLE));
+ g_object_class_install_property (gobject_class,
+ PROP_END_INDEX,
+ g_param_spec_int ("start-index",
+ _("Start index"),
+ _("The start index of the AtkHyperlink object"),
+ 0,
+ G_MAXINT,
+ 0,
+ G_PARAM_READABLE));
+ atk_hyperlink_signals[LINK_ACTIVATED] =
+ g_signal_new ("link_activated",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (AtkHyperlinkClass, link_activated),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+
}
static void
@@ -112,6 +164,15 @@ atk_hyperlink_real_get_property (GObject *object,
case PROP_SELECTED_LINK:
g_value_set_boolean (value, atk_hyperlink_is_selected_link (link));
break;
+ case PROP_NUMBER_ANCHORS:
+ g_value_set_int (value, atk_hyperlink_get_n_anchors (link));
+ break;
+ case PROP_END_INDEX:
+ g_value_set_int (value, atk_hyperlink_get_end_index (link));
+ break;
+ case PROP_START_INDEX:
+ g_value_set_int (value, atk_hyperlink_get_start_index (link));
+ break;
default:
break;
}