GNOME Bugzilla – Bug 712350
eog doesn't export actions on D-Bus
Last modified: 2013-12-01 14:22:24 UTC
Long story, but I'm doing some work on a very large set of images. I'm trying to use eog to help me do that, and it would be awesome if I could script eog from the outside in order to make my life easier. I was a bit surprised to discover that eog windows don't expose any actions via D-Bus. At the very least I would have expected to see things like 'next-image', 'prev-image', 'first-image', 'last-image', etc. A 'current-image' with integer state might be a neat idea. Zoom controls and rotate would also be nice.
eog once had a very simple D-Bus interface which allowed you to remotely open images. I think it got dropped during the GtkApplication-migration or even earlier. From what I hear this should be somewhat easy now using GApplication and GAction/GMenu. But migrating from GtkAction and GtkUIManager is currently blocked since GAction/GMenu is not really compatible to our plugins.
Indeed you already have a D-Bus interface for opening images. This works: gapplication launch org.gnome.eog.ApplicationService abc.png It would not be too hard to expose a few additional actions on windows, even if you don't drop GtkAction. I'll try a simple patch.
Created attachment 261382 [details] [review] EogWindow: export some actions on the bus Expose a few useful actions in GAction form so that they can be hit from D-Bus.
That is really easy. I thought there would be more to it. So I guess that could work as a starting point for a GMenu transition in the future. I extended your patch by rotating and zooming and a custom action whose state will show the current image relative to the collection size. --- This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.