[gnome-contacts] contacts: Make DBus-activatable



commit 62121e1f31d4edc08831975c7561467468503032
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jun 9 22:23:18 2014 -0400

    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

 configure.ac                                       |    2 +-
 data/Makefile.am                                   |   12 +++++++++---
 ...ktop.in.in => org.gnome.Contacts.desktop.in.in} |    1 +
 3 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ebf5711..ce3f522 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,8 +14,8 @@ AC_CONFIG_FILES([Makefile
                src/Makefile
                man/Makefile
                data/Makefile
+               data/org.gnome.Contacts.desktop.in
                po/Makefile.in
-               data/gnome-contacts.desktop.in
                ])
 
 LT_INIT
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/org.gnome.Contacts.desktop.in.in
similarity index 92%
rename from data/gnome-contacts.desktop.in.in
rename to data/org.gnome.Contacts.desktop.in.in
index 8d395d7..0e25719 100644
--- a/data/gnome-contacts.desktop.in.in
+++ b/data/org.gnome.Contacts.desktop.in.in
@@ -9,3 +9,4 @@ Type=Application
 StartupNotify=true
 Categories=GNOME;GTK;Utility;
 OnlyShowIn=GNOME;Unity;
+DBusActivatable=true


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]