diff options
-rw-r--r-- | .bzr-builddeb/default.conf | 2 | ||||
-rw-r--r-- | debian/changelog | 173 | ||||
-rw-r--r-- | debian/compat | 1 | ||||
-rw-r--r-- | debian/control | 115 | ||||
-rw-r--r-- | debian/copyright | 60 | ||||
-rw-r--r-- | debian/indicator-application.install | 3 | ||||
-rw-r--r-- | debian/libappindicator-cil-dev.install | 1 | ||||
-rw-r--r-- | debian/libappindicator-dev.install | 3 | ||||
-rw-r--r-- | debian/libappindicator-doc.install | 1 | ||||
-rw-r--r-- | debian/libappindicator0-cil.install | 1 | ||||
-rw-r--r-- | debian/libappindicator0.install | 1 | ||||
-rw-r--r-- | debian/python-appindicator.install | 2 | ||||
-rwxr-xr-x | debian/rules | 76 | ||||
-rw-r--r-- | debian/watch | 2 | ||||
-rw-r--r-- | example/simple-client.c | 4 | ||||
-rw-r--r-- | src/application-service-watcher.c | 18 | ||||
-rw-r--r-- | src/dbus-shared.h | 9 | ||||
-rw-r--r-- | src/libappindicator/app-indicator.c | 38 | ||||
-rw-r--r-- | src/libappindicator/app-indicator.h | 4 | ||||
-rw-r--r-- | src/notification-item.xml | 4 | ||||
-rw-r--r-- | src/notification-watcher.xml | 8 |
21 files changed, 504 insertions, 22 deletions
diff --git a/.bzr-builddeb/default.conf b/.bzr-builddeb/default.conf new file mode 100644 index 0000000..3165e05 --- /dev/null +++ b/.bzr-builddeb/default.conf @@ -0,0 +1,2 @@ +[BUILDDEB] +merge = True diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f8b3b9a --- /dev/null +++ b/debian/changelog @@ -0,0 +1,173 @@ +indicator-application (0.0.6-0ubuntu1~ppa2~icon2ubuntu1) karmic; urgency=low + + * Debug message + + -- Ted Gould <ted@ubuntu.com> Thu, 07 Jan 2010 01:10:18 -0600 + +indicator-application (0.0.6-0ubuntu1~ppa2~icon2) karmic; urgency=low + + * Fixing the signals. + + -- Ted Gould <ted@ubuntu.com> Thu, 07 Jan 2010 00:59:12 -0600 + +indicator-application (0.0.6-0ubuntu1~ppa2~icon1) karmic; urgency=low + + * Adding in icon path support. + + -- Ted Gould <ted@ubuntu.com> Sun, 20 Dec 2009 22:20:35 -0600 + +indicator-application (0.0.6-0ubuntu1~ppa3) karmic; urgency=low + + * Upstream update + * Switching DBus interface to org.freedesktop + * Adding check/radio support to menu parsing + + -- Ted Gould <ted@ubuntu.com> Fri, 08 Jan 2010 11:02:09 -0600 + +indicator-application (0.0.6-0ubuntu1~ppa2) karmic; urgency=low + + * Upstream update + * Adding ChangeLog to dist + * Adding check item support to menu parsing + + -- Ted Gould <ted@ubuntu.com> Thu, 07 Jan 2010 13:58:33 -0600 + +indicator-application (0.0.6-0ubuntu1~ppa1) karmic; urgency=low + + * Upstream release 0.0.6 + * Keeping a constant signature for the library instead of + building it each time. + + -- Ted Gould <ted@ubuntu.com> Thu, 17 Dec 2009 14:45:50 -0600 + +indicator-application (0.0.5-0ubuntu1~ppa1) karmic; urgency=low + + * Upstream release 0.0.5 + * Include Python binding + * Include Mono binding + * Minor bug fixes + * Fixing when menus are set twice. (LP: #497812) + * debian/control, debian/python-appindicator.install: Building + a binary package for the python bindings. + * debian/control: Adding python building build deps + * debian/control, debian/libappindicator0-cil.install: Building + a binary package for the Mono bindings. + * debian/control: Adding Mono building build deps + + [ Ken VanDine ] + * debian/rules + - don't use gnome.mk, specify all the targets to build python + bindings for each supported python version + + -- Ted Gould <ted@ubuntu.com> Thu, 17 Dec 2009 13:21:47 -0600 + +indicator-application (0.0.4-0ubuntu2) lucid; urgency=low + + * debian/control + - make libappindicator0 recommend indicator-application + + -- Ken VanDine <ken.vandine@canonical.com> Tue, 15 Dec 2009 10:40:07 -0500 + +indicator-application (0.0.4-0ubuntu1) lucid; urgency=low + + * Upstream release 0.0.4 + * debian/rules: + - removed the disable-scrollkeeper configure arg + - don't include .la and .a files + * debian/patches/clean_up_docs.patch + - removed, merged upstream + * debian/control: + - removed Build-Depend for scrollkeeper + - libappindicator-dev needs to depend on libdbusmenu-glib-dev + - bump standards version to 3.8.3 + - libappindicator-doc doesn't need to depend on libappindicator0 + + -- Ken VanDine <ken.vandine@canonical.com> Fri, 11 Dec 2009 09:18:58 -0500 + +indicator-application (0.0.3-0ubuntu1) lucid; urgency=low + + * Upstream release 0.0.3 + * Adding in documentation + * Adding a pkg-config .pc file for libappindicator + * More GtkMenu support in libappindicator + * debian/libappindicator-dev.install: Adding pkgconfig files. + * debian/control: Adding a build dep on gtk-doc-tools + * debian/control: Increasing libdbusmenu requirements to 0.1.8 + + [Ken VanDine] + * debian/control + - set Vcs-Bzr to ~ubuntu-desktop + - set libappindicator-doc arch all + - make libappindicator-dev depend on libappindicator0 + * debian/libappindicator-doc.install + - install the developer docs + * debian/rules + - enable-gtk-doc + - added simple-patchsys.mk + * debian/patches/clean_up_docs.patch + - Remove template values and set a proper title + * debian/copyright + - Include the proper licenses (LGPL-2.1 and LGPL-3) + + -- Ted Gould <ted@ubuntu.com> Thu, 10 Dec 2009 13:34:40 -0600 + +indicator-application (0.0.2-0~ppa3) karmic; urgency=low + + * debian/watch: + - Updated url to point to the LP project + * debian/control + - Updated Vcs-Bzr, project urls and description + + -- Ken VanDine <ken.vandine@canonical.com> Thu, 10 Dec 2009 09:00:06 -0500 + +indicator-application (0.0.2-0ubuntu1~ppa1) karmic; urgency=low + + * Upstream release 0.0.2 + * Updates API to use GTK instead of dbusmenu to make it + easier for upstream developers to use. + + -- Ted Gould <ted@ubuntu.com> Fri, 04 Dec 2009 14:50:45 -0600 + +indicator-application (0.0.1-0ubuntu3~ppa4) karmic; urgency=low + + * Adding in copyright headers and licenses + + -- Ted Gould <ted@ubuntu.com> Wed, 02 Dec 2009 12:17:00 -0600 + +indicator-application (0.0.1-0ubuntu3~ppa3) karmic; urgency=low + + * Massive name change. + * debian/* changing packaging to not be "custom" anymore and now + everything is "application" + + -- Ted Gould <ted@ubuntu.com> Wed, 02 Dec 2009 12:06:25 -0600 + +indicator-application (0.0.1-0ubuntu3~ppa2) karmic; urgency=low + + * Implementing the service and having the indicator and app + library start using it. + + -- Ted Gould <ted@ubuntu.com> Wed, 02 Dec 2009 11:58:08 -0600 + +indicator-application (0.0.1-0ubuntu3~ppa1) karmic; urgency=low + + * Flesh out the library to have stuff working. + * Updating test suite to run under dbus-test-runner. + + -- Ted Gould <ted@ubuntu.com> Tue, 01 Dec 2009 09:17:24 -0600 + +indicator-application (0.0.1-0ubuntu2) karmic; urgency=low + + * debian/control: Splitting out libappindicator + * Adding debian/libappindicator0.install, + debian/libappindicator-dev.install, + debian/indicator-application.install + to make all the different packages. + + -- Ted Gould <ted@ubuntu.com> Mon, 02 Nov 2009 21:41:20 -0600 + +indicator-application (0.0.1-0ubuntu1) karmic; urgency=low + + * Development packaging edition. + + -- Robert Collins <robert@canonical.com> Thu, 29 Oct 2009 15:44:14 +1100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..6df04a7 --- /dev/null +++ b/debian/control @@ -0,0 +1,115 @@ +Source: indicator-application +Section: gnome +Priority: optional +XS-Python-Version: all +Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com> +Build-Depends: debhelper (>= 5.0), + cdbs (>= 0.4.41), + python-central (>= 0.6), + libgtk2.0-dev (>= 2.12.0), + libdbus-glib-1-dev, + gnome-doc-utils, + gtk-doc-tools, + intltool, + python-all-dev, + python-gtk2-dev, + libindicate-dev (>= 0.2.0), + libindicate-gtk-dev (>= 0.2.0), + libindicator-dev (>= 0.3.0), + libdbusmenu-gtk-dev (>= 0.1.8), + libdbusmenu-glib-dev (>= 0.1.8), + cli-common-dev (>= 0.5.7), + mono-devel (>= 2.0.1), + gtk-sharp2-gapi, + libmono-dev, + libgtk2.0-cil, + nunit +Standards-Version: 3.8.3 +Homepage: https://launchpad.net/indicator-application +Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-desktop/indicator-application/ubuntu + +Package: python-appindicator +Section: python +Architecture: any +XB-Python-Version: ${python:Versions} +Depends: ${shlibs:Depends}, + ${misc:Depends}, + ${python:Depends}, + libappindicator0 (= ${binary:Version}), + python-gobject +Provides: ${python:Provides} +Description: Python bindings for libappindicator + This package provides Python bindings so that you can use libappindicator from + a Python program. + +Package: indicator-application +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Application Indicators + A library and indicator to take menus from applications and place them in + the panel. + +Package: libappindicator0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends} +Recommends: indicator-application (= ${binary:Version}) +Description: Application Indicators + A library and indicator to take menus from applications and place them in + the panel. + . + This package contains shared libraries to be used by applications. + +Package: libappindicator-dev +Section: libdevel +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libdbusmenu-glib-dev (>= 0.1.8), + libdbus-glib-1-dev (>= 0.76), + libappindicator0 (= ${binary:Version}) +Description: Application Indicators + A library and indicator to take menus from applications and place them in + the panel. + . + This package contains files that are needed to build applications. + +Package: libappindicator-doc +Section: doc +Architecture: all +Depends: ${shlibs:Depends}, + ${misc:Depends} +Description: Application Indicators + A library and indicator to take menus from applications and place them in + the panel. + . + This package contains developer documentation. + +Package: libappindicator0-cil +Section: cli-mono +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + ${cli:Depends}, + libappindicator0 (= ${binary:Version}) +Provides: ${cli:Provides} +Description: CLI bindings for libappindicator + This package provides the appindicator-sharp assembly that allows CLI (.NET) + programs to take menus from applications and place them in the panel. + . + This package contains assemblies to be used by applications. + +Package: libappindicator-cil-dev +Section: libdevel +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + ${cli:Depends}, + libappindicator0-cil (= ${binary:Version}) +Description: Application Indicators + A library and indicator to take menus from applications and place them in + the panel. + . + This package contains files that are needed to build applications. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..ba92c05 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,60 @@ +This package was debianized by Robert Collins <robert@canonical.com> on +Thu, 29 Oct 2009 15:44:14 +1100 + +It was downloaded from <http://launchpad.net/indicator-application/> + +Upstream Author: + + Ted Gould <ted@canonical.com> + +Copyright: + + Copyright (C) 2009 Canonical Ltd. + +License: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Two files (app-indicator.c and app-indicator.h) are under: + + 1) the GNU Lesser General Public License version 3, as published by the + Free Software Foundation; and/or + 2) the GNU Lesser General Public License version 2.1, as published by + the Free Software Foundation. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranties of + MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR + PURPOSE. See the applicable version of the GNU Lesser General Public + License for more details. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301 USA + +On Debian/Ubuntu systems, the full text of the LGPL v2.1 can be found in +`/usr/share/common-licenses/LGPL-2.1', the full text of the LGPL v3 can be found in +`/usr/share/common-licenses/LGPL-3, and the full text of the GPL v3 can be +found in `/usr/share/common-licenses/GPL-3' diff --git a/debian/indicator-application.install b/debian/indicator-application.install new file mode 100644 index 0000000..4429197 --- /dev/null +++ b/debian/indicator-application.install @@ -0,0 +1,3 @@ +debian/tmp/usr/lib/indicators/* +debian/tmp/usr/lib/indicator-application/indicator-application-service +debian/tmp/usr/share/dbus-1/services/indicator-application.service diff --git a/debian/libappindicator-cil-dev.install b/debian/libappindicator-cil-dev.install new file mode 100644 index 0000000..6185943 --- /dev/null +++ b/debian/libappindicator-cil-dev.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/pkgconfig/appindicator-sharp-0.1.pc diff --git a/debian/libappindicator-dev.install b/debian/libappindicator-dev.install new file mode 100644 index 0000000..88e3347 --- /dev/null +++ b/debian/libappindicator-dev.install @@ -0,0 +1,3 @@ +debian/tmp/usr/include/libappindicator-0.1/* +debian/tmp/usr/lib/libappindicator.so +debian/tmp/usr/lib/pkgconfig/appindicator-0.1.pc diff --git a/debian/libappindicator-doc.install b/debian/libappindicator-doc.install new file mode 100644 index 0000000..313fe33 --- /dev/null +++ b/debian/libappindicator-doc.install @@ -0,0 +1 @@ +debian/tmp/usr/share/gtk-doc/html/libappindicator/* diff --git a/debian/libappindicator0-cil.install b/debian/libappindicator0-cil.install new file mode 100644 index 0000000..17c04e9 --- /dev/null +++ b/debian/libappindicator0-cil.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/appindicator-sharp-0.1/* diff --git a/debian/libappindicator0.install b/debian/libappindicator0.install new file mode 100644 index 0000000..a0b5976 --- /dev/null +++ b/debian/libappindicator0.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/libappindicator.so.* diff --git a/debian/python-appindicator.install b/debian/python-appindicator.install new file mode 100644 index 0000000..7a7f049 --- /dev/null +++ b/debian/python-appindicator.install @@ -0,0 +1,2 @@ +debian/tmp/usr/lib/python2.6/* +debian/tmp/usr/share/pygtk/* diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..7936902 --- /dev/null +++ b/debian/rules @@ -0,0 +1,76 @@ +#!/usr/bin/make -f + +DEB_PYTHON_SYSTEM=pycentral +PY_VERSIONS = $(shell pyversions --requested debian/control) +export MONO_SHARED_DIR=$(CURDIR) + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools-vars.mk +include /usr/share/cdbs/1/rules/utils.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +DEB_CONFIGURE_EXTRA_FLAGS += --enable-gtk-doc +API_VERSION = 0.1 + +configure-stamp-%: + mkdir build-$* + cd build-$* && PYTHON=`which $*` \ + $(DEB_CONFIGURE_SCRIPT) $(DEB_CONFIGURE_NORMAL_ARGS) --srcdir=.. + touch $@ + +configure/python-appindicator:: $(addprefix configure-stamp-, $(PY_VERSIONS)) + +build-stamp-%: + make -C build-$*/bindings/python + touch $@ + +build/python-appindicator:: $(addprefix build-stamp-, $(PY_VERSIONS)) + +install-stamp-%: + make -C build-$*/bindings/python install DESTDIR=$(CURDIR)/debian/tmp + touch $@ + +install/python-appindicator:: $(addprefix install-stamp-, $(PY_VERSIONS)) + +binary-install/python-appindicator:: + dh_pycentral + +configure-stamp: + $(DEB_CONFIGURE_SCRIPT) $(DEB_CONFIGURE_NORMAL_ARGS) $(DEB_CONFIGURE_EXTRA_FLAGS) + touch $@ + +configure/indicator-application:: configure-stamp + +build-stamp: + make + touch $@ + +build/indicator-application:: build-stamp + +install-stamp: + make install DESTDIR=$(CURDIR)/debian/tmp + touch $@ + +install/indicator-application:: install-stamp + +binary-post-install/indicator-application:: + find debian/indicator-application/usr/lib -name \*.la -exec rm {} \; + find debian/indicator-application/usr/lib -name \*.a -exec rm {} \; + +binary/libappindicator0-cil:: binary-arch +binary-arch: + dh_clifixperms -i + dh_installdeb -i + dh_makeclilibs -m $(API_VERSION) + dh_clideps -i -d + + +common-binary-predeb-arch:: list-missing + +clean:: + -rm -rf $(addprefix build-, $(PY_VERSIONS)) + -rm -rf $(addprefix configure-stamp-, $(PY_VERSIONS)) + -rm -rf $(addprefix build-stamp-, $(PY_VERSIONS)) + -rm -rf $(addprefix install-stamp-, $(PY_VERSIONS)) + rm -rf $(MONO_SHARED_DIR)/.wapi + diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..ffb0b21 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://launchpad.net/indicator-application/+download .*/indicator-application-([0-9.]+)\.tar\.gz diff --git a/example/simple-client.c b/example/simple-client.c index ea4da9d..8ce9fba 100644 --- a/example/simple-client.c +++ b/example/simple-client.c @@ -53,12 +53,12 @@ main (int argc, char ** argv) app_indicator_set_attention_icon(ci, "indicator-messages-new"); menu = gtk_menu_new (); - GtkWidget *item = gtk_menu_item_new_with_label ("1"); + GtkWidget *item = gtk_check_menu_item_new_with_label ("1"); g_signal_connect (item, "activate", G_CALLBACK (item_clicked_cb), "1"); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - item = gtk_menu_item_new_with_label ("2"); + item = gtk_radio_menu_item_new_with_label (NULL, "2"); g_signal_connect (item, "activate", G_CALLBACK (item_clicked_cb), "2"); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); diff --git a/src/application-service-watcher.c b/src/application-service-watcher.c index 984b9d4..1ad59d4 100644 --- a/src/application-service-watcher.c +++ b/src/application-service-watcher.c @@ -29,8 +29,8 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "application-service-watcher.h" #include "dbus-shared.h" -static gboolean _notification_watcher_server_register_service (ApplicationServiceWatcher * appwatcher, const gchar * service, DBusGMethodInvocation * method); -static gboolean _notification_watcher_server_registered_services (ApplicationServiceWatcher * appwatcher, GArray ** apps); +static gboolean _notification_watcher_server_register_status_notifier_item (ApplicationServiceWatcher * appwatcher, const gchar * service, DBusGMethodInvocation * method); +static gboolean _notification_watcher_server_registered_status_notifier_items (ApplicationServiceWatcher * appwatcher, GArray ** apps); static gboolean _notification_watcher_server_protocol_version (ApplicationServiceWatcher * appwatcher, char ** version); static gboolean _notification_watcher_server_register_notification_host (ApplicationServiceWatcher * appwatcher, const gchar * host); static gboolean _notification_watcher_server_is_notification_host_registered (ApplicationServiceWatcher * appwatcher, gboolean * haveHost); @@ -165,18 +165,26 @@ application_service_watcher_new (ApplicationServiceAppstore * appstore) } static gboolean -_notification_watcher_server_register_service (ApplicationServiceWatcher * appwatcher, const gchar * service, DBusGMethodInvocation * method) +_notification_watcher_server_register_status_notifier_item (ApplicationServiceWatcher * appwatcher, const gchar * service, DBusGMethodInvocation * method) { ApplicationServiceWatcherPrivate * priv = APPLICATION_SERVICE_WATCHER_GET_PRIVATE(appwatcher); - application_service_appstore_application_add(priv->appstore, dbus_g_method_get_sender(method), service); + if (service[0] == '/') { + application_service_appstore_application_add(priv->appstore, + dbus_g_method_get_sender(method), + service); + } else { + application_service_appstore_application_add(priv->appstore, + service, + NOTIFICATION_ITEM_DEFAULT_OBJ); + } dbus_g_method_return(method, G_TYPE_NONE); return TRUE; } static gboolean -_notification_watcher_server_registered_services (ApplicationServiceWatcher * appwatcher, GArray ** apps) +_notification_watcher_server_registered_status_notifier_items (ApplicationServiceWatcher * appwatcher, GArray ** apps) { return FALSE; diff --git a/src/dbus-shared.h b/src/dbus-shared.h index f888e02..efc57a4 100644 --- a/src/dbus-shared.h +++ b/src/dbus-shared.h @@ -20,12 +20,13 @@ with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define INDICATOR_APPLICATION_DBUS_ADDR "org.ayatana.indicator.application" +#define INDICATOR_APPLICATION_DBUS_ADDR "org.freedesktop.StatusNotifierWatcher" #define INDICATOR_APPLICATION_DBUS_OBJ "/org/ayatana/indicator/application/service" #define INDICATOR_APPLICATION_DBUS_IFACE "org.ayatana.indicator.application.service" -#define NOTIFICATION_WATCHER_DBUS_OBJ "/org/ayatana/indicator/application/NotificationWatcher" -#define NOTIFICATION_WATCHER_DBUS_IFACE "org.ayatana.indicator.application.NotificationWatcher" +#define NOTIFICATION_WATCHER_DBUS_OBJ "/StatusNotifierWatcher" +#define NOTIFICATION_WATCHER_DBUS_IFACE "org.freedesktop.StatusNotifierWatcher" -#define NOTIFICATION_ITEM_DBUS_IFACE "org.ayatana.indicator.application.NotificationItem" +#define NOTIFICATION_ITEM_DBUS_IFACE "org.freedesktop.StatusNotifierItem" +#define NOTIFICATION_ITEM_DEFAULT_OBJ "/StatusNotifierItem" diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c index 739a7e6..9a2e2a1 100644 --- a/src/libappindicator/app-indicator.c +++ b/src/libappindicator/app-indicator.c @@ -541,7 +541,7 @@ check_connect (AppIndicator *self) return; } - org_ayatana_indicator_application_NotificationWatcher_register_service_async(priv->watcher_proxy, "/need/a/path", register_service_cb, self); + org_freedesktop_StatusNotifierWatcher_register_status_notifier_item_async(priv->watcher_proxy, "/need/a/path", register_service_cb, self); return; } @@ -718,6 +718,14 @@ activate_menuitem (DbusmenuMenuitem *mi, gpointer user_data) } static void +widget_toggled (GtkWidget *widget, DbusmenuMenuitem *mi) +{ + dbusmenu_menuitem_property_set (mi, + DBUSMENU_MENUITEM_PROP_TOGGLE_CHECKED, + gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget)) ? DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED : DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED); +} + +static void menuitem_iterate (GtkWidget *widget, gpointer data) { @@ -750,9 +758,33 @@ container_iterate (GtkWidget *widget, } else { - label = gtk_menu_item_get_label (GTK_MENU_ITEM (widget)); + if (GTK_IS_CHECK_MENU_ITEM (widget)) + { + GtkCheckMenuItem *check; + + check = GTK_CHECK_MENU_ITEM (widget); + label = gtk_menu_item_get_label (GTK_MENU_ITEM (widget)); + + dbusmenu_menuitem_property_set (child, + DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE, + GTK_IS_RADIO_MENU_ITEM (widget) ? DBUSMENU_MENUITEM_TOGGLE_RADIO : DBUSMENU_MENUITEM_TOGGLE_CHECK); - if (GTK_IS_IMAGE_MENU_ITEM (widget)) + dbusmenu_menuitem_property_set (child, + DBUSMENU_MENUITEM_PROP_LABEL, + label); + + label_set = TRUE; + + dbusmenu_menuitem_property_set (child, + DBUSMENU_MENUITEM_PROP_TOGGLE_CHECKED, + gtk_check_menu_item_get_active (check) ? DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED : DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED); + + g_signal_connect (widget, + "toggled", + G_CALLBACK (widget_toggled), + child); + } + else if (GTK_IS_IMAGE_MENU_ITEM (widget)) { GtkWidget *image = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (widget)); diff --git a/src/libappindicator/app-indicator.h b/src/libappindicator/app-indicator.h index 52438f6..a680c33 100644 --- a/src/libappindicator/app-indicator.h +++ b/src/libappindicator/app-indicator.h @@ -128,8 +128,8 @@ typedef enum { /*< prefix=APP_INDICATOR_CATEGORY >*/ These are the states that the indicator can be on in the user's panel. The indicator by default starts - in the state @APP_INDICATOR_STATUS_OFF and can be - shown by setting it to @APP_INDICATOR_STATUS_ON. + in the state @APP_INDICATOR_STATUS_PASSIVE and can be + shown by setting it to @APP_INDICATOR_STATUS_ACTIVE. */ typedef enum { /*< prefix=APP_INDICATOR_STATUS >*/ APP_INDICATOR_STATUS_PASSIVE, diff --git a/src/notification-item.xml b/src/notification-item.xml index f95db31..bcc3a4a 100644 --- a/src/notification-item.xml +++ b/src/notification-item.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<node name="/"> - <interface name="org.ayatana.indicator.application.NotificationItem"> +<node name="/StatusNotifierItem"> + <interface name="org.freedesktop.StatusNotifierItem"> <!-- Properties --> <property name="Id" type="s" access="read" /> diff --git a/src/notification-watcher.xml b/src/notification-watcher.xml index 2ef54a0..22ada5f 100644 --- a/src/notification-watcher.xml +++ b/src/notification-watcher.xml @@ -1,16 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> -<node name="/"> - <interface name="org.ayatana.indicator.application.NotificationWatcher"> +<node name="/StatusNotifierWatcher"> + <interface name="org.freedesktop.StatusNotifierWatcher"> <!-- Properties --> <!-- None currently --> <!-- Methods --> - <method name="RegisterService"> + <method name="RegisterStatusNotifierItem"> <annotation name="org.freedesktop.DBus.GLib.Async" value="true" /> <arg type="s" name="service" direction="in" /> </method> - <method name="RegisteredServices"> + <method name="RegisteredStatusNotifierItems"> <arg type="as" name="services" direction="out" /> </method> <method name="ProtocolVersion"> |