Add close_button_on_tab option, defaulting to true. Set to false to turn off close buttons on tabs.

This commit is contained in:
Thomas Hurst 2008-06-27 18:54:42 +01:00
parent d34496416f
commit 254ecec810
3 changed files with 12 additions and 6 deletions

View File

@ -133,6 +133,10 @@ Default value: \fBFalse\fR
.B cycle_term_tab .B cycle_term_tab
If this is set to true, when switching to the next/previous term, Terminator will cycle within the same tab. Ctrl-PageUp/PageDown can then be used to move from one tab to the other one. If this is set to true, when switching to the next/previous term, Terminator will cycle within the same tab. Ctrl-PageUp/PageDown can then be used to move from one tab to the other one.
Default value: \fBTrue\fR Default value: \fBTrue\fR
.TP
.B close_button_on_tab
If set to true, tabs will have a close button on them.
Default value: \fBTrue\fR
.B copy_on_selection .B copy_on_selection
If set to True, text selections will be automatically copied to the clipboard, in addition to being made the Primary selection. If set to True, text selections will be automatically copied to the clipboard, in addition to being made the Primary selection.
Default value: \fBFalse\fR Default value: \fBFalse\fR

View File

@ -126,6 +126,7 @@ class TerminatorConfValuestore:
'force_no_bell' : False, 'force_no_bell' : False,
'cycle_term_tab' : True, 'cycle_term_tab' : True,
'copy_on_selection' : False, 'copy_on_selection' : False,
'close_button_on_tab' : True,
} }
def __getattr__ (self, keyname): def __getattr__ (self, keyname):

View File

@ -39,12 +39,13 @@ class TerminatorNotebookTabLabel(gtk.HBox):
icon = gtk.Image() icon = gtk.Image()
icon.set_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_MENU) icon.set_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_MENU)
self.pack_start(self._label, True, True)
if terminator.conf.close_button_on_tab:
self._button = gtk.Button() self._button = gtk.Button()
self._button.set_relief(gtk.RELIEF_NONE) self._button.set_relief(gtk.RELIEF_NONE)
self._button.set_image(icon) self._button.set_image(icon)
self._button.connect('clicked', self.on_close) self._button.connect('clicked', self.on_close)
self.pack_start(self._label, True, True)
self.pack_start(self._button, False, False) self.pack_start(self._button, False, False)
self.show_all() self.show_all()