I have noticed this problem over the years.  It is nice you are giving users the choice.

Lots of programs on Linux seem to be trending toward the Mac way of doing it. Acrobat reader and Gimp will throw new work at the existing instance. Gimp has a command line argument to tell it to not do so:

 -n, --new-instance                  Start a new GIMP instance

I wonder if you would consider doing same in the CLI arguments for gretl?

Thanks, good luck with your project.
pj



On Thu, Apr 4, 2013 at 2:50 PM, Allin Cottrell <cottrell@wfu.edu> wrote:
A follow-up to Jack's posting at
http://lists.wfu.edu/pipermail/gretl-devel/2013-March/004371.html

The question Jack raised was about what happens when you
already have gretl running, and you double-click a file for
which gretl is registered as the handler (e.g. a .gdt data
file or .inp script file).

The OS defaults are: (a) for Linux and Windows you'd get the
file opened by a new gretl instance, but (b) on OS X (at least
with the new gtk-quartz build of gretl) you'd get the file
opened in the current gretl instance.

To provide choice on this on the OS X side I added (again this
is just in the gtk-quartz build) an option to open a new gretl
instance if you want.

Now on Linux and Windows I've added some functionality to
support choice. If you double-click on a gretl-type file this
will launch a new gretl instance, but that instance will now,
before showing itself, look around to see if gretl is already
running. If so, it'll put up a dialog box asking if you want a
new instance. And if you say "No" it'll pass a message to the
prior instance requesting that the file be opened, then exit.
Thi is implemented via the POSIX signals API on Linux, and the
Windows Messages API on win32.

This is in CVS and the Windows snapshot. Please test, and
report any breakage! Thanks.

Allin

_______________________________________________
Gretl-devel mailing list
Gretl-devel@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel



--
Paul E. Johnson
Professor, Political Science      Assoc. Director
1541 Lilac Lane, Room 504      Center for Research Methods
University of Kansas                 University of Kansas
http://pj.freefaculty.org               http://quant.ku.edu