aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-01-27 15:58:14 -0600
committerTed Gould <ted@gould.cx>2011-01-27 15:58:14 -0600
commit2c6ef4e38e32386cc19bb8e1eb094378ef1c58f1 (patch)
tree87a0ee95a7f19b4925491a83e1f2d4b1e9ce6687
parent9dee1e2decb74007676089f5d86fde138d1aac9e (diff)
parent82c80cd622d65cdce1c1eef15a71baf8a3530f7f (diff)
downloadayatana-indicator-application-2c6ef4e38e32386cc19bb8e1eb094378ef1c58f1.tar.gz
ayatana-indicator-application-2c6ef4e38e32386cc19bb8e1eb094378ef1c58f1.tar.bz2
ayatana-indicator-application-2c6ef4e38e32386cc19bb8e1eb094378ef1c58f1.zip
Import upstream version 0.2.92
-rw-r--r--ChangeLog28
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac4
-rw-r--r--src/application-service-appstore.c43
-rw-r--r--src/dbus-shared.h2
-rw-r--r--src/gen-notification-approver.xml.c2
-rw-r--r--src/notification-approver.xml2
7 files changed, 74 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index dfe882e..0c2f900 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,33 @@
# Generated by Makefile. Do not edit.
+2011-01-27 Ted Gould <ted@gould.cx>
+
+ 0.2.92
+
+2011-01-26 Ted Gould <ted@gould.cx>
+
+ Fix the use of variant builder
+
+2011-01-26 Ted Gould <ted@gould.cx>
+
+ Protecting against empty application lists, fixing the builder to be on the stack and using it correctly.
+
+2011-01-18 Ted Gould <ted@gould.cx>
+
+ Switch to canonical.com
+
+2011-01-17 Ted Gould <ted@gould.cx>
+
+ Changing the name of the approver interface
+
+2011-01-14 Ken VanDine <ken.vandine@canonical.com>
+
+ distcheck fixes, use notdir to wrap basename
+
+2011-01-14 Ken VanDine <ken.vandine@canonical.com>
+
+ Version bump, 0.2.91
+
2011-01-14 Ted Gould <ted@gould.cx>
Porting to GDBus and fixing some other misc. issus.
diff --git a/configure b/configure
index 6c50566..4415a24 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.90.
+# Generated by GNU Autoconf 2.67 for indicator-application 0.2.92.
#
# 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.90'
-PACKAGE_STRING='indicator-application 0.2.90'
+PACKAGE_VERSION='0.2.92'
+PACKAGE_STRING='indicator-application 0.2.92'
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.90 to adapt to many kinds of systems.
+\`configure' configures indicator-application 0.2.92 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.90:";;
+ short | recursive ) echo "Configuration of indicator-application 0.2.92:";;
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.90
+indicator-application configure 0.2.92
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.90, which was
+It was created by indicator-application $as_me 0.2.92, 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.91
+ VERSION=0.2.92
cat >>confdefs.h <<_ACEOF
@@ -12466,7 +12466,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.90, which was
+This file was extended by indicator-application $as_me 0.2.92, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12532,7 +12532,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.90
+indicator-application config.status 0.2.92
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 1deb16f..f76ec1f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
-AC_INIT(indicator-application, 0.2.90, ted@canonical.com)
+AC_INIT(indicator-application, 0.2.92, 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.91)
+AM_INIT_AUTOMAKE(indicator-application, 0.2.92)
AM_MAINTAINER_MODE
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index 481d886..dd94561 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -1156,24 +1156,43 @@ static GVariant *
get_applications (ApplicationServiceAppstore * appstore)
{
ApplicationServiceAppstorePrivate * priv = appstore->priv;
+ GVariant * out = NULL;
- GVariantBuilder * builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY);
- GList * listpntr;
- gint position = 0;
+ if (g_list_length(priv->applications) > 0) {
+ GVariantBuilder builder;
+ GList * listpntr;
+ gint position = 0;
- for (listpntr = priv->applications; listpntr != NULL; listpntr = g_list_next(listpntr)) {
- Application * app = (Application *)listpntr->data;
- if (app->visible_state == VISIBLE_STATE_HIDDEN) {
- continue;
+ g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);
+
+ for (listpntr = priv->applications; listpntr != NULL; listpntr = g_list_next(listpntr)) {
+ Application * app = (Application *)listpntr->data;
+ if (app->visible_state == VISIBLE_STATE_HIDDEN) {
+ continue;
+ }
+
+ g_variant_builder_add (&builder, "(sisosss)", app->icon,
+ position++, app->dbus_name, app->menu,
+ app->icon_theme_path, app->label,
+ app->guide);
}
- g_variant_builder_add (builder, "(sisosss)", app->icon,
- position++, app->dbus_name, app->menu,
- app->icon_theme_path, app->label,
- app->guide);
+ out = g_variant_builder_end(&builder);
+ } else {
+ GError * error = NULL;
+ out = g_variant_parse(g_variant_type_new("a(sisosss)"), "[]", NULL, NULL, &error);
+ if (error != NULL) {
+ g_warning("Unable to parse '[]' as a 'a(sisosss)': %s", error->message);
+ out = NULL;
+ g_error_free(error);
+ }
}
- return g_variant_new("(a(sisosss))", builder);
+ if (out != NULL) {
+ return g_variant_new_tuple(&out, 1);
+ } else {
+ return NULL;
+ }
}
/* Removes and approver from our list of approvers and
diff --git a/src/dbus-shared.h b/src/dbus-shared.h
index 71c063e..6144b9b 100644
--- a/src/dbus-shared.h
+++ b/src/dbus-shared.h
@@ -31,5 +31,5 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#define NOTIFICATION_ITEM_DBUS_IFACE "org.kde.StatusNotifierItem"
#define NOTIFICATION_ITEM_DEFAULT_OBJ "/StatusNotifierItem"
-#define NOTIFICATION_APPROVER_DBUS_IFACE "org.ayatana.StatusNotifierApprover"
+#define NOTIFICATION_APPROVER_DBUS_IFACE "com.canonical.StatusNotifierApprover"
diff --git a/src/gen-notification-approver.xml.c b/src/gen-notification-approver.xml.c
index 0844b94..3cd36cf 100644
--- a/src/gen-notification-approver.xml.c
+++ b/src/gen-notification-approver.xml.c
@@ -1,7 +1,7 @@
const char * _notification_approver =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<node name=\"/\">\n"
-" <interface name=\"org.ayatana.StatusNotifierApprover\">\n"
+" <interface name=\"com.canonical.StatusNotifierApprover\">\n"
"\n"
"<!-- Methods -->\n"
" <method name=\"ApproveItem\">\n"
diff --git a/src/notification-approver.xml b/src/notification-approver.xml
index 4a8e39b..a72ca92 100644
--- a/src/notification-approver.xml
+++ b/src/notification-approver.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<node name="/">
- <interface name="org.ayatana.StatusNotifierApprover">
+ <interface name="com.canonical.StatusNotifierApprover">
<!-- Methods -->
<method name="ApproveItem">