aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac16
-rw-r--r--src/application-service-appstore.c9
-rw-r--r--src/application-service.xml3
-rw-r--r--src/indicator-application.c30
-rw-r--r--tests/test-approver.c5
5 files changed, 42 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac
index a57f197..112d1f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
-AC_INIT(indicator-application, 0.3.90, ted@canonical.com)
+AC_INIT(indicator-application, 0.3.91, ted@canonical.com)
AC_COPYRIGHT([Copyright 2009, 2010 Canonical])
AC_PREREQ(2.53)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(indicator-application, 0.3.90)
+AM_INIT_AUTOMAKE(indicator-application, 0.3.91)
AM_MAINTAINER_MODE
@@ -47,7 +47,7 @@ AC_ARG_WITH([gtk],
AS_IF([test "x$with_gtk" = x3],
[PKG_CHECK_MODULES(INDICATOR, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
gio-2.0 >= $GIO_REQUIRED_VERSION
- indicator3 >= $INDICATOR_REQUIRED_VERSION
+ indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION
json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
@@ -59,7 +59,7 @@ AS_IF([test "x$with_gtk" = x3],
[test "x$with_gtk" = x2],
[PKG_CHECK_MODULES(INDICATOR, gtk+-2.0 >= $GTK_REQUIRED_VERSION
gio-2.0 >= $GIO_REQUIRED_VERSION
- indicator >= $INDICATOR_REQUIRED_VERSION
+ indicator-0.4 >= $INDICATOR_REQUIRED_VERSION
json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
@@ -92,11 +92,11 @@ if test "x$with_localinstall" = "xyes"; then
INDICATORDIR="${libdir}/indicators/2/"
INDICATORICONSDIR="${datadir}/libindicate/icons/"
elif test "x$with_gtk" = x2; then
- INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`
- INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator`
+ INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator-0.4`
+ INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator-0.4`
else
- INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3`
- INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3`
+ INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3-0.4`
+ INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3-0.4`
fi
AC_SUBST(INDICATORDIR)
AC_SUBST(INDICATORICONSDIR)
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index 238814e..9cd65b4 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -870,12 +870,12 @@ apply_status (Application * app)
if (app->visible_state == VISIBLE_STATE_HIDDEN) {
/* Put on panel */
emit_signal (appstore, "ApplicationAdded",
- g_variant_new ("(sisossss)", newicon,
+ g_variant_new ("(sisosssss)", newicon,
get_position(app),
app->dbus_name, app->menu,
app->icon_theme_path,
app->label, app->guide,
- newdesc));
+ newdesc, app->id));
} else {
/* Icon update */
gint position = get_position(app);
@@ -1265,11 +1265,12 @@ get_applications (ApplicationServiceAppstore * appstore)
continue;
}
- g_variant_builder_add (&builder, "(sisossss)", app->icon,
+ g_variant_builder_add (&builder, "(sisosssss)", app->icon,
position++, app->dbus_name, app->menu,
app->icon_theme_path, app->label,
app->guide,
- (app->icon_desc != NULL) ? app->icon_desc : "");
+ (app->icon_desc != NULL) ? app->icon_desc : "",
+ app->id);
}
out = g_variant_builder_end(&builder);
diff --git a/src/application-service.xml b/src/application-service.xml
index f3164ef..1cffbc7 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(sisossss)" name="applications" direction="out" />
+ <arg type="a(sisosssss)" name="applications" direction="out" />
</method>
<method name="ApplicationScrollEvent">
<arg type="s" name="dbusaddress" direction="in" />
@@ -45,6 +45,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
<arg type="s" name="label" direction="out" />
<arg type="s" name="labelguide" direction="out" />
<arg type="s" name="accessibledesc" direction="out" />
+ <arg type="s" name="hint" direction="out" />
</signal>
<signal name="ApplicationRemoved">
<arg type="i" name="position" direction="out" />
diff --git a/src/indicator-application.c b/src/indicator-application.c
index fd24c27..dc810f4 100644
--- a/src/indicator-application.c
+++ b/src/indicator-application.c
@@ -116,7 +116,7 @@ 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_desc);
+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, const gchar * hint);
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, const gchar * icondesc);
@@ -469,7 +469,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_desc)
+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, const gchar * hint)
{
g_return_if_fail(IS_INDICATOR_APPLICATION(application));
g_debug("Building new application entry: %s with icon: %s at position %i", dbusaddress, iconname, position);
@@ -524,6 +524,12 @@ application_added (IndicatorApplication * application, const gchar * iconname, g
app->entry.accessible_desc = g_strdup(accessible_desc);
}
+ if (hint == NULL || hint[0] == '\0') {
+ app->entry.name_hint = NULL;
+ } else {
+ app->entry.name_hint = g_strdup(hint);
+ }
+
app->entry.menu = GTK_MENU(dbusmenu_gtkmenu_new((gchar *)dbusaddress, (gchar *)dbusobject));
/* Keep copies of these for ourself, just in case. */
@@ -580,6 +586,12 @@ application_removed (IndicatorApplication * application, gint position)
if (app->entry.menu != NULL) {
g_object_unref(G_OBJECT(app->entry.menu));
}
+ if (app->entry.accessible_desc != NULL) {
+ g_free((gchar *)app->entry.accessible_desc);
+ }
+ if (app->entry.name_hint != NULL) {
+ g_free((gchar *)app->entry.name_hint);
+ }
g_free(app);
return;
@@ -775,13 +787,14 @@ receive_signal (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name,
const gchar * label;
const gchar * guide;
const gchar * accessible_desc;
- g_variant_get (parameters, "(&si&s&o&s&s&s&s)", &iconname,
+ const gchar * hint;
+ g_variant_get (parameters, "(&si&s&o&s&s&s&s&s)", &iconname,
&position, &dbusaddress, &dbusobject,
&icon_theme_path, &label, &guide,
- &accessible_desc);
+ &accessible_desc, &hint);
application_added(self, iconname, position, dbusaddress,
dbusobject, icon_theme_path, label, guide,
- accessible_desc);
+ accessible_desc, hint);
}
else if (g_strcmp0(signal_name, "ApplicationRemoved") == 0) {
gint position;
@@ -872,11 +885,12 @@ get_applications_helper (IndicatorApplication * self, GVariant * variant)
const gchar * label;
const gchar * guide;
const gchar * accessible_desc;
- g_variant_get(variant, "(sisossss)", &icon_name, &position,
+ const gchar * hint;
+ g_variant_get(variant, "(sisosssss)", &icon_name, &position,
&dbus_address, &dbus_object, &icon_theme_path, &label,
- &guide, &accessible_desc);
+ &guide, &accessible_desc, &hint);
- return application_added(self, icon_name, position, dbus_address, dbus_object, icon_theme_path, label, guide, accessible_desc);
+ return application_added(self, icon_name, position, dbus_address, dbus_object, icon_theme_path, label, guide, accessible_desc, hint);
}
/* Unrefs a theme directory. This may involve removing it from
diff --git a/tests/test-approver.c b/tests/test-approver.c
index 6fc75c5..bacdc67 100644
--- a/tests/test-approver.c
+++ b/tests/test-approver.c
@@ -149,6 +149,11 @@ register_cb (GObject *object, GAsyncResult *res, gpointer user_data)
result = g_dbus_proxy_call_finish(proxy, res, &error);
+ if (result != NULL) {
+ g_variant_unref(result);
+ result = NULL;
+ }
+
if (error != NULL) {
g_warning("Unable to register approver: %s", error->message);
g_error_free(error);