From 1c806199a4d17f992387e38bb1818b43a923c1a2 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 8 Apr 2021 14:08:35 +0200 Subject: [PATCH 1/6] Explicitly give keyring backend on Mac too. CURA-7180 --- cura/OAuth2/KeyringAttribute.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cura/OAuth2/KeyringAttribute.py b/cura/OAuth2/KeyringAttribute.py index 1d5bfaba3a..8f489dc773 100644 --- a/cura/OAuth2/KeyringAttribute.py +++ b/cura/OAuth2/KeyringAttribute.py @@ -18,6 +18,9 @@ if Platform.isWindows() and hasattr(sys, "frozen"): import win32timezone from keyring.backends.Windows import WinVaultKeyring keyring.set_keyring(WinVaultKeyring()) +if Platform.isOSX() and hasattr(sys, "frozen"): + from keyring.backends.OS_X import Keyring + keyring.set_keyring(Keyring()) # Even if errors happen, we don't want this stored locally: DONT_EVER_STORE_LOCALLY: List[str] = ["refresh_token"] From 8ee0e13394492ce889e9eb7c08a5e30616a94cfc Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 9 Apr 2021 15:12:28 +0200 Subject: [PATCH 2/6] Remove hack that made older code work to make newer code work. Theme and Language (in the interface) would stay on 'Colorblind Assist' and empty respectively, even if the actual theme (and obvioulsy the language) where different. CURA-8161 --- resources/qml/Preferences/GeneralPage.qml | 29 ----------------------- 1 file changed, 29 deletions(-) diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index f17fa9c05f..e6872170d1 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -197,20 +197,6 @@ UM.PreferencesPage } } onActivated: UM.Preferences.setValue("general/language", model.get(index).code) - - Component.onCompleted: - { - // Because ListModel is stupid and does not allow using qsTr() for values. - for(var i = 0; i < languageList.count; ++i) - { - languageList.setProperty(i, "text", catalog.i18n(languageList.get(i).text)); - } - - // Glorious hack time. ComboBox does not update the text properly after changing the - // model. So change the indices around to force it to update. - currentIndex += 1; - currentIndex -= 1; - } } Label @@ -265,21 +251,6 @@ UM.PreferencesPage return 0; } onActivated: UM.Preferences.setValue("general/theme", model.get(index).code) - - Component.onCompleted: - { - // Because ListModel is stupid and does not allow using qsTr() for values. - for(var i = 0; i < themeList.count; ++i) - { - themeList.setProperty(i, "text", catalog.i18n(themeList.get(i).text)); - } - - // Glorious hack time. ComboBox does not update the text properly after changing the - // model. So change the indices around to force it to update. - currentIndex += 1; - currentIndex -= 1; - } - } } From ed7439f9cdf99debd56b763d7379f80ff00aa67d Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 9 Apr 2021 15:30:09 +0200 Subject: [PATCH 3/6] Fix various UX issues. - Remove donkey: We where showing our donkey due to an unfortunate abbreviation/truncation of 'Colorblind Assist'. Now that should already not show in for a default install, which was fixed in the previous commit, but also just give the box some more space. - Revert most of the rest of the preferences/general page back to the old controls (except for the combo-boxes, which needed to be upgraded in order to work on MacOS 11), pending a _proper_ redesign to the newer style of this page. CURA-8161 --- resources/qml/Preferences/GeneralPage.qml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index e6872170d1..ca02d9a125 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -2,10 +2,12 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 -import QtQuick.Controls 2.3 +import QtQuick.Controls 1.1 import QtQuick.Layouts 1.1 import QtQuick.Controls.Styles 1.1 +import QtQuick.Controls 2.3 as NewControls + import UM 1.1 as UM import Cura 1.1 as Cura @@ -139,6 +141,7 @@ UM.PreferencesPage { id: interfaceGrid columns: 4 + width: parent.width Label { @@ -178,12 +181,13 @@ UM.PreferencesPage } } - ComboBox + NewControls.ComboBox { id: languageComboBox textRole: "text" model: languageList + Layout.fillWidth: true currentIndex: { @@ -231,12 +235,13 @@ UM.PreferencesPage } } - ComboBox + NewControls.ComboBox { id: themeComboBox model: themeList textRole: "text" + Layout.fillWidth: true currentIndex: { @@ -506,7 +511,7 @@ UM.PreferencesPage } } - ComboBox + NewControls.ComboBox { id: cameraComboBox @@ -647,7 +652,7 @@ UM.PreferencesPage text: catalog.i18nc("@window:text", "Default behavior when opening a project file: ") } - ComboBox + NewControls.ComboBox { id: choiceOnOpenProjectDropDownButton width: 200 * screenScaleFactor @@ -714,7 +719,7 @@ UM.PreferencesPage text: catalog.i18nc("@window:text", "Default behavior for changed setting values when switching to a different profile: ") } - ComboBox + NewControls.ComboBox { id: choiceOnProfileOverrideDropDownButton width: 200 * screenScaleFactor From 97442ebefc40c161fc55e5b4adbfb54bcb6124c6 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Fri, 9 Apr 2021 16:18:04 +0200 Subject: [PATCH 4/6] Increase size of the profile override choice popup in preferences This way the popup will show the entire text for all three options. CURA-8161 --- resources/qml/Preferences/GeneralPage.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index ca02d9a125..cdf0636144 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -655,7 +655,7 @@ UM.PreferencesPage NewControls.ComboBox { id: choiceOnOpenProjectDropDownButton - width: 200 * screenScaleFactor + width: Math.round(250 * screenScaleFactor) model: ListModel { @@ -722,8 +722,8 @@ UM.PreferencesPage NewControls.ComboBox { id: choiceOnProfileOverrideDropDownButton - width: 200 * screenScaleFactor - + width: Math.round(250 * screenScaleFactor) + popup.width: Math.round(350 * screenScaleFactor) model: ListModel { id: discardOrKeepProfileListModel From fe2d554ec0d10ec5bdff1407e7c16f33105e73b9 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 9 Apr 2021 17:14:32 +0200 Subject: [PATCH 5/6] Change the OS_X keyring backend module to macOS Since the OS_X has been deprecated since keyring v22.0.0 and has been replaced by the macOS. CURA-7180 --- cura/OAuth2/KeyringAttribute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/OAuth2/KeyringAttribute.py b/cura/OAuth2/KeyringAttribute.py index 8f489dc773..351cdf4574 100644 --- a/cura/OAuth2/KeyringAttribute.py +++ b/cura/OAuth2/KeyringAttribute.py @@ -19,7 +19,7 @@ if Platform.isWindows() and hasattr(sys, "frozen"): from keyring.backends.Windows import WinVaultKeyring keyring.set_keyring(WinVaultKeyring()) if Platform.isOSX() and hasattr(sys, "frozen"): - from keyring.backends.OS_X import Keyring + from keyring.backends.macOS import Keyring keyring.set_keyring(Keyring()) # Even if errors happen, we don't want this stored locally: From 43cc5fbca9ec32f7276fe0e9441a311d2ec82305 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 12 Apr 2021 10:14:44 +0200 Subject: [PATCH 6/6] Add constant marker to supportsPrintJobQueue --- plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py index 82b8c1da62..56144a54b3 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py @@ -287,7 +287,7 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): firmware_version = Version([version_number[0], version_number[1], version_number[2]]) return firmware_version >= self.PRINT_JOB_ACTIONS_MIN_VERSION - @pyqtProperty(bool) + @pyqtProperty(bool, constant = True) def supportsPrintJobQueue(self) -> bool: """Gets whether the printer supports a queue"""