aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Yelavich <luke.yelavich@canonical.com>2011-02-08 17:55:35 +1100
committerLuke Yelavich <luke.yelavich@canonical.com>2011-02-08 17:55:35 +1100
commitfffab2e1e8d991a41cc591ceaca77c8a40f31f33 (patch)
tree357a2665a5cdda03ee4635d154a31c23b5adbf98
parent31519e77b290d832f287c1daa6a90f8d6e11b136 (diff)
downloadlibayatana-appindicator-fffab2e1e8d991a41cc591ceaca77c8a40f31f33.tar.gz
libayatana-appindicator-fffab2e1e8d991a41cc591ceaca77c8a40f31f33.tar.bz2
libayatana-appindicator-fffab2e1e8d991a41cc591ceaca77c8a40f31f33.zip
accessible_name -> accessible_desc
-rw-r--r--bindings/mono/Makefile.am2
-rw-r--r--bindings/mono/libappindicator-api.metadata12
-rw-r--r--bindings/python/appindicator.defs10
-rw-r--r--docs/reference/libappindicator-sections.txt6
-rw-r--r--example/simple-client.c10
-rw-r--r--src/app-indicator.c124
-rw-r--r--src/app-indicator.h18
-rw-r--r--src/notification-item.xml6
-rw-r--r--tests/test-libappindicator.c92
9 files changed, 140 insertions, 140 deletions
diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am
index 1f23742..80c03e3 100644
--- a/bindings/mono/Makefile.am
+++ b/bindings/mono/Makefile.am
@@ -94,7 +94,7 @@ $(API): $(MIDDLE_API) Makefile.am
-e "s|PROP_LABEL_S|label|" \
-e "s|PROP_LABEL_GUIDE_S|label-guide|" \
-e "s|PROP_ORDERING_INDEX_S|ordering-index|" \
- -e "s|PROP_ACCESSIBLE_NAME_S|accessible-name|" \
+ -e "s|PROP_ACCESSIBLE_DESC_S|accessible-name|" \
$< > $@
api_includes = $(GTK_SHARP_CFLAGS)
diff --git a/bindings/mono/libappindicator-api.metadata b/bindings/mono/libappindicator-api.metadata
index 57e8245..e610c88 100644
--- a/bindings/mono/libappindicator-api.metadata
+++ b/bindings/mono/libappindicator-api.metadata
@@ -7,8 +7,8 @@
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_status']" name="cname">new-status</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_label']" name="name">NewLabel</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_label']" name="cname">new-label</attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_accessible_name']" name="name">NewAccessibleName</attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_accessible_name']" name="cname">new-accessible-name</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_accessible_desc']" name="name">NewAccessibleDesc</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_accessible_desc']" name="cname">new-accessible-desc</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='connection_changed']" name="name">ConnectionChanged</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='connection_changed']" name="cname">connection-changed</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='scroll_event']" name="name">ScrollEvent</attr>
@@ -28,7 +28,7 @@
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_CONNECTED_S']" name="name">Connected</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_LABEL_S']" name="name">Label</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_LABEL_GUIDE_S']" name="name">LabelGuide</attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ACCESSIBLE_NAME_S']" name="name">AccessibleName</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ACCESSIBLE_DESC_S']" name="name">AccessibleDesc</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ORDERING_INDEX_S']" name="name">OrderingIndex</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/method[@name='SetMenu']" name="name">SetMenu</attr>
@@ -43,7 +43,7 @@
<remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_LABEL_S']" />
<remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_LABEL_GUIDE_S']" />
<remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_ORDERING_INDEX_S']" />
- <remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_ACCESSIBLE_NAME_S']" />
+ <remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_ACCESSIBLE_DESC_S']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_id']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_status']" />
@@ -54,7 +54,7 @@
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_label']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_label_guide']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_ordering_index']" />
- <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_accessible_name']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_accessible_desc']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_status']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_icon']" />
@@ -62,5 +62,5 @@
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_attention_icon']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_label']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_ordering_index']" />
- <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_accessible_name']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_accessible_desc']" />
</metadata>
diff --git a/bindings/python/appindicator.defs b/bindings/python/appindicator.defs
index 8c4efb3..cc8ae75 100644
--- a/bindings/python/appindicator.defs
+++ b/bindings/python/appindicator.defs
@@ -72,12 +72,12 @@
)
)
-(define-method set_accessible_name
+(define-method set_accessible_desc
(of-object "AppIndicator")
- (c-name "app_indicator_set_accessible_name")
+ (c-name "app_indicator_set_accessible_desc")
(return-type "none")
(parameters
- '("const-gchar*" "accessible_name" (null-ok))
+ '("const-gchar*" "accessible_desc" (null-ok))
)
)
@@ -155,9 +155,9 @@
(return-type "const-gchar*")
)
-(define-method get_accessible_name
+(define-method get_accessible_desc
(of-object "AppIndicator")
- (c-name "app_indicator_get_accessible_name")
+ (c-name "app_indicator_get_accessible_desc")
(return-type "const-gchar*")
)
diff --git a/docs/reference/libappindicator-sections.txt b/docs/reference/libappindicator-sections.txt
index 3434588..602e8d9 100644
--- a/docs/reference/libappindicator-sections.txt
+++ b/docs/reference/libappindicator-sections.txt
@@ -10,7 +10,7 @@ APP_INDICATOR_SIGNAL_NEW_ICON
APP_INDICATOR_SIGNAL_NEW_ATTENTION_ICON
APP_INDICATOR_SIGNAL_NEW_STATUS
APP_INDICATOR_SIGNAL_NEW_LABEL
-APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_NAME
+APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_DESC
APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH
APP_INDICATOR_SIGNAL_CONNECTION_CHANGED
AppIndicatorCategory
@@ -28,7 +28,7 @@ app_indicator_set_menu
app_indicator_set_icon
app_indicator_set_icon_theme_path
app_indicator_set_label
-app_indicator_set_accessible_name
+app_indicator_set_accessible_desc
app_indicator_set_ordering_index
app_indicator_get_id
app_indicator_get_category
@@ -39,7 +39,7 @@ app_indicator_get_attention_icon
app_indicator_get_menu
app_indicator_get_label
app_indicator_get_label_guide
-app_indicator_get_accessible_name
+app_indicator_get_accessible_desc
app_indicator_get_ordering_index
app_indicator_build_menu_from_desktop
</SECTION>
diff --git a/example/simple-client.c b/example/simple-client.c
index 9c9a14b..d5c9ad8 100644
--- a/example/simple-client.c
+++ b/example/simple-client.c
@@ -49,9 +49,9 @@ a11yname_toggle_cb (GtkWidget * widget, gpointer data)
can_haz_a11yname = !can_haz_a11yname;
if (can_haz_a11yname) {
- gtk_menu_item_set_label(GTK_MENU_ITEM(widget), "Hide accessible name");
+ gtk_menu_item_set_label(GTK_MENU_ITEM(widget), "Hide accessible description");
} else {
- gtk_menu_item_set_label(GTK_MENU_ITEM(widget), "Show accessible name");
+ gtk_menu_item_set_label(GTK_MENU_ITEM(widget), "Show accessible description");
}
return;
@@ -157,10 +157,10 @@ percent_change (gpointer user_data)
}
if (can_haz_a11yname) {
gchar * percentstr = g_strdup_printf("%d%%", percentage + 1);
- app_indicator_set_accessible_name (APP_INDICATOR(user_data), percentstr);
+ app_indicator_set_accessible_desc (APP_INDICATOR(user_data), percentstr);
g_free(percentstr);
} else {
- app_indicator_set_accessible_name (APP_INDICATOR(user_data), NULL);
+ app_indicator_set_accessible_desc (APP_INDICATOR(user_data), NULL);
}
return TRUE;
}
@@ -235,7 +235,7 @@ main (int argc, char ** argv)
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show(item);
- item = gtk_menu_item_new_with_label ("Show accessible name");
+ item = gtk_menu_item_new_with_label ("Show accessible description");
a11yname_toggle_cb(item, ci);
g_signal_connect (item, "activate",
G_CALLBACK (a11yname_toggle_cb), ci);
diff --git a/src/app-indicator.c b/src/app-indicator.c
index de9dd39..a5045e3 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -80,9 +80,9 @@ struct _AppIndicatorPrivate {
guint32 ordering_index;
gchar * label;
gchar * label_guide;
- gchar * accessible_name;
+ gchar * accessible_desc;
guint label_change_idle;
- guint accessible_name_change_idle;
+ guint accessible_desc_change_idle;
GtkStatusIcon * status_icon;
gint fallback_timer;
@@ -106,7 +106,7 @@ enum {
CONNECTION_CHANGED,
NEW_ICON_THEME_PATH,
SCROLL_EVENT,
- NEW_ACCESSIBLE_NAME,
+ NEW_ACCESSIBLE_DESC,
LAST_SIGNAL
};
@@ -127,7 +127,7 @@ enum {
PROP_LABEL_GUIDE,
PROP_ORDERING_INDEX,
PROP_DBUS_MENU_SERVER,
- PROP_ACCESSIBLE_NAME
+ PROP_ACCESSIBLE_DESC
};
/* The strings so that they can be slowly looked up. */
@@ -142,7 +142,7 @@ enum {
#define PROP_LABEL_GUIDE_S "label-guide"
#define PROP_ORDERING_INDEX_S "ordering-index"
#define PROP_DBUS_MENU_SERVER_S "dbus-menu-server"
-#define PROP_ACCESSIBLE_NAME_S "accessible-name"
+#define PROP_ACCESSIBLE_DESC_S "accessible-desc"
/* Private macro, shhhh! */
#define APP_INDICATOR_GET_PRIVATE(o) \
@@ -170,7 +170,7 @@ static void app_indicator_set_property (GObject * object, guint prop_id, const G
static void app_indicator_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec);
/* Other stuff */
static void signal_label_change (AppIndicator * self);
-static void signal_accessible_name_change (AppIndicator * self);
+static void signal_accessible_desc_change (AppIndicator * self);
static void check_connect (AppIndicator * self);
static void register_service_cb (GObject * obj, GAsyncResult * res, gpointer user_data);
static void start_fallback_timer (AppIndicator * self, gboolean disable_timeout);
@@ -352,7 +352,7 @@ app_indicator_class_init (AppIndicatorClass *klass)
NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
- AppIndicator:accessible-name:
+ AppIndicator:accessible-desc:
A string that describes the indicator in text form. This string is
used to identify the indicator to users of assistive technologies, such
@@ -361,10 +361,10 @@ app_indicator_class_init (AppIndicatorClass *klass)
information about the state of the indicator to the user.
*/
g_object_class_install_property(object_class,
- PROP_ACCESSIBLE_NAME,
- g_param_spec_string (PROP_ACCESSIBLE_NAME_S,
+ PROP_ACCESSIBLE_DESC,
+ g_param_spec_string (PROP_ACCESSIBLE_DESC_S,
"A string that describes the indicator in text form.",
- "This string shoudl convey a description of the indicator's current status, for users who use assistive technologies.",
+ "This string should convey a description of the indicator's current status, for users who use assistive technologies.",
NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
@@ -465,16 +465,16 @@ app_indicator_class_init (AppIndicatorClass *klass)
G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
/**
- AppIndicator::new-accessible-name:
+ AppIndicator::new-accessible-desc:
@arg0: The #AppIndicator object
- @arg1: The string for the accessible name
+ @arg1: The string for the accessible description
- Emitted when #AppIndicator:accessible_name changes.
+ Emitted when #AppIndicator:accessible_desc changes.
*/
- signals[NEW_ACCESSIBLE_NAME] = g_signal_new (APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_NAME,
+ signals[NEW_ACCESSIBLE_DESC] = g_signal_new (APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_DESC,
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (AppIndicatorClass, new_accessible_name),
+ G_STRUCT_OFFSET (AppIndicatorClass, new_accessible_desc),
NULL, NULL,
_application_service_marshal_VOID__STRING_STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
@@ -583,7 +583,7 @@ app_indicator_init (AppIndicator *self)
priv->label = NULL;
priv->label_guide = NULL;
priv->label_change_idle = 0;
- priv->accessible_name_change_idle = 0;
+ priv->accessible_desc_change_idle = 0;
priv->watcher_proxy = NULL;
priv->connection = NULL;
@@ -647,9 +647,9 @@ app_indicator_dispose (GObject *object)
priv->label_change_idle = 0;
}
- if (priv->accessible_name_change_idle != 0) {
- g_source_remove(priv->accessible_name_change_idle);
- priv->accessible_name_change_idle = 0;
+ if (priv->accessible_desc_change_idle != 0) {
+ g_source_remove(priv->accessible_desc_change_idle);
+ priv->accessible_desc_change_idle = 0;
}
if (priv->menu != NULL) {
@@ -729,9 +729,9 @@ app_indicator_finalize (GObject *object)
priv->label_guide = NULL;
}
- if (priv->accessible_name != NULL) {
- g_free(priv->accessible_name);
- priv->accessible_name = NULL;
+ if (priv->accessible_desc != NULL) {
+ g_free(priv->accessible_desc);
+ priv->accessible_desc = NULL;
}
if (priv->path != NULL) {
@@ -845,21 +845,21 @@ app_indicator_set_property (GObject * object, guint prop_id, const GValue * valu
}
break;
}
- case PROP_ACCESSIBLE_NAME: {
- gchar * olda11yname = priv->accessible_name;
- priv->accessible_name = g_value_dup_string(value);
+ case PROP_ACCESSIBLE_DESC: {
+ gchar * olda11ydesc = priv->accessible_desc;
+ priv->accessible_desc = g_value_dup_string(value);
- if (g_strcmp0(olda11yname, priv->accessible_name) != 0) {
- signal_accessible_name_change(APP_INDICATOR(object));
+ if (g_strcmp0(olda11ydesc, priv->accessible_desc) != 0) {
+ signal_accessible_desc_change(APP_INDICATOR(object));
}
- if (priv->accessible_name != NULL && priv->accessible_name[0] == '\0') {
- g_free(priv->accessible_name);
- priv->accessible_name = NULL;
+ if (priv->accessible_desc != NULL && priv->accessible_desc[0] == '\0') {
+ g_free(priv->accessible_desc);
+ priv->accessible_desc = NULL;
}
- if (olda11yname != NULL) {
- g_free(olda11yname);
+ if (olda11ydesc != NULL) {
+ g_free(olda11ydesc);
}
break;
}
@@ -941,8 +941,8 @@ app_indicator_get_property (GObject * object, guint prop_id, GValue * value, GPa
g_value_set_string (value, priv->label_guide);
break;
- case PROP_ACCESSIBLE_NAME:
- g_value_set_string (value, priv->accessible_name);
+ case PROP_ACCESSIBLE_DESC:
+ g_value_set_string (value, priv->accessible_desc);
break;
case PROP_ORDERING_INDEX:
@@ -1067,8 +1067,8 @@ bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar *
return g_variant_new_string(priv->label_guide ? priv->label_guide : "");
} else if (g_strcmp0(property, "XAyatanaOrderingIndex") == 0) {
return g_variant_new_uint32(priv->ordering_index);
- } else if (g_strcmp0(property, "AccessibleName") == 0) {
- return g_variant_new_string(priv->accessible_name ? priv->accessible_name : "");
+ } else if (g_strcmp0(property, "AccessibleDesc") == 0) {
+ return g_variant_new_string(priv->accessible_desc ? priv->accessible_desc : "");
}
*error = g_error_new(0, 0, "Unknown property: %s", property);
@@ -1125,17 +1125,17 @@ signal_label_change (AppIndicator * self)
return;
}
-/* Sends the accessible name changed signal and resets the source ID */
+/* Sends the accessible description changed signal and resets the source ID */
static gboolean
-signal_accessible_name_change_idle (gpointer user_data)
+signal_accessible_desc_change_idle (gpointer user_data)
{
AppIndicator * self = (AppIndicator *)user_data;
AppIndicatorPrivate *priv = self->priv;
- gchar * accessible_name = priv->accessible_name != NULL ? priv->accessible_name : "";
+ gchar * accessible_desc = priv->accessible_desc != NULL ? priv->accessible_desc : "";
- g_signal_emit(G_OBJECT(self), signals[NEW_ACCESSIBLE_NAME], 0,
- accessible_name, TRUE);
+ g_signal_emit(G_OBJECT(self), signals[NEW_ACCESSIBLE_DESC], 0,
+ accessible_desc, TRUE);
if (priv->dbus_registration != 0 && priv->connection != NULL) {
GError * error = NULL;
@@ -1143,34 +1143,34 @@ signal_accessible_name_change_idle (gpointer user_data)
NULL,
priv->path,
NOTIFICATION_ITEM_DBUS_IFACE,
- "NewAccessibleName",
- g_variant_new("(s)", accessible_name),
+ "NewAccessibleDesc",
+ g_variant_new("(s)", accessible_desc),
&error);
if (error != NULL) {
- g_warning("Unable to send signal for NewIcon: %s", error->message);
+ g_warning("Unable to send signal for NewAccessibleDesc: %s", error->message);
g_error_free(error);
}
}
- priv->accessible_name_change_idle = 0;
+ priv->accessible_desc_change_idle = 0;
return FALSE;
}
-/* Sets up an idle function to send the accessible name changed
- signal so that we don't send it too many times. */
+/* Sets up an idle function to send the accessible description
+ changed signal so that we don't send it too many times. */
static void
-signal_accessible_name_change (AppIndicator * self)
+signal_accessible_desc_change (AppIndicator * self)
{
AppIndicatorPrivate *priv = self->priv;
/* don't set it twice */
- if (priv->accessible_name_change_idle != 0) {
+ if (priv->accessible_desc_change_idle != 0) {
return;
}
- priv->accessible_name_change_idle = g_idle_add(signal_accessible_name_change_idle, self);
+ priv->accessible_desc_change_idle = g_idle_add(signal_accessible_desc_change_idle, self);
return;
}
@@ -1840,22 +1840,22 @@ app_indicator_set_label (AppIndicator *self, const gchar * label, const gchar *
}
/**
- app_indicator_set_accessible_name:
+ app_indicator_set_accessible_desc:
@self: The #AppIndicator object to use
- @accessible_name: The accessible name used by assistive technologies.
+ @accessible_desc: The accessible description used by assistive technologies.
- This is a wrapper function for the #AppIndicator:accessible_name
- property. This function can take #NULL as @accessible_name and
+ This is a wrapper function for the #AppIndicator:accessible_desc
+ property. This function can take #NULL as @accessible_desc and
will clear the entry.
*/
void
-app_indicator_set_accessible_name (AppIndicator *self, const gchar * accessible_name)
+app_indicator_set_accessible_desc (AppIndicator *self, const gchar * accessible_desc)
{
g_return_if_fail (IS_APP_INDICATOR (self));
- /* Note: The accessible name can be NULL, it's okay */
+ /* Note: The accessible description can be NULL, it's okay */
g_object_set(G_OBJECT(self),
- PROP_ACCESSIBLE_NAME_S, accessible_name == NULL ? "" : accessible_name,
+ PROP_ACCESSIBLE_DESC_S, accessible_desc == NULL ? "" : accessible_desc,
NULL);
return;
@@ -2156,19 +2156,19 @@ app_indicator_get_label_guide (AppIndicator *self)
}
/**
- app_indicator_get_accessible_name:
+ app_indicator_get_accessible_desc:
@self: The #AppIndicator object to use
- Wrapper function for property #AppIndicator:accessible_name.
+ Wrapper function for property #AppIndicator:accessible_desc.
- Return value: The current accessible name.
+ Return value: The current accessible description.
*/
const gchar *
-app_indicator_get_accessible_name (AppIndicator *self)
+app_indicator_get_accessible_desc (AppIndicator *self)
{
g_return_val_if_fail (IS_APP_INDICATOR (self), NULL);
- return self->priv->accessible_name;
+ return self->priv->accessible_desc;
}
/**
diff --git a/src/app-indicator.h b/src/app-indicator.h
index 0d4473d..0807eee 100644
--- a/src/app-indicator.h
+++ b/src/app-indicator.h
@@ -113,9 +113,9 @@ G_BEGIN_DECLS
String identifier for the #AppIndicator::scroll-event signal.
*/
/**
- APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_NAME:
+ APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_DESC:
- String identifier for the #AppIndicator::new-accessible-name signal.
+ String identifier for the #AppIndicator::new-accessible-desc signal.
*/
#define APP_INDICATOR_SIGNAL_NEW_ICON "new-icon"
#define APP_INDICATOR_SIGNAL_NEW_ATTENTION_ICON "new-attention-icon"
@@ -124,7 +124,7 @@ G_BEGIN_DECLS
#define APP_INDICATOR_SIGNAL_CONNECTION_CHANGED "connection-changed"
#define APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH "new-icon-theme-path"
#define APP_INDICATOR_SIGNAL_SCROLL_EVENT "scroll-event"
-#define APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_NAME "new-accessible-name"
+#define APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_DESC "new-accessible-desc"
/**
AppIndicatorCategory:
@@ -174,7 +174,7 @@ typedef struct _AppIndicatorPrivate AppIndicatorPrivate;
@new_status: Slot for #AppIndicator::new-status.
@new_icon_theme_path: Slot for #AppIndicator::new-icon-theme-path
@new_label: Slot for #AppIndicator::new-label.
- @new_accessible_name: Slot for #AppIndicator::new-accessible-name.
+ @new_accessible_desc: Slot for #AppIndicator::new-accessible-desc.
@connection_changed: Slot for #AppIndicator::connection-changed.
@scroll-event: Slot for #AppIndicator::scroll-event
@app_indicator_reserved_ats: Reserved for future use.
@@ -211,8 +211,8 @@ struct _AppIndicatorClass {
const gchar *label,
const gchar *guide,
gpointer user_data);
- void (* new_accessible_name) (AppIndicator *indicator,
- const gchar *accessible_name);
+ void (* new_accessible_desc) (AppIndicator *indicator,
+ const gchar *accessible_desc);
/* Local Signals */
@@ -284,8 +284,8 @@ void app_indicator_set_icon (AppIndicator
void app_indicator_set_label (AppIndicator *self,
const gchar *label,
const gchar *guide);
-void app_indicator_set_accessible_name(AppIndicator *self,
- const gchar *accessible_name);
+void app_indicator_set_accessible_desc(AppIndicator *self,
+ const gchar *accessible_desc);
void app_indicator_set_icon_theme_path(AppIndicator *self,
const gchar *icon_theme_path);
void app_indicator_set_ordering_index (AppIndicator *self,
@@ -301,7 +301,7 @@ const gchar * app_indicator_get_attention_icon (AppIndicator *
GtkMenu * app_indicator_get_menu (AppIndicator *self);
const gchar * app_indicator_get_label (AppIndicator *self);
const gchar * app_indicator_get_label_guide (AppIndicator *self);
-const gchar * app_indicator_get_accessible_name(AppIndicator *self);
+const gchar * app_indicator_get_accessible_desc(AppIndicator *self);
guint32 app_indicator_get_ordering_index (AppIndicator *self);
/* Helpers */
diff --git a/src/notification-item.xml b/src/notification-item.xml
index 737ecb3..3e5b3ff 100644
--- a/src/notification-item.xml
+++ b/src/notification-item.xml
@@ -15,7 +15,7 @@
<property name="XAyatanaLabel" type="s" access="read" />
<property name="XAyatanaLabelGuide" type="s" access="read" />
<property name="XAyatanaOrderingIndex" type="u" access="read" />
- <property name="AccessibleName" type="s" access="read" />
+ <property name="AccessibleDesc" type="s" access="read" />
<!-- Methods -->
<method name="Scroll">
@@ -38,8 +38,8 @@
<arg type="s" name="label" direction="out" />
<arg type="s" name="guide" direction="out" />
</signal>
- <signal name="AccessibleName">
- <arg type="s" name="accessible_name" direction="out" />
+ <signal name="AccessibleDesc">
+ <arg type="s" name="accessible_desc" direction="out" />
</signal>
</interface>
diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c
index 0b866f8..d62226e 100644
--- a/tests/test-libappindicator.c
+++ b/tests/test-libappindicator.c
@@ -228,40 +228,40 @@ test_libappindicator_set_label (void)
}
void
-test_libappindicator_set_accessible_name (void)
+test_libappindicator_set_accessible_desc (void)
{
AppIndicator * ci = app_indicator_new ("my-id",
"my-name",
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
g_assert(ci != NULL);
- g_assert(app_indicator_get_accessible_name(ci) == NULL);
+ g_assert(app_indicator_get_accessible_desc(ci) == NULL);
/* First check all the clearing modes, this is important as
we're going to use them later, we need them to work. */
- app_indicator_set_accessible_name(ci, NULL);
+ app_indicator_set_accessible_desc(ci, NULL);
- g_assert(app_indicator_get_accessible_name(ci) == NULL);
+ g_assert(app_indicator_get_accessible_desc(ci) == NULL);
- app_indicator_set_accessible_name(ci, "");
+ app_indicator_set_accessible_desc(ci, "");
- g_assert(app_indicator_get_accessible_name(ci) == NULL);
+ g_assert(app_indicator_get_accessible_desc(ci) == NULL);
- app_indicator_set_accessible_name(ci, "accessible_name");
+ app_indicator_set_accessible_desc(ci, "accessible_desc");
- g_assert(g_strcmp0(app_indicator_get_accessible_name(ci), "accessible_name") == 0);
+ g_assert(g_strcmp0(app_indicator_get_accessible_desc(ci), "accessible_desc") == 0);
- app_indicator_set_accessible_name(ci, NULL);
+ app_indicator_set_accessible_desc(ci, NULL);
- g_assert(app_indicator_get_accessible_name(ci) == NULL);
+ g_assert(app_indicator_get_accessible_desc(ci) == NULL);
- app_indicator_set_accessible_name(ci, "accessible_name2");
+ app_indicator_set_accessible_desc(ci, "accessible_desc2");
- g_assert(g_strcmp0(app_indicator_get_accessible_name(ci), "accessible_name2") == 0);
+ g_assert(g_strcmp0(app_indicator_get_accessible_desc(ci), "accessible_desc2") == 0);
- app_indicator_set_accessible_name(ci, "trick-accessible_name");
+ app_indicator_set_accessible_desc(ci, "trick-accessible_desc");
- g_assert(g_strcmp0(app_indicator_get_accessible_name(ci), "trick-accessible_name") == 0);
+ g_assert(g_strcmp0(app_indicator_get_accessible_desc(ci), "trick-accessible_desc") == 0);
g_object_unref(G_OBJECT(ci));
return;
@@ -327,10 +327,10 @@ label_signals_cb (AppIndicator * appindicator, gchar * label, gchar * guide, gpo
}
void
-accessible_name_signals_cb (AppIndicator * appindicator, gchar * accessible_name, gpointer user_data)
+accessible_desc_signals_cb (AppIndicator * appindicator, gchar * accessible_desc, gpointer user_data)
{
- gint * accessible_name_signals_count = (gint *)user_data;
- (*accessible_name_signals_count)++;
+ gint * accessible_desc_signals_count = (gint *)user_data;
+ (*accessible_desc_signals_count)++;
return;
}
@@ -345,7 +345,7 @@ label_signals_check (void)
}
void
-accessible_name_signals_check (void)
+accessible_desc_signals_check (void)
{
while (g_main_context_pending(NULL)) {
g_main_context_iteration(NULL, TRUE);
@@ -406,51 +406,51 @@ test_libappindicator_label_signals (void)
}
void
-test_libappindicator_accessible_name_signals (void)
+test_libappindicator_accessible_desc_signals (void)
{
- gint accessible_name_signals_count = 0;
+ gint accessible_desc_signals_count = 0;
AppIndicator * ci = app_indicator_new ("my-id",
"my-name",
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
g_assert(ci != NULL);
- g_assert(app_indicator_get_accessible_name(ci) == NULL);
+ g_assert(app_indicator_get_accessible_desc(ci) == NULL);
- g_signal_connect(G_OBJECT(ci), APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_NAME, G_CALLBACK(accessible_name_signals_cb), &accessible_name_signals_count);
+ g_signal_connect(G_OBJECT(ci), APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_DESC, G_CALLBACK(accessible_desc_signals_cb), &accessible_desc_signals_count);
/* Shouldn't be a signal as it should be stuck in idle */
- app_indicator_set_accessible_name(ci, "accessible_name");
- g_assert(accessible_name_signals_count == 0);
+ app_indicator_set_accessible_desc(ci, "accessible_desc");
+ g_assert(accessible_desc_signals_count == 0);
/* Should show up after idle processing */
- accessible_name_signals_check();
- g_assert(accessible_name_signals_count == 1);
+ accessible_desc_signals_check();
+ g_assert(accessible_desc_signals_count == 1);
/* Shouldn't signal with no change */
- accessible_name_signals_count = 0;
- app_indicator_set_accessible_name(ci, "accessible_name");
- accessible_name_signals_check();
- g_assert(accessible_name_signals_count == 0);
+ accessible_desc_signals_count = 0;
+ app_indicator_set_accessible_desc(ci, "accessible_desc");
+ accessible_desc_signals_check();
+ g_assert(accessible_desc_signals_count == 0);
/* Change one, we should get one signal */
- app_indicator_set_accessible_name(ci, "accessible_name2");
- accessible_name_signals_check();
- g_assert(accessible_name_signals_count == 1);
+ app_indicator_set_accessible_desc(ci, "accessible_desc2");
+ accessible_desc_signals_check();
+ g_assert(accessible_desc_signals_count == 1);
/* Change several times, one signal */
- accessible_name_signals_count = 0;
- app_indicator_set_accessible_name(ci, "accessible_name1");
- app_indicator_set_accessible_name(ci, "accessible_name1");
- app_indicator_set_accessible_name(ci, "accessible_name2");
- app_indicator_set_accessible_name(ci, "accessible_name3");
- accessible_name_signals_check();
- g_assert(accessible_name_signals_count == 1);
+ accessible_desc_signals_count = 0;
+ app_indicator_set_accessible_desc(ci, "accessible_desc1");
+ app_indicator_set_accessible_desc(ci, "accessible_desc1");
+ app_indicator_set_accessible_desc(ci, "accessible_desc2");
+ app_indicator_set_accessible_desc(ci, "accessible_desc3");
+ accessible_desc_signals_check();
+ g_assert(accessible_desc_signals_count == 1);
/* Clear should signal too */
- accessible_name_signals_count = 0;
- app_indicator_set_accessible_name(ci, NULL);
- accessible_name_signals_check();
- g_assert(accessible_name_signals_count == 1);
+ accessible_desc_signals_count = 0;
+ app_indicator_set_accessible_desc(ci, NULL);
+ accessible_desc_signals_check();
+ g_assert(accessible_desc_signals_count == 1);
return;
}
@@ -536,8 +536,8 @@ test_libappindicator_props_suite (void)
g_test_add_func ("/indicator-application/libappindicator/label_signals", test_libappindicator_label_signals);
g_test_add_func ("/indicator-application/libappindicator/desktop_menu", test_libappindicator_desktop_menu);
g_test_add_func ("/indicator-application/libappindicator/desktop_menu_bad",test_libappindicator_desktop_menu_bad);
- g_test_add_func ("/indicator-application/libappindicator/set_accessible_name",test_libappindicator_set_accessible_name);
- g_test_add_func ("/indicator-application/libappindicator/accessible_name_signals",test_libappindicator_accessible_name_signals);
+ g_test_add_func ("/indicator-application/libappindicator/set_accessible_desc",test_libappindicator_set_accessible_desc);
+ g_test_add_func ("/indicator-application/libappindicator/accessible_desc_signals",test_libappindicator_accessible_desc_signals);
return;
}