def __init_navigatebar(self): self.navigatebar = TreeView(enable_drag_drop=False, enable_multiple_select=False) self.navigatebar.connect("single-click-item", self.on_navigatebar_single_click) self.navigatebar.set_size_request(132, -1) self.navigatebar.draw_mask = self.on_navigatebar_draw_mask local_expand_item = ExpandItem(_("Library")) network_expand_item = ExpandItem(_("Internet")) self.navigatebar.add_items([ local_expand_item, network_expand_item, ]) local_expand_item.add_childs( [(_("System"), self.system_wallpapers_page), (_("Pictures"), self.picture_wallpapers_page), (_("Favorites"), self.download_wallpapaers_page)], expand=True) network_expand_item.add_childs([ (_("360 Wallpaper"), self.bizhi360_cache_page), (_("LoveWallpaper"), self.aibizhi_cache_page), ], expand=True) self.navigatebar.set_highlight_item(self.navigatebar.get_items()[1])
def __init_navigatebar(self): self.navigatebar = TreeView(enable_drag_drop=False, enable_multiple_select=False) self.navigatebar.connect("single-click-item", self.on_navigatebar_single_click) self.navigatebar.set_size_request(132, -1) self.navigatebar.draw_mask = self.on_navigatebar_draw_mask local_expand_item = ExpandItem(_("Library")) network_expand_item = ExpandItem(_("Internet")) self.navigatebar.add_items([ local_expand_item, network_expand_item, ]) local_expand_item.add_childs([ (FavoritesTitle, self.favorites_page), (LocalWallpapersTitle, self.pictures_page), ], expand=True) network_expand_item.add_childs([ (_("360 Wallpaper"), self.bizhi360_cache_page), (_("LoveWallpaper"), self.aibizhi_cache_page), ], expand=True) if get_favorite_number() == 0: self.navigatebar.set_highlight_item( self.navigatebar.get_items()[2]) self.switch_page.add(self.pictures_page) else: self.navigatebar.set_highlight_item( self.navigatebar.get_items()[1]) self.switch_page.add(self.favorites_page)
def __init_navigatebar(self): self.navigatebar = TreeView(enable_drag_drop=False, enable_multiple_select=False) self.navigatebar.connect("single-click-item", self.on_navigatebar_single_click) self.navigatebar.set_size_request(132, -1) self.navigatebar.draw_mask = self.on_navigatebar_draw_mask local_expand_item = ExpandItem(_("Library")) network_expand_item = ExpandItem(_("Internet")) self.navigatebar.add_items([local_expand_item, network_expand_item, ]) local_expand_item.add_childs([ (FavoritesTitle, self.favorites_page), (LocalWallpapersTitle, self.pictures_page), ], expand=True) network_expand_item.add_childs([(_("360 Wallpaper"), self.bizhi360_cache_page), (_("LoveWallpaper"), self.aibizhi_cache_page), ], expand=True) if get_favorite_number() == 0: self.navigatebar.set_highlight_item(self.navigatebar.get_items()[2]) self.switch_page.add(self.pictures_page) else: self.navigatebar.set_highlight_item(self.navigatebar.get_items()[1]) self.switch_page.add(self.favorites_page)
def __init_navigatebar(self): self.navigatebar = TreeView(enable_drag_drop=False, enable_multiple_select=False) self.navigatebar.connect("single-click-item", self.on_navigatebar_single_click) self.navigatebar.set_size_request(132, -1) self.navigatebar.draw_mask = self.on_navigatebar_draw_mask local_expand_item = ExpandItem(_("Library")) network_expand_item = ExpandItem(_("Internet")) self.navigatebar.add_items([local_expand_item, network_expand_item, ]) local_expand_item.add_childs([(_("System"), self.system_wallpapers_page), (_("Pictures"), self.picture_wallpapers_page), (_("Favorites"), self.download_wallpapaers_page)], expand=True) network_expand_item.add_childs([(_("360 Wallpaper"), self.bizhi360_cache_page), (_("LoveWallpaper"), self.aibizhi_cache_page), ], expand=True) self.navigatebar.set_highlight_item(self.navigatebar.get_items()[1])