Ejemplo n.º 1
0
 def run(self):
     # addFrame(self.dialog) # Need to do this differently if we want it
     self.dialog.set_position(gtk.WIN_POS_CENTER)
     self.dialog.show_all()
     rc = self.dialog.run()
     if (rc == gtk.RESPONSE_CANCEL or rc == gtk.RESPONSE_NO
             or rc == gtk.RESPONSE_CLOSE):
         self.rc = 0
     self.dialog.destroy()
     gtk.main_iteration_do(True)
Ejemplo n.º 2
0
 def run(self):
     # addFrame(self.dialog) # Need to do this differently if we want it
     self.dialog.set_position(gtk.WIN_POS_CENTER)
     self.dialog.show_all()
     rc = self.dialog.run()
     if (rc == gtk.RESPONSE_CANCEL or rc == gtk.RESPONSE_NO
         or rc == gtk.RESPONSE_CLOSE):
         self.rc = 0
     self.dialog.destroy()
     gtk.main_iteration_do(True)
Ejemplo n.º 3
0
    def setProgress(self, amount, total, speed = 0, secs = 0):
        if total:
            i = float(amount) / total
        else:
            i = 1

        if i > 1:
            i = 1
        if i > self.lastProgress + .01 or i == 1:
            self.xml.get_widget("progressBar").set_fraction(i)
            if i == 1:
                # reset
                i = 0
#            gtk.gdk_flush()
            while gtk.events_pending():
                gtk.main_iteration_do(False)
            self.lastProgress = i
Ejemplo n.º 4
0
    def setProgress(self, amount, total, speed=0, secs=0):
        if total:
            i = float(amount) / total
        else:
            i = 1

        if i > 1:
            i = 1
        if i > self.lastProgress + .01 or i == 1:
            self.xml.get_widget("progressBar").set_fraction(i)
            if i == 1:
                # reset
                i = 0
#            gtk.gdk_flush()
            while gtk.events_pending():
                gtk.main_iteration_do(False)
            self.lastProgress = i
Ejemplo n.º 5
0
    def destroy(self):
        while gtk.events_pending():
            gtk.main_iteration_do(False)

        self.progressWindow.destroy()
Ejemplo n.º 6
0
 def setStatusLabel(self, text):
     self.xml.get_widget("statusLabel").set_text(text)
     while gtk.events_pending():
         gtk.main_iteration_do(False)
Ejemplo n.º 7
0
 def setLabel(self, text):
     label = self.xml.get_widget("progressLabel")
     label.set_text(text)
     while gtk.events_pending():
         gtk.main_iteration_do(False)
Ejemplo n.º 8
0
    def hide(self):
        self.progressWindow.hide()
        while gtk.events_pending():
            gtk.main_iteration_do(False)

        del self
Ejemplo n.º 9
0
    def destroy(self):
        while gtk.events_pending():
            gtk.main_iteration_do(False)

        self.progressWindow.destroy()
Ejemplo n.º 10
0
 def setStatusLabel(self, text):
     self.xml.get_widget("statusLabel").set_text(text)
     while gtk.events_pending():
         gtk.main_iteration_do(False)
Ejemplo n.º 11
0
 def setLabel(self, text):
     label = self.xml.get_widget("progressLabel")
     label.set_text(text)
     while gtk.events_pending():
         gtk.main_iteration_do(False)
Ejemplo n.º 12
0
    def hide(self):
        self.progressWindow.hide()
        while gtk.events_pending():
            gtk.main_iteration_do(False)

        del self
Ejemplo n.º 13
0
 def hide(self):
     self.dialog.hide()
     self.dialog.destroy()
     gtk.main_iteration_do(True)
Ejemplo n.º 14
0
 def hide(self):
     self.dialog.hide()
     self.dialog.destroy()
     gtk.main_iteration_do(True)