--hidden --minimized

This commit is contained in:
Eric Blade 2010-11-27 20:35:34 -05:00
parent e2b86eb239
commit 7402c57eb1
3 changed files with 16 additions and 1 deletions

View File

@ -102,6 +102,11 @@ class HUD_main(object):
# a main window
self.main_window = gtk.Window()
if options.minimized:
self.main_window.iconify()
if options.hidden:
self.main_window.hide()
if options.xloc is not None or options.yloc is not None:
if options.xloc is None:
options.xloc = 0
@ -126,7 +131,8 @@ class HUD_main(object):
self.main_window.set_icon_from_file('/usr/share/pixmaps/fpdb-cards.png')
else:
self.main_window.set_icon_stock(gtk.STOCK_HOME)
self.main_window.show_all()
if not options.hidden:
self.main_window.show_all()
gobject.timeout_add(100, self.check_tables)
except:

View File

@ -65,6 +65,10 @@ def fpdb_options():
help=_("Y location to open Window"))
parser.add_option("--autoimport", action="store_true", dest="autoimport",
help=_("Auto-start Auto-import"))
parser.add_option("--minimized", action="store_true", dest="minimized",
help=_("Start Minimized"))
parser.add_option("--hidden", action="store_true", dest="hidden",
help=_("Start Hidden"))
(options, argv) = parser.parse_args()

View File

@ -1140,6 +1140,11 @@ You can find the full license texts in agpl-3.0.txt, gpl-2.0.txt, gpl-3.0.txt an
self.nb_tab_names=[] # list of tab names currently displayed in notebook
self.tab_main_help(None, None)
if options.minimized:
self.window.iconify()
if options.hidden:
self.window.hide()
self.window.show()
self.visible = True # Flip on