GNOME Bugzilla – Bug 735935
main: Fix opening files
Last modified: 2014-09-03 12:08:01 UTC
.
Created attachment 285209 [details] [review] main: Fix opening files Caused by the switch to D-Bus activation.
Can you please test, Elad?
It works (ie. I can open a file) but things are extremely slow, so I guess the workaround from bug #728716 would need to be used for this codepath as well.
Created attachment 285212 [details] [review] main: Fix opening files Caused by the switch to D-Bus activation.
Review of attachment 285212 [details] [review]: ::: src/totem.c @@ +255,3 @@ totem = g_object_new (TOTEM_TYPE_OBJECT, "application-id", "org.gnome.Totem", + "flags", G_APPLICATION_HANDLES_COMMAND_LINE | G_APPLICATION_HANDLES_OPEN, The docs for G_APPLICATION_HANDLES_OPEN say it has no effect when G_APPLICATION_HANDLES_COMMAND_LINE is set. So I guess this hunk can be removed, since we do handle local file opening in app_command_line().
The latest patch doesn't even build, totem-object.c: In function 'totem_object_app_open': totem-object.c:148:30: error: 'totem' undeclared (first use in this function) totem_object_set_main_page (totem, "player");
Created attachment 285242 [details] [review] main: Fix opening files Caused by the switch to D-Bus activation.
(In reply to comment #6) > The latest patch doesn't even build, The "even" is not needed. (In reply to comment #5) > Review of attachment 285212 [details] [review]: > > ::: src/totem.c > @@ +255,3 @@ > totem = g_object_new (TOTEM_TYPE_OBJECT, > "application-id", "org.gnome.Totem", > + "flags", G_APPLICATION_HANDLES_COMMAND_LINE | > G_APPLICATION_HANDLES_OPEN, > > The docs for G_APPLICATION_HANDLES_OPEN say it has no effect when > G_APPLICATION_HANDLES_COMMAND_LINE is set. So I guess this hunk can be removed, > since we do handle local file opening in app_command_line(). I'm guessing that's not the case when the command-line isn't used though, and g_application_open() is called directly. gedit uses the same combination of flags, to the same effect (opening a file works again after a port to using D-Bus activation).
Sorry for the bad phrasing on my part, I meant no offense. The latest patch works, and I also think it is correct to use G_APPLICATION_HANDLES_OPEN as the command line is not what handles the file opening when you launch using gapplication and dbus activation. Thanks for fixing this so quickly, and sorry for not filing this bug sooner.
Attachment 285242 [details] pushed as ed8485f - main: Fix opening files