Merge Markus Korn's branch for LP #246706
This commit is contained in:
commit
18ffbcd62e
|
@ -33,6 +33,9 @@ Place the Terminator window in its fullscreen state when it starts
|
||||||
Instruct the window manager not to render borders/decoration on the
|
Instruct the window manager not to render borders/decoration on the
|
||||||
Terminator window (good with \-m)
|
Terminator window (good with \-m)
|
||||||
.TP
|
.TP
|
||||||
|
.B \-\-no_gconf
|
||||||
|
Ignore the gconf settings of gnome-terminal
|
||||||
|
.TP
|
||||||
.B \-p, \-\-profile=PROFILE
|
.B \-p, \-\-profile=PROFILE
|
||||||
Loads the GNOME Terminal profile named PROFILE
|
Loads the GNOME Terminal profile named PROFILE
|
||||||
.TP
|
.TP
|
||||||
|
|
|
@ -87,6 +87,7 @@ if __name__ == '__main__':
|
||||||
parser.add_option ("-m", "--maximise", action="store_true", dest="maximise", help="Open the %s window maximised"%APP_NAME.capitalize())
|
parser.add_option ("-m", "--maximise", action="store_true", dest="maximise", help="Open the %s window maximised"%APP_NAME.capitalize())
|
||||||
parser.add_option ("-f", "--fullscreen", action="store_true", dest="fullscreen", help="Set the window into fullscreen mode")
|
parser.add_option ("-f", "--fullscreen", action="store_true", dest="fullscreen", help="Set the window into fullscreen mode")
|
||||||
parser.add_option ("-b", "--borderless", action="store_true", dest="borderless", help="Turn off the window's borders")
|
parser.add_option ("-b", "--borderless", action="store_true", dest="borderless", help="Turn off the window's borders")
|
||||||
|
parser.add_option ("-n", "--no-gconf", dest="no_gconf", action="store_true", help="ignore gnome-terminal gconf settings")
|
||||||
parser.add_option ("-p", "--profile", dest="profile", action="callback", callback=profile_cb, help="Specify a GNOME Terminal profile to emulate")
|
parser.add_option ("-p", "--profile", dest="profile", action="callback", callback=profile_cb, help="Specify a GNOME Terminal profile to emulate")
|
||||||
parser.add_option ("-e", "--command", dest="command", help="Execute the argument to this option inside the terminal")
|
parser.add_option ("-e", "--command", dest="command", help="Execute the argument to this option inside the terminal")
|
||||||
parser.add_option ("-x", "--execute", dest="execute", action="callback", callback=execute_cb, help="Execute the remainder of the command line inside the terminal")
|
parser.add_option ("-x", "--execute", dest="execute", action="callback", callback=execute_cb, help="Execute the remainder of the command line inside the terminal")
|
||||||
|
@ -94,6 +95,9 @@ if __name__ == '__main__':
|
||||||
(options, args) = parser.parse_args ()
|
(options, args) = parser.parse_args ()
|
||||||
if len (args) != 0:
|
if len (args) != 0:
|
||||||
parser.error("Expecting zero additional arguments, found: %d"%len (args))
|
parser.error("Expecting zero additional arguments, found: %d"%len (args))
|
||||||
|
|
||||||
|
if options.no_gconf and options.profile:
|
||||||
|
parser.error("using --no-gconf and defining a profile at the same time does not make sense")
|
||||||
|
|
||||||
if options.version:
|
if options.version:
|
||||||
print "%s %s"%(APP_NAME, APP_VERSION)
|
print "%s %s"%(APP_NAME, APP_VERSION)
|
||||||
|
@ -136,7 +140,7 @@ See the following bug report for more details:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
dbg ('profile_cb: settled on profile: "%s"'%options.profile)
|
dbg ('profile_cb: settled on profile: "%s"'%options.profile)
|
||||||
term = Terminator (options.profile, command, options.fullscreen, options.maximise, options.borderless)
|
term = Terminator (options.profile, command, options.fullscreen, options.maximise, options.borderless, options.no_gconf)
|
||||||
|
|
||||||
gtk.main ()
|
gtk.main ()
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ class TerminatorNotebookTabLabel(gtk.HBox):
|
||||||
return self.size_request()[0]
|
return self.size_request()[0]
|
||||||
|
|
||||||
class Terminator:
|
class Terminator:
|
||||||
def __init__ (self, profile = None, command = None, fullscreen = False, maximise = False, borderless = False):
|
def __init__ (self, profile = None, command = None, fullscreen = False, maximise = False, borderless = False, no_gconf=False):
|
||||||
self.profile = profile
|
self.profile = profile
|
||||||
self.command = command
|
self.command = command
|
||||||
|
|
||||||
|
@ -99,21 +99,22 @@ class Terminator:
|
||||||
stores = []
|
stores = []
|
||||||
stores.append (config.TerminatorConfValuestoreRC ())
|
stores.append (config.TerminatorConfValuestoreRC ())
|
||||||
|
|
||||||
try:
|
if not no_gconf:
|
||||||
import gconf
|
try:
|
||||||
if self.profile:
|
import gconf
|
||||||
self.profile = gconf.escape_key (self.profile, -1)
|
if self.profile:
|
||||||
store = config.TerminatorConfValuestoreGConf (self.profile)
|
self.profile = gconf.escape_key (self.profile, -1)
|
||||||
store.set_reconfigure_callback (self.reconfigure_vtes)
|
store = config.TerminatorConfValuestoreGConf (self.profile)
|
||||||
dbg ('Terminator__init__: comparing %s and %s'%(self.profile, store.profile.split ('/').pop ()))
|
store.set_reconfigure_callback (self.reconfigure_vtes)
|
||||||
if self.profile == store.profile.split ('/').pop ():
|
dbg ('Terminator__init__: comparing %s and %s'%(self.profile, store.profile.split ('/').pop ()))
|
||||||
# If we have been given a profile, and we loaded it, we should be higher priority than RC
|
if self.profile == store.profile.split ('/').pop ():
|
||||||
dbg ('Terminator__init__: placing GConf before RC')
|
# If we have been given a profile, and we loaded it, we should be higher priority than RC
|
||||||
stores.insert (0, store)
|
dbg ('Terminator__init__: placing GConf before RC')
|
||||||
else:
|
stores.insert (0, store)
|
||||||
stores.append (store)
|
else:
|
||||||
except:
|
stores.append (store)
|
||||||
pass
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
self.conf = config.TerminatorConfig (stores)
|
self.conf = config.TerminatorConfig (stores)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue