GNOME Bugzilla – Bug 665300
Allow to open previews from the command line
Last modified: 2011-12-01 19:49:26 UTC
See patches.
Created attachment 202531 [details] [review] embed: Allow switching directly between previews Currently it is only possible to open a preview from the overview. However, when we allow to open a preview from the command line, we should switch to the new preview even if we are already in preview mode.
Created attachment 202532 [details] [review] application: Allow to open previews from the command line Allow to pass in a URN on the command line and handle it in the primary instance. This will be used by the gnome-shell search provider to open search results.
Created attachment 202535 [details] [review] embed: Allow switching directly between previews Fix for collections.
Created attachment 202536 [details] [review] application: Allow to open previews from the command line Reattaching to maintain patch order
Review of attachment 202535 [details] [review]: Looks good. ::: src/embed.js @@ +234,3 @@ + + if (doc == null) + return; I prefer the if (!foo) style in JS, since it's also safe vs. undefined values.
Review of attachment 202536 [details] [review]: Looks good, thanks! ::: src/main.js @@ +24,3 @@ function start() { let application = new Application.Application(); + return application.application.run(ARGV); Why do you return here?
Attachment 202535 [details] pushed as 95b8ed5 - embed: Allow switching directly between previews Attachment 202536 [details] pushed as e5f507d - application: Allow to open previews from the command line (In reply to comment #6) > @@ +24,3 @@ > function start() { > let application = new Application.Application(); > + return application.application.run(ARGV); > > Why do you return here? From g_application_run() docs: This function is intended to be run from main() and its return value is intended to be returned by main(). (and yes, it actually works, though there's a bug currently which prevents non-primary instances from returning immediately)