From 62121e1f31d4edc08831975c7561467468503032 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 9 Jun 2014 22:23:18 -0400 Subject: contacts: Make DBus-activatable This commit installs a service file, renames the desktop file to follow the bus name, and adds the DBusActivatable key to the desktop file, following https://wiki.gnome.org/HowDoI/DBusApplicationLaunching https://bugzilla.gnome.org/show_bug.cgi?id=728266 --- data/Makefile.am | 12 +++++++++--- data/gnome-contacts.desktop.in.in | 11 ----------- data/org.gnome.Contacts.desktop.in.in | 12 ++++++++++++ 3 files changed, 21 insertions(+), 14 deletions(-) delete mode 100644 data/gnome-contacts.desktop.in.in create mode 100644 data/org.gnome.Contacts.desktop.in.in (limited to 'data') diff --git a/data/Makefile.am b/data/Makefile.am index 7fa7314..979f3ce 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,7 +1,7 @@ NULL= desktopdir = $(datadir)/applications -desktop_in_files = gnome-contacts.desktop.in +desktop_in_files = org.gnome.Contacts.desktop.in desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) searchproviderdir = $(datadir)/gnome-shell/search-providers @@ -15,19 +15,25 @@ searchprovider_DATA = gnome-contacts-search-provider.ini service_in_files = org.gnome.Contacts.SearchProvider.service.in servicedir = $(datadir)/dbus-1/services -service_DATA = $(service_in_files:.service.in=.service) +service_DATA = $(service_in_files:.service.in=.service) org.gnome.Contacts.service %.service: %.service.in Makefile $(AM_V_GEN) [ -d $(@D) ] || $(mkdir_p) $(@D) ; \ sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@.tmp && mv $@.tmp $@ +org.gnome.Contacts.service: + $(AM_V_GEN) (echo '[D-BUS Service]'; \ + echo 'Name=org.gnome.Contacts'; \ + echo 'Exec=${bindir}/gnome-contacts --gapplication-service') > $@.tmp && \ + mv $@.tmp $@ + @INTLTOOL_XML_RULE@ appdatadir = $(datadir)/appdata appdata_DATA = $(appdata_in_files:.xml.in=.xml) appdata_in_files = gnome-contacts.appdata.xml.in EXTRA_DIST = \ - gnome-contacts.desktop.in.in \ + org.gnome.Contacts.desktop.in.in \ contacts.gresource.xml \ ui/app-menu.ui \ ui/contacts-window.ui \ diff --git a/data/gnome-contacts.desktop.in.in b/data/gnome-contacts.desktop.in.in deleted file mode 100644 index 8d395d7..0000000 --- a/data/gnome-contacts.desktop.in.in +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -_Name=Contacts -_Comment=A contacts manager for GNOME -_Keywords=friends;address book; -Icon=x-office-address-book -Exec=gnome-contacts -Terminal=false -Type=Application -StartupNotify=true -Categories=GNOME;GTK;Utility; -OnlyShowIn=GNOME;Unity; diff --git a/data/org.gnome.Contacts.desktop.in.in b/data/org.gnome.Contacts.desktop.in.in new file mode 100644 index 0000000..0e25719 --- /dev/null +++ b/data/org.gnome.Contacts.desktop.in.in @@ -0,0 +1,12 @@ +[Desktop Entry] +_Name=Contacts +_Comment=A contacts manager for GNOME +_Keywords=friends;address book; +Icon=x-office-address-book +Exec=gnome-contacts +Terminal=false +Type=Application +StartupNotify=true +Categories=GNOME;GTK;Utility; +OnlyShowIn=GNOME;Unity; +DBusActivatable=true -- cgit v1.2.1