On Wed, Mar 03, 2010 at 04:01:34PM -0500, John J. Foerch wrote:
> On Wed, Mar 03, 2010 at 04:59:19PM +0100, Rohan Nicholls wrote:
> > Hey all,
> >
> > I have been using a mac for work lately, and have installed conkeror
> > there (second app after emacs).
> >
> > What I have noticed is that xulrunner runs with a minimal menu (one
> > list, with a quit item). Normally that would not be a probelem,
> > except that the way the mac and spaces works it makes it an involved
> > process to get a new window. Macs work on the one instance for
> > everything, and switching brings up the current instance, which you
> > then ask to make a new window, e.g. in emacs this would be C-x 5 2.
> >
> > This is not possible with the way conkeror works on the mac, and I was
> > wondering if anyone has found a solution to this.
> >
> > Btw. just so you know, I have explicitly set spaces to NOT switch to
> > the nearest workspace with an open window. Another thing is that I
> > tried making a launch script to have conkeror launch a new instance
> > each time it is called, but I run into the "There is already an
> > instance of xulrunner running, so we won't run another" Which would
> > be okay, if there was some way to pass to the application on the
> > commandline to please open a new window.
> >
> > Another P.S. At the moment what I do, is find the nearest window, do a
> > C-x 5 f, and then take the new window to the new workspace, but you
> > can imagine that this is far from ideal.
>
>
> So you're saying there should be a "New Window" item in the menu? Sounds
> good to me. I'll follow-up later after I push that.
Following up, there is now a partial fix in place. I thought it would be
good to put the notes from my investigations out into the world, so here
goes.
The fundamental problem is that Xulrunner does not support command line
remoting on OS X. Instead of remoting the command line to the running
instance, Xulrunner just displays that error window "Conkeror is already
running, and you can only run one instance at a time." Due to this bug,
you can only get a new window from an old window. There are four possible
approaches to deal with this problem:
1) wait for mozilla to fix command line remoting on OS X. (this is what
we've been doing so far)
2) rewrite our command line handler to run inside of a hidden-window,
instead of an nsICommandLineHandler component. this is not out of the
question, but i can't make the time for it right now.
3) add a menu system and enable it with javascript that only runs on OS
X. it would be a single menu with a single command. i'm not in favor
of this approach because it adds an entire mouse-only gui element to
the program for the sake of one command, opening the floodgates to a
user-interface paradigm that we have been working to avoid since day
one.
4) there are a small number of special menu items that, when present in a
hidden menu in our XUL, will get put into the OS X application menu by
Xulrunner. This is how the Quit menu item is set up. Unfortunately,
we can't put any arbitrary thing in that menu, but we can repurpose
one of the special ones to be a "New Window" menu item.
Combining 1 and 4 seems a sensible thing to do right now. Although 4 is
a hack by any standard, 2 and 3 are bigger hacks still, considering that
our original purpose is to work around a Mozilla bug. I still have hope
that the Mozilla bug will be fixed "soon".
I prefaced this message by saying a "partial fix", and it is indeed
partial because the code I pushed does not work when there are no open
windows at all. This is a current limitation in Conkeror's interactive
system---an assumption that commands will only be called when there is an
open window. So I will try to address that problem soon, appreciate your
patience, and for the time being, (OS X users), don't close all of your
windows!
Thanks all,
--
John Foerch
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror