Deprecate the hide_tabbar config option and instead add a 'hidden' value to tab_position and update the code/UI/docs accordingly.
This commit is contained in:
parent
d1989ec4a6
commit
7522bb2b9d
|
@ -54,6 +54,7 @@ Default value: \fBFalse\fR
|
|||
.TP
|
||||
.B tab_position
|
||||
Defines where tabs are placed. Can be any of: top, left, right, bottom.
|
||||
If this is set to "hidden", the tab bar will not be shown. Note that hiding the tab bar is very confusing and not recommended.
|
||||
Default value: \fBtop\fR
|
||||
.TP
|
||||
.B close_button_on_tab \fR(boolean)
|
||||
|
@ -62,6 +63,7 @@ Default value: \fBTrue\fR
|
|||
.TP
|
||||
.B hide_tabbar \fR(boolean)
|
||||
If set to True, the tab bar will be hidden. This means there will be no visual indication of either how many tabs there are, or which one you are on. Be warned that this can be very confusing and hard to use.
|
||||
.B NOTE: THIS OPTION IS DEPRECATED, USE tab_position INSTEAD
|
||||
Default value: \fBFalse\fR
|
||||
.TP
|
||||
.B scroll_tabbar \fR(boolean)
|
||||
|
|
|
@ -199,6 +199,8 @@ the %s will also close all terminals within it.') % (reqtype, reqtype))
|
|||
terminals = {}
|
||||
|
||||
for child in self.get_offspring():
|
||||
if not child:
|
||||
continue
|
||||
if maker.isinstance(child, 'Terminal'):
|
||||
terminals[child] = child.get_allocation()
|
||||
elif maker.isinstance(child, 'Container'):
|
||||
|
|
|
@ -48,9 +48,12 @@ class Notebook(Container, gtk.Notebook):
|
|||
self.set_property('homogeneous', True)
|
||||
self.set_scrollable(self.config['scroll_tabbar'])
|
||||
|
||||
if self.config['tab_position'] == 'hidden' or self.config['hide_tabbar']:
|
||||
self.set_show_tabs(False)
|
||||
else:
|
||||
self.set_show_tabs(True)
|
||||
pos = getattr(gtk, 'POS_%s' % self.config['tab_position'].upper())
|
||||
self.set_tab_pos(pos)
|
||||
self.set_show_tabs(not self.config['hide_tabbar'])
|
||||
|
||||
for tab in xrange(0, self.get_n_pages()):
|
||||
label = self.get_tab_label(self.get_nth_page(tab))
|
||||
|
|
|
@ -57,6 +57,9 @@
|
|||
<row>
|
||||
<col id="0" translatable="yes">Right</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Hidden</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="CursorShapeListStore">
|
||||
|
|
|
@ -210,6 +210,8 @@ class PrefsEditor:
|
|||
active = 2
|
||||
elif option == 'right':
|
||||
active = 3
|
||||
elif option == 'hidden':
|
||||
active = 4
|
||||
else:
|
||||
active = 0
|
||||
widget.set_active(active)
|
||||
|
@ -852,6 +854,8 @@ class PrefsEditor:
|
|||
value = 'left'
|
||||
elif selected == 3:
|
||||
value = 'right'
|
||||
elif selected == 4:
|
||||
value = 'hidden'
|
||||
else:
|
||||
value = 'top'
|
||||
self.config['tab_position'] = value
|
||||
|
|
|
@ -431,9 +431,12 @@ class Window(Container, gtk.Window):
|
|||
def get_visible_terminals(self):
|
||||
"""Walk down the widget tree to find all of the visible terminals.
|
||||
Mostly using Container::get_visible_terminals()"""
|
||||
terminals = {}
|
||||
maker = Factory()
|
||||
child = self.get_child()
|
||||
terminals = {}
|
||||
|
||||
if not child:
|
||||
return([])
|
||||
|
||||
# If our child is a Notebook, reset to work from its visible child
|
||||
if maker.isinstance(child, 'Notebook'):
|
||||
|
|
Loading…
Reference in New Issue