def __init__(self): self.app_n = 0 self.apps = [application.Application("Movie Player", "totem"), application.Application("Comix", "comix"), application.Application("Gimp", "gimp"), #application.Application("ACE", "uace"), ]
def get_test_window_confirm_remove(): # test real remove dialog icons = get_test_gtk3_icon_cache() db = get_test_db() app = application.Application("", "p7zip-full") return dependency_dialogs.confirm_remove(None, app, db, icons)
def get_test_window_dependency_dialog(): icons = get_test_gtk3_icon_cache() db = get_test_db() depends = ["apt", "synaptic"] app = application.Application("", "software-center") primary = "primary text" button_text = "button_text" dia = dependency_dialogs._get_confirm_internal_dialog( parent=None, app=app, db=db, icons=icons, primary=primary, button_text=button_text, depends=depends, cache=db._aptcache) return dia
def get_test_window_appdetails(pkgname=None): cache = pkginfo.get_pkg_info() cache.open() xapian_base_path = "/var/cache/software-center" pathname = os.path.join(xapian_base_path, "xapian") db = database.StoreDatabase(pathname, cache) db.open() icons = get_sc_icon_theme() distro = softwarecenter.distro.get_distro() # gui scroll = Gtk.ScrolledWindow() view = appdetailsview.AppDetailsView(db, distro, icons, cache) if pkgname is None: pkgname = "totem" view.show_app(application.Application("", pkgname)) #view.show_app(application.Application("Pay App Example", "pay-app")) #view.show_app(application.Application("3D Chess", "3dchess")) #view.show_app(application.Application("Movie Player", "totem")) #view.show_app(application.Application("ACE", "unace")) #~ view.show_app(application.Application("", "apt")) #view.show_app("AMOR") #view.show_app("Configuration Editor") #view.show_app("Artha") #view.show_app("cournol") #view.show_app("Qlix") scroll.add(view) scroll.show() win = get_test_window(child=scroll, width=800, height=800) win.set_data("view", view) return win