Add a --nowindow argument.

This commit is contained in:
Florian Bruhin 2014-08-02 00:47:04 +02:00
parent 3b16207bfc
commit df0558fb47
2 changed files with 4 additions and 1 deletions

View File

@ -163,7 +163,8 @@ class Application(QApplication):
self.modeman.enter(KeyMode.normal, 'init') self.modeman.enter(KeyMode.normal, 'init')
log.init.debug("Showing mainwindow...") log.init.debug("Showing mainwindow...")
self.mainwindow.show() if not args.nowindow:
self.mainwindow.show()
log.init.debug("Applying python hacks...") log.init.debug("Applying python hacks...")
self._python_hacks() self._python_hacks()
timer = QTimer.singleShot(0, self._process_init_args) timer = QTimer.singleShot(0, self._process_init_args)

View File

@ -64,6 +64,8 @@ def get_argparser():
debug.add_argument('--harfbuzz', choices=['old', 'new', 'system', 'auto'], debug.add_argument('--harfbuzz', choices=['old', 'new', 'system', 'auto'],
default='auto', help="HarfBuzz engine version to use. " default='auto', help="HarfBuzz engine version to use. "
"Default: auto.") "Default: auto.")
debug.add_argument('--nowindow', action='store_true', help="Don't show "
"the main window.")
# For the Qt args, we use store_const with const=True rather than # For the Qt args, we use store_const with const=True rather than
# store_true because we want the default to be None, to make # store_true because we want the default to be None, to make
# utils.qt:get_qt_args easier. # utils.qt:get_qt_args easier.