Browse Source

fix disable_progress_bar_animation inverted meaning

pull/120/head
Alexander Gordeyev 9 years ago
parent
commit
59b70a814b
3 changed files with 3 additions and 3 deletions
  1. 2
      gooey/_tmp/example_progress_bar_2.py
  2. 2
      gooey/_tmp/example_progress_bar_4.py
  3. 2
      gooey/gui/windows/base_window.py

2
gooey/_tmp/example_progress_bar_2.py

@ -10,7 +10,7 @@ from gooey import Gooey, GooeyParser
@Gooey(progress_regex=r"^progress: (\d+)/(\d+)$", @Gooey(progress_regex=r"^progress: (\d+)/(\d+)$",
progress_expr="x[0] / x[1] * 100", progress_expr="x[0] / x[1] * 100",
disable_progress_bar_animation=False)
disable_progress_bar_animation=True)
def main(): def main():
parser = GooeyParser(prog="example_progress_bar_2") parser = GooeyParser(prog="example_progress_bar_2")
parser.add_argument("steps", type=int, default=15) parser.add_argument("steps", type=int, default=15)

2
gooey/_tmp/example_progress_bar_4.py

@ -9,7 +9,7 @@ from gooey import Gooey, GooeyParser
@Gooey(progress_regex=r"^progress: (-?\d+)%$", @Gooey(progress_regex=r"^progress: (-?\d+)%$",
disable_progress_bar_animation=False)
disable_progress_bar_animation=True)
def main(): def main():
parser = GooeyParser(prog="example_progress_bar_1") parser = GooeyParser(prog="example_progress_bar_1")
_ = parser.parse_args(sys.argv[1:]) _ = parser.parse_args(sys.argv[1:])

2
gooey/gui/windows/base_window.py

@ -161,7 +161,7 @@ class BaseWindow(wx.Frame):
if pb.GetValue() != value: if pb.GetValue() != value:
# Windows 7 progress bar animation hack # Windows 7 progress bar animation hack
# http://stackoverflow.com/questions/5332616/disabling-net-progressbar-animation-when-changing-value # http://stackoverflow.com/questions/5332616/disabling-net-progressbar-animation-when-changing-value
if not self.build_spec["disable_progress_bar_animation"] \
if self.build_spec["disable_progress_bar_animation"] \
and sys.platform.startswith("win"): and sys.platform.startswith("win"):
if pb.GetRange() == value: if pb.GetRange() == value:
pb.SetValue(value) pb.SetValue(value)

Loading…
Cancel
Save