mirror of
https://github.com/lutris/lutris
synced 2024-09-15 13:59:50 +00:00
GH-578 Hide GUI window on rungame command
Prevent Lutris window to open when running a game from command line. The opening window seems to be a regression introduced by commitdabf7ef
which was a revert of commit7ca5f6c9
. Adding back chunks of commit7ca5f6c9
prevent the Lutris window from opening when running game from command line. Also removing a duplicate entry from the .gitignore file and adding JetBrains IDE projet directory.
This commit is contained in:
parent
6ea72414b6
commit
10ca90578c
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -9,8 +9,8 @@ build
|
||||||
.pydevproject
|
.pydevproject
|
||||||
.settings
|
.settings
|
||||||
.ropeproject
|
.ropeproject
|
||||||
|
.idea
|
||||||
tags
|
tags
|
||||||
.ropeproject
|
|
||||||
*.pyc
|
*.pyc
|
||||||
*.pyo
|
*.pyo
|
||||||
PYSMELLTAGS
|
PYSMELLTAGS
|
||||||
|
|
|
@ -183,7 +183,6 @@ class Application(Gtk.Application):
|
||||||
Gtk.StyleContext.add_provider_for_screen(
|
Gtk.StyleContext.add_provider_for_screen(
|
||||||
screen, self.css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
|
screen, self.css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
|
||||||
)
|
)
|
||||||
self.window.present()
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _print(command_line, string):
|
def _print(command_line, string):
|
||||||
|
@ -330,6 +329,8 @@ class Application(Gtk.Application):
|
||||||
elif action in ("rungame", "rungameid"):
|
elif action in ("rungame", "rungameid"):
|
||||||
if not db_game or not db_game["id"]:
|
if not db_game or not db_game["id"]:
|
||||||
logger.warning("No game found in library")
|
logger.warning("No game found in library")
|
||||||
|
if not self.window.is_visible():
|
||||||
|
self.do_shutdown()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
logger.info("Launching %s", db_game["name"])
|
logger.info("Launching %s", db_game["name"])
|
||||||
|
|
Loading…
Reference in a new issue