availablepane.py 文件源码

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

项目:x-mario-center 作者: fossasia 项目源码 文件源码
def get_test_window():
    from softwarecenter.testutils import (get_test_db,
                                          get_test_datadir,
                                          get_test_install_backend,
                                          get_test_gtk3_viewmanager,
                                          get_test_pkg_info,
                                          get_test_gtk3_icon_cache,
                                          )
    # needed because available pane will try to get it
    vm = get_test_gtk3_viewmanager()
    vm  # make pyflakes happy
    db = get_test_db()
    cache = get_test_pkg_info()
    datadir = get_test_datadir()
    icons = get_test_gtk3_icon_cache()
    backend = get_test_install_backend()

    # create global AppManager instance
    from softwarecenter.ui.gtk3.session.appmanager import ApplicationManager
    ApplicationManager(db, backend, icons)

    navhistory_back_action = Gtk.Action("navhistory_back_action", "Back",
        "Back", None)
    navhistory_forward_action = Gtk.Action("navhistory_forward_action",
        "Forward", "Forward", None)

    w = AvailablePane(cache, db, 'Ubuntu', icons, datadir,
        navhistory_back_action, navhistory_forward_action)
    w.init_view()
    w.show()

    win = Gtk.Window()
    win.connect("destroy", Gtk.main_quit)
    win.add(w)
    win.set_size_request(800, 600)
    win.show_all()

    # this is used later in tests
    win.set_data("pane", w)

    return win
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号