Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
 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')
Exemplo n.º 3
0
 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()
Exemplo n.º 4
0
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()
Exemplo n.º 5
0
    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')
Exemplo n.º 6
0
 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
Exemplo n.º 7
0
 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),)
Exemplo n.º 8
0
 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))
Exemplo n.º 9
0
 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