gtk_interface.py 文件源码

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

项目:Tadman 作者: KeepPositive 项目源码 文件源码
def __init__(self, package_name):

        self.install_choice = ()

        Gtk.Window.__init__(self, title="Install")

        self.set_default_size(300, 100)
        self.set_resizable(False)
        self.connect("delete-event", Gtk.main_quit)

        main_box = Gtk.VBox()
        button_box = Gtk.HBox()

        install_message = "Would you like to install %s?" % package_name
        intro_label = Gtk.Label(install_message)
        install_button = Gtk.Button(label='Install')
        cancel_button = Gtk.Button(label='Cancel')

        install_button.connect('clicked', self.install_was_pressed)
        cancel_button.connect('clicked', self.cancel_was_pressed)

        self.add(main_box)
        button_box.pack_start(install_button, True, True, 5)
        button_box.pack_start(cancel_button, True, True, 5)

        main_box.pack_start(intro_label, True, True, 0)
        main_box.pack_start(button_box, True, True, 5)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号