From b13fa490fb368b779a99543d18d5c68c01f8eb31 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Fri, 4 Feb 2011 13:57:23 +1100 Subject: Add accessible_name support --- bindings/mono/Makefile.am | 1 + bindings/mono/libappindicator-api.metadata | 6 ++ bindings/python/appindicator.defs | 15 +++ docs/reference/libappindicator-sections.txt | 3 + example/simple-client.c | 29 +++++ src/app-indicator.c | 161 +++++++++++++++++++++++++++- src/app-indicator.h | 13 +++ src/notification-item.xml | 4 + tests/test-libappindicator.c | 110 +++++++++++++++++++ 9 files changed, 341 insertions(+), 1 deletion(-) diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am index dfaa41f..1f23742 100644 --- a/bindings/mono/Makefile.am +++ b/bindings/mono/Makefile.am @@ -94,6 +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|" \ $< > $@ api_includes = $(GTK_SHARP_CFLAGS) diff --git a/bindings/mono/libappindicator-api.metadata b/bindings/mono/libappindicator-api.metadata index ccf58f1..d818e60 100644 --- a/bindings/mono/libappindicator-api.metadata +++ b/bindings/mono/libappindicator-api.metadata @@ -7,6 +7,8 @@ new-status NewLabel new-label + NewAccessibleName + new-accessible-name ConnectionChanged connection-changed NewIcon @@ -24,6 +26,7 @@ Connected Label LabelGuide + AccessibleName OrderingIndex SetMenu @@ -38,6 +41,7 @@ + @@ -48,6 +52,7 @@ + @@ -55,4 +60,5 @@ + diff --git a/bindings/python/appindicator.defs b/bindings/python/appindicator.defs index 5027a6d..8c4efb3 100644 --- a/bindings/python/appindicator.defs +++ b/bindings/python/appindicator.defs @@ -72,6 +72,15 @@ ) ) +(define-method set_accessible_name + (of-object "AppIndicator") + (c-name "app_indicator_set_accessible_name") + (return-type "none") + (parameters + '("const-gchar*" "accessible_name" (null-ok)) + ) +) + (define-method set_ordering_index (of-object "AppIndicator") (c-name "app_indicator_set_ordering_index") @@ -146,6 +155,12 @@ (return-type "const-gchar*") ) +(define-method get_accessible_name + (of-object "AppIndicator") + (c-name "app_indicator_get_accessible_name") + (return-type "const-gchar*") +) + (define-method get_ordering_index (of-object "AppIndicator") (c-name "app_indicator_get_ordering_index") diff --git a/docs/reference/libappindicator-sections.txt b/docs/reference/libappindicator-sections.txt index 41ff7fa..3434588 100644 --- a/docs/reference/libappindicator-sections.txt +++ b/docs/reference/libappindicator-sections.txt @@ -10,6 +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_ICON_THEME_PATH APP_INDICATOR_SIGNAL_CONNECTION_CHANGED AppIndicatorCategory @@ -27,6 +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_ordering_index app_indicator_get_id app_indicator_get_category @@ -37,6 +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_ordering_index app_indicator_build_menu_from_desktop diff --git a/example/simple-client.c b/example/simple-client.c index ac8360f..9c9a14b 100644 --- a/example/simple-client.c +++ b/example/simple-client.c @@ -27,6 +27,7 @@ with this program. If not, see . GMainLoop * mainloop = NULL; static gboolean active = TRUE; static gboolean can_haz_label = TRUE; +static gboolean can_haz_a11yname = TRUE; static void label_toggle_cb (GtkWidget * widget, gpointer data) @@ -42,6 +43,20 @@ label_toggle_cb (GtkWidget * widget, gpointer data) return; } +static void +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"); + } else { + gtk_menu_item_set_label(GTK_MENU_ITEM(widget), "Show accessible name"); + } + + return; +} + static void activate_clicked_cb (GtkWidget *widget, gpointer data) { @@ -140,6 +155,13 @@ percent_change (gpointer user_data) } else { app_indicator_set_label (APP_INDICATOR(user_data), NULL, NULL); } + if (can_haz_a11yname) { + gchar * percentstr = g_strdup_printf("%d%%", percentage + 1); + app_indicator_set_accessible_name (APP_INDICATOR(user_data), percentstr); + g_free(percentstr); + } else { + app_indicator_set_accessible_name (APP_INDICATOR(user_data), NULL); + } return TRUE; } @@ -213,6 +235,13 @@ 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"); + a11yname_toggle_cb(item, ci); + g_signal_connect (item, "activate", + G_CALLBACK (a11yname_toggle_cb), ci); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + gtk_widget_show(item); + app_indicator_set_menu (ci, GTK_MENU (menu)); mainloop = g_main_loop_new(NULL, FALSE); diff --git a/src/app-indicator.c b/src/app-indicator.c index 039b980..f815fac 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -80,7 +80,9 @@ struct _AppIndicatorPrivate { guint32 ordering_index; gchar * label; gchar * label_guide; + gchar * accessible_name; guint label_change_idle; + guint accessible_name_change_idle; GtkStatusIcon * status_icon; gint fallback_timer; @@ -103,6 +105,7 @@ enum { NEW_LABEL, CONNECTION_CHANGED, NEW_ICON_THEME_PATH, + NEW_ACCESSIBLE_NAME, LAST_SIGNAL }; @@ -122,7 +125,8 @@ enum { PROP_LABEL, PROP_LABEL_GUIDE, PROP_ORDERING_INDEX, - PROP_DBUS_MENU_SERVER + PROP_DBUS_MENU_SERVER, + PROP_ACCESSIBLE_NAME }; /* The strings so that they can be slowly looked up. */ @@ -137,6 +141,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" /* Private macro, shhhh! */ #define APP_INDICATOR_GET_PRIVATE(o) \ @@ -164,6 +169,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 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); @@ -341,6 +347,22 @@ app_indicator_class_init (AppIndicatorClass *klass) "To ensure that the label does not cause the panel to 'jiggle' this string should provide information on how much space it could take.", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + AppIndicator:accessible-name: + + A string that describes the indicator in text form. This string is + used to identify the indicator to users of assistive technologies, such + as screen readers. If the indicator has a label, then duplicating the + contents of the label is fine, if the label alone conveys enough + 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, + "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.", + NULL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** AppIndicator:ordering-index: @@ -438,6 +460,21 @@ app_indicator_class_init (AppIndicatorClass *klass) _application_service_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); + /** + AppIndicator::new-accessible-name: + @arg0: The #AppIndicator object + @arg1: The string for the accessible name + + Emitted when #AppIndicator:accessible_name changes. + */ + signals[NEW_ACCESSIBLE_NAME] = g_signal_new (APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_NAME, + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AppIndicatorClass, new_accessible_name), + NULL, NULL, + _application_service_marshal_VOID__STRING_STRING, + G_TYPE_NONE, 1, G_TYPE_STRING); + /** AppIndicator::connection-changed: @@ -527,6 +564,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->watcher_proxy = NULL; priv->connection = NULL; @@ -590,6 +628,11 @@ 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->menu != NULL) { g_signal_handlers_disconnect_by_func (G_OBJECT (priv->menu), client_menu_changed, @@ -667,6 +710,11 @@ 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->path != NULL) { g_free(priv->path); priv->path = NULL; @@ -778,6 +826,24 @@ 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); + + if (g_strcmp0(olda11yname, priv->accessible_name) != 0) { + signal_accessible_name_change(APP_INDICATOR(object)); + } + + if (priv->accessible_name != NULL && priv->accessible_name[0] == '\0') { + g_free(priv->accessible_name); + priv->accessible_name = NULL; + } + + if (olda11yname != NULL) { + g_free(olda11yname); + } + break; + } case PROP_ORDERING_INDEX: priv->ordering_index = g_value_get_uint(value); break; @@ -856,6 +922,10 @@ 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); + break; + case PROP_ORDERING_INDEX: g_value_set_uint(value, priv->ordering_index); break; @@ -941,6 +1011,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 : ""); } *error = g_error_new(0, 0, "Unknown property: %s", property); @@ -997,6 +1069,55 @@ signal_label_change (AppIndicator * self) return; } +/* Sends the accessible name changed signal and resets the source ID */ +static gboolean +signal_accessible_name_change_idle (gpointer user_data) +{ + AppIndicator * self = (AppIndicator *)user_data; + AppIndicatorPrivate *priv = self->priv; + + gchar * accessible_name = priv->accessible_name != NULL ? priv->accessible_name : ""; + + g_signal_emit(G_OBJECT(self), signals[NEW_ACCESSIBLE_NAME], 0, + accessible_name, TRUE); + if (priv->dbus_registration != 0 && priv->connection != NULL) { + GError * error = NULL; + + g_dbus_connection_emit_signal(priv->connection, + NULL, + priv->path, + NOTIFICATION_ITEM_DBUS_IFACE, + "NewAccessibleName", + g_variant_new("(s)", accessible_name), + &error); + + if (error != NULL) { + g_warning("Unable to send signal for NewIcon: %s", error->message); + g_error_free(error); + } + } + + priv->accessible_name_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. */ +static void +signal_accessible_name_change (AppIndicator * self) +{ + AppIndicatorPrivate *priv = self->priv; + + /* don't set it twice */ + if (priv->accessible_name_change_idle != 0) { + return; + } + + priv->accessible_name_change_idle = g_idle_add(signal_accessible_name_change_idle, self); + return; +} + /* This function is used to see if we have enough information to connect to things. If we do, and we're not connected, it connects for us. */ @@ -1638,6 +1759,28 @@ app_indicator_set_label (AppIndicator *self, const gchar * label, const gchar * return; } +/** + app_indicator_set_accessible_name: + @self: The #AppIndicator object to use + @accessible_name: The accessible name used by assistive technologies. + + This is a wrapper function for the #AppIndicator:accessible_name + property. This function can take #NULL as @accessible_name and + will clear the entry. +*/ +void +app_indicator_set_accessible_name (AppIndicator *self, const gchar * accessible_name) +{ + g_return_if_fail (IS_APP_INDICATOR (self)); + /* Note: The accessible name can be NULL, it's okay */ + + g_object_set(G_OBJECT(self), + PROP_ACCESSIBLE_NAME_S, accessible_name == NULL ? "" : accessible_name, + NULL); + + return; +} + /** app_indicator_set_icon_theme_path: @self: The #AppIndicator object to use @@ -1932,6 +2075,22 @@ app_indicator_get_label_guide (AppIndicator *self) return self->priv->label_guide; } +/** + app_indicator_get_accessible_name: + @self: The #AppIndicator object to use + + Wrapper function for property #AppIndicator:accessible_name. + + Return value: The current accessible name. +*/ +const gchar * +app_indicator_get_accessible_name (AppIndicator *self) +{ + g_return_val_if_fail (IS_APP_INDICATOR (self), NULL); + + return self->priv->accessible_name; +} + /** app_indicator_get_ordering_index: @self: The #AppIndicator object to use diff --git a/src/app-indicator.h b/src/app-indicator.h index 3e159db..dac87ec 100644 --- a/src/app-indicator.h +++ b/src/app-indicator.h @@ -107,12 +107,18 @@ G_BEGIN_DECLS String identifier for the #AppIndicator::new-icon-theme-path signal. */ +/** + APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_NAME: + + String identifier for the #AppIndicator::new-accessible-name signal. +*/ #define APP_INDICATOR_SIGNAL_NEW_ICON "new-icon" #define APP_INDICATOR_SIGNAL_NEW_ATTENTION_ICON "new-attention-icon" #define APP_INDICATOR_SIGNAL_NEW_STATUS "new-status" #define APP_INDICATOR_SIGNAL_NEW_LABEL "new-label" #define APP_INDICATOR_SIGNAL_CONNECTION_CHANGED "connection-changed" #define APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH "new-icon-theme-path" +#define APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_NAME "new-accessible-name" /** AppIndicatorCategory: @@ -162,6 +168,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. @connection_changed: Slot for #AppIndicator::connection-changed. @app_indicator_reserved_sw: Reserved for future use. @app_indicator_reserved_ats: Reserved for future use. @@ -198,6 +205,9 @@ struct _AppIndicatorClass { const gchar *label, const gchar *guide, gpointer user_data); + void (* new_accessible_name) (AppIndicator *indicator, + const gchar *accessible_name); + /* Local Signals */ void (* connection_changed) (AppIndicator * indicator, @@ -263,6 +273,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_icon_theme_path(AppIndicator *self, const gchar *icon_theme_path); void app_indicator_set_ordering_index (AppIndicator *self, @@ -278,6 +290,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); guint32 app_indicator_get_ordering_index (AppIndicator *self); /* Helpers */ diff --git a/src/notification-item.xml b/src/notification-item.xml index 05afd83..63f9374 100644 --- a/src/notification-item.xml +++ b/src/notification-item.xml @@ -15,6 +15,7 @@ + @@ -34,6 +35,9 @@ + + + diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c index cadf783..0b866f8 100644 --- a/tests/test-libappindicator.c +++ b/tests/test-libappindicator.c @@ -227,6 +227,46 @@ test_libappindicator_set_label (void) return; } +void +test_libappindicator_set_accessible_name (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); + + /* 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); + + g_assert(app_indicator_get_accessible_name(ci) == NULL); + + app_indicator_set_accessible_name(ci, ""); + + g_assert(app_indicator_get_accessible_name(ci) == NULL); + + app_indicator_set_accessible_name(ci, "accessible_name"); + + g_assert(g_strcmp0(app_indicator_get_accessible_name(ci), "accessible_name") == 0); + + app_indicator_set_accessible_name(ci, NULL); + + g_assert(app_indicator_get_accessible_name(ci) == NULL); + + app_indicator_set_accessible_name(ci, "accessible_name2"); + + g_assert(g_strcmp0(app_indicator_get_accessible_name(ci), "accessible_name2") == 0); + + app_indicator_set_accessible_name(ci, "trick-accessible_name"); + + g_assert(g_strcmp0(app_indicator_get_accessible_name(ci), "trick-accessible_name") == 0); + + g_object_unref(G_OBJECT(ci)); + return; +} + void test_libappindicator_set_menu (void) { @@ -286,6 +326,14 @@ label_signals_cb (AppIndicator * appindicator, gchar * label, gchar * guide, gpo return; } +void +accessible_name_signals_cb (AppIndicator * appindicator, gchar * accessible_name, gpointer user_data) +{ + gint * accessible_name_signals_count = (gint *)user_data; + (*accessible_name_signals_count)++; + return; +} + void label_signals_check (void) { @@ -296,6 +344,16 @@ label_signals_check (void) return; } +void +accessible_name_signals_check (void) +{ + while (g_main_context_pending(NULL)) { + g_main_context_iteration(NULL, TRUE); + } + + return; +} + void test_libappindicator_label_signals (void) { @@ -347,6 +405,56 @@ test_libappindicator_label_signals (void) return; } +void +test_libappindicator_accessible_name_signals (void) +{ + gint accessible_name_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_signal_connect(G_OBJECT(ci), APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_NAME, G_CALLBACK(accessible_name_signals_cb), &accessible_name_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); + + /* Should show up after idle processing */ + accessible_name_signals_check(); + g_assert(accessible_name_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); + + /* 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); + + /* 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); + + /* 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); + + return; +} + void test_libappindicator_desktop_menu (void) { @@ -428,6 +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); return; } -- cgit v1.2.3 From fffab2e1e8d991a41cc591ceaca77c8a40f31f33 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Tue, 8 Feb 2011 17:55:35 +1100 Subject: accessible_name -> accessible_desc --- bindings/mono/Makefile.am | 2 +- bindings/mono/libappindicator-api.metadata | 12 +-- bindings/python/appindicator.defs | 10 +-- docs/reference/libappindicator-sections.txt | 6 +- example/simple-client.c | 10 +-- src/app-indicator.c | 124 ++++++++++++++-------------- src/app-indicator.h | 18 ++-- src/notification-item.xml | 6 +- tests/test-libappindicator.c | 92 ++++++++++----------- 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 @@ new-status NewLabel new-label - NewAccessibleName - new-accessible-name + NewAccessibleDesc + new-accessible-desc ConnectionChanged connection-changed ScrollEvent @@ -28,7 +28,7 @@ Connected Label LabelGuide - AccessibleName + AccessibleDesc OrderingIndex SetMenu @@ -43,7 +43,7 @@ - + @@ -54,7 +54,7 @@ - + @@ -62,5 +62,5 @@ - + 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 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 @@ - + @@ -38,8 +38,8 @@ - - + + 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; } -- cgit v1.2.3 From 86d57d3066eb25150e09050b2e9cd789bc9e56da Mon Sep 17 00:00:00 2001 From: Michael Terry Date: Fri, 11 Feb 2011 13:37:19 -0500 Subject: don't unregister on dbus until after we hide appindicator --- src/app-indicator.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index f4e9173..79ced0a 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -579,11 +579,6 @@ app_indicator_dispose (GObject *object) AppIndicator *self = APP_INDICATOR (object); AppIndicatorPrivate *priv = self->priv; - if (priv->dbus_registration != 0) { - g_dbus_connection_unregister_object(priv->connection, priv->dbus_registration); - priv->dbus_registration = 0; - } - if (priv->shorties != NULL) { g_object_unref(G_OBJECT(priv->shorties)); priv->shorties = NULL; @@ -632,6 +627,11 @@ app_indicator_dispose (GObject *object) g_signal_emit (self, signals[CONNECTION_CHANGED], 0, FALSE); } + if (priv->dbus_registration != 0) { + g_dbus_connection_unregister_object(priv->connection, priv->dbus_registration); + priv->dbus_registration = 0; + } + if (priv->connection != NULL) { g_object_unref(G_OBJECT(priv->connection)); priv->connection = NULL; -- cgit v1.2.3 From d63e2d04123cb7e37fa5f9a3cb8239364d81e629 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 20:51:06 -0600 Subject: Changing the signal to match what was discussed with the KDE folks --- src/notification-item.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/notification-item.xml b/src/notification-item.xml index 3e5b3ff..bbf77c5 100644 --- a/src/notification-item.xml +++ b/src/notification-item.xml @@ -7,7 +7,9 @@ + + @@ -15,7 +17,6 @@ - @@ -38,9 +39,6 @@ - - - -- cgit v1.2.3 From 5de3ea9982cb396feceab453ce9c83032bc00074 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 21:10:58 -0600 Subject: Change the name of the accessible description and add the attention one. --- src/app-indicator.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index c3da8ed..7d849dd 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -81,6 +81,7 @@ struct _AppIndicatorPrivate { gchar * label; gchar * label_guide; gchar * accessible_desc; + gchar * att_accessible_desc; guint label_change_idle; guint accessible_desc_change_idle; @@ -736,6 +737,11 @@ app_indicator_finalize (GObject *object) priv->accessible_desc = NULL; } + if (priv->att_accessible_desc != NULL) { + g_free(priv->att_accessible_desc); + priv->att_accessible_desc = NULL; + } + if (priv->path != NULL) { g_free(priv->path); priv->path = NULL; @@ -1069,8 +1075,10 @@ 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, "AccessibleDesc") == 0) { + } else if (g_strcmp0(property, "IconAccessibleDesc") == 0) { return g_variant_new_string(priv->accessible_desc ? priv->accessible_desc : ""); + } else if (g_strcmp0(property, "AttentionAccessibleDesc") == 0) { + return g_variant_new_string(priv->att_accessible_desc ? priv->att_accessible_desc : ""); } *error = g_error_new(0, 0, "Unknown property: %s", property); -- cgit v1.2.3 From 6335283b2e1551066fd12ef89c4916122ea27ffe Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 21:14:24 -0600 Subject: Drop signaling the accessible description changed on it's own. --- src/app-indicator.c | 63 +---------------------------------------------------- 1 file changed, 1 insertion(+), 62 deletions(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index 7d849dd..858f424 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -83,7 +83,6 @@ struct _AppIndicatorPrivate { gchar * accessible_desc; gchar * att_accessible_desc; guint label_change_idle; - guint accessible_desc_change_idle; GtkStatusIcon * status_icon; gint fallback_timer; @@ -171,7 +170,6 @@ 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_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); @@ -586,7 +584,6 @@ app_indicator_init (AppIndicator *self) priv->label = NULL; priv->label_guide = NULL; priv->label_change_idle = 0; - priv->accessible_desc_change_idle = 0; priv->watcher_proxy = NULL; priv->connection = NULL; @@ -650,11 +647,6 @@ app_indicator_dispose (GObject *object) priv->label_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) { g_signal_handlers_disconnect_by_func (G_OBJECT (priv->menu), client_menu_changed, @@ -857,10 +849,6 @@ app_indicator_set_property (GObject * object, guint prop_id, const GValue * valu gchar * olda11ydesc = priv->accessible_desc; priv->accessible_desc = g_value_dup_string(value); - if (g_strcmp0(olda11ydesc, priv->accessible_desc) != 0) { - signal_accessible_desc_change(APP_INDICATOR(object)); - } - if (priv->accessible_desc != NULL && priv->accessible_desc[0] == '\0') { g_free(priv->accessible_desc); priv->accessible_desc = NULL; @@ -870,7 +858,7 @@ app_indicator_set_property (GObject * object, guint prop_id, const GValue * valu g_free(olda11ydesc); } break; - } + } case PROP_ORDERING_INDEX: priv->ordering_index = g_value_get_uint(value); break; @@ -1135,55 +1123,6 @@ signal_label_change (AppIndicator * self) return; } -/* Sends the accessible description changed signal and resets the source ID */ -static gboolean -signal_accessible_desc_change_idle (gpointer user_data) -{ - AppIndicator * self = (AppIndicator *)user_data; - AppIndicatorPrivate *priv = self->priv; - - gchar * accessible_desc = priv->accessible_desc != NULL ? priv->accessible_desc : ""; - - 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; - - g_dbus_connection_emit_signal(priv->connection, - NULL, - priv->path, - NOTIFICATION_ITEM_DBUS_IFACE, - "NewAccessibleDesc", - g_variant_new("(s)", accessible_desc), - &error); - - if (error != NULL) { - g_warning("Unable to send signal for NewAccessibleDesc: %s", error->message); - g_error_free(error); - } - } - - priv->accessible_desc_change_idle = 0; - - return FALSE; -} - -/* 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_desc_change (AppIndicator * self) -{ - AppIndicatorPrivate *priv = self->priv; - - /* don't set it twice */ - if (priv->accessible_desc_change_idle != 0) { - return; - } - - priv->accessible_desc_change_idle = g_idle_add(signal_accessible_desc_change_idle, self); - return; -} - /* This function is used to see if we have enough information to connect to things. If we do, and we're not connected, it connects for us. */ -- cgit v1.2.3 From 021dd71e638567f708d86f0805e01b055888083d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 21:18:37 -0600 Subject: Dropping the new accessible description signal --- src/app-indicator.c | 17 ----------------- src/app-indicator.h | 10 ---------- 2 files changed, 27 deletions(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index 858f424..814a8f1 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -106,7 +106,6 @@ enum { CONNECTION_CHANGED, NEW_ICON_THEME_PATH, SCROLL_EVENT, - NEW_ACCESSIBLE_DESC, LAST_SIGNAL }; @@ -463,22 +462,6 @@ app_indicator_class_init (AppIndicatorClass *klass) _application_service_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); - /** - AppIndicator::new-accessible-desc: - @arg0: The #AppIndicator object - @arg1: The string for the accessible description - - Emitted when #AppIndicator:accessible_desc changes. - */ - 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_desc), - NULL, NULL, - _application_service_marshal_VOID__STRING_STRING, - G_TYPE_NONE, 1, G_TYPE_STRING); - - /** AppIndicator::connection-changed: @arg0: The #AppIndicator object diff --git a/src/app-indicator.h b/src/app-indicator.h index 9e53447..cce6b9e 100644 --- a/src/app-indicator.h +++ b/src/app-indicator.h @@ -112,11 +112,6 @@ G_BEGIN_DECLS String identifier for the #AppIndicator::scroll-event signal. */ -/** - APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_DESC: - - 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" #define APP_INDICATOR_SIGNAL_NEW_STATUS "new-status" @@ -124,7 +119,6 @@ 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_DESC "new-accessible-desc" /** AppIndicatorCategory: @@ -174,7 +168,6 @@ 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_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,9 +204,6 @@ struct _AppIndicatorClass { const gchar *label, const gchar *guide, gpointer user_data); - void (* new_accessible_desc) (AppIndicator *indicator, - const gchar *accessible_desc); - /* Local Signals */ void (* connection_changed) (AppIndicator * indicator, -- cgit v1.2.3 From 4716fe0deefcd3e4ccbe777093427157ed6c99c6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 21:43:21 -0600 Subject: Switch around API so it makes sense for what we want to do. --- src/app-indicator.h | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/app-indicator.h b/src/app-indicator.h index cce6b9e..562de56 100644 --- a/src/app-indicator.h +++ b/src/app-indicator.h @@ -267,32 +267,37 @@ void app_indicator_set_status (AppIndicator AppIndicatorStatus status); void app_indicator_set_attention_icon (AppIndicator *self, const gchar *icon_name); +void app_indicator_set_attention_icon_full (AppIndicator *self, + const gchar *icon_name, + const gchar *icon_description); void app_indicator_set_menu (AppIndicator *self, GtkMenu *menu); void app_indicator_set_icon (AppIndicator *self, const gchar *icon_name); +void app_indicator_set_icon_full (AppIndicator *self, + const gchar *icon_name, + const gchar *icon_description); void app_indicator_set_label (AppIndicator *self, const gchar *label, const gchar *guide); -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, guint32 ordering_index); /* Get properties */ -const gchar * app_indicator_get_id (AppIndicator *self); -AppIndicatorCategory app_indicator_get_category (AppIndicator *self); -AppIndicatorStatus app_indicator_get_status (AppIndicator *self); -const gchar * app_indicator_get_icon (AppIndicator *self); -const gchar * app_indicator_get_icon_theme_path(AppIndicator *self); -const gchar * app_indicator_get_attention_icon (AppIndicator *self); -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_desc(AppIndicator *self); -guint32 app_indicator_get_ordering_index (AppIndicator *self); +const gchar * app_indicator_get_id (AppIndicator *self); +AppIndicatorCategory app_indicator_get_category (AppIndicator *self); +AppIndicatorStatus app_indicator_get_status (AppIndicator *self); +const gchar * app_indicator_get_icon (AppIndicator *self); +const gchar * app_indicator_get_icon_desc (AppIndicator *self); +const gchar * app_indicator_get_icon_theme_path (AppIndicator *self); +const gchar * app_indicator_get_attention_icon (AppIndicator *self); +const gchar * app_indicator_get_attention_icon_desc (AppIndicator *self); +GtkMenu * app_indicator_get_menu (AppIndicator *self); +const gchar * app_indicator_get_label (AppIndicator *self); +const gchar * app_indicator_get_label_guide (AppIndicator *self); +guint32 app_indicator_get_ordering_index (AppIndicator *self); /* Helpers */ void app_indicator_build_menu_from_desktop (AppIndicator * self, -- cgit v1.2.3 From 7e03eadb90bf137ff4737d796edd0b8bf61ad6f1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 21:57:03 -0600 Subject: Fixing up the set functions so we get some descriptions. --- src/app-indicator.c | 96 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 69 insertions(+), 27 deletions(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index 814a8f1..d75fce0 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -1664,20 +1664,51 @@ app_indicator_set_status (AppIndicator *self, AppIndicatorStatus status) @self: The #AppIndicator object to use @icon_name: The name of the attention icon to set for this indicator - Wrapper function for property #AppIndicator:attention-icon-name. + Wrapper for app_indicator_set_attention_icon_full() with a NULL + description. + + Deprecated: Use app_indicator_set_attention_icon_full() instead. */ void app_indicator_set_attention_icon (AppIndicator *self, const gchar *icon_name) +{ + return app_indicator_set_attention_icon_full(self, icon_name, NULL); +} + +/** + app_indicator_set_attention_icon_full: + @self: The #AppIndicator object to use + @icon_name: The name of the attention icon to set for this indicator + @icon_desc: A textual description of the icon + + Wrapper function for property #AppIndicator:attention-icon-name. +*/ +void +app_indicator_set_attention_icon_full (AppIndicator *self, const gchar *icon_name, const gchar * icon_desc) { g_return_if_fail (IS_APP_INDICATOR (self)); g_return_if_fail (icon_name != NULL); + gboolean changed = FALSE; if (g_strcmp0 (self->priv->attention_icon_name, icon_name) != 0) { - if (self->priv->attention_icon_name) + if (self->priv->attention_icon_name) { g_free (self->priv->attention_icon_name); + } self->priv->attention_icon_name = g_strdup(icon_name); + changed = TRUE; + } + + if (g_strcmp0(self->priv->att_accessible_desc, icon_desc) != 0) { + if (self->priv->att_accessible_desc) { + g_free (self->priv->att_accessible_desc); + } + self->priv->att_accessible_desc = g_strdup(icon_name); + changed = TRUE; + } + + if (changed) { g_signal_emit (self, signals[NEW_ATTENTION_ICON], 0, TRUE); if (self->priv->dbus_registration != 0 && self->priv->connection != NULL) { @@ -1706,23 +1737,56 @@ app_indicator_set_attention_icon (AppIndicator *self, const gchar *icon_name) @self: The #AppIndicator object to use @icon_name: The icon name to set. + Wrapper function for app_indicator_set_icon_full() with a NULL + description. + + Deprecated: Use app_indicator_set_icon_full() +**/ +void +app_indicator_set_icon (AppIndicator *self, const gchar *icon_name) +{ + return app_indicator_set_icon_full(self, icon_name, NULL); +} + +/** + app_indicator_set_icon_full: + @self: The #AppIndicator object to use + @icon_name: The icon name to set. + @icon_desc: A textual description of the icon for accessibility + Sets the default icon to use when the status is active but not set to attention. In most cases, this should be the application icon for the program. - Wrapper function for property #AppIndicator:icon-name. + + Wrapper function for property #AppIndicator:icon-name and + #AppIndicator::icon-description. **/ void -app_indicator_set_icon (AppIndicator *self, const gchar *icon_name) +app_indicator_set_icon_full (AppIndicator *self, const gchar *icon_name, const gchar * icon_desc) { g_return_if_fail (IS_APP_INDICATOR (self)); g_return_if_fail (icon_name != NULL); + gboolean changed = FALSE; if (g_strcmp0 (self->priv->icon_name, icon_name) != 0) { - if (self->priv->icon_name) + if (self->priv->icon_name) { g_free (self->priv->icon_name); + } self->priv->icon_name = g_strdup(icon_name); + changed = TRUE; + } + if (g_strcmp0(self->priv->accessible_desc, icon_desc) != 0) { + if (self->priv->accessible_desc != NULL) { + g_free(self->priv->accessible_desc); + } + + self->priv->accessible_desc = g_strdup(icon_desc); + changed = TRUE; + } + + if (changed) { g_signal_emit (self, signals[NEW_ICON], 0, TRUE); if (self->priv->dbus_registration != 0 && self->priv->connection != NULL) { @@ -1771,28 +1835,6 @@ app_indicator_set_label (AppIndicator *self, const gchar * label, const gchar * return; } -/** - app_indicator_set_accessible_desc: - @self: The #AppIndicator object to use - @accessible_desc: The accessible description used by assistive technologies. - - 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_desc (AppIndicator *self, const gchar * accessible_desc) -{ - g_return_if_fail (IS_APP_INDICATOR (self)); - /* Note: The accessible description can be NULL, it's okay */ - - g_object_set(G_OBJECT(self), - PROP_ACCESSIBLE_DESC_S, accessible_desc == NULL ? "" : accessible_desc, - NULL); - - return; -} - /** app_indicator_set_icon_theme_path: @self: The #AppIndicator object to use -- cgit v1.2.3 From e5b4e41bb3b71899ecc2e22fd3d8ce4badfd02ae Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 22:03:23 -0600 Subject: Fixing up the get functions --- src/app-indicator.c | 50 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index d75fce0..4f09e60 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -2044,6 +2044,22 @@ app_indicator_get_icon (AppIndicator *self) return self->priv->icon_name; } +/** + app_indicator_get_icon_desc: + @self: The #AppIndicator object to use + + Wrapper function for property #AppIndicator:icon-desc. + + Return value: The current icon description. +*/ +const gchar * +app_indicator_get_icon_desc (AppIndicator *self) +{ + g_return_val_if_fail (IS_APP_INDICATOR (self), NULL); + + return self->priv->accessible_desc; +} + /** app_indicator_get_icon_theme_path: @self: The #AppIndicator object to use @@ -2076,6 +2092,22 @@ app_indicator_get_attention_icon (AppIndicator *self) return self->priv->attention_icon_name; } +/** + app_indicator_get_attention_icon_desc: + @self: The #AppIndicator object to use + + Wrapper function for property #AppIndicator:attention-icon-desc. + + Return value: The current attention icon description. +*/ +const gchar * +app_indicator_get_attention_icon_desc (AppIndicator *self) +{ + g_return_val_if_fail (IS_APP_INDICATOR (self), NULL); + + return self->priv->att_accessible_desc; +} + /** app_indicator_get_menu: @self: The #AppIndicator object to use @@ -2083,7 +2115,7 @@ app_indicator_get_attention_icon (AppIndicator *self) Gets the menu being used for this application indicator. Wrapper function for property #AppIndicator:menu. - Return value: A #GtkMenu object or %NULL if one hasn't been set. + Return value: (transfer none): A #GtkMenu object or %NULL if one hasn't been set. */ GtkMenu * app_indicator_get_menu (AppIndicator *self) @@ -2129,22 +2161,6 @@ app_indicator_get_label_guide (AppIndicator *self) return self->priv->label_guide; } -/** - app_indicator_get_accessible_desc: - @self: The #AppIndicator object to use - - Wrapper function for property #AppIndicator:accessible_desc. - - Return value: The current accessible description. -*/ -const gchar * -app_indicator_get_accessible_desc (AppIndicator *self) -{ - g_return_val_if_fail (IS_APP_INDICATOR (self), NULL); - - return self->priv->accessible_desc; -} - /** app_indicator_get_ordering_index: @self: The #AppIndicator object to use -- cgit v1.2.3 From e3ccf5fa098bbc85cb1b1085683d2c748f1ca85b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 22:13:44 -0600 Subject: Reconfigure properties to match. --- src/app-indicator.c | 108 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 62 insertions(+), 46 deletions(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index 4f09e60..7742d30 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -119,14 +119,15 @@ enum { PROP_CATEGORY, PROP_STATUS, PROP_ICON_NAME, + PROP_ICON_DESC, PROP_ATTENTION_ICON_NAME, + PROP_ATTENTION_ICON_DESC, PROP_ICON_THEME_PATH, PROP_CONNECTED, PROP_LABEL, PROP_LABEL_GUIDE, PROP_ORDERING_INDEX, - PROP_DBUS_MENU_SERVER, - PROP_ACCESSIBLE_DESC + PROP_DBUS_MENU_SERVER }; /* The strings so that they can be slowly looked up. */ @@ -134,14 +135,15 @@ enum { #define PROP_CATEGORY_S "category" #define PROP_STATUS_S "status" #define PROP_ICON_NAME_S "icon-name" +#define PROP_ICON_DESC_S "icon-desc" #define PROP_ATTENTION_ICON_NAME_S "attention-icon-name" +#define PROP_ATTENTION_ICON_DESC_S "attention-icon-desc" #define PROP_ICON_THEME_PATH_S "icon-theme-path" #define PROP_CONNECTED_S "connected" #define PROP_LABEL_S "label" #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_DESC_S "accessible-desc" /* Private macro, shhhh! */ #define APP_INDICATOR_GET_PRIVATE(o) \ @@ -267,12 +269,24 @@ app_indicator_class_init (AppIndicatorClass *klass) The name of the regular icon that is shown for the indicator. */ g_object_class_install_property(object_class, - PROP_ICON_NAME, + PROP_ICON_NAME, g_param_spec_string (PROP_ICON_NAME_S, - "An icon for the indicator", - "The default icon that is shown for the indicator.", - NULL, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT)); + "An icon for the indicator", + "The default icon that is shown for the indicator.", + NULL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + AppIndicator:icon-desc: + + The description of the regular icon that is shown for the indicator. + */ + g_object_class_install_property(object_class, + PROP_ICON_DESC, + g_param_spec_string (PROP_ICON_DESC_S, + "A description of the icon for the indicator", + "A description of the default icon that is shown for the indicator.", + NULL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** AppIndicator:attention-icon-name: @@ -287,6 +301,19 @@ app_indicator_class_init (AppIndicatorClass *klass) "If the indicator sets it's status to 'attention' then this icon is shown.", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + AppIndicator:attention-icon-desc: + + If the indicator sets it's status to %APP_INDICATOR_STATUS_ATTENTION + then this textual description of the icon shown. + */ + g_object_class_install_property (object_class, + PROP_ATTENTION_ICON_DESC, + g_param_spec_string (PROP_ATTENTION_ICON_DESC_S, + "A description of the icon to show when the indicator request attention.", + "When the indicator is an attention mode this should describe the icon shown", + NULL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** AppIndicator:icon-theme-path: @@ -349,22 +376,6 @@ app_indicator_class_init (AppIndicatorClass *klass) "To ensure that the label does not cause the panel to 'jiggle' this string should provide information on how much space it could take.", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - 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 - as screen readers. If the indicator has a label, then duplicating the - contents of the label is fine, if the label alone conveys enough - information about the state of the indicator to the user. - */ - g_object_class_install_property(object_class, - PROP_ACCESSIBLE_DESC, - g_param_spec_string (PROP_ACCESSIBLE_DESC_S, - "A string that describes the indicator in text form.", - "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)); /** AppIndicator:ordering-index: @@ -776,14 +787,29 @@ app_indicator_set_property (GObject * object, guint prop_id, const GValue * valu break; case PROP_ICON_NAME: - app_indicator_set_icon (APP_INDICATOR (object), - g_value_get_string (value)); + app_indicator_set_icon_full (APP_INDICATOR (object), + g_value_get_string (value), + priv->accessible_desc); + check_connect (self); + break; + + case PROP_ICON_DESC: + app_indicator_set_icon_full (APP_INDICATOR (object), + priv->icon_name, + g_value_get_string (value)); check_connect (self); break; case PROP_ATTENTION_ICON_NAME: - app_indicator_set_attention_icon (APP_INDICATOR (object), - g_value_get_string (value)); + app_indicator_set_attention_icon_full (APP_INDICATOR (object), + g_value_get_string (value), + priv->att_accessible_desc); + break; + + case PROP_ATTENTION_ICON_DESC: + app_indicator_set_attention_icon_full (APP_INDICATOR (object), + priv->attention_icon_name, + g_value_get_string (value)); break; case PROP_ICON_THEME_PATH: @@ -828,20 +854,6 @@ app_indicator_set_property (GObject * object, guint prop_id, const GValue * valu } break; } - case PROP_ACCESSIBLE_DESC: { - gchar * olda11ydesc = priv->accessible_desc; - priv->accessible_desc = g_value_dup_string(value); - - if (priv->accessible_desc != NULL && priv->accessible_desc[0] == '\0') { - g_free(priv->accessible_desc); - priv->accessible_desc = NULL; - } - - if (olda11ydesc != NULL) { - g_free(olda11ydesc); - } - break; - } case PROP_ORDERING_INDEX: priv->ordering_index = g_value_get_uint(value); break; @@ -889,10 +901,18 @@ app_indicator_get_property (GObject * object, guint prop_id, GValue * value, GPa g_value_set_string (value, priv->icon_name); break; + case PROP_ICON_DESC: + g_value_set_string (value, priv->accessible_desc); + break; + case PROP_ATTENTION_ICON_NAME: g_value_set_string (value, priv->attention_icon_name); break; + case PROP_ATTENTION_ICON_DESC: + g_value_set_string (value, priv->att_accessible_desc); + break; + case PROP_ICON_THEME_PATH: g_value_set_string (value, priv->icon_theme_path); break; @@ -920,10 +940,6 @@ app_indicator_get_property (GObject * object, guint prop_id, GValue * value, GPa g_value_set_string (value, priv->label_guide); break; - case PROP_ACCESSIBLE_DESC: - g_value_set_string (value, priv->accessible_desc); - break; - case PROP_ORDERING_INDEX: g_value_set_uint(value, priv->ordering_index); break; -- cgit v1.2.3 From f4920ad7a859f4cb35548741954fece0af6264ca Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 22:21:55 -0600 Subject: Switching to the new style of setting the a11y label --- docs/reference/tmpl/libappindicator-unused.sgml | 36 +++++++++++++++++++++++++ example/simple-client.c | 35 +++--------------------- 2 files changed, 39 insertions(+), 32 deletions(-) diff --git a/docs/reference/tmpl/libappindicator-unused.sgml b/docs/reference/tmpl/libappindicator-unused.sgml index 1428b51..789a03f 100644 --- a/docs/reference/tmpl/libappindicator-unused.sgml +++ b/docs/reference/tmpl/libappindicator-unused.sgml @@ -1,6 +1,42 @@ + + + + + + + + + + + +@appindicator: the object which received the signal. +@arg1: + + + + + + + + + + + + +@self: +@Returns: + + + + + + +@self: +@accessible_desc: + diff --git a/example/simple-client.c b/example/simple-client.c index 5d464ac..9e63e14 100644 --- a/example/simple-client.c +++ b/example/simple-client.c @@ -27,7 +27,6 @@ with this program. If not, see . GMainLoop * mainloop = NULL; static gboolean active = TRUE; static gboolean can_haz_label = TRUE; -static gboolean can_haz_a11yname = TRUE; static void label_toggle_cb (GtkWidget * widget, gpointer data) @@ -43,20 +42,6 @@ label_toggle_cb (GtkWidget * widget, gpointer data) return; } -static void -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 description"); - } else { - gtk_menu_item_set_label(GTK_MENU_ITEM(widget), "Show accessible description"); - } - - return; -} - static void activate_clicked_cb (GtkWidget *widget, gpointer data) { @@ -80,9 +65,9 @@ local_icon_toggle_cb (GtkWidget *widget, gpointer data) AppIndicator * ci = APP_INDICATOR(data); if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) { - app_indicator_set_icon(ci, LOCAL_ICON); + app_indicator_set_icon_full(ci, LOCAL_ICON, "Local Icon"); } else { - app_indicator_set_icon(ci, "indicator-messages"); + app_indicator_set_icon_full(ci, "indicator-messages", "System Icon"); } return; @@ -161,13 +146,6 @@ percent_change (gpointer user_data) } else { app_indicator_set_label (APP_INDICATOR(user_data), NULL, NULL); } - if (can_haz_a11yname) { - gchar * percentstr = g_strdup_printf("%d%%", percentage + 1); - app_indicator_set_accessible_desc (APP_INDICATOR(user_data), percentstr); - g_free(percentstr); - } else { - app_indicator_set_accessible_desc (APP_INDICATOR(user_data), NULL); - } return TRUE; } @@ -187,7 +165,7 @@ main (int argc, char ** argv) g_assert (G_IS_OBJECT (ci)); app_indicator_set_status (ci, APP_INDICATOR_STATUS_ACTIVE); - app_indicator_set_attention_icon(ci, "indicator-messages-new"); + app_indicator_set_attention_icon_full(ci, "indicator-messages-new", "System Messages Icon Highlighted"); app_indicator_set_label (ci, "1%", "100%"); g_signal_connect (ci, "scroll-event", @@ -244,13 +222,6 @@ 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 description"); - a11yname_toggle_cb(item, ci); - g_signal_connect (item, "activate", - G_CALLBACK (a11yname_toggle_cb), ci); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - gtk_widget_show(item); - app_indicator_set_menu (ci, GTK_MENU (menu)); mainloop = g_main_loop_new(NULL, FALSE); -- cgit v1.2.3 From f4470e6b9b9dfa770872b2001d70661ec157269d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 22:23:41 -0600 Subject: Dropping the accessible description tests. I don't have time to rewrite them now. They should be redone though. --- tests/test-libappindicator.c | 110 ------------------------------------------- 1 file changed, 110 deletions(-) diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c index d62226e..cadf783 100644 --- a/tests/test-libappindicator.c +++ b/tests/test-libappindicator.c @@ -227,46 +227,6 @@ test_libappindicator_set_label (void) return; } -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_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_desc(ci, NULL); - - g_assert(app_indicator_get_accessible_desc(ci) == NULL); - - app_indicator_set_accessible_desc(ci, ""); - - g_assert(app_indicator_get_accessible_desc(ci) == NULL); - - app_indicator_set_accessible_desc(ci, "accessible_desc"); - - g_assert(g_strcmp0(app_indicator_get_accessible_desc(ci), "accessible_desc") == 0); - - app_indicator_set_accessible_desc(ci, NULL); - - g_assert(app_indicator_get_accessible_desc(ci) == NULL); - - app_indicator_set_accessible_desc(ci, "accessible_desc2"); - - g_assert(g_strcmp0(app_indicator_get_accessible_desc(ci), "accessible_desc2") == 0); - - app_indicator_set_accessible_desc(ci, "trick-accessible_desc"); - - g_assert(g_strcmp0(app_indicator_get_accessible_desc(ci), "trick-accessible_desc") == 0); - - g_object_unref(G_OBJECT(ci)); - return; -} - void test_libappindicator_set_menu (void) { @@ -326,14 +286,6 @@ label_signals_cb (AppIndicator * appindicator, gchar * label, gchar * guide, gpo return; } -void -accessible_desc_signals_cb (AppIndicator * appindicator, gchar * accessible_desc, gpointer user_data) -{ - gint * accessible_desc_signals_count = (gint *)user_data; - (*accessible_desc_signals_count)++; - return; -} - void label_signals_check (void) { @@ -344,16 +296,6 @@ label_signals_check (void) return; } -void -accessible_desc_signals_check (void) -{ - while (g_main_context_pending(NULL)) { - g_main_context_iteration(NULL, TRUE); - } - - return; -} - void test_libappindicator_label_signals (void) { @@ -405,56 +347,6 @@ test_libappindicator_label_signals (void) return; } -void -test_libappindicator_accessible_desc_signals (void) -{ - 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_desc(ci) == NULL); - - 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_desc(ci, "accessible_desc"); - g_assert(accessible_desc_signals_count == 0); - - /* Should show up after idle processing */ - accessible_desc_signals_check(); - g_assert(accessible_desc_signals_count == 1); - - /* Shouldn't signal with no change */ - 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_desc(ci, "accessible_desc2"); - accessible_desc_signals_check(); - g_assert(accessible_desc_signals_count == 1); - - /* Change several times, one signal */ - 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_desc_signals_count = 0; - app_indicator_set_accessible_desc(ci, NULL); - accessible_desc_signals_check(); - g_assert(accessible_desc_signals_count == 1); - - return; -} - void test_libappindicator_desktop_menu (void) { @@ -536,8 +428,6 @@ 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_desc",test_libappindicator_set_accessible_desc); - g_test_add_func ("/indicator-application/libappindicator/accessible_desc_signals",test_libappindicator_accessible_desc_signals); return; } -- cgit v1.2.3 From 13b9f3350011ed969fedd73dbfb5155f37b4c0cf Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 22:26:27 -0600 Subject: Fixing the sections list --- docs/reference/libappindicator-sections.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/reference/libappindicator-sections.txt b/docs/reference/libappindicator-sections.txt index d09c498..da05f40 100644 --- a/docs/reference/libappindicator-sections.txt +++ b/docs/reference/libappindicator-sections.txt @@ -10,7 +10,6 @@ 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_DESC APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH APP_INDICATOR_SIGNAL_CONNECTION_CHANGED APP_INDICATOR_SIGNAL_SCROLL_EVENT @@ -25,22 +24,24 @@ app_indicator_new app_indicator_new_with_path app_indicator_set_status app_indicator_set_attention_icon +app_indicator_set_attention_icon_full app_indicator_set_menu app_indicator_set_icon +app_indicator_set_icon_full app_indicator_set_icon_theme_path app_indicator_set_label -app_indicator_set_accessible_desc app_indicator_set_ordering_index app_indicator_get_id app_indicator_get_category app_indicator_get_status app_indicator_get_icon +app_indicator_get_icon_desc app_indicator_get_icon_theme_path app_indicator_get_attention_icon +app_indicator_get_attention_icon_desc app_indicator_get_menu app_indicator_get_label app_indicator_get_label_guide -app_indicator_get_accessible_desc app_indicator_get_ordering_index app_indicator_build_menu_from_desktop -- cgit v1.2.3 From ccad277faafa2d6a6b5f63e87aa57c58d0aee222 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 22:27:08 -0600 Subject: Matching prototypes to C file --- src/app-indicator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app-indicator.h b/src/app-indicator.h index 562de56..f96212d 100644 --- a/src/app-indicator.h +++ b/src/app-indicator.h @@ -269,14 +269,14 @@ void app_indicator_set_attention_icon (AppIndicator const gchar *icon_name); void app_indicator_set_attention_icon_full (AppIndicator *self, const gchar *icon_name, - const gchar *icon_description); + const gchar *icon_desc); void app_indicator_set_menu (AppIndicator *self, GtkMenu *menu); void app_indicator_set_icon (AppIndicator *self, const gchar *icon_name); void app_indicator_set_icon_full (AppIndicator *self, const gchar *icon_name, - const gchar *icon_description); + const gchar *icon_desc); void app_indicator_set_label (AppIndicator *self, const gchar *label, const gchar *guide); -- cgit v1.2.3 From eb2ba45eaf60c05f1ce570d3f0c9d63f1602af4b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 22:31:45 -0600 Subject: Switching to proper properties --- bindings/mono/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am index 80c03e3..13bfaa9 100644 --- a/bindings/mono/Makefile.am +++ b/bindings/mono/Makefile.am @@ -87,14 +87,15 @@ $(API): $(MIDDLE_API) Makefile.am -e "s|PROP_STATUS_S|status|" \ -e "s|PROP_CATEGORY_S|category|" \ -e "s|PROP_ICON_NAME_S|icon-name|" \ + -e "s|PROP_ICON_DESC_S|icon-desc|" \ -e "s|PROP_ATTENTION_ICON_NAME_S|attention-icon-name|" \ + -e "s|PROP_ATTENTION_ICON_DESC_S|attention-icon-desc|" \ -e "s|PROP_ICON_THEME_PATH_S|icon-theme-path|" \ -e "s|PROP_MENU_S|menu|" \ -e "s|PROP_CONNECTED_S|connected|" \ -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_DESC_S|accessible-name|" \ $< > $@ api_includes = $(GTK_SHARP_CFLAGS) -- cgit v1.2.3 From d21b676e9fe3a9b7f52465cd75d833ce05a6c7a7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 23 Feb 2011 22:46:17 -0600 Subject: Cleaning up even more! --- bindings/mono/Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am index 13bfaa9..9a899e1 100644 --- a/bindings/mono/Makefile.am +++ b/bindings/mono/Makefile.am @@ -85,10 +85,13 @@ $(MIDDLE_API): $(METADATA) $(RAW_API) $(API): $(MIDDLE_API) Makefile.am sed -e "s|PROP_ID_S|id|" \ -e "s|PROP_STATUS_S|status|" \ + -e "s|PROP_CATEGORY_S|Category|" \ -e "s|PROP_CATEGORY_S|category|" \ -e "s|PROP_ICON_NAME_S|icon-name|" \ + -e "s|PROP_ICON_DESC_S|IconDesc|" \ -e "s|PROP_ICON_DESC_S|icon-desc|" \ -e "s|PROP_ATTENTION_ICON_NAME_S|attention-icon-name|" \ + -e "s|PROP_ATTENTION_ICON_DESC_S|AttentionIconDesc|" \ -e "s|PROP_ATTENTION_ICON_DESC_S|attention-icon-desc|" \ -e "s|PROP_ICON_THEME_PATH_S|icon-theme-path|" \ -e "s|PROP_MENU_S|menu|" \ @@ -96,6 +99,8 @@ $(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_DBUS_MENU_SERVER_S|DbusMenuServer|" \ + -e "s|PROP_DBUS_MENU_SERVER_S|dbus-menu-server|" \ $< > $@ api_includes = $(GTK_SHARP_CFLAGS) -- cgit v1.2.3 From d634d56953314f19911f4331b7e9a03f04f20b7f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 24 Feb 2011 15:42:23 -0600 Subject: 0.2.96 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 597a5bc..248c28f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libappindicator, 0.2.95, ted@canonical.com) +AC_INIT(libappindicator, 0.2.96, ted@canonical.com) AC_COPYRIGHT([Copyright 2009, 2010 Canonical]) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libappindicator, 0.2.95) +AM_INIT_AUTOMAKE(libappindicator, 0.2.96) AM_MAINTAINER_MODE -- cgit v1.2.3 From 22fbdf6340b9b4e233c033e20009d2c65d18c804 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 24 Feb 2011 16:06:46 -0600 Subject: releasing version 0.2.96-0ubuntu1~ppa1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0a16d6b..1c2bad1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -libappindicator (0.2.96-0ubuntu1~ppa1) UNRELEASED; urgency=low +libappindicator (0.2.96-0ubuntu1~ppa1) natty; urgency=low * New upstream release. * Add support for accessible descriptions * Move deregistration of object later to send final signals - -- Ted Gould Thu, 24 Feb 2011 16:01:24 -0600 + -- Ted Gould Thu, 24 Feb 2011 16:06:43 -0600 libappindicator (0.2.95-0ubuntu3) natty; urgency=low -- cgit v1.2.3