Fortschrittanzeige rein
This commit is contained in:
parent
3869b868da
commit
79b9d7f1ec
4 changed files with 89 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
[ ] einstellungen rueckgaengig machen
|
||||
|
||||
= DONE =
|
||||
[*] progress bar
|
||||
[*] loggen in threads erzeugt Speicherzugriffsfehler
|
||||
[*] wkn datei auswaehlen
|
||||
[*] zielverzeichnis auswaehlen
|
||||
|
|
|
@ -57,7 +57,8 @@ class WKNCharts:
|
|||
png.write(f.read())
|
||||
png.close()
|
||||
import time
|
||||
time.sleep(2)
|
||||
### bei einigen modem verbindungen war eine pause notwendig
|
||||
#time.sleep(2)
|
||||
except IOError, e:
|
||||
print e
|
||||
|
||||
|
@ -83,10 +84,15 @@ class WKNCharts:
|
|||
return
|
||||
|
||||
gui.add_log("Beginne Download nach: %s" % self.dstdir, 2)
|
||||
alldownloads = len(self.wkn_dict.keys()) * len(self.times)
|
||||
downloaded = 0
|
||||
for wkn in self.wkn_dict.keys():
|
||||
self.gui.add_log(" hole gerade: %s (%s) %s" % (self.wkn_dict[wkn], wkn, str(self.times)),2)
|
||||
for time in self.times:
|
||||
self.gui.set_progress("Speichern von: %s" % self.wkn_dict[wkn], int(downloaded), int(alldownloads))
|
||||
self.getchart(wkn, time)
|
||||
downloaded += 1
|
||||
self.gui.set_progress("Download beendet!", int(downloaded), int(alldownloads))
|
||||
gui.add_log("Download Ende",2)
|
||||
return
|
||||
|
||||
|
|
|
@ -147,6 +147,13 @@ class WknGUI:
|
|||
self.log += text
|
||||
self.buffer.set_text(self.log)
|
||||
|
||||
def set_progress(self, text, actual, max):
|
||||
self.progressbar = self.wkngui.get_widget("progressbar1")
|
||||
self.progressbar.set_text(str(text))
|
||||
self.gtk.threads_enter()
|
||||
self.progressbar.set_fraction(float(actual)/int(max))
|
||||
self.gtk.threads_leave()
|
||||
|
||||
def clicked_show_pics(self, widget):
|
||||
'''this is just for a rapid prototype'''
|
||||
## set an image to display
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
<signal name="destroy" handler="on_window1_destroy" last_modification_time="Tue, 06 Jun 2006 23:45:16 GMT"/>
|
||||
|
||||
<child>
|
||||
|
@ -58,6 +60,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">4</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -110,6 +116,22 @@
|
|||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkProgressBar" id="progressbar1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
|
||||
<property name="fraction">0</property>
|
||||
<property name="pulse_step">0</property>
|
||||
<property name="text" translatable="yes">Fortschritt</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox3">
|
||||
<property name="visible">True</property>
|
||||
|
@ -173,6 +195,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -248,6 +274,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -323,6 +353,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -369,6 +403,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">tab</property>
|
||||
|
@ -404,6 +442,10 @@
|
|||
<property name="yalign">0</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
|
@ -428,6 +470,10 @@
|
|||
<property name="yalign">0</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
|
@ -573,6 +619,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -651,6 +701,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -823,6 +877,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -935,6 +993,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -1010,6 +1072,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -1055,6 +1121,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">tab</property>
|
||||
|
@ -1122,6 +1192,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">tab</property>
|
||||
|
|
Loading…
Reference in a new issue