desktop: open a file via xdg-open without additional output window
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>
Sun, 28 Jun 2020 16:46:43 +0000 (18:46 +0200)
committerFriedrich Beckmann <friedrich.beckmann@gmx.de>
Sun, 28 Jun 2020 16:46:43 +0000 (18:46 +0200)
commita79bd621c1a9c91f84c39ddfda501de63aa2697e
tree4d4d0a907aecec017ba1cfcab56d21a4ffbbe133
parentd9c674e05188abe16dc9440a8c1597632982dd48
desktop: open a file via xdg-open without additional output window

Currently there is a difference between opening an additional data
file via the Edit->Open menu or by opening a file via xdg-open (same
for doubleclick on Filebrowser). In the latter case the on_open
callback is called which runs an additional post_initialize. That
results in an additional output window.

I changed the behavior such that post_initialize is only called
when there is no psppire window yet. That happens when psppire
is started from a terminal with the file as argument on linux.
Further I check if there is an empty datawindow and replace that
in the same way as it is done via the Edit->Open menu.
src/ui/gui/main.c
src/ui/gui/psppire.c
src/ui/gui/psppire.h