From 0860fc6cf57e529b259056058705249bafe4d834 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 27 Jun 2016 10:32:56 +0200 Subject: [PATCH 1/2] Automatically start discovery CURA-336 --- DiscoverUM3Action.qml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/DiscoverUM3Action.qml b/DiscoverUM3Action.qml index cf0262abf0..9b1046b445 100644 --- a/DiscoverUM3Action.qml +++ b/DiscoverUM3Action.qml @@ -59,6 +59,7 @@ Cura.MachineAction height: 500 currentIndex: activeIndex onCurrentIndexChanged: base.selectedPrinter = listview.model[currentIndex] + Component.onCompleted: manager.startDiscovery() delegate: Rectangle { height: childrenRect.height @@ -142,11 +143,6 @@ Cura.MachineAction } } } - Button - { - text: catalog.i18nc("@label","Start looking!") - onClicked: manager.startDiscovery() - } } Button { From 7af7748fff323449f5b48758c462c206757efeb8 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 27 Jun 2016 14:40:07 +0200 Subject: [PATCH 2/2] Make machine action button translatable CURA-336 --- DiscoverUM3Action.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DiscoverUM3Action.py b/DiscoverUM3Action.py index b492b79d8b..2ee14b4b9d 100644 --- a/DiscoverUM3Action.py +++ b/DiscoverUM3Action.py @@ -4,9 +4,12 @@ from UM.Application import Application from PyQt5.QtCore import pyqtSignal, pyqtProperty, pyqtSlot +from UM.i18n import i18nCatalog +catalog = i18nCatalog("cura") + class DiscoverUM3Action(MachineAction): def __init__(self): - super().__init__("DiscoverUM3Action", "Discover printers") + super().__init__("DiscoverUM3Action", catalog.i18nc("@action","Connect via Network")) self._qml_url = "DiscoverUM3Action.qml" self._network_plugin = None