Commit cbcb0da9 authored by Nuno Araujo's avatar Nuno Araujo Committed by Debarshi Ray

Support notification filtering

Set the desktop-entry hint on the notifications of goa-daemon and
create a desktop file for it with a X-GNOME-UsesNotifications key, so
that it appears in the new control panel notifications panel.

https://bugzilla.gnome.org/show_bug.cgi?id=692768
parent f3983b9f
......@@ -6,6 +6,11 @@ SUBDIRS = icons
cssdir = $(pkgdatadir)
css_DATA = goawebview.css
desktopdir = $(datadir)/applications
desktop_in_in_files = goa-daemon.desktop.in.in
desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
servicedir = $(datadir)/dbus-1/services
service_in_files = org.gnome.OnlineAccounts.service.in
service_DATA = $(service_in_files:.service.in=.service)
......@@ -13,14 +18,22 @@ service_DATA = $(service_in_files:.service.in=.service)
$(service_DATA): $(service_in_files) Makefile
@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
$(desktop_in_files): $(desktop_in_in_files) Makefile
@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
@INTLTOOL_DESKTOP_RULE@
EXTRA_DIST = \
$(css_DATA) \
$(desktop_in_in_files) \
$(service_in_files) \
dbus-interfaces.xml \
$(NULL)
DISTCLEANFILES = \
org.gnome.OnlineAccounts.service \
$(desktop_DATA) \
$(desktop_in_files) \
$(NULL)
clean-local :
......
[Desktop Entry]
_Name=Online Accounts
_Comment=Provides the org.gnome.OnlinesAccounts name on the session bus
Exec=@libexecdir@/goa-daemon
Icon=goa-panel
Terminal=false
Type=Application
StartupNotify=false
Categories=GTK;GNOME;Settings;X-GNOME-PersonalSettings;
OnlyShowIn=GNOME;Unity;
NoDisplay=true
X-GNOME-UsesNotifications=true
[encoding: UTF-8]
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
data/goa-daemon.desktop.in.in
src/daemon/goadaemon.c
src/goabackend/goaewsclient.c
src/goabackend/goaexchangeprovider.c
......
......@@ -986,10 +986,13 @@ goa_daemon_update_notifications (GoaDaemon *daemon)
if (daemon->notification == NULL)
{
GError *error;
GVariant *desktop_entry;
daemon->notification = notify_notification_new (_("An online account needs attention"),
NULL,
NULL);
desktop_entry = g_variant_new_string ("goa-daemon");
notify_notification_set_hint (daemon->notification, "desktop-entry", desktop_entry);
notify_notification_set_timeout (daemon->notification, NOTIFY_EXPIRES_NEVER);
g_object_set (daemon->notification, "icon-name", "gtk-dialog-error", NULL);
notify_notification_add_action (daemon->notification,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment