Fixed progress indicator incorrectly being displayed after unpiring

This commit is contained in:
Albert Vaca 2015-06-21 19:42:57 -07:00
parent 7bdf26927d
commit 02bc1bcd90

View file

@ -252,18 +252,18 @@ void KdeConnectKcm::pairingFailed(const QString& error)
kcmUi->messages->animatedShow(); kcmUi->messages->animatedShow();
} }
void KdeConnectKcm::pairingChanged(bool pairing) void KdeConnectKcm::pairingChanged(bool paired)
{ {
DeviceDbusInterface* senderDevice = (DeviceDbusInterface*) sender(); DeviceDbusInterface* senderDevice = (DeviceDbusInterface*) sender();
devicesModel->deviceStatusChanged(senderDevice->id()); devicesModel->deviceStatusChanged(senderDevice->id());
if (senderDevice != currentDevice) return; if (senderDevice != currentDevice) return;
kcmUi->pair_button->setVisible(!pairing); kcmUi->pair_button->setVisible(!paired);
kcmUi->unpair_button->setVisible(pairing); kcmUi->unpair_button->setVisible(paired);
kcmUi->progressBar->setVisible(!pairing); kcmUi->progressBar->setVisible(senderDevice->pairRequested());
kcmUi->ping_button->setVisible(pairing); kcmUi->ping_button->setVisible(paired);
kcmUi->status_label->setText(pairing ? i18n("(paired)") : i18n("(unpaired)")); kcmUi->status_label->setText(paired ? i18n("(paired)") : i18n("(unpaired)"));
} }
void KdeConnectKcm::pluginsConfigChanged() void KdeConnectKcm::pluginsConfigChanged()