Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cura/UI
diff options
context:
space:
mode:
authordigitalfrost <gerald.hofmaier@gmail.com>2022-09-13 11:50:39 +0300
committerdigitalfrost <gerald.hofmaier@gmail.com>2022-09-13 11:50:39 +0300
commitfe483d4656099d465bf8a37345066f4ac1e855e4 (patch)
tree86ae96946789b28ffc40a7ac763de5365aa8fca4 /cura/UI
parent2b981daf17b435ee107b1ce5256adda156fd8a00 (diff)
parentd31cc5baf0769415e233423e61696ee7152e2441 (diff)
Merge branch 'main' into 050922b
Diffstat (limited to 'cura/UI')
-rw-r--r--cura/UI/PrintInformation.py4
-rw-r--r--cura/UI/WhatsNewPagesModel.py24
2 files changed, 17 insertions, 11 deletions
diff --git a/cura/UI/PrintInformation.py b/cura/UI/PrintInformation.py
index 8b31285a9b..936e646946 100644
--- a/cura/UI/PrintInformation.py
+++ b/cura/UI/PrintInformation.py
@@ -186,7 +186,7 @@ class PrintInformation(QObject):
if time != time: # Check for NaN. Engine can sometimes give us weird values.
duration.setDuration(0)
- Logger.log("w", "Received NaN for print duration message")
+ Logger.warning("Received NaN for print duration message")
continue
total_estimated_time += time
@@ -368,7 +368,7 @@ class PrintInformation(QObject):
mime_type = MimeTypeDatabase.getMimeTypeForFile(name)
data = mime_type.stripExtension(name)
except MimeTypeNotFoundError:
- Logger.log("w", "Unsupported Mime Type Database file extension %s", name)
+ Logger.warning(f"Unsupported Mime Type Database file extension {name}")
if data is not None and check_name is not None:
self._base_name = data
diff --git a/cura/UI/WhatsNewPagesModel.py b/cura/UI/WhatsNewPagesModel.py
index 4fb7802924..1faf9572c7 100644
--- a/cura/UI/WhatsNewPagesModel.py
+++ b/cura/UI/WhatsNewPagesModel.py
@@ -62,15 +62,21 @@ class WhatsNewPagesModel(WelcomePagesModel):
def initialize(self) -> None:
self._pages = []
- self._pages.append({"id": "whats_new",
- "page_url": self._getBuiltinWelcomePagePath("WhatsNewContent.qml"),
- "next_page_button_text": self._catalog.i18nc("@action:button", "Skip"),
- "next_page_id": "changelog"
- })
- self._pages.append({"id": "changelog",
- "page_url": self._getBuiltinWelcomePagePath("ChangelogContent.qml"),
- "next_page_button_text": self._catalog.i18nc("@action:button", "Close"),
- })
+ try:
+ self._pages.append({"id": "whats_new",
+ "page_url": self._getBuiltinWelcomePagePath("WhatsNewContent.qml"),
+ "next_page_button_text": self._catalog.i18nc("@action:button", "Skip"),
+ "next_page_id": "changelog"
+ })
+ except FileNotFoundError:
+ Logger.warning("Unable to find what's new page")
+ try:
+ self._pages.append({"id": "changelog",
+ "page_url": self._getBuiltinWelcomePagePath("ChangelogContent.qml"),
+ "next_page_button_text": self._catalog.i18nc("@action:button", "Close"),
+ })
+ except FileNotFoundError:
+ Logger.warning("Unable to find changelog page")
self.setItems(self._pages)
images, max_image = WhatsNewPagesModel._collectOrdinalFiles(Resources.Images, WhatsNewPagesModel.image_formats)