Skip to content

Commit

Permalink
Added system translations and autoStartup
Browse files Browse the repository at this point in the history
  • Loading branch information
nicola02nb committed Sep 2, 2024
1 parent 7dba550 commit 081bd07
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.0
0.14.0
1 change: 0 additions & 1 deletion src/UI/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ MainWindow::MainWindow(QWidget *parent)
}

this->setMaximumHeight(this->minimumHeight());
this->show();
}

MainWindow::~MainWindow()
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ bool setOSRunOnStartup(bool enable){
if (desktopFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
QTextStream out(&desktopFile);
out << "[Desktop Entry]\n";
out << "Path=" + appDir + "\n"
out << "Path=" + appDir + "\n";
out << "Type=Application\n";
out << "Exec=" << appPath << "\n";
out << "Name=" << appName << "\n";
Expand Down
7 changes: 3 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.setApplicationVersion(GUI_VERSION);
QLocale language = QLocale::system();
QString nation = language.amText();
QLocale locale = QLocale::system();
QString languageCode = locale.name();
QTranslator translator;
if (translator.load(":/translations/tr/HeadsetControl_GUI_it_IT.qm")) {
if (translator.load(":/translations/tr/HeadsetControl_GUI_"+languageCode+".qm")) {
app.installTranslator(&translator);
}
MainWindow window;


return app.exec();
}

0 comments on commit 081bd07

Please sign in to comment.