mainwin.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:Solfege 作者: RannyeriDev 项目源码 文件源码
def __init__(self, options, datadir):
        Gtk.Window.__init__(self, Gtk.WindowType.TOPLEVEL)
        self._vbox = Gtk.VBox()
        self._vbox.show()
        self.add(self._vbox)
        stock.SolfegeIconFactory(self, datadir)
        Gtk.Settings.get_default().set_property('gtk-button-images', True)
        cfg.ConfigUtils.__dict__['__init__'](self, 'mainwin')
        self.set_resizable(self.get_bool('gui/mainwin_user_resizeable'))
        self.add_watch('gui/mainwin_user_resizeable', lambda s: self.set_resizable(self.get_bool('gui/mainwin_user_resizeable')))
        self.connect('delete-event', self.quit_program)
        self.connect('key_press_event', self.on_key_press_event)
        self.g_about_window = None
        self.m_exercise = None
        self.m_viewer = None
        self.box_dict = {}
        self.g_config_window = None
        self.g_path_info_dlg = None
        self.g_musicviewer_window = None
        self.m_history = []
        self.g_ui_manager = Gtk.UIManager()
        self.m_action_groups = {
            'Exit': Gtk.ActionGroup('Exit'),
            'NotExit': Gtk.ActionGroup('NotExit'),
        }
        for a in self.m_action_groups.values():
            self.g_ui_manager.insert_action_group(a, 1)
        self.setup_menu()
        self.main_box = Gtk.VBox()
        self.main_box.show()
        self._vbox.pack_start(self.main_box, True, True, 0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号