Add a commandline argument to allow specifying the window title. Closes LP #370064

This commit is contained in:
Chris Jones 2009-05-04 02:00:44 +01:00
parent 676ddfdb0c
commit ee1490dc4a
4 changed files with 11 additions and 2 deletions

View File

@ -10,6 +10,7 @@ terminator 0.13:
* The tab bar can now be hidden and/or scrolled.
* Add configurability of cursor colour and shape
* Support various VoIP URIs
* Addcommand line option to force a particular window title
terminator 0.12:
* Bug fixes

View File

@ -37,6 +37,10 @@ Terminator window (good with \-m)
Hide the Terminator window by default. Its visibility can be toggled
with the \fBhide_window\fR keyboard shortcut (Ctrl-Shift-Alt-a by default)
.TP
.B \-T, \-\-title
Force the Terminator window to use a specific name rather than updating it dynamically
based on the wishes of the child shell.
.TP
.B \-\-no_gconf
Ignore the gconf settings of gnome-terminal
.TP

View File

@ -90,6 +90,8 @@ if __name__ == '__main__':
dest="borderless", help="Turn off the window's borders")
parser.add_option("-H", "--hidden", action="store_true", dest="hidden",
help="Open the %s window hidden"%APP_NAME.capitalize())
parser.add_option("-T", "--title", dest="forcedtitle",
help="Specify a title to use for the window")
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",
@ -166,7 +168,7 @@ See the following bug report for more details:
dbg ('profile_cb: settled on profile: "%s"' % options.profile)
term = Terminator (options.profile, command, options.fullscreen,
options.maximise, options.borderless, options.no_gconf,
options.geometry, options.hidden)
options.geometry, options.hidden, options.forcedtitle)
if options.debug > 1:
import terminatorlib.debugserver as debugserver

View File

@ -212,7 +212,7 @@ class Terminator:
def __init__ (self, profile = None, command = None, fullscreen = False,
maximise = False, borderless = False, no_gconf = False,
geometry = None, hidden = False):
geometry = None, hidden = False, forcedtitle = None):
self.profile = profile
self.command = command
@ -306,6 +306,8 @@ class Terminator:
self.window = gtk.Window ()
self.windowtitle = TerminatorWindowTitle (self.window)
if forcedtitle:
self.windowtitle.force_title (forcedtitle)
self.windowtitle.update ()
if self._geometry is not None: