[gnome-photos/wip/search: 13/22] Turn into a DBus activated service
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/search: 13/22] Turn into a DBus activated service
- Date: Wed, 19 Feb 2014 12:32:54 +0000 (UTC)
commit 2c0f30404e6f4956ece2b9ea67c76a3fef3e3d92
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Feb 18 13:21:07 2014 +0100
Turn into a DBus activated service
configure.ac | 2 +-
data/Makefile.am | 19 +++++++++++++++----
...data.xml.in => org.gnome.Photos.appdata.xml.in} | 2 +-
...esktop.in.in => org.gnome.Photos.desktop.in.in} | 1 +
...er.ini => org.gnome.Photos.search-provider.ini} | 2 +-
data/org.gnome.Photos.service.in | 3 +++
po/POTFILES.in | 4 ++--
po/POTFILES.skip | 2 +-
src/Makefile.am | 18 ++++++++++--------
src/gnome-photos | 3 +++
src/photos-application.c | 2 +-
11 files changed, 39 insertions(+), 19 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9c10cae..c09cf3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -131,7 +131,7 @@ fi
AC_CONFIG_FILES([
Makefile
data/Makefile
-data/gnome-photos.desktop.in
+data/org.gnome.Photos.desktop.in
data/icons/Makefile
libgd/Makefile
src/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 6b51365..3caac18 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,12 +1,12 @@
SUBDIRS = icons
appdatadir = $(datadir)/appdata
-appdata_in_files = $(PACKAGE_TARNAME).appdata.xml.in
+appdata_in_files = org.gnome.Photos.appdata.xml.in
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
desktopdir = $(datadir)/applications
-desktop_in_in_files = $(PACKAGE_TARNAME).desktop.in.in
-desktop_in_files = $(PACKAGE_TARNAME).desktop.in
+desktop_in_in_files = org.gnome.Photos.desktop.in.in
+desktop_in_files = org.gnome.Photos.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
@@ -22,17 +22,23 @@ dist_icons_DATA = \
@GSETTINGS_RULES@
searchproviderdir = $(datadir)/gnome-shell/search-providers
-dist_searchprovider_DATA = gnome-photos-search-provider.ini
+dist_searchprovider_DATA = org.gnome.Photos.search-provider.ini
+
+servicedir = $(datadir)/dbus-1/services
+service_in_files = org.gnome.Photos.service.in
+service_DATA = $(service_in_files:.service.in=.service)
EXTRA_DIST = \
$(appdata_in_files) \
$(desktop_in_in_files) \
$(gsettings_SCHEMAS) \
+ $(service_in_files) \
$(NULL)
CLEANFILES = \
$(appdata_DATA) \
$(desktop_DATA) \
+ $(service_DATA) \
$(NULL)
DISTCLEANFILES = \
@@ -48,4 +54,9 @@ check-local: desktop-file-validate
.PHONY: desktop-file-validate
+org.gnome.Photos.service: org.gnome.Photos.service.in
+ $(AM_V_GEN) \
+ [ -d $(@D) ] || $(mkdir_p) $(@D) ; \
+ sed -e "s|\ libexecdir\@|$(libexecdir)|" $< > $ tmp && mv $ tmp $@
+
-include $(top_srcdir)/git.mk
diff --git a/data/gnome-photos.appdata.xml.in b/data/org.gnome.Photos.appdata.xml.in
similarity index 95%
rename from data/gnome-photos.appdata.xml.in
rename to data/org.gnome.Photos.appdata.xml.in
index 0d093ad..5be0b5c 100644
--- a/data/gnome-photos.appdata.xml.in
+++ b/data/org.gnome.Photos.appdata.xml.in
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<application>
- <id type="desktop">gnome-photos.desktop</id>
+ <id type="desktop">org.gnome.Photos.desktop</id>
<licence>CC0</licence>
<name>Photos</name>
<summary>Access, organize and share your photos on GNOME</summary>
diff --git a/data/gnome-photos.desktop.in.in b/data/org.gnome.Photos.desktop.in.in
similarity index 92%
rename from data/gnome-photos.desktop.in.in
rename to data/org.gnome.Photos.desktop.in.in
index f44f43e..7c64be0 100644
--- a/data/gnome-photos.desktop.in.in
+++ b/data/org.gnome.Photos.desktop.in.in
@@ -3,6 +3,7 @@ _Name=Photos
_Comment=Access, organize and share photos
Exec= PACKAGE_TARNAME@
Icon= PACKAGE_TARNAME@
+DBusActivatable=true
StartupNotify=true
Terminal=false
Type=Application
diff --git a/data/gnome-photos-search-provider.ini b/data/org.gnome.Photos.search-provider.ini
similarity index 74%
rename from data/gnome-photos-search-provider.ini
rename to data/org.gnome.Photos.search-provider.ini
index dc6cb76..5d5c0cf 100644
--- a/data/gnome-photos-search-provider.ini
+++ b/data/org.gnome.Photos.search-provider.ini
@@ -1,5 +1,5 @@
[Shell Search Provider]
-DesktopId=gnome-photos.desktop
+DesktopId=org.gnome.Photos.desktop
BusName=org.gnome.Photos
ObjectPath=/org/gnome/Photos/SearchProvider
Version=2
diff --git a/data/org.gnome.Photos.service.in b/data/org.gnome.Photos.service.in
new file mode 100644
index 0000000..5d9d881
--- /dev/null
+++ b/data/org.gnome.Photos.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.Photos
+Exec= libexecdir@/gnome-photos-service
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c55a5cf..9f6a381 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,8 +1,8 @@
# List of source files containing translatable strings.
# Please keep this list sorted alphabetically.
-data/gnome-photos.appdata.xml.in
-data/gnome-photos.desktop.in.in
+data/org.gnome.Photos.appdata.xml.in
+data/org.gnome.Photos.desktop.in.in
data/org.gnome.photos.gschema.xml
src/eog-exif-util.c
src/eog-image.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 76a4fbe..a3d95c6 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1 +1 @@
-data/gnome-photos.desktop.in
+data/org.gnome.Photos.desktop.in
diff --git a/src/Makefile.am b/src/Makefile.am
index 3367aa9..ec6acee 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,8 @@
-bin_PROGRAMS = gnome-photos
+dist_bin_SCRIPTS = gnome-photos
-gnome_photos_built_sources = \
+libexec_PROGRAMS = gnome-photos-service
+
+gnome_photos_service_built_sources = \
gegl-gtk-enums.c \
gegl-gtk-marshal.c \
gegl-gtk-marshal.h \
@@ -28,11 +30,11 @@ gnome_photos_built_sources = \
photos-tracker-resources.h \
$(NULL)
-nodist_gnome_photos_SOURCES = \
- $(gnome_photos_built_sources) \
+nodist_gnome_photos_service_SOURCES = \
+ $(gnome_photos_service_built_sources) \
$(NULL)
-gnome_photos_SOURCES = \
+gnome_photos_service_SOURCES = \
eog-debug.c \
eog-debug.h \
eog-enums.h \
@@ -231,7 +233,7 @@ gnome_photos_SOURCES = \
$(NULL)
BUILT_SOURCES = \
- $(gnome_photos_built_sources) \
+ $(gnome_photos_service_built_sources) \
$(NULL)
EXTRA_DIST = \
@@ -278,9 +280,9 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/libgd \
$(NULL)
-gnome_photos_LDFLAGS =
+gnome_photos_service_LDFLAGS =
-gnome_photos_LDADD = \
+gnome_photos_service_LDADD = \
$(BABL_LIBS) \
$(CAIRO_LIBS) \
$(EXEMPI_LIBS) \
diff --git a/src/gnome-photos b/src/gnome-photos
new file mode 100755
index 0000000..aed7cd9
--- /dev/null
+++ b/src/gnome-photos
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+gapplication launch org.gnome.Photos
diff --git a/src/photos-application.c b/src/photos-application.c
index 90149da..4e8e2b2 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -726,6 +726,6 @@ photos_application_new (void)
{
return g_object_new (PHOTOS_TYPE_APPLICATION,
"application-id", "org.gnome." PACKAGE_NAME,
- "flags", G_APPLICATION_FLAGS_NONE,
+ "flags", G_APPLICATION_IS_SERVICE,
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]