RefactoringRope/ProgressHandle.py

branch
server_client_variant
changeset 167
3c8e875d0326
parent 164
121d426d4ed7
child 203
c38750e1bafd
diff -r 6fc202183b3b -r 3c8e875d0326 RefactoringRope/ProgressHandle.py
--- a/RefactoringRope/ProgressHandle.py	Sat Sep 16 16:40:50 2017 +0200
+++ b/RefactoringRope/ProgressHandle.py	Sat Sep 16 18:51:19 2017 +0200
@@ -32,9 +32,10 @@
         
         self.__client = client
         
-        self.__client.sendJson("ProgressInit", {
+        self.__client.sendJson("Progress", {
+            "Subcommand": "Init",
             "Title": title,
-            "Interrutable": interruptable,
+            "Interruptable": interruptable,
         })
         
         self.add_observer(self.__updateProgress)
@@ -43,6 +44,10 @@
         """
         Private slot to handle the task progress.
         """
+        params = {
+            "Subcommand": "Progress",
+        }
+        
         jobset = self.current_jobset()
         if jobset:
             text = ''
@@ -50,14 +55,10 @@
                 text += jobset.get_name()
             if jobset.get_active_job_name() is not None:
                 text += ': ' + jobset.get_active_job_name()
-            params = {
-                "Text": text,
-            }
+            params["Text"] = text
             if jobset.count is not None:
                 params["Maximum"] = jobset.count
                 params["Value"] = jobset.done
-        else:
-            params = {}
         
         self.__client.sendJson("Progress", params)
         self.__client.poll()
@@ -66,5 +67,7 @@
         """
         Public slot to reset the progress dialog.
         """
-        self.__client.sendJson("ProgressReset", {})
+        self.__client.sendJson("Progress", {
+            "Subcommand": "Reset",
+        })
         self.__client.poll()

eric ide

mercurial