Indicate if set_active_tab() worked or not
This commit is contained in:
parent
40b9049deb
commit
eb006a6688
@ -846,7 +846,8 @@ class Boss:
|
|||||||
def set_active_tab(self, tab):
|
def set_active_tab(self, tab):
|
||||||
tm = self.active_tab_manager
|
tm = self.active_tab_manager
|
||||||
if tm is not None:
|
if tm is not None:
|
||||||
tm.set_active_tab(tab)
|
return tm.set_active_tab(tab)
|
||||||
|
return False
|
||||||
|
|
||||||
def next_tab(self):
|
def next_tab(self):
|
||||||
tm = self.active_tab_manager
|
tm = self.active_tab_manager
|
||||||
|
|||||||
@ -478,8 +478,9 @@ class TabManager: # {{{
|
|||||||
try:
|
try:
|
||||||
idx = self.tabs.index(tab)
|
idx = self.tabs.index(tab)
|
||||||
except Exception:
|
except Exception:
|
||||||
return
|
return False
|
||||||
self.set_active_tab_idx(idx)
|
self.set_active_tab_idx(idx)
|
||||||
|
return True
|
||||||
|
|
||||||
def next_tab(self, delta=1):
|
def next_tab(self, delta=1):
|
||||||
if len(self.tabs) > 1:
|
if len(self.tabs) > 1:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user