Merge branch 'master' of github.com:Ultimaker/JediWifiPrintingPlugin

This commit is contained in:
Jack Ha 2016-09-13 11:47:07 +02:00
commit d8d1bd92d3
3 changed files with 11 additions and 4 deletions

View file

@ -165,7 +165,7 @@ Cura.MachineAction
Column
{
width: parent.width * 0.5
visible: base.selectedPrinter
visible: base.selectedPrinter ? true : false
spacing: UM.Theme.getSize("default_margin").height
Label
{
@ -220,7 +220,7 @@ Cura.MachineAction
Button
{
text: catalog.i18nc("@action:button", "Connect")
enabled: base.selectedPrinter
enabled: base.selectedPrinter ? true : false
onClicked: connectToPrinter()
}
}

View file

@ -245,7 +245,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
self._authentication_state = auth_state
@pyqtSlot()
def requestAuthentication(self, message_id, action_id):
def requestAuthentication(self, message_id = None, action_id = "Retry"):
if action_id == "Request" or action_id == "Retry":
self._authentication_failed_message.hide()
self._not_authenticated_message.hide()

View file

@ -37,6 +37,7 @@ Item
text: catalog.i18nc("@action:button", "Connect")
style: UM.Theme.styles.sidebar_action_button
onClicked: connectActionDialog.show()
enabled: true
visible: !base.printerConnected
}
}
@ -64,12 +65,18 @@ Item
visible: isUM3
Button
{
height: UM.Theme.getSize("save_button_save_to_button").height
tooltip: catalog.i18nc("@info:tooltip", "Send access request to the printer")
text: catalog.i18nc("@action:button", "Request Access")
onClicked: Cura.MachineManager.printerOutputDevices[0].requestAuthentication()
visible: base.printerConnected && !base.printerAcceptsCommands
}
Button
{
tooltip: catalog.i18nc("@info:tooltip", "Load the configuration of the printer into Cura")
text: catalog.i18nc("@action:button", "Activate Configuration")
visible: false
}
}
UM.I18nCatalog{id: catalog; name:"cura"}