Skip to content

Commit

Permalink
GUI: Correctly set titles for Phaethon and About dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
fdde authored and DrMcCoy committed Dec 29, 2017
1 parent 8309507 commit 61abebc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ namespace GUI {

W_OBJECT_IMPL(MainWindow)

MainWindow::MainWindow(QWidget *parent, const char *version, const QSize &size, const Common::UString &path)
MainWindow::MainWindow(QWidget *parent, const char *title, const QSize &size, const Common::UString &path)
: QMainWindow(parent)
{
_ui.setupUi(this);

setWindowTitle(title);
resize(size);

// preview
Expand Down Expand Up @@ -427,7 +428,7 @@ void MainWindow::exportWAV() {

void MainWindow::slotAbout() {
QString msg = createVersionText().toQString();
QMessageBox::about(this, "About", msg);
QMessageBox::about(this, "About Phaethon", msg);
}

std::shared_ptr<StatusBar> MainWindow::status() {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MainWindow : public QMainWindow {
W_OBJECT(MainWindow)

public:
MainWindow(QWidget *parent = 0, const char *version = "", const QSize &size = QSize(800, 600), const Common::UString &path = "");
MainWindow(QWidget *parent, const char *title, const QSize &size, const Common::UString &path);
~MainWindow();

std::shared_ptr<StatusBar> status();
Expand Down
2 changes: 1 addition & 1 deletion src/phaethon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Phaethon::Phaethon(const Common::UString &path) : _path(path) {
char *argv[] = {empty}; // must be at least 1
QApplication app(argc, argv);

GUI::MainWindow mainWindow;
GUI::MainWindow mainWindow(0, Version::getProjectNameVersion(), QSize(800, 600), path);
mainWindow.show();

app.exec();
Expand Down

0 comments on commit 61abebc

Please sign in to comment.