Fixed initial loaded start tab, cleanup

This commit is contained in:
itdominator 2022-03-13 18:21:06 -05:00
parent 51ac26048c
commit 09a85abb79
2 changed files with 8 additions and 8 deletions

View File

@ -36,13 +36,13 @@ class WindowMixin(TabMixin):
try: try:
if not self.is_pane4_hidden: if not self.is_pane4_hidden:
icon_grid = self.window4.get_children()[1].get_children()[0] icon_grid = self.window4.get_children()[-1].get_children()[0]
elif not self.is_pane3_hidden: elif not self.is_pane3_hidden:
icon_grid = self.window3.get_children()[1].get_children()[0] icon_grid = self.window3.get_children()[-1].get_children()[0]
elif not self.is_pane2_hidden: elif not self.is_pane2_hidden:
icon_grid = self.window2.get_children()[1].get_children()[0] icon_grid = self.window2.get_children()[-1].get_children()[0]
elif not self.is_pane1_hidden: elif not self.is_pane1_hidden:
icon_grid = self.window1.get_children()[1].get_children()[0] icon_grid = self.window1.get_children()[-1].get_children()[0]
icon_grid.event(Gdk.Event().new(type=Gdk.EventType.BUTTON_RELEASE)) icon_grid.event(Gdk.Event().new(type=Gdk.EventType.BUTTON_RELEASE))
icon_grid.event(Gdk.Event().new(type=Gdk.EventType.BUTTON_RELEASE)) icon_grid.event(Gdk.Event().new(type=Gdk.EventType.BUTTON_RELEASE))

View File

@ -30,16 +30,16 @@ class Window:
def pop_tab(self): def pop_tab(self):
self._tabs.pop() self._tabs.pop()
def delete_tab_by_id(self, vid): def delete_tab_by_id(self, tid):
for tab in self._tabs: for tab in self._tabs:
if tab.get_id() == vid: if tab.get_id() == tid:
self._tabs.remove(tab) self._tabs.remove(tab)
break break
def get_tab_by_id(self, vid): def get_tab_by_id(self, tid):
for tab in self._tabs: for tab in self._tabs:
if tab.get_id() == vid: if tab.get_id() == tid:
return tab return tab
def get_tab_by_index(self, index): def get_tab_by_index(self, index):