def run(t):
    if WITH_GUI:
        dia = AptProgressDialog(t)
        dia.run()
        dia.destroy()
    else:
        t.run()
 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)
Beispiel #3
0
 def _install(self):
     def reply():
         return True
     dialog = AptProgressDialog(self._transaction,
                                parent=self.parent)
     dialog.run(close_on_finished=True,
                show_error=True,
                reply_handler=reply,
                error_handler=self._error_handler)
 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)
Beispiel #5
0
    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)
Beispiel #6
0
def run(t):
    if WITH_GUI:
        dia = AptProgressDialog(t)
        dia.run()
        dia.destroy()
    else:
        t.run()
 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)
 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)
 def _run_in_dialog(self, trans, parent_window):
   dia = AptProgressDialog(trans, parent=parent_window)
   dia.connect("finished", self._on_finished)
   dia.run()