Skip to content

Commit

Permalink
fix message box progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriechi committed Apr 1, 2018
1 parent 33b063c commit 0ca1431
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions DuetRRFOutputDevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ def onUploadDone(self):
Logger.log("d", self._name_id + " | Simulating...")
if self._message:
self._message.hide()
text = catalog.i18nc("@info:progress", "Simulating print on {}").format(self._name)
self._message = Message(text, 0, False, -1)
self._message = Message(catalog.i18nc("@info:progress", "Simulating print on {}").format(self._name), 0, False, -1)
self._message.show()

self._send('gcode', [("gcode", "M37 S1")], self.onReadyToPrint)
Expand All @@ -238,7 +237,7 @@ def onUploadDone(self):
if self._message:
self._message.hide()
text = "Uploaded file {} to {}.".format(os.path.basename(self._fileName), self._name)
self._message = Message(catalog.i18nc("@info:status", text), 0, False, -1)
self._message = Message(catalog.i18nc("@info:status", text), 0, False)
self._message.addAction("open_browser", catalog.i18nc("@action:button", "Open Browser"), "globe", catalog.i18nc("@info:tooltip", "Open browser to DuetWebControl."))
self._message.actionTriggered.connect(self._onMessageActionTriggered)
self._message.show()
Expand Down Expand Up @@ -266,7 +265,7 @@ def onPrintStarted(self):
if self._message:
self._message.hide()
text = "Print started on {} with file {}".format(self._name, self._fileName)
self._message = Message(catalog.i18nc("@info:status", text), 0, False, -1)
self._message = Message(catalog.i18nc("@info:status", text), 0, False)
self._message.addAction("open_browser", catalog.i18nc("@action:button", "Open Browser"), "globe", catalog.i18nc("@info:tooltip", "Open browser to DuetWebControl."))
self._message.actionTriggered.connect(self._onMessageActionTriggered)
self._message.show()
Expand Down Expand Up @@ -336,7 +335,7 @@ def onReported(self):
self._message.hide()

text = "Simulation performed on {} with file {}:\n\n{}".format(self._name, self._fileName, reply_body)
self._message = Message(catalog.i18nc("@info:status", text), 0, False, -1)
self._message = Message(catalog.i18nc("@info:status", text), 0, False)
self._message.addAction("open_browser", catalog.i18nc("@action:button", "Open Browser"), "globe", catalog.i18nc("@info:tooltip", "Open browser to DuetWebControl."))
self._message.actionTriggered.connect(self._onMessageActionTriggered)
self._message.show()
Expand Down Expand Up @@ -380,7 +379,7 @@ def _onNetworkError(self, errorCode):
errorString = self._reply.errorString()
else:
errorString = ''
message = Message(catalog.i18nc("@info:status", "There was a network error: {} {}").format(errorCode, errorString), 0, False, -1)
message = Message(catalog.i18nc("@info:status", "There was a network error: {} {}").format(errorCode, errorString), 0, False)
message.show()

self.writeError.emit(self)
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "DuetRRF",
"author": "Thomas Kriechbaumer",
"description": "Provides direct upload of gcode to DuetRRF.",
"version": "0.0.14",
"version": "0.0.15",
"api": 4
}

0 comments on commit 0ca1431

Please sign in to comment.