After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 722662 - Turn into a DBus activatable service
Turn into a DBus activatable service
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-01-20 23:29 UTC by Cosimo Cecchi
Modified: 2014-02-18 01:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
application: don't call Gtk.init() manually (798 bytes, patch)
2014-01-20 23:29 UTC, Cosimo Cecchi
committed Details | Review
application: turn into a DBusActivatable service (10.53 KB, patch)
2014-01-20 23:29 UTC, Cosimo Cecchi
none Details | Review
application: turn into a DBusActivatable service (11.25 KB, patch)
2014-01-21 00:01 UTC, Cosimo Cecchi
none Details | Review
application: turn into a DBusActivatable service (11.49 KB, patch)
2014-01-21 00:06 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2014-01-20 23:29:48 UTC
Use the new facilities in GtkApplication to turn the app into a DBus-activatable service.
Comment 1 Cosimo Cecchi 2014-01-20 23:29:49 UTC
Created attachment 266821 [details] [review]
application: don't call Gtk.init() manually

GtkApplication already does this for us in startup().
Comment 2 Cosimo Cecchi 2014-01-20 23:29:52 UTC
Created attachment 266822 [details] [review]
application: turn into a DBusActivatable service

Use the new DBusActivatable features in GtkApplication to turn
gnome-documents into a DBus-activated service.
Comment 3 Cosimo Cecchi 2014-01-21 00:01:33 UTC
Created attachment 266824 [details] [review]
application: turn into a DBusActivatable service

--

Forgot to git add one file
Comment 4 Cosimo Cecchi 2014-01-21 00:06:05 UTC
Created attachment 266825 [details] [review]
application: turn into a DBusActivatable service

--

Third time's a charm.
Comment 5 Matthias Clasen 2014-01-23 04:50:29 UTC
Review of attachment 266825 [details] [review]:

I think the desktop file has to be called org.gnome.Documents.desktop.in.in for this to work ?
Comment 6 Debarshi Ray 2014-01-23 08:03:56 UTC
Review of attachment 266821 [details] [review]:

Looks good.
Comment 7 Debarshi Ray 2014-01-23 08:56:33 UTC
Review of attachment 266825 [details] [review]:

I think org.gnome.Documents.desktop.in is OK, and we do not need the extra .in. This is because there is nothing in that file that needs to be translated by configure. eg., Exec and Icon does not use Autoconf variables. We only need one .in for INTLTOOL_DESKTOP_RULE.
Comment 8 Debarshi Ray 2014-01-23 09:25:39 UTC
Review of attachment 266825 [details] [review]:

Matthias,
I think org.gnome.Documents.desktop.in is OK, and we do not need the extra .in. This is because there is nothing in that file that needs to be translated by configure. eg., Exec and Icon does not use Autoconf variables. We only need one .in for INTLTOOL_DESKTOP_RULE.

Cosimo,
You also need to fix the appdata file. It should now be org.gnome.Documents.appdata.xml, and the <id type="desktop"> in the file should be updated too.
Comment 9 Debarshi Ray 2014-01-23 09:29:51 UTC
Review of attachment 266825 [details] [review]:

::: src/gnome-documents
@@ +16,3 @@
+
+let application = new Application();
+application.run(ARGV);

Why not just:
#!/bin/sh
gapplication launch org.gnome.Documents

Not a blocker, though. Just saying. :)
Comment 10 Cosimo Cecchi 2014-02-18 00:50:41 UTC
Attachment 266825 [details] pushed as 04d89d1 - application: turn into a DBusActivatable service

Fixed the review comments and pushed to master.