Add support for tab_position.
This commit is contained in:
parent
6016f06775
commit
3c77ec10c1
@ -182,14 +182,18 @@ Default value: \fBTrue\fR
|
||||
If set to True, tabs will have a close button on them.
|
||||
Default value: \fBTrue\fR
|
||||
.TP
|
||||
.B copy_on_selection \fR(boolean)
|
||||
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
|
||||
.B tab_position
|
||||
Defines where tabs are placed. Can be any of: top, left, right, bottom.
|
||||
Default value: \fBtop\fR
|
||||
.TP
|
||||
.B extreme_tabs \fB(boolean)\fR
|
||||
If set to True, tabs can be created within other tabs. Be warned that this can be very confusing and hard to use.
|
||||
Default value: \fBFalse\fR
|
||||
.TP
|
||||
.B copy_on_selection \fR(boolean)
|
||||
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
|
||||
.TP
|
||||
.B try_posix_regexp \fB(boolean)\fR
|
||||
If set to True, URL matching regexps will try to use POSIX style first, and fall back on GNU style on failure. If you are on Linux but URL matches don't work, try setting this to True. If you are not on Linux, but you get VTE warnings on startup saying "Error compiling regular expression", set this to False to silence them (they are otherwise harmless).
|
||||
Default value: \fBFalse\fR on Linux, \fBTrue\fR otherwise.
|
||||
|
@ -98,6 +98,7 @@ Defaults = {
|
||||
'cycle_term_tab' : True,
|
||||
'copy_on_selection' : False,
|
||||
'close_button_on_tab' : True,
|
||||
'tab_position' : 'top',
|
||||
'enable_real_transparency' : False,
|
||||
'try_posix_regexp' : platform.system() != 'Linux',
|
||||
'keybindings' : {
|
||||
@ -269,6 +270,11 @@ Errors were encountered while parsing terminator_config(5) file:
|
||||
self.values[key] = value
|
||||
except ValueError:
|
||||
raise ValueError(_("Setting %s value %s not a valid colour; ignoring") % (key,repr(value)))
|
||||
elif key == 'tab_position':
|
||||
if value.lower() in ('top', 'left', 'bottom', 'right'):
|
||||
self.values[key] = value.lower()
|
||||
else:
|
||||
raise ValueError(_("%s must be one of: top, left, right, bottom") % key)
|
||||
elif deftype == 'bool':
|
||||
if value.lower () in ('true', 'yes', 'on'):
|
||||
self.values[key] = True
|
||||
|
@ -34,7 +34,12 @@ class TerminatorNotebookTabLabel(gtk.HBox):
|
||||
gtk.HBox.__init__(self, False)
|
||||
self._notebook = notebook
|
||||
self.terminator = terminator
|
||||
self._label = gtk.Label(title)
|
||||
self._label = gtk.Label(title)
|
||||
tab_pos = notebook.get_tab_pos()
|
||||
if tab_pos == gtk.POS_LEFT:
|
||||
self._label.set_angle(90)
|
||||
elif tab_pos == gtk.POS_RIGHT:
|
||||
self._label.set_angle(270)
|
||||
icon = gtk.Image()
|
||||
icon.set_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_MENU)
|
||||
self.pack_start(self._label, True, True)
|
||||
@ -344,7 +349,7 @@ class Terminator:
|
||||
parent.set_tab_label_packing(pane, True, True, gtk.PACK_START)
|
||||
parent.set_tab_reorderable(pane, True)
|
||||
parent.set_current_page(page)
|
||||
|
||||
|
||||
position = (vertical) and parent.allocation.height \
|
||||
or parent.allocation.width
|
||||
|
||||
@ -480,10 +485,12 @@ class Terminator:
|
||||
((self.conf.extreme_tabs and not toplevel) or not isinstance(child, gtk.Notebook))):
|
||||
#no notebook yet.
|
||||
notebook = gtk.Notebook()
|
||||
#notebook.set_tab_pos(gtk.POS_TOP)
|
||||
notebook.connect('page-reordered',self.on_page_reordered)
|
||||
notebook.set_property('homogeneous', True)
|
||||
notebook.set_tab_reorderable(widget, True)
|
||||
# Config validates this.
|
||||
pos = getattr(gtk, "POS_%s" % self.conf.tab_position.upper())
|
||||
notebook.set_tab_pos(pos)
|
||||
|
||||
if isinstance(parent, gtk.Paned):
|
||||
if parent.get_child1() == child:
|
||||
|
Loading…
Reference in New Issue
Block a user