diff options
author | Luke Yelavich <luke.yelavich@canonical.com> | 2011-02-08 17:57:32 +1100 |
---|---|---|
committer | Luke Yelavich <luke.yelavich@canonical.com> | 2011-02-08 17:57:32 +1100 |
commit | a958e07de2cb9148a261187600b10598f60bbb69 (patch) | |
tree | e8a1b286685cd8cdc540d35980f04c4f5839d21c /src | |
parent | 8c46407f0faa1062f1801c150bc6dd93bb7d67af (diff) | |
download | ayatana-indicator-application-a958e07de2cb9148a261187600b10598f60bbb69.tar.gz ayatana-indicator-application-a958e07de2cb9148a261187600b10598f60bbb69.tar.bz2 ayatana-indicator-application-a958e07de2cb9148a261187600b10598f60bbb69.zip |
accessible_name -> accessible_desc
Diffstat (limited to 'src')
-rw-r--r-- | src/application-service-appstore.c | 50 | ||||
-rw-r--r-- | src/application-service.xml | 6 | ||||
-rw-r--r-- | src/indicator-application.c | 48 |
3 files changed, 52 insertions, 52 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c index fcd7f24..6c4ec02 100644 --- a/src/application-service-appstore.c +++ b/src/application-service-appstore.c @@ -49,14 +49,14 @@ static void props_cb (GObject * object, GAsyncResult * res, gpointer user_data); #define NOTIFICATION_ITEM_PROP_LABEL "XAyatanaLabel" #define NOTIFICATION_ITEM_PROP_LABEL_GUIDE "XAyatanaLabelGuide" #define NOTIFICATION_ITEM_PROP_ORDERING_INDEX "XAyatanaOrderingIndex" -#define NOTIFICATION_ITEM_PROP_ACCESSIBLE_NAME "AccessibleName" +#define NOTIFICATION_ITEM_PROP_ACCESSIBLE_DESC "AccessibleDesc" #define NOTIFICATION_ITEM_SIG_NEW_ICON "NewIcon" #define NOTIFICATION_ITEM_SIG_NEW_AICON "NewAttentionIcon" #define NOTIFICATION_ITEM_SIG_NEW_STATUS "NewStatus" #define NOTIFICATION_ITEM_SIG_NEW_LABEL "XAyatanaNewLabel" #define NOTIFICATION_ITEM_SIG_NEW_ICON_THEME_PATH "NewIconThemePath" -#define NOTIFICATION_ITEM_SIG_NEW_ACCESSIBLE_NAME "NewAccessibleName" +#define NOTIFICATION_ITEM_SIG_NEW_ACCESSIBLE_DESC "NewAccessibleDesc" #define OVERRIDE_GROUP_NAME "Ordering Index Overrides" #define OVERRIDE_FILE_NAME "ordering-override.keyfile" @@ -106,7 +106,7 @@ struct _Application { gchar * icon_theme_path; gchar * label; gchar * guide; - gchar * accessible_name; + gchar * accessible_desc; gboolean currently_free; guint ordering_index; GList * approved_by; @@ -434,7 +434,7 @@ got_all_properties (GObject * source_object, GAsyncResult * res, GVariant * menu = NULL, * id = NULL, * category = NULL, * status = NULL, * icon_name = NULL, * aicon_name = NULL, * icon_theme_path = NULL, * index = NULL, * label = NULL, - * guide = NULL, * accessible_name = NULL; + * guide = NULL, * accessible_desc = NULL; GVariant * properties = g_dbus_proxy_call_finish(app->props, res, &error); @@ -477,8 +477,8 @@ got_all_properties (GObject * source_object, GAsyncResult * res, label = g_variant_ref(value); } else if (g_strcmp0(name, NOTIFICATION_ITEM_PROP_LABEL_GUIDE) == 0) { guide = g_variant_ref(value); - } else if (g_strcmp0(name, NOTIFICATION_ITEM_PROP_ACCESSIBLE_NAME) == 0) { - accessible_name = g_variant_ref(value); + } else if (g_strcmp0(name, NOTIFICATION_ITEM_PROP_ACCESSIBLE_DESC) == 0) { + accessible_desc = g_variant_ref(value); } /* else ignore */ } g_variant_iter_free (iter); @@ -533,10 +533,10 @@ got_all_properties (GObject * source_object, GAsyncResult * res, app->guide = g_strdup(""); } - if (accessible_name != NULL) { - app->accessible_name = g_variant_dup_string(accessible_name, NULL); + if (accessible_desc != NULL) { + app->accessible_desc = g_variant_dup_string(accessible_desc, NULL); } else { - app->accessible_name = g_strdup(""); + app->accessible_desc = g_strdup(""); } g_list_foreach(priv->approvers, check_with_old_approver, app); @@ -559,7 +559,7 @@ got_all_properties (GObject * source_object, GAsyncResult * res, if (index) g_variant_unref (index); if (label) g_variant_unref (label); if (guide) g_variant_unref (guide); - if (accessible_name) g_variant_unref (accessible_name); + if (accessible_desc) g_variant_unref (accessible_desc); return; } @@ -737,8 +737,8 @@ application_free (Application * app) if (app->approved_by != NULL) { g_list_free(app->approved_by); } - if (app->accessible_name != NULL) { - g_free(app->accessible_name); + if (app->accessible_desc != NULL) { + g_free(app->accessible_desc); } g_free(app); @@ -853,7 +853,7 @@ apply_status (Application * app) app->dbus_name, app->menu, app->icon_theme_path, app->label, app->guide, - app->accessible_name)); + app->accessible_desc)); } else { /* Icon update */ gint position = get_position(app); @@ -943,17 +943,17 @@ new_label (Application * app, const gchar * label, const gchar * guide) } static void -new_accessible_name (Application * app, const gchar * accessible_name) +new_accessible_desc (Application * app, const gchar * accessible_desc) { gboolean changed = FALSE; - if (g_strcmp0(app->accessible_name, accessible_name) != 0) { + if (g_strcmp0(app->accessible_desc, accessible_desc) != 0) { changed = TRUE; - if (app->accessible_name != NULL) { - g_free(app->accessible_name); - app->accessible_name = NULL; + if (app->accessible_desc != NULL) { + g_free(app->accessible_desc); + app->accessible_desc = NULL; } - app->accessible_name = g_strdup(accessible_name); + app->accessible_desc = g_strdup(accessible_desc); } if (changed) { @@ -962,7 +962,7 @@ new_accessible_name (Application * app, const gchar * accessible_name) emit_signal (app->appstore, "ApplicationAccessibleNameChanged", g_variant_new ("(is)", position, - app->accessible_name != NULL ? app->accessible_name : "")); + app->accessible_desc != NULL ? app->accessible_desc : "")); } return; @@ -1166,10 +1166,10 @@ app_receive_signal (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name g_variant_get(parameters, "(&s&s)", &label, &guide); new_label(app, label, guide); } - else if (g_strcmp0(signal_name, NOTIFICATION_ITEM_SIG_NEW_ACCESSIBLE_NAME) == 0) { - const gchar * accessible_name; - g_variant_get(parameters, "(&s)", &accessible_name); - new_accessible_name(app, accessible_name); + else if (g_strcmp0(signal_name, NOTIFICATION_ITEM_SIG_NEW_ACCESSIBLE_DESC) == 0) { + const gchar * accessible_desc; + g_variant_get(parameters, "(&s)", &accessible_desc); + new_accessible_desc(app, accessible_desc); } return; @@ -1262,7 +1262,7 @@ get_applications (ApplicationServiceAppstore * appstore) g_variant_builder_add (&builder, "(sisossss)", app->icon, position++, app->dbus_name, app->menu, app->icon_theme_path, app->label, - app->guide, app->accessible_name); + app->guide, app->accessible_desc); } out = g_variant_builder_end(&builder); diff --git a/src/application-service.xml b/src/application-service.xml index 8693c52..fc65c40 100644 --- a/src/application-service.xml +++ b/src/application-service.xml @@ -44,7 +44,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. <arg type="s" name="iconpath" direction="out" /> <arg type="s" name="label" direction="out" /> <arg type="s" name="labelguide" direction="out" /> - <arg type="s" name="accessiblename" direction="out" /> + <arg type="s" name="accessibledesc" direction="out" /> </signal> <signal name="ApplicationRemoved"> <arg type="i" name="position" direction="out" /> @@ -62,9 +62,9 @@ with this program. If not, see <http://www.gnu.org/licenses/>. <arg type="s" name="label" direction="out" /> <arg type="s" name="guide" direction="out" /> </signal> - <signal name="ApplicationAccessibleNameChanged"> + <signal name="ApplicationAccessibleDescChanged"> <arg type="i" name="position" direction="out" /> - <arg type="s" name="accessible_name" direction="out" /> + <arg type="s" name="accessible_desc" direction="out" /> </signal> </interface> </node> diff --git a/src/indicator-application.c b/src/indicator-application.c index 098644b..785f0b6 100644 --- a/src/indicator-application.c +++ b/src/indicator-application.c @@ -115,12 +115,12 @@ static void disconnected (IndicatorApplication * application); static void disconnected_helper (gpointer data, gpointer user_data); static gboolean disconnected_kill (gpointer user_data); static void disconnected_kill_helper (gpointer data, gpointer user_data); -static void application_added (IndicatorApplication * application, const gchar * iconname, gint position, const gchar * dbusaddress, const gchar * dbusobject, const gchar * icon_theme_path, const gchar * label, const gchar * guide, const gchar * accessible_name); +static void application_added (IndicatorApplication * application, const gchar * iconname, gint position, const gchar * dbusaddress, const gchar * dbusobject, const gchar * icon_theme_path, const gchar * label, const gchar * guide, const gchar * accessible_desc); static void application_removed (IndicatorApplication * application, gint position); static void application_label_changed (IndicatorApplication * application, gint position, const gchar * label, const gchar * guide); static void application_icon_changed (IndicatorApplication * application, gint position, const gchar * iconname); static void application_icon_theme_path_changed (IndicatorApplication * application, gint position, const gchar * icon_theme_path); -static void application_accessible_name_changed (IndicatorApplication * application, gint position, const gchar * accessible_name); +static void application_accessible_desc_changed (IndicatorApplication * application, gint position, const gchar * accessible_desc); static void get_applications (GObject * obj, GAsyncResult * res, gpointer user_data); static void get_applications_helper (IndicatorApplication * self, GVariant * variant); static void theme_dir_unref(IndicatorApplication * ia, const gchar * dir); @@ -451,7 +451,7 @@ guess_label_size (ApplicationEntry * app) ApplicationEntry and signaling the indicator host that we've got a new indicator. */ static void -application_added (IndicatorApplication * application, const gchar * iconname, gint position, const gchar * dbusaddress, const gchar * dbusobject, const gchar * icon_theme_path, const gchar * label, const gchar * guide, const gchar * accessible_name) +application_added (IndicatorApplication * application, const gchar * iconname, gint position, const gchar * dbusaddress, const gchar * dbusobject, const gchar * icon_theme_path, const gchar * label, const gchar * guide, const gchar * accessible_desc) { g_return_if_fail(IS_INDICATOR_APPLICATION(application)); g_debug("Building new application entry: %s with icon: %s at position %i", dbusaddress, iconname, position); @@ -500,10 +500,10 @@ application_added (IndicatorApplication * application, const gchar * iconname, g guess_label_size(app); } - if (accessible_name == NULL || accessible_name[0] == '\0') { - app->entry.accessible_name = NULL; + if (accessible_desc == NULL || accessible_desc[0] == '\0') { + app->entry.accessible_desc = NULL; } else { - app->entry.accessible_name = g_strdup(accessible_name); + app->entry.accessible_desc = g_strdup(accessible_desc); } app->entry.menu = GTK_MENU(dbusmenu_gtkmenu_new((gchar *)dbusaddress, (gchar *)dbusobject)); @@ -707,10 +707,10 @@ application_icon_theme_path_changed (IndicatorApplication * application, gint po return; } -/* The callback for the signal that the accessible name for an application - has changed. */ +/* The callback for the signal that the accessible description for + an application has changed. */ static void -application_accessible_name_changed (IndicatorApplication * application, gint position, const gchar * accessible_name) +application_accessible_desc_changed (IndicatorApplication * application, gint position, const gchar * accessible_desc) { IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application); ApplicationEntry * app = (ApplicationEntry *)g_list_nth_data(priv->applications, position); @@ -721,14 +721,14 @@ application_accessible_name_changed (IndicatorApplication * application, gint po return; } - if (accessible_name == NULL || accessible_name[0] == '\0') { - /* No accessible_name, let's see if we need to delete the old one */ - if (app->entry.accessible_name != NULL) { - app->entry.accessible_name = NULL; + if (accessible_desc == NULL || accessible_desc[0] == '\0') { + /* No accessible_desc, let's see if we need to delete the old one */ + if (app->entry.accessible_desc != NULL) { + app->entry.accessible_desc = NULL; signal_reload = TRUE; } } else { - app->entry.accessible_name = g_strdup(accessible_name); + app->entry.accessible_desc = g_strdup(accessible_desc); signal_reload = TRUE; } @@ -781,14 +781,14 @@ receive_signal (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name, const gchar * icon_theme_path; const gchar * label; const gchar * guide; - const gchar * accessible_name; + const gchar * accessible_desc; g_variant_get (parameters, "(&si&s&o&s&s&s&s)", &iconname, &position, &dbusaddress, &dbusobject, &icon_theme_path, &label, &guide, - &accessible_name); + &accessible_desc); application_added(self, iconname, position, dbusaddress, dbusobject, icon_theme_path, label, guide, - accessible_name); + accessible_desc); } else if (g_strcmp0(signal_name, "ApplicationRemoved") == 0) { gint position; @@ -814,11 +814,11 @@ receive_signal (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name, g_variant_get (parameters, "(i&s&s)", &position, &label, &guide); application_label_changed(self, position, label, guide); } - else if (g_strcmp0(signal_name, "ApplicationAccessibleNameChanged") == 0) { + else if (g_strcmp0(signal_name, "ApplicationAccessibleDescChanged") == 0) { gint position; - const gchar * accessible_name; - g_variant_get (parameters, "(i&s)", &position, &accessible_name); - application_accessible_name_changed(self, position, accessible_name); + const gchar * accessible_desc; + g_variant_get (parameters, "(i&s)", &position, &accessible_desc); + application_accessible_desc_changed(self, position, accessible_desc); } return; @@ -863,12 +863,12 @@ get_applications_helper (IndicatorApplication * self, GVariant * variant) const gchar * icon_theme_path; const gchar * label; const gchar * guide; - const gchar * accessible_name; + const gchar * accessible_desc; g_variant_get(variant, "(sisossss)", &icon_name, &position, &dbus_address, &dbus_object, &icon_theme_path, &label, - &guide, &accessible_name); + &guide, &accessible_desc); - return application_added(self, icon_name, position, dbus_address, dbus_object, icon_theme_path, label, guide, accessible_name); + return application_added(self, icon_name, position, dbus_address, dbus_object, icon_theme_path, label, guide, accessible_desc); } /* Unrefs a theme directory. This may involve removing it from |