Remote info is updated when closing remote selection dialog if online
authorJari Jarvi <t7jaja00@students.oamk.fi>
Tue, 6 Jul 2010 06:38:51 +0000 (09:38 +0300)
committerJari Jarvi <t7jaja00@students.oamk.fi>
Tue, 6 Jul 2010 06:40:03 +0000 (09:40 +0300)
src/settingsdlg.cpp

index a5a0d16..8755529 100644 (file)
@@ -64,7 +64,7 @@ SettingsDlg::SettingsDlg(QWidget *parent)
 
     QString selectedRemote = settings.value("remoteName", "").toString();
     if (selectedRemote == "") {
-        m_remoteNameLabel->setText("No remote selected");
+        m_remoteNameLabel->setText(tr("No remote selected"));
         enableRateBtns(false);
     } else {
         // Create remote by name and update it's info if online
@@ -112,6 +112,7 @@ void SettingsDlg::showSelectRemoteDlg()
     connect(&dlg, SIGNAL(remoteChanged(Remote)),
             this, SLOT(setRemote(Remote)));
     dlg.exec();
+    onNetworkStatusUpdate();
 }
 
 void SettingsDlg::showAboutDlg()
@@ -135,6 +136,8 @@ void SettingsDlg::onNetworkStatusUpdate()
                 this, SLOT(updateRemoteInfo()));
         m_remote.updateInfo();
         enableRateBtns();
+    } else {
+        m_ratingLabel->setText(tr("Offline"));
     }
 }