def uninstall_pkg(self, pkg_name, purge_flag): self.bus_interface.uninstall_pkg(pkg_name, purge_flag, reply_handler=lambda :handle_dbus_reply("uninstall_pkg"), error_handler=lambda e:handle_dbus_error("uninstall_pkg", e)) SendUninstallCount(pkg_name).start() self.install_page.delete_item_match_pkgname(pkg_name)
def request_exit(self): self.exit() self.bus_interface.request_quit( reply_handler=lambda :handle_dbus_reply("request_quit"), error_handler=lambda e:handle_dbus_error("request_quit", e)) data_exit() self.loginfo('Data id removed')
def install_pkgs(self, pkg_names): for pkg_name in pkg_names: self.install_page.download_wait(pkg_name) create_thread(lambda : self.bus_interface.install_pkg( pkg_names, reply_handler=lambda :handle_dbus_reply("install_pkg"), error_handler=lambda e:handle_dbus_error("install_pkg", e))).start() for pkg_name in pkg_names: SendDownloadCount(pkg_name).start()
def finish(source, icon_window, bus_interface, pkg_names): icon_window.destroy() # Send install command. create_thread(lambda : bus_interface.install_pkg( pkg_names, reply_handler=lambda :handle_dbus_reply("install_pkg"), error_handler=lambda e:handle_dbus_error("install_pkg", e))).start() for pkg_name in pkg_names: SendDownloadCount(pkg_name).start()
def run(self): self.ready_show() gtk.main() # Send exit request to backend when frontend exit. self.bus_interface.request_quit( reply_handler=lambda :handle_dbus_reply("request_quit"), error_handler=lambda e:handle_dbus_error("request_quit", e)) # Remove id from config file. data_exit() self.loginfo('Data id removed')
def upgrade_pkgs(self, pkg_names): self.bus_interface.upgrade_pkgs_with_new_policy( pkg_names, reply_handler=lambda :handle_dbus_reply("upgrade_pkgs"), error_handler=lambda e:handle_dbus_error("upgrade_pkgs", e)) return False
def request_update_list(self): self.in_update_list = True self.bus_interface.start_update_list( reply_handler=lambda :handle_dbus_reply("start_update_list"), error_handler=lambda e:handle_dbus_error("start_update_list", e),)
def set_software_download_dir(self): self.bus_interface.set_download_dir( get_software_download_dir(), reply_handler=lambda :handle_dbus_reply("set_download_dir"), error_handler=lambda e:handle_dbus_error("set_download_dir", e))
def upgrade_pkgs(self, pkg_names): self.bus_interface.DistUpgrade( pkg_names, reply_handler=lambda :handle_dbus_reply("upgrade_pkgs"), error_handler=lambda e:handle_dbus_error("upgrade_pkgs", e)) return False