mirror of
https://github.com/redstrate/Astra.git
synced 2025-06-08 15:07:45 +00:00
Add version label to about window
This is hardcoded for now
This commit is contained in:
parent
8e86ed8e8d
commit
1aa1d10d07
3 changed files with 12 additions and 3 deletions
|
@ -38,7 +38,8 @@ set(SRC
|
||||||
include/headline.h
|
include/headline.h
|
||||||
src/headline.cpp
|
src/headline.cpp
|
||||||
include/indexparser.h
|
include/indexparser.h
|
||||||
src/indexparser.cpp)
|
src/indexparser.cpp
|
||||||
|
include/config.h)
|
||||||
|
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
|
|
3
include/config.h
Normal file
3
include/config.h
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
constexpr const char* version = "v0.3.1-beta";
|
|
@ -15,6 +15,7 @@
|
||||||
#include "sapphirelauncher.h"
|
#include "sapphirelauncher.h"
|
||||||
#include "assetupdater.h"
|
#include "assetupdater.h"
|
||||||
#include "headline.h"
|
#include "headline.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindow(parent), core(core) {
|
LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindow(parent), core(core) {
|
||||||
setWindowTitle("Astra");
|
setWindowTitle("Astra");
|
||||||
|
@ -81,7 +82,11 @@ LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindo
|
||||||
QAction* showAbout = helpMenu->addAction("About Astra");
|
QAction* showAbout = helpMenu->addAction("About Astra");
|
||||||
showAbout->setIcon(QIcon::fromTheme("help-about"));
|
showAbout->setIcon(QIcon::fromTheme("help-about"));
|
||||||
connect(showAbout, &QAction::triggered, [=] {
|
connect(showAbout, &QAction::triggered, [=] {
|
||||||
QMessageBox::about(this, "About Astra", "The source code is available <a href='https://github.com/redstrate/astra'>here</a>.");
|
QString aboutText;
|
||||||
|
aboutText.append(QString("Version: %1\n").arg(version));
|
||||||
|
aboutText.append("The source code is available at https://sr.ht/~redstrate/astra.");
|
||||||
|
|
||||||
|
QMessageBox::about(this, "About Astra", aboutText);
|
||||||
});
|
});
|
||||||
|
|
||||||
QAction* showAboutQt = helpMenu->addAction("About Qt");
|
QAction* showAboutQt = helpMenu->addAction("About Qt");
|
||||||
|
@ -173,7 +178,7 @@ LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindo
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(currentProfile().isSapphire) {
|
if(currentProfile().isSapphire) {
|
||||||
this->core.sapphireLauncher->login(currentProfile().lobbyURL, info);
|
//this->core.sapphireLauncher->login(currentProfile().lobbyURL, info);
|
||||||
} else {
|
} else {
|
||||||
this->core.squareBoot->bootCheck(info);
|
this->core.squareBoot->bootCheck(info);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue