equal
deleted
inserted
replaced
294 if len(tabs) == 1: |
294 if len(tabs) == 1: |
295 return tabs[0] |
295 return tabs[0] |
296 split = None |
296 split = None |
297 for idx, tab in enumerate(tabs): |
297 for idx, tab in enumerate(tabs): |
298 if len(tab["pages"]) == 0: |
298 if len(tab["pages"]) == 0: |
299 raise ValueError, "Not possible" |
299 raise ValueError("Not possible") |
300 if tab["size"][0] == rect.width: |
300 if tab["size"][0] == rect.width: |
301 if tab["pos"][1] == rect.y: |
301 if tab["pos"][1] == rect.y: |
302 split = (wx.TOP, float(tab["size"][1]) / float(rect.height)) |
302 split = (wx.TOP, float(tab["size"][1]) / float(rect.height)) |
303 split_rect = wx.Rect(rect.x, rect.y + tab["size"][1] + TAB_BORDER, |
303 split_rect = wx.Rect(rect.x, rect.y + tab["size"][1] + TAB_BORDER, |
304 rect.width, rect.height - tab["size"][1] - TAB_BORDER) |
304 rect.width, rect.height - tab["size"][1] - TAB_BORDER) |
818 |
818 |
819 def LoadTabLayout(self, notebook, tabs, mode="all", first_index=None): |
819 def LoadTabLayout(self, notebook, tabs, mode="all", first_index=None): |
820 if isinstance(tabs, ListType): |
820 if isinstance(tabs, ListType): |
821 if len(tabs) == 0: |
821 if len(tabs) == 0: |
822 return |
822 return |
823 raise ValueError, "Not supported" |
823 raise ValueError("Not supported") |
824 |
824 |
825 if "split" in tabs: |
825 if "split" in tabs: |
826 self.LoadTabLayout(notebook, tabs["others"]) |
826 self.LoadTabLayout(notebook, tabs["others"]) |
827 |
827 |
828 split_dir, split_ratio = tabs["split"] |
828 split_dir, split_ratio = tabs["split"] |