Drag and drop ordering continues to be insane. Refactor it so we're not double-negativing. This appears to fix everything about it
This commit is contained in:
parent
8e0c5aacbc
commit
cc77c3bc4e
|
@ -64,7 +64,6 @@ class Notebook(Container, gtk.Notebook):
|
||||||
err('incorrect number of children for Notebook: %s' % layout)
|
err('incorrect number of children for Notebook: %s' % layout)
|
||||||
return
|
return
|
||||||
|
|
||||||
pages = 2 # Notebooks always start with two pages
|
|
||||||
num = 0
|
num = 0
|
||||||
keys = children.keys()
|
keys = children.keys()
|
||||||
keys.sort()
|
keys.sort()
|
||||||
|
@ -87,7 +86,7 @@ class Notebook(Container, gtk.Notebook):
|
||||||
page.create_layout(children[child_key])
|
page.create_layout(children[child_key])
|
||||||
num = num + 1
|
num = num + 1
|
||||||
|
|
||||||
def split_axis(self, widget, vertical=True, sibling=None, widgetlast=False):
|
def split_axis(self, widget, vertical=True, sibling=None, widgetfirst=True):
|
||||||
"""Split the axis of a terminal inside us"""
|
"""Split the axis of a terminal inside us"""
|
||||||
order = None
|
order = None
|
||||||
page_num = self.page_num(widget)
|
page_num = self.page_num(widget)
|
||||||
|
@ -112,8 +111,8 @@ class Notebook(Container, gtk.Notebook):
|
||||||
self.set_tab_label(container, label)
|
self.set_tab_label(container, label)
|
||||||
self.show_all()
|
self.show_all()
|
||||||
|
|
||||||
order = [sibling, widget]
|
order = [widget, sibling]
|
||||||
if widgetlast is True:
|
if widgetfirst is False:
|
||||||
order.reverse()
|
order.reverse()
|
||||||
|
|
||||||
for terminal in order:
|
for terminal in order:
|
||||||
|
|
|
@ -41,7 +41,7 @@ class Paned(Container):
|
||||||
|
|
||||||
# pylint: disable-msg=W0613
|
# pylint: disable-msg=W0613
|
||||||
def split_axis(self, widget, vertical=True, sibling=None,
|
def split_axis(self, widget, vertical=True, sibling=None,
|
||||||
widgetlast=False):
|
widgetfirst=True):
|
||||||
"""Default axis splitter. This should be implemented by subclasses"""
|
"""Default axis splitter. This should be implemented by subclasses"""
|
||||||
order = None
|
order = None
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ class Paned(Container):
|
||||||
self.show_all()
|
self.show_all()
|
||||||
|
|
||||||
order = [widget, sibling]
|
order = [widget, sibling]
|
||||||
if widgetlast is False:
|
if widgetfirst is False:
|
||||||
order.reverse()
|
order.reverse()
|
||||||
|
|
||||||
for terminal in order:
|
for terminal in order:
|
||||||
|
|
|
@ -291,7 +291,7 @@ class Window(Container, gtk.Window):
|
||||||
Container.closeterm(self, widget)
|
Container.closeterm(self, widget)
|
||||||
self.hoover()
|
self.hoover()
|
||||||
|
|
||||||
def split_axis(self, widget, vertical=True, sibling=None, widgetlast=False):
|
def split_axis(self, widget, vertical=True, sibling=None, widgetfirst=True):
|
||||||
"""Split the window"""
|
"""Split the window"""
|
||||||
order = None
|
order = None
|
||||||
maker = Factory()
|
maker = Factory()
|
||||||
|
@ -308,8 +308,8 @@ class Window(Container, gtk.Window):
|
||||||
self.add(container)
|
self.add(container)
|
||||||
container.show_all()
|
container.show_all()
|
||||||
|
|
||||||
order = [sibling, widget]
|
order = [widget, sibling]
|
||||||
if widgetlast is True:
|
if widgetfirst is False:
|
||||||
order.reverse()
|
order.reverse()
|
||||||
|
|
||||||
for term in order:
|
for term in order:
|
||||||
|
|
Loading…
Reference in New Issue