mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Fixed code comments
CURA-4501
This commit is contained in:
parent
8bfd10f9aa
commit
0bdc1aad00
4 changed files with 28 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2015 Ultimaker B.V.
|
||||
# Copyright (c) 2017 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from UM.Extension import Extension
|
||||
|
@ -14,10 +14,9 @@ from PyQt5.QtCore import QUrl, QObject, pyqtSlot
|
|||
|
||||
import os.path
|
||||
|
||||
class UserAgreement(Extension, QObject):
|
||||
class UserAgreement(QObject, Extension):
|
||||
def __init__(self, parent = None):
|
||||
QObject.__init__(self, parent)
|
||||
Extension.__init__(self)
|
||||
super(UserAgreement, self).__init__()
|
||||
self._user_agreement_window = None
|
||||
self._user_agreement_context = None
|
||||
Application.getInstance().engineCreatedSignal.connect(self._onEngineCreated)
|
||||
|
@ -36,11 +35,11 @@ class UserAgreement(Extension, QObject):
|
|||
@pyqtSlot(bool)
|
||||
def didAgree(self, userChoice):
|
||||
if userChoice:
|
||||
Logger.log("i", 'User agreed to the user agreement')
|
||||
Logger.log('i', 'User agreed to the user agreement')
|
||||
Preferences.getInstance().setValue("general/accepted_user_agreement", True)
|
||||
self._user_agreement_window.hide()
|
||||
else:
|
||||
Logger.log("i", 'User did NOT agree to the user agreement')
|
||||
Logger.log('i', 'User did NOT agree to the user agreement')
|
||||
Preferences.getInstance().setValue("general/accepted_user_agreement", False)
|
||||
CuraApplication.getInstance().quit()
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (c) 2015 Ultimaker B.V.
|
||||
// Copyright (c) 2017 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.3
|
||||
import QtQuick.Controls 1.4
|
||||
|
||||
import UM 1.3 as UM
|
||||
|
||||
|
@ -13,7 +13,7 @@ UM.Dialog
|
|||
minimumHeight: Math.floor(UM.Theme.getSize("modal_window_minimum").height * 0.5)
|
||||
width: minimumWidth
|
||||
height: minimumHeight
|
||||
title: "User Agreement"
|
||||
title: catalog.i18nc("@title:window", "User Agreement")
|
||||
|
||||
TextArea
|
||||
{
|
||||
|
@ -36,10 +36,12 @@ UM.Dialog
|
|||
width: parent.width
|
||||
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
|
||||
|
||||
UM.I18nCatalog { id: catalog; name:"cura" }
|
||||
|
||||
Button
|
||||
{
|
||||
anchors.right: parent.right
|
||||
text: "I understand and agree"
|
||||
text: catalog.i18nc("@action:button", "I understand and agree")
|
||||
onClicked: {
|
||||
manager.didAgree(true)
|
||||
}
|
||||
|
@ -48,7 +50,7 @@ UM.Dialog
|
|||
Button
|
||||
{
|
||||
anchors.left: parent.left
|
||||
text: "I don't agree"
|
||||
text: catalog.i18nc("@action:button", "I don't agree")
|
||||
onClicked: {
|
||||
manager.didAgree(false)
|
||||
}
|
||||
|
@ -59,6 +61,4 @@ UM.Dialog
|
|||
onClosing: {
|
||||
manager.didAgree(false)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2015 Ultimaker B.V.
|
||||
# Copyright (c) 2017 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from . import UserAgreement
|
||||
|
|
|
@ -18,6 +18,21 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
||||
|
||||
#Manually added for plugins/UserAgreementPlugin/UserAgreement.qml
|
||||
msgctxt "@title:window"
|
||||
msgid "User Agreement"
|
||||
msgstr ""
|
||||
|
||||
#Manually added for plugins/UserAgreementPlugin/UserAgreement.qml
|
||||
msgctxt "@action:button"
|
||||
msgid "I understand and agree"
|
||||
msgstr ""
|
||||
|
||||
#Manually added for plugins/UserAgreementPlugin/UserAgreement.qml
|
||||
msgctxt "@action:button"
|
||||
msgid "I don't agree"
|
||||
msgstr ""
|
||||
|
||||
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
|
||||
msgctxt "@label:status"
|
||||
msgid "Print aborted"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue