-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display errors when sending commands in UI.
- Loading branch information
Showing
6 changed files
with
170 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
""" | ||
Copyright 2020 Luc Rubio <[email protected]> | ||
Plugin is licensed under the GNU Lesser General Public License v3.0. | ||
""" | ||
from UM import i18nCatalog | ||
from UM.Message import Message | ||
|
||
I18N_CATALOG = i18nCatalog('cura') | ||
|
||
|
||
class NetworkErrorMessage(Message): | ||
"""Message displayed when there was an network error.""" | ||
|
||
def __init__(self) -> None: | ||
super().__init__( | ||
title=I18N_CATALOG.i18nc('@info:title', 'Network error'), | ||
text=I18N_CATALOG.i18nc( | ||
'@info:text', | ||
'There was a problem communicating with the printer.'), | ||
lifetime=10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
""" | ||
Copyright 2020 Luc Rubio <[email protected]> | ||
Plugin is licensed under the GNU Lesser General Public License v3.0. | ||
""" | ||
from UM import i18nCatalog | ||
from UM.Message import Message | ||
|
||
I18N_CATALOG = i18nCatalog('cura') | ||
|
||
|
||
class PrintJobCancelErrorMessage(Message): | ||
"""Message displayed when there is an error cancelling the print job.""" | ||
|
||
def __init__(self) -> None: | ||
super().__init__( | ||
title=I18N_CATALOG.i18nc('@info:title', 'Network error'), | ||
text=I18N_CATALOG.i18nc( | ||
'@info:text', | ||
'Could not cancel the print. Please make sure the printer is online and try again.'), | ||
lifetime=10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
""" | ||
Copyright 2020 Luc Rubio <[email protected]> | ||
Plugin is licensed under the GNU Lesser General Public License v3.0. | ||
""" | ||
from UM import i18nCatalog | ||
from UM.Message import Message | ||
|
||
I18N_CATALOG = i18nCatalog('cura') | ||
|
||
|
||
class PrintJobPauseErrorMessage(Message): | ||
"""Message displayed when there is an error pausing the print job.""" | ||
|
||
def __init__(self) -> None: | ||
super().__init__( | ||
title=I18N_CATALOG.i18nc('@info:title', 'Network error'), | ||
text=I18N_CATALOG.i18nc( | ||
'@info:text', | ||
'Could not pause the print. Please make sure the printer is online and try again.'), | ||
lifetime=10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
""" | ||
Copyright 2020 Luc Rubio <[email protected]> | ||
Plugin is licensed under the GNU Lesser General Public License v3.0. | ||
""" | ||
from UM import i18nCatalog | ||
from UM.Message import Message | ||
|
||
I18N_CATALOG = i18nCatalog('cura') | ||
|
||
|
||
class PrintJobStartErrorMessage(Message): | ||
"""Message displayed when there is an error starting the print job.""" | ||
|
||
def __init__(self) -> None: | ||
super().__init__( | ||
title=I18N_CATALOG.i18nc('@info:title', 'Network error'), | ||
text=I18N_CATALOG.i18nc( | ||
'@info:text', | ||
'Could not start printing. Please make sure the printer is online and try again.'), | ||
lifetime=10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
""" | ||
Copyright 2020 Luc Rubio <[email protected]> | ||
Plugin is licensed under the GNU Lesser General Public License v3.0. | ||
""" | ||
from UM import i18nCatalog | ||
from UM.Message import Message | ||
|
||
I18N_CATALOG = i18nCatalog('cura') | ||
|
||
|
||
class SetTargetTemperatureErrorMessage(Message): | ||
"""Message displayed when there is an error setting target temperature.""" | ||
|
||
def __init__(self) -> None: | ||
super().__init__( | ||
title=I18N_CATALOG.i18nc('@info:title', 'Network error'), | ||
text=I18N_CATALOG.i18nc( | ||
'@info:text', | ||
'Could not set target temperature. Please make sure the printer is online and try again.'), | ||
lifetime=10) |