Skip to content

Commit

Permalink
Port code to current master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
pinusc committed Feb 17, 2019
1 parent 3fd69ea commit 6d07b1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions qutebrowser/browser/commands.py
Expand Up @@ -82,8 +82,6 @@ def _set_current_index(self, idx):
"""Convenience method to set the current widget index."""
cmdutils.check_overflow(idx, 'int')
self._tabbed_browser.widget.setCurrentIndex(idx)
self._tabbed_browser.setCurrentIndex(idx)
self._tabbed_browser.print_tree_tab_structure("---- Printing from Command _set_current_index ----\n")

def _current_index(self):
"""Convenience method to get the current widget index."""
Expand Down Expand Up @@ -1738,7 +1736,7 @@ def tree_tab_print(self):
Args:
"""
self._tabbed_browser.print_tree_tab_structure("---- Printing from Command tree_tab_printf----\n")
self._tabbed_browser.widget.print_tree_tab_structure("---- Printing from Command tree_tab_printf----\n")

@cmdutils.register(instance='command-dispatcher', scope='window')
def tree_tab_promote(self):
Expand All @@ -1756,8 +1754,8 @@ def tree_tab_promote(self):
tab.node.parent = grandparent


self._tabbed_browser.update_tab_titles()
self._tabbed_browser.update_tree_tab_positions('command: tree_tab_promote')
self._tabbed_browser.widget.update_tab_titles()
self._tabbed_browser.widget.update_tree_tab_positions('command: tree_tab_promote')

@cmdutils.register(instance='command-dispatcher', scope='window')
def tree_tab_demote(self):
Expand All @@ -1780,8 +1778,8 @@ def tree_tab_demote(self):

cur_node.parent = siblings[node_idx]

self._tabbed_browser.update_tab_titles()
self._tabbed_browser.update_tree_tab_positions('command: tree_tab_demote')
self._tabbed_browser.widget.update_tab_titles()
self._tabbed_browser.widget.update_tree_tab_positions('command: tree_tab_demote')

@cmdutils.register(instance='command-dispatcher', scope='window')
def tree_tab_rotate_up(self):
Expand All @@ -1799,7 +1797,7 @@ def tree_tab_rotate_up(self):

parent.children = siblings

self._tabbed_browser.update_tree_tab_positions('command: tree_tab_rotate_up')
self._tabbed_browser.widget.update_tree_tab_positions('command: tree_tab_rotate_up')

@cmdutils.register(instance='command-dispatcher', scope='window')
def tree_tab_next_on_same_level(self):
Expand Down
2 changes: 1 addition & 1 deletion qutebrowser/mainwindow/tabbedbrowser.py
Expand Up @@ -510,7 +510,7 @@ def tabopen(self, url=None, background=None, related=True, idx=None, *,
# this was necessary to remove otherwise it was making a hell of a mess in tree structure
# if idx is None:
# idx = self._get_new_tab_idx(explicit)
idx = self._get_new_tab_idx(explicit)
idx = self._get_new_tab_idx(related)

self.widget.insertTab(idx, tab, "")

Expand Down

0 comments on commit 6d07b1d

Please sign in to comment.