Minor tweaks per PR review

This commit is contained in:
blitzmann
2020-06-20 14:59:49 -04:00
parent e4e49cef54
commit 413bc5d46c
2 changed files with 5 additions and 3 deletions

View File

@@ -215,7 +215,8 @@ class ChromeNotebook(wx.Panel):
wx.PostEvent(self, PageChanged(current_page, new_page))
def AddPage(self, win=None, title="Empty Tab", image: wx.Image=None, closeable=True):
def AddPage(self, win=None, title=None, image: wx.Image=None, closeable=True):
title = title or "Empty Tab"
if self._active_page:
self._active_page.Hide()
@@ -227,7 +228,7 @@ class ChromeNotebook(wx.Panel):
self.page_container.Layout()
self._pages.append(win)
self.tabs_container.AddTab(_(title), image, closeable)
self.tabs_container.AddTab(title, image, closeable)
self._active_page = win
self.ShowActive(True)

View File

@@ -37,7 +37,8 @@ class MultiSwitch(ChromeNotebook):
if h:
h(type, info)
def AddPage(self, tabWnd=None, tabTitle="Empty Tab", tabImage=None):
def AddPage(self, tabWnd=None, tabTitle=None, tabImage=None):
tabTitle = tabTitle or _("Empty Tab")
if tabWnd is None:
tabWnd = gui.builtinViews.emptyView.BlankPage(self)
tabWnd.handleDrag = lambda type, info: self.handleDrag(type, info)