Set window title and add support for removing window border

This commit is contained in:
Chris Jones 2008-01-05 01:05:41 +00:00
parent a8707e790f
commit 9914817630
1 changed files with 10 additions and 2 deletions

View File

@ -22,6 +22,7 @@ Usage: terminator [OPTION] ...
-d, --debug Enable debugging
-m, --maximise Maximise the terminator window when it starts
-f, --fullscreen Place the window in its fullscreen state when it starts
-b, --borderless Draw the terminator window without a window border (useful with -m)
-p, --profile=PROFILE Take settings from gnome-terminal profile PROFILE
"""
@ -388,6 +389,7 @@ class Terminator:
self._fullscreen = False
self.window = gtk.Window ()
self.window.set_title ("Terminator")
self.icon = self.window.render_icon (gtk.STOCK_DIALOG_INFO, gtk.ICON_SIZE_BUTTON)
self.window.set_icon (self.icon)
@ -609,8 +611,8 @@ def usage ():
if __name__ == '__main__':
# define the options
short_opts = "hdmfp:"
long_opts = ["help", "debug", "maximise", "fullscreen", "profile="]
short_opts = "hdmfbp:"
long_opts = ["help", "debug", "maximise", "fullscreen", "borderless", "profile="]
# parse the options
try:
@ -624,6 +626,7 @@ if __name__ == '__main__':
profile = "Default"
maximise = False
fullscreen = False
borderless = False
# check the options
for opt, arg in opts:
@ -636,6 +639,8 @@ if __name__ == '__main__':
maximise = True
if opt in ("-f", "--fullscreen"):
fullscreen = True
if opt in ("-b", "--borderless"):
borderless = True
if opt in ("-p", "--profile"):
profile = arg
@ -649,5 +654,8 @@ if __name__ == '__main__':
elif maximise:
term.maximize ()
if borderless:
term.window.set_decorated (False)
gtk.main ()