Make maximisation a non-default option
This commit is contained in:
parent
f9f46b3b4a
commit
05eb675a46
10
terminator
10
terminator
|
@ -325,7 +325,7 @@ class TerminatorTerm:
|
||||||
return self._box
|
return self._box
|
||||||
|
|
||||||
class Terminator:
|
class Terminator:
|
||||||
def __init__ (self, profile):
|
def __init__ (self, profile, maximise):
|
||||||
self.profile = profile
|
self.profile = profile
|
||||||
self.gconf_client = gconf.client_get_default ()
|
self.gconf_client = gconf.client_get_default ()
|
||||||
|
|
||||||
|
@ -334,6 +334,8 @@ class Terminator:
|
||||||
self.window.set_icon (self.icon)
|
self.window.set_icon (self.icon)
|
||||||
self.window.connect ("delete_event", self.on_delete_event)
|
self.window.connect ("delete_event", self.on_delete_event)
|
||||||
self.window.connect ("destroy", self.on_destroy_event)
|
self.window.connect ("destroy", self.on_destroy_event)
|
||||||
|
|
||||||
|
if maximise:
|
||||||
self.window.maximize ()
|
self.window.maximize ()
|
||||||
|
|
||||||
self.window.set_property ('allow-shrink', True)
|
self.window.set_property ('allow-shrink', True)
|
||||||
|
@ -518,11 +520,13 @@ Usage: terminator [OPTION]...
|
||||||
-h, --help Show this usage information
|
-h, --help Show this usage information
|
||||||
-d, --debug Enable debugging
|
-d, --debug Enable debugging
|
||||||
-p, --profile=PROFILE Take settings from gnome-terminal profile PROFILE
|
-p, --profile=PROFILE Take settings from gnome-terminal profile PROFILE
|
||||||
|
-m, --maximise Maximise the terminator window when it starts
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
debug = 0
|
debug = 0
|
||||||
profile = "Default"
|
profile = "Default"
|
||||||
|
maximise = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt (sys.argv[1:], "hdp:", ["help", "debug", "profile="])
|
opts, args = getopt.getopt (sys.argv[1:], "hdp:", ["help", "debug", "profile="])
|
||||||
|
@ -538,7 +542,9 @@ if __name__ == '__main__':
|
||||||
debug = 1
|
debug = 1
|
||||||
if opt in ("-p", "--profile"):
|
if opt in ("-p", "--profile"):
|
||||||
profile = arg
|
profile = arg
|
||||||
|
if opt in ("-m", "--maximise"):
|
||||||
|
maximise = True
|
||||||
|
|
||||||
term = Terminator (profile)
|
term = Terminator (profile, maximise)
|
||||||
gtk.main ()
|
gtk.main ()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue