File: gui-fix-input-of-text-and-buttons-at-startup.patch

package info (click to toggle)
subdownloader 2.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 18,188 kB
  • sloc: python: 19,688; makefile: 13
file content (42 lines) | stat: -rw-r--r-- 1,618 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: Anonymous Maarten <anonymous.maarten@gmail.com>
Date: Tue, 17 Sep 2019 19:41:50 +0200
Subject: gui: fix input of text and buttons at startup

Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/subdownloader/+bug/1869376

---
 subdownloader/client/gui/callback.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/subdownloader/client/gui/callback.py b/subdownloader/client/gui/callback.py
index dfd4a8c..dc39604 100644
--- a/subdownloader/client/gui/callback.py
+++ b/subdownloader/client/gui/callback.py
@@ -15,7 +15,6 @@ class ProgressCallbackWidget(ClientCallback):
     def __init__(self, parent):
         ClientCallback.__init__(self)
 
-        self.status_progress = None
         self._parent = parent
         self._block = False
 
@@ -27,8 +26,6 @@ class ProgressCallbackWidget(ClientCallback):
 
         self.status_progress = QProgressDialog(self._parent, Qt.Dialog)
 
-        self.status_progress.setWindowModality(Qt.WindowModal)
-
         self.set_range(0, 1)
 
     def __del__(self):
@@ -92,8 +89,8 @@ class ProgressCallbackWidget(ClientCallback):
     def on_finish(self, *args, **kwargs):
         # FIXME: let the caller format the strings
         finishedMsg = self._finished_text.format(*args)
-        # self.status_progress.setLabelText(finishedMsg)
-        self.status_progress.hide()
+        self.status_progress.setLabelText(finishedMsg)
+        self.status_progress.done(0)
         if self._block:
             self._parent.setCursor(Qt.ArrowCursor) # FIXME: restoreCursor? setCursor only in this class!!
         QCoreApplication.processEvents()