def __init__(self): PreferenceDialog.__init__(self, 566, 488) self.waiting_dialog = WaitingDialog() self.waiting_dialog.set_transient_for(self) self.general_box = GeneralBox() self.mirrors_box = MirrorsBox() self.about_box = AboutBox() self.set_preference_items([ (_("General"), self.general_box), (_("Mirrors"), self.mirrors_box), (_("About"), self.about_box), ]) global_event.register_event("toggle-waiting-dialog", self.handle_toggle_waiting_dialog) global_event.register_event("mirror-backend-changed", self.handle_after_mirror_changed)
def __init__(self): PreferenceDialog.__init__(self, 566, 488) self.waiting_dialog = WaitingDialog() self.waiting_dialog.set_transient_for(self) preference_items = [] self.general_box = GeneralBox() preference_items.append((_("General"), self.general_box)) #if len(all_mirrors) > 0: #self.mirrors_box = MirrorsBox() #preference_items.append((_("Mirrors"), self.mirrors_box)) self.about_box = AboutBox() preference_items.append((_("About"), self.about_box)) self.set_preference_items(preference_items) global_event.register_event("toggle-waiting-dialog", self.handle_toggle_waiting_dialog) global_event.register_event("mirror-backend-changed", self.handle_after_mirror_changed)
def __init__(self): PreferenceDialog.__init__(self, 566, 488) self.current_mirror_item = None self.normal_settings = gtk.VBox() self.normal_settings.set_spacing(TABLE_ROW_SPACING) self.normal_settings.pack_start(self.create_uninstall_box(), False, True) self.normal_settings.pack_start(self.create_download_dir_table(), False, True) self.normal_settings_align = gtk.Alignment(0, 0, 1, 1) self.normal_settings_align.set_padding(padding_left=5, padding_right=5, padding_top=25, padding_bottom=10) self.normal_settings_align.add(self.normal_settings) self.mirror_settings = gtk.VBox() self.mirror_settings.set_app_paintable(True) self.mirror_settings.connect("expose-event", self.mirror_settings_align_expose) self.mirror_settings.set_spacing(TABLE_ROW_SPACING) self.mirror_settings.pack_start(self.create_mirror_select_table(), False, True) self.mirror_settings.pack_start(self.create_source_update_frequency_table(), False, True) self.mirror_settings_inner_align = gtk.Alignment(0.5, 0.5, 1, 1) self.mirror_settings_inner_align.set_padding(padding_top=25, padding_bottom=10, padding_left=0, padding_right=0) self.mirror_settings_inner_align.add(self.mirror_settings) self.mirror_settings_scrolled_win = ScrolledWindow() self.mirror_settings_scrolled_win.add_child(self.mirror_settings_inner_align) self.mirror_settings_align = gtk.Alignment(0, 0, 1, 1) self.mirror_settings_align.set_padding(padding_left=0, padding_right=0, padding_top=0, padding_bottom=3) self.mirror_settings_align.add(self.mirror_settings_scrolled_win) self.set_preference_items([ (_("General"), self.normal_settings_align), (_("Mirrors"), self.mirror_settings_align), (_("About"), AboutBox()), ])
droplist = Droplist([ ("测试测试测试1", None), ("测试测试测试2", None), ("测试测试测试3", None), None, ("测试测试测试", None), None, ("测试测试测试4", None), ("测试测试测试5", None), ("测试测试测试6", None), ], True) droplist.set_size_request(-1, 100) images_path = os.path.join(get_parent_dir(__file__, 1), "images") preference_dialog = PreferenceDialog() preference_dialog.set_preference_items([ ("常规设置", gtk.Label("常规设置")), ("热键设置", gtk.Label("热键设置")), ("歌词设置", [ ("桌面歌词", gtk.Label("桌面歌词")), ("窗口歌词", gtk.Label("窗口歌词")), ]), ("插件", gtk.Label("插件")), ("关于", gtk.Label("关于")), ]) navigatebar = Navigatebar([ (app_theme.get_pixbuf("navigatebar/nav_recommend.png"), "导航1", lambda: Wizard([ os.path.join(images_path, "slide_1.jpg"), os.path.join(images_path, "slide_2.jpg"),
[("测试测试测试1", None), ("测试测试测试2", None), ("测试测试测试3", None), None, ("测试测试测试", None), None, ("测试测试测试4", None), ("测试测试测试5", None), ("测试测试测试6", None), ], True ) droplist.set_size_request(-1, 100) images_path = os.path.join(get_parent_dir(__file__, 1), "images") preference_dialog = PreferenceDialog() preference_dialog.set_preference_items( [("常规设置", gtk.Label("常规设置")), ("热键设置", gtk.Label("热键设置")), ("歌词设置", [("桌面歌词", gtk.Label("桌面歌词")), ("窗口歌词", gtk.Label("窗口歌词")), ]), ("插件", gtk.Label("插件")), ("关于", gtk.Label("关于")), ]) navigatebar = Navigatebar( [(app_theme.get_pixbuf("navigatebar/nav_recommend.png"), "导航1", lambda : Wizard([os.path.join(images_path, "slide_1.jpg"), os.path.join(images_path, "slide_2.jpg"), os.path.join(images_path, "slide_3.jpg"),