コード例 #1
0
 def update(self):
     """Run a update to refresh the package list"""
     self.ac = client.AptClient()
     t = self.ac.update_cache(exit_handler=self._on_exit)
     dia = AptProgressDialog(t, parent=self.window_main, terminal=False)
     dia.run()
     dia.hide()
     self._show_messages(t)
コード例 #2
0
 def update(self):
     """Run a update to refresh the package list"""
     self.ac = client.AptClient()
     t = self.ac.update_cache(exit_handler=self._on_exit)
     dia = AptProgressDialog(t, parent=self.window_main, terminal=False)
     dia.run()
     dia.hide()
     self._show_messages(t)
コード例 #3
0
 def commit(self, add, remove):
     """Commit a list of package adds and removes"""
     self.ac = client.AptClient()
     t = self.ac.commit_packages(list(add), [], list(remove), [], [],
                                 exit_handler=self._on_exit)
     dia = AptProgressDialog(t, parent=self.window_main)
     dia.run()
     dia.hide()
     self._show_messages(t)
コード例 #4
0
 def commit(self, add, remove):
     """Commit a list of package adds and removes"""
     self.ac = client.AptClient()
     t = self.ac.commit_packages(list(add), [],
                                 list(remove), [], [],
                                 exit_handler=self._on_exit)
     dia = AptProgressDialog(t, parent=self.window_main)
     dia.run()
     dia.hide()
     self._show_messages(t)
コード例 #5
0
ファイル: __init__.py プロジェクト: DigGe/ubuntu-tweak
    def perform_action(self, window_main, to_add=None, to_rm=None):
        self.window_main = window_main
        window_main.set_sensitive(False)
        window_main.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))

        t = self.ac.commit_packages(list(to_add), [], list(to_rm), [], [], exit_handler=self._on_exit)
        dia = AptProgressDialog(t, parent=window_main)                
        dia.run()
        dia.hide()                     
        self._show_messages(t)  

        window_main.set_sensitive(True)
        window_main.window.set_cursor(None)