Commit 775971ee authored by Matt Edman's avatar Matt Edman
Browse files

Since the AboutDialog is static in MainWindow::about(), we have to reload

Tor's version each time show() is called instead of just doing that in the
dialog's constructor.


svn:r118
parent e15632db
Loading
Loading
Loading
Loading
+12 −3
Changes for src/gui/about.cpp: 12 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -28,13 +28,22 @@ AboutDialog::AboutDialog(TorControl *torControl, QWidget *parent)
{
  ui.setupUi(this);

  /* Save the TorControl object to use later */
  _torControl = torControl;

  /* Get Vidalia's version number */
  ui.lblVidaliaVersion->setText(VidaliaSettings::getVersion());

  /* Access the TorControl object to retrieve version */
  ui.lblTorVersion->setText(torControl->getTorVersion());

  /* Get Qt's version number */
  ui.lblQtVersion->setText(QT_VERSION_STR);
}

void
AboutDialog::show()
{
  /* Access the TorControl object to retrieve version */
  ui.lblTorVersion->setText(_torControl->getTorVersion());

  QDialog::show();
}
+2 −0
Changes for src/gui/about.h: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -34,9 +34,11 @@ class AboutDialog : public QDialog

public:
    AboutDialog(TorControl *torControl, QWidget *parent = 0);
    void show();

private:
    Ui::AboutDialog ui;
    TorControl *_torControl;
};

#endif