2041
2041
def set_section(self, section):
2042
2042
self.section = section
2045
def get_test_window_appdetails():
2047
from softwarecenter.db.pkginfo import get_pkg_info
2048
cache = get_pkg_info()
2051
from softwarecenter.db.database import StoreDatabase
2052
xapian_base_path = "/var/cache/software-center"
2053
pathname = os.path.join(xapian_base_path, "xapian")
2054
db = StoreDatabase(pathname, cache)
2057
import softwarecenter.paths
2058
datadir = softwarecenter.paths.datadir
2060
from softwarecenter.ui.gtk3.utils import get_sc_icon_theme
2061
icons = get_sc_icon_theme(datadir)
2063
import softwarecenter.distro
2064
distro = softwarecenter.distro.get_distro()
2068
scroll = Gtk.ScrolledWindow()
2069
view = AppDetailsView(db, distro, icons, cache, datadir)
2072
if len(sys.argv) > 1:
2073
pkgname = sys.argv[1]
2077
view.show_app(Application("", pkgname))
2078
#view.show_app(Application("Pay App Example", "pay-app"))
2079
#view.show_app(Application("3D Chess", "3dchess"))
2080
#view.show_app(Application("Movie Player", "totem"))
2081
#view.show_app(Application("ACE", "unace"))
2082
#~ view.show_app(Application("", "apt"))
2084
#view.show_app("AMOR")
2085
#view.show_app("Configuration Editor")
2086
#view.show_app("Artha")
2087
#view.show_app("cournol")
2088
#view.show_app("Qlix")
2093
win.set_size_request(600, 800)
2095
win.connect('destroy', Gtk.main_quit)
2096
win.set_data("view", view)
2100
if __name__ == "__main__":
2101
def _show_app(view):
2102
if view.app.pkgname == "totem":
2103
view.show_app(Application("Pithos", "pithos"))
2105
view.show_app(Application("Movie Player", "totem"))
2108
win = get_test_window_appdetails()
2110
# keep it spinning to test for re-draw issues and memleaks
2111
#view = win.get_data("view")
2112
#GObject.timeout_add_seconds(2, _show_app, view)