aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--ChangeLog68
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac4
-rw-r--r--src/application-service-appstore.c63
-rw-r--r--src/application-service.xml4
-rw-r--r--src/gen-application-service.xml.c4
-rw-r--r--src/indicator-application.c59
8 files changed, 175 insertions, 48 deletions
diff --git a/AUTHORS b/AUTHORS
index 54219b0..88c4f9d 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -13,6 +13,7 @@
Ken Vandine
Ken VanDine
Krzysztof Klimonda
+ Luke Yelavich
Marco Trevisan (TreviƱo)
Michael Terry
Neil Jagdish Patel
diff --git a/ChangeLog b/ChangeLog
index e4ee331..632461a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,73 @@
# Generated by Makefile. Do not edit.
+2011-02-24 Ted Gould <ted@gould.cx>
+
+ 0.2.94
+
+2011-02-24 Ted Gould <ted@gould.cx>
+
+ Making sure we have a description for the variant world
+
+2011-02-24 Ted Gould <ted@gould.cx>
+
+ Adding support for accessible descriptions
+
+2011-02-24 Ted Gould <ted@gould.cx>
+
+ Switching things around so the icon switches with the description all the way up the stack
+
+2011-02-23 Ted Gould <ted@gould.cx>
+
+ Adding a missing brace
+
+2011-02-11 Luke Yelavich <luke.yelavich@canonical.com>
+
+ Use the ACCESSIBLE_DESC_UPDATE signal to refresh the accessible description.
+
+2011-02-08 Luke Yelavich <luke.yelavich@canonical.com>
+
+ accessible_name -> accessible_desc
+
+2011-02-08 Luke Yelavich <luke.yelavich@canonical.com>
+
+ Merge from trunk
+
+2011-02-07 Luke Yelavich <luke.yelavich@canonical.com>
+
+ Add accessible name support
+
+2011-02-21 Ted Gould <ted@gould.cx>
+
+ Make sure to NULL out the structure
+
+2011-02-18 Ted Gould <ted@gould.cx>
+
+ Ensures the accessible description is NULL
+
+2011-02-16 Ted Gould <ted@gould.cx>
+
+ Remove g_error's to stop abortion.
+
+2011-02-11 Michael Terry <mike@mterry.name>
+
+ don't abort on various unexpected situations; just spit out critical warning
+
+2011-02-16 Ted Gould <ted@gould.cx>
+
+ On status change update the label as well
+
+2011-02-11 Michael Terry <mike@mterry.name>
+
+ update label too in update_status
+
+2011-02-07 Ted Gould <ted@gould.cx>
+
+ Build fix to get libindicator header
+
+2011-02-07 Luke Yelavich <luke.yelavich@canonical.com>
+
+ Include indicator-object.h to reference INDICATOR_OBJECT_SCROLL_UP
+
2011-02-03 Ted Gould <ted@gould.cx>
0.2.93
diff --git a/configure b/configure
index a539c4d..8b55bec 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for indicator-application 0.2.93.
+# Generated by GNU Autoconf 2.67 for indicator-application 0.2.94.
#
# Report bugs to <ted@canonical.com>.
#
@@ -703,8 +703,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='indicator-application'
PACKAGE_TARNAME='indicator-application'
-PACKAGE_VERSION='0.2.93'
-PACKAGE_STRING='indicator-application 0.2.93'
+PACKAGE_VERSION='0.2.94'
+PACKAGE_STRING='indicator-application 0.2.94'
PACKAGE_BUGREPORT='ted@canonical.com'
PACKAGE_URL=''
@@ -1446,7 +1446,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures indicator-application 0.2.93 to adapt to many kinds of systems.
+\`configure' configures indicator-application 0.2.94 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1517,7 +1517,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of indicator-application 0.2.93:";;
+ short | recursive ) echo "Configuration of indicator-application 0.2.94:";;
esac
cat <<\_ACEOF
@@ -1634,7 +1634,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-indicator-application configure 0.2.93
+indicator-application configure 0.2.94
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1914,7 +1914,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by indicator-application $as_me 0.2.93, which was
+It was created by indicator-application $as_me 0.2.94, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -2735,7 +2735,7 @@ fi
# Define the identity of the package.
PACKAGE=indicator-application
- VERSION=0.2.93
+ VERSION=0.2.94
cat >>confdefs.h <<_ACEOF
@@ -12462,7 +12462,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by indicator-application $as_me 0.2.93, which was
+This file was extended by indicator-application $as_me 0.2.94, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12528,7 +12528,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-indicator-application config.status 0.2.93
+indicator-application config.status 0.2.94
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index fa8d252..fe010cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
-AC_INIT(indicator-application, 0.2.93, ted@canonical.com)
+AC_INIT(indicator-application, 0.2.94, ted@canonical.com)
AC_COPYRIGHT([Copyright 2009, 2010 Canonical])
AC_PREREQ(2.53)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(indicator-application, 0.2.93)
+AM_INIT_AUTOMAKE(indicator-application, 0.2.94)
AM_MAINTAINER_MODE
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index c9e803f..10feef5 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -24,7 +24,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config.h"
#endif
-#include "libindicator/indicator-object.h"
+#include <libindicator/indicator-object.h>
#include "libappindicator/app-indicator.h"
#include "app-indicator-enum-types.h"
#include "application-service-appstore.h"
@@ -43,7 +43,9 @@ static void props_cb (GObject * object, GAsyncResult * res, gpointer user_data);
#define NOTIFICATION_ITEM_PROP_CATEGORY "Category"
#define NOTIFICATION_ITEM_PROP_STATUS "Status"
#define NOTIFICATION_ITEM_PROP_ICON_NAME "IconName"
+#define NOTIFICATION_ITEM_PROP_ICON_DESC "IconAccessibleDesc"
#define NOTIFICATION_ITEM_PROP_AICON_NAME "AttentionIconName"
+#define NOTIFICATION_ITEM_PROP_AICON_DESC "AttentionAccessibleDesc"
#define NOTIFICATION_ITEM_PROP_ICON_THEME_PATH "IconThemePath"
#define NOTIFICATION_ITEM_PROP_MENU "Menu"
#define NOTIFICATION_ITEM_PROP_LABEL "XAyatanaLabel"
@@ -99,7 +101,9 @@ struct _Application {
gboolean validated; /* Whether we've gotten all the parameters and they look good. */
AppIndicatorStatus status;
gchar * icon;
+ gchar * icon_desc;
gchar * aicon;
+ gchar * aicon_desc;
gchar * menu;
gchar * icon_theme_path;
gchar * label;
@@ -163,7 +167,7 @@ application_service_appstore_class_init (ApplicationServiceAppstoreClass *klass)
node_info = g_dbus_node_info_new_for_xml(_application_service, &error);
if (error != NULL) {
- g_error("Unable to parse Application Service Interface description: %s", error->message);
+ g_critical("Unable to parse Application Service Interface description: %s", error->message);
g_error_free(error);
}
}
@@ -172,7 +176,7 @@ application_service_appstore_class_init (ApplicationServiceAppstoreClass *klass)
interface_info = g_dbus_node_info_lookup_interface(node_info, INDICATOR_APPLICATION_DBUS_IFACE);
if (interface_info == NULL) {
- g_error("Unable to find interface '" INDICATOR_APPLICATION_DBUS_IFACE "'");
+ g_critical("Unable to find interface '" INDICATOR_APPLICATION_DBUS_IFACE "'");
}
}
@@ -215,7 +219,7 @@ bus_get_cb (GObject * object, GAsyncResult * res, gpointer user_data)
GDBusConnection * connection = g_bus_get_finish(res, &error);
if (error != NULL) {
- g_error("OMG! Unable to get a connection to DBus: %s", error->message);
+ g_critical("OMG! Unable to get a connection to DBus: %s", error->message);
g_error_free(error);
return;
}
@@ -240,7 +244,7 @@ bus_get_cb (GObject * object, GAsyncResult * res, gpointer user_data)
&error);
if (error != NULL) {
- g_error("Unable to register the object to DBus: %s", error->message);
+ g_critical("Unable to register the object to DBus: %s", error->message);
g_error_free(error);
return;
}
@@ -430,6 +434,7 @@ got_all_properties (GObject * source_object, GAsyncResult * res,
ApplicationServiceAppstorePrivate * priv = app->appstore->priv;
GVariant * menu = NULL, * id = NULL, * category = NULL,
* status = NULL, * icon_name = NULL, * aicon_name = NULL,
+ * icon_desc = NULL, * aicon_desc = NULL,
* icon_theme_path = NULL, * index = NULL, * label = NULL,
* guide = NULL;
@@ -441,7 +446,7 @@ got_all_properties (GObject * source_object, GAsyncResult * res,
}
if (error != NULL) {
- g_error("Could not grab DBus properties for %s: %s", app->dbus_name, error->message);
+ g_critical("Could not grab DBus properties for %s: %s", app->dbus_name, error->message);
g_error_free(error);
if (!app->validated)
application_free(app);
@@ -464,8 +469,12 @@ got_all_properties (GObject * source_object, GAsyncResult * res,
status = g_variant_ref(value);
} else if (g_strcmp0(name, NOTIFICATION_ITEM_PROP_ICON_NAME) == 0) {
icon_name = g_variant_ref(value);
+ } else if (g_strcmp0(name, NOTIFICATION_ITEM_PROP_ICON_DESC) == 0) {
+ icon_desc = g_variant_ref(value);
} else if (g_strcmp0(name, NOTIFICATION_ITEM_PROP_AICON_NAME) == 0) {
aicon_name = g_variant_ref(value);
+ } else if (g_strcmp0(name, NOTIFICATION_ITEM_PROP_AICON_DESC) == 0) {
+ aicon_desc = g_variant_ref(value);
} else if (g_strcmp0(name, NOTIFICATION_ITEM_PROP_ICON_THEME_PATH) == 0) {
icon_theme_path = g_variant_ref(value);
} else if (g_strcmp0(name, NOTIFICATION_ITEM_PROP_ORDERING_INDEX) == 0) {
@@ -543,7 +552,9 @@ got_all_properties (GObject * source_object, GAsyncResult * res,
if (category) g_variant_unref (category);
if (status) g_variant_unref (status);
if (icon_name) g_variant_unref (icon_name);
+ if (icon_desc) g_variant_unref (icon_desc);
if (aicon_name) g_variant_unref (aicon_name);
+ if (aicon_desc) g_variant_unref (aicon_desc);
if (icon_theme_path) g_variant_unref (icon_theme_path);
if (index) g_variant_unref (index);
if (label) g_variant_unref (label);
@@ -707,8 +718,11 @@ application_free (Application * app)
if (app->icon != NULL) {
g_free(app->icon);
}
- if (app->aicon != NULL) {
- g_free(app->aicon);
+ if (app->icon_desc != NULL) {
+ g_free(app->icon_desc);
+ }
+ if (app->aicon_desc != NULL) {
+ g_free(app->aicon_desc);
}
if (app->menu != NULL) {
g_free(app->menu);
@@ -773,7 +787,7 @@ emit_signal (ApplicationServiceAppstore * appstore, const gchar * name,
&error);
if (error != NULL) {
- g_error("Unable to send %s signal: %s", name, error->message);
+ g_critical("Unable to send %s signal: %s", name, error->message);
g_error_free(error);
return;
}
@@ -825,26 +839,37 @@ apply_status (Application * app)
} else {
/* Figure out which icon we should be using */
gchar * newicon = app->icon;
+ gchar * newdesc = app->icon_desc;
if (app->status == APP_INDICATOR_STATUS_ATTENTION && app->aicon != NULL && app->aicon[0] != '\0') {
newicon = app->aicon;
+ newdesc = app->aicon_desc;
+ }
+
+ if (newdesc == NULL) {
+ newdesc = "";
}
/* Determine whether we're already shown or not */
if (app->visible_state == VISIBLE_STATE_HIDDEN) {
/* Put on panel */
emit_signal (appstore, "ApplicationAdded",
- g_variant_new ("(sisosss)", newicon,
+ g_variant_new ("(sisossss)", newicon,
get_position(app),
app->dbus_name, app->menu,
app->icon_theme_path,
- app->label, app->guide));
+ app->label, app->guide,
+ newdesc));
} else {
/* Icon update */
gint position = get_position(app);
if (position == -1) return;
emit_signal (appstore, "ApplicationIconChanged",
- g_variant_new ("(is)", position, newicon));
+ g_variant_new ("(iss)", position, newicon, newdesc));
+ emit_signal (appstore, "ApplicationLabelChanged",
+ g_variant_new ("(iss)", position,
+ app->label != NULL ? app->label : "",
+ app->guide != NULL ? app->guide : ""));
}
}
@@ -1021,7 +1046,7 @@ dbus_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data)
}
if (error != NULL) {
- g_error("Could not grab DBus proxy for %s: %s", app->dbus_name, error->message);
+ g_critical("Could not grab DBus proxy for %s: %s", app->dbus_name, error->message);
g_error_free(error);
application_free(app);
return;
@@ -1077,7 +1102,7 @@ props_cb (GObject * object, GAsyncResult * res, gpointer user_data)
}
if (error != NULL) {
- g_error("Could not grab Properties DBus proxy for %s: %s", app->dbus_name, error->message);
+ g_critical("Could not grab Properties DBus proxy for %s: %s", app->dbus_name, error->message);
g_error_free(error);
application_free(app);
return;
@@ -1212,18 +1237,18 @@ get_applications (ApplicationServiceAppstore * appstore)
continue;
}
- g_variant_builder_add (&builder, "(sisosss)", app->icon,
+ g_variant_builder_add (&builder, "(sisossss)", app->icon,
position++, app->dbus_name, app->menu,
app->icon_theme_path, app->label,
- app->guide);
+ app->guide, app->icon_desc);
}
out = g_variant_builder_end(&builder);
} else {
GError * error = NULL;
- out = g_variant_parse(g_variant_type_new("a(sisosss)"), "[]", NULL, NULL, &error);
+ out = g_variant_parse(g_variant_type_new("a(sisossss)"), "[]", NULL, NULL, &error);
if (error != NULL) {
- g_warning("Unable to parse '[]' as a 'a(sisosss)': %s", error->message);
+ g_warning("Unable to parse '[]' as a 'a(sisossss)': %s", error->message);
out = NULL;
g_error_free(error);
}
@@ -1416,7 +1441,7 @@ approver_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data)
}
if (error != NULL) {
- g_error("Could not grab DBus proxy for approver: %s", error->message);
+ g_critical("Could not grab DBus proxy for approver: %s", error->message);
g_error_free(error);
return;
}
diff --git a/src/application-service.xml b/src/application-service.xml
index 1ad7030..f3164ef 100644
--- a/src/application-service.xml
+++ b/src/application-service.xml
@@ -26,7 +26,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Methods -->
<method name="GetApplications">
- <arg type="a(sisosss)" name="applications" direction="out" />
+ <arg type="a(sisossss)" name="applications" direction="out" />
</method>
<method name="ApplicationScrollEvent">
<arg type="s" name="dbusaddress" direction="in" />
@@ -44,6 +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="accessibledesc" direction="out" />
</signal>
<signal name="ApplicationRemoved">
<arg type="i" name="position" direction="out" />
@@ -51,6 +52,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
<signal name="ApplicationIconChanged">
<arg type="i" name="position" direction="out" />
<arg type="s" name="icon_name" direction="out" />
+ <arg type="s" name="icon_desc" direction="out" />
</signal>
<signal name="ApplicationIconThemePathChanged">
<arg type="i" name="position" direction="out" />
diff --git a/src/gen-application-service.xml.c b/src/gen-application-service.xml.c
index 292cb62..cae1819 100644
--- a/src/gen-application-service.xml.c
+++ b/src/gen-application-service.xml.c
@@ -27,7 +27,7 @@ const char * _application_service =
"\n"
"<!-- Methods -->\n"
" <method name=\"GetApplications\">\n"
-" <arg type=\"a(sisosss)\" name=\"applications\" direction=\"out\" />\n"
+" <arg type=\"a(sisossss)\" name=\"applications\" direction=\"out\" />\n"
" </method>\n"
" <method name=\"ApplicationScrollEvent\">\n"
" <arg type=\"s\" name=\"dbusaddress\" direction=\"in\" />\n"
@@ -45,6 +45,7 @@ const char * _application_service =
" <arg type=\"s\" name=\"iconpath\" direction=\"out\" />\n"
" <arg type=\"s\" name=\"label\" direction=\"out\" />\n"
" <arg type=\"s\" name=\"labelguide\" direction=\"out\" />\n"
+" <arg type=\"s\" name=\"accessibledesc\" direction=\"out\" />\n"
" </signal>\n"
" <signal name=\"ApplicationRemoved\">\n"
" <arg type=\"i\" name=\"position\" direction=\"out\" />\n"
@@ -52,6 +53,7 @@ const char * _application_service =
" <signal name=\"ApplicationIconChanged\">\n"
" <arg type=\"i\" name=\"position\" direction=\"out\" />\n"
" <arg type=\"s\" name=\"icon_name\" direction=\"out\" />\n"
+" <arg type=\"s\" name=\"icon_desc\" direction=\"out\" />\n"
" </signal>\n"
" <signal name=\"ApplicationIconThemePathChanged\">\n"
" <arg type=\"i\" name=\"position\" direction=\"out\" />\n"
diff --git a/src/indicator-application.c b/src/indicator-application.c
index cd83bdf..f7ce391 100644
--- a/src/indicator-application.c
+++ b/src/indicator-application.c
@@ -115,10 +115,10 @@ 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);
+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_changed (IndicatorApplication * application, gint position, const gchar * iconname, const gchar * icondesc);
static void application_icon_theme_path_changed (IndicatorApplication * application, gint position, const gchar * icon_theme_path);
static void get_applications (GObject * obj, GAsyncResult * res, gpointer user_data);
static void get_applications_helper (IndicatorApplication * self, GVariant * variant);
@@ -279,7 +279,7 @@ service_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data)
}
if (error != NULL) {
- g_error("Could not grab DBus proxy for %s: %s", INDICATOR_APPLICATION_DBUS_ADDR, error->message);
+ g_critical("Could not grab DBus proxy for %s: %s", INDICATOR_APPLICATION_DBUS_ADDR, error->message);
g_error_free(error);
return;
}
@@ -450,13 +450,13 @@ 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)
+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);
IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application);
- ApplicationEntry * app = g_new(ApplicationEntry, 1);
+ ApplicationEntry * app = g_new0(ApplicationEntry, 1);
app->old_service = FALSE;
app->icon_theme_path = NULL;
@@ -499,6 +499,12 @@ application_added (IndicatorApplication * application, const gchar * iconname, g
guess_label_size(app);
}
+ if (accessible_desc == NULL || accessible_desc[0] == '\0') {
+ app->entry.accessible_desc = NULL;
+ } else {
+ app->entry.accessible_desc = g_strdup(accessible_desc);
+ }
+
app->entry.menu = GTK_MENU(dbusmenu_gtkmenu_new((gchar *)dbusaddress, (gchar *)dbusobject));
/* Keep copies of these for ourself, just in case. */
@@ -644,7 +650,7 @@ application_label_changed (IndicatorApplication * application, gint position, co
/* The callback for the signal that the icon for an application
has changed. */
static void
-application_icon_changed (IndicatorApplication * application, gint position, const gchar * iconname)
+application_icon_changed (IndicatorApplication * application, gint position, const gchar * iconname, const gchar * icondesc)
{
IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application);
ApplicationEntry * app = (ApplicationEntry *)g_list_nth_data(priv->applications, position);
@@ -654,6 +660,11 @@ application_icon_changed (IndicatorApplication * application, gint position, con
return;
}
+ if (iconname == NULL) {
+ g_warning("We can't have a NULL icon name on %d", position);
+ return;
+ }
+
/* We make a long name using the suffix, and if that
icon is available we want to use it. Otherwise we'll
just use the name we were given. */
@@ -668,6 +679,19 @@ application_icon_changed (IndicatorApplication * application, gint position, con
}
indicator_image_helper_update(app->entry.image, app->longname);
+ if (g_strcmp0(app->entry.accessible_desc, icondesc) != 0) {
+ if (app->entry.accessible_desc != NULL) {
+ g_free((gchar *)app->entry.accessible_desc);
+ app->entry.accessible_desc = NULL;
+ }
+
+ if (icondesc != NULL && icondesc[0] != '\0') {
+ app->entry.accessible_desc = g_strdup(icondesc);
+ }
+
+ g_signal_emit(G_OBJECT(application), INDICATOR_OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE_ID, 0, &(app->entry), TRUE);
+ }
+
return;
}
@@ -715,11 +739,14 @@ receive_signal (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name,
const gchar * icon_theme_path;
const gchar * label;
const gchar * guide;
- g_variant_get (parameters, "(&si&s&o&s&s&s)", &iconname,
+ const gchar * accessible_desc;
+ g_variant_get (parameters, "(&si&s&o&s&s&s&s)", &iconname,
&position, &dbusaddress, &dbusobject,
- &icon_theme_path, &label, &guide);
+ &icon_theme_path, &label, &guide,
+ &accessible_desc);
application_added(self, iconname, position, dbusaddress,
- dbusobject, icon_theme_path, label, guide);
+ dbusobject, icon_theme_path, label, guide,
+ accessible_desc);
}
else if (g_strcmp0(signal_name, "ApplicationRemoved") == 0) {
gint position;
@@ -729,8 +756,9 @@ receive_signal (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name,
else if (g_strcmp0(signal_name, "ApplicationIconChanged") == 0) {
gint position;
const gchar * iconname;
- g_variant_get (parameters, "(i&s)", &position, &iconname);
- application_icon_changed(self, position, iconname);
+ const gchar * icondesc;
+ g_variant_get (parameters, "(i&s&s)", &position, &iconname, &icondesc);
+ application_icon_changed(self, position, iconname, icondesc);
}
else if (g_strcmp0(signal_name, "ApplicationIconThemePathChanged") == 0) {
gint position;
@@ -768,7 +796,7 @@ get_applications (GObject * obj, GAsyncResult * res, gpointer user_data)
return;
}
- g_variant_get(result, "(a(sisosss))", &iter);
+ g_variant_get(result, "(a(sisossss))", &iter);
while ((child = g_variant_iter_next_value (iter)))
get_applications_helper(self, child);
g_variant_iter_free (iter);
@@ -788,11 +816,12 @@ get_applications_helper (IndicatorApplication * self, GVariant * variant)
const gchar * icon_theme_path;
const gchar * label;
const gchar * guide;
- g_variant_get(variant, "(sisosss)", &icon_name, &position,
+ const gchar * accessible_desc;
+ g_variant_get(variant, "(sisossss)", &icon_name, &position,
&dbus_address, &dbus_object, &icon_theme_path, &label,
- &guide);
+ &guide, &accessible_desc);
- return application_added(self, icon_name, position, dbus_address, dbus_object, icon_theme_path, label, guide);
+ 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