diff --git a/apps/gamelauncher/CMakeLists.txt b/apps/gamelauncher/CMakeLists.txt index 5e32c60..d98eb7e 100644 --- a/apps/gamelauncher/CMakeLists.txt +++ b/apps/gamelauncher/CMakeLists.txt @@ -21,6 +21,7 @@ target_link_libraries(novus-gamelauncher Qt6::Widgets) install(TARGETS novus-gamelauncher ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS}) +install(FILES gamelauncher.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/novus) if (WIN32) set_target_properties(novus-gamelauncher PROPERTIES @@ -28,4 +29,4 @@ if (WIN32) OUTPUT_NAME "GameLauncher") install(FILES $ DESTINATION ${CMAKE_INSTALL_BINDIR}) -endif() \ No newline at end of file +endif() diff --git a/apps/gamelauncher/gamelauncher.rc b/apps/gamelauncher/gamelauncher.rc new file mode 100644 index 0000000..6d3965e --- /dev/null +++ b/apps/gamelauncher/gamelauncher.rc @@ -0,0 +1,14 @@ + + + + + File + + + + diff --git a/apps/gamelauncher/include/mainwindow.h b/apps/gamelauncher/include/mainwindow.h index a749d7f..865c2f5 100644 --- a/apps/gamelauncher/include/mainwindow.h +++ b/apps/gamelauncher/include/mainwindow.h @@ -17,5 +17,7 @@ public: explicit MainWindow(); private: + void setupActions(); + QProcess *process = nullptr; -}; \ No newline at end of file +}; diff --git a/apps/gamelauncher/src/mainwindow.cpp b/apps/gamelauncher/src/mainwindow.cpp index 2548f1a..332aa4f 100644 --- a/apps/gamelauncher/src/mainwindow.cpp +++ b/apps/gamelauncher/src/mainwindow.cpp @@ -40,6 +40,7 @@ MainWindow::MainWindow() }); layout->addWidget(launchGameButton); + setupActions(); setupGUI(Keys | Save | Create); // We don't provide help (yet) @@ -48,4 +49,9 @@ MainWindow::MainWindow() actionCollection()->removeAction(actionCollection()->action(KStandardAction::name(KStandardAction::AboutKDE))); } -#include "moc_mainwindow.cpp" \ No newline at end of file +void MainWindow::setupActions() +{ + KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection()); +} + +#include "moc_mainwindow.cpp" diff --git a/apps/karuku/exceleditor.rc b/apps/karuku/exceleditor.rc index 8a7e98d..388aea8 100644 --- a/apps/karuku/exceleditor.rc +++ b/apps/karuku/exceleditor.rc @@ -10,6 +10,8 @@ File + + diff --git a/apps/karuku/src/mainwindow.cpp b/apps/karuku/src/mainwindow.cpp index 42a76a1..2a5a3a8 100644 --- a/apps/karuku/src/mainwindow.cpp +++ b/apps/karuku/src/mainwindow.cpp @@ -172,6 +172,8 @@ void MainWindow::setupActions() }); }); actionCollection()->addAction(QStringLiteral("download_list"), downloadList); + + KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection()); } -#include "moc_mainwindow.cpp" \ No newline at end of file +#include "moc_mainwindow.cpp" diff --git a/apps/mapeditor/CMakeLists.txt b/apps/mapeditor/CMakeLists.txt index ea43ea7..5bb4c13 100644 --- a/apps/mapeditor/CMakeLists.txt +++ b/apps/mapeditor/CMakeLists.txt @@ -25,6 +25,7 @@ target_link_libraries(novus-mapeditor Qt6::Widgets) install(TARGETS novus-mapeditor ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS}) +install(FILES mapeditor.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/novus) ecm_add_app_icon(novus-mapeditor ICONS @@ -43,4 +44,4 @@ if (WIN32) else() install(FILES zone.xiv.mapeditor.desktop DESTINATION ${KDE_INSTALL_APPDIR}) install(FILES zone.xiv.mapeditor.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps) -endif() \ No newline at end of file +endif() diff --git a/apps/mapeditor/include/mainwindow.h b/apps/mapeditor/include/mainwindow.h index 0477212..8bdbf38 100644 --- a/apps/mapeditor/include/mainwindow.h +++ b/apps/mapeditor/include/mainwindow.h @@ -17,6 +17,8 @@ public: explicit MainWindow(GameData *data); private: + void setupActions(); + GameData *data = nullptr; FileCache cache; -}; \ No newline at end of file +}; diff --git a/apps/mapeditor/mapeditor.rc b/apps/mapeditor/mapeditor.rc new file mode 100644 index 0000000..f04de8c --- /dev/null +++ b/apps/mapeditor/mapeditor.rc @@ -0,0 +1,14 @@ + + + + + File + + + + diff --git a/apps/mapeditor/src/mainwindow.cpp b/apps/mapeditor/src/mainwindow.cpp index 03a3075..e712a83 100644 --- a/apps/mapeditor/src/mainwindow.cpp +++ b/apps/mapeditor/src/mainwindow.cpp @@ -46,6 +46,7 @@ MainWindow::MainWindow(GameData *data) mapView->addTerrain(bgPath, tera); }); + setupActions(); setupGUI(Keys | Save | Create); // We don't provide help (yet) @@ -54,4 +55,9 @@ MainWindow::MainWindow(GameData *data) actionCollection()->removeAction(actionCollection()->action(KStandardAction::name(KStandardAction::AboutKDE))); } -#include "moc_mainwindow.cpp" \ No newline at end of file +void MainWindow::setupActions() +{ + KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection()); +} + +#include "moc_mainwindow.cpp" diff --git a/apps/mateditor/CMakeLists.txt b/apps/mateditor/CMakeLists.txt index 9e5db10..31d9c0a 100644 --- a/apps/mateditor/CMakeLists.txt +++ b/apps/mateditor/CMakeLists.txt @@ -25,6 +25,7 @@ target_link_libraries(novus-mateditor Qt6::Widgets) install(TARGETS novus-mateditor ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS}) +install(FILES mateditor.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/novus) if (WIN32) set_target_properties(novus-mateditor PROPERTIES @@ -32,4 +33,4 @@ if (WIN32) OUTPUT_NAME "MaterialEditor") install(FILES $ DESTINATION ${CMAKE_INSTALL_BINDIR}) -endif() \ No newline at end of file +endif() diff --git a/apps/mateditor/include/mainwindow.h b/apps/mateditor/include/mainwindow.h index 2e08d49..fe48c8c 100644 --- a/apps/mateditor/include/mainwindow.h +++ b/apps/mateditor/include/mainwindow.h @@ -17,7 +17,9 @@ public: explicit MainWindow(GameData *data); private: + void setupActions(); + GameData *data = nullptr; FileCache cache; physis_Material m_material; -}; \ No newline at end of file +}; diff --git a/apps/mateditor/mateditor.rc b/apps/mateditor/mateditor.rc new file mode 100644 index 0000000..9ef4929 --- /dev/null +++ b/apps/mateditor/mateditor.rc @@ -0,0 +1,14 @@ + + + + + File + + + + diff --git a/apps/mateditor/src/mainwindow.cpp b/apps/mateditor/src/mainwindow.cpp index a800db6..451dc3c 100644 --- a/apps/mateditor/src/mainwindow.cpp +++ b/apps/mateditor/src/mainwindow.cpp @@ -36,6 +36,7 @@ MainWindow::MainWindow(GameData *data) matView->addSphere(m_material); dummyWidget->addWidget(matView); + setupActions(); setupGUI(Keys | Save | Create); // We don't provide help (yet) @@ -44,4 +45,9 @@ MainWindow::MainWindow(GameData *data) actionCollection()->removeAction(actionCollection()->action(KStandardAction::name(KStandardAction::AboutKDE))); } -#include "moc_mainwindow.cpp" \ No newline at end of file +void MainWindow::setupActions() +{ + KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection()); +} + +#include "moc_mainwindow.cpp" diff --git a/apps/mdlviewer/mdlviewer.rc b/apps/mdlviewer/mdlviewer.rc index 2595e39..1e7e9bf 100644 --- a/apps/mdlviewer/mdlviewer.rc +++ b/apps/mdlviewer/mdlviewer.rc @@ -1,6 +1,6 @@ File + + diff --git a/apps/mdlviewer/src/mainwindow.cpp b/apps/mdlviewer/src/mainwindow.cpp index 812cc26..9846815 100644 --- a/apps/mdlviewer/src/mainwindow.cpp +++ b/apps/mdlviewer/src/mainwindow.cpp @@ -119,6 +119,8 @@ void MainWindow::setupActions() } }); actionCollection()->addAction(QStringLiteral("open_mdl"), openMDLFile); + + KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection()); } #include "moc_mainwindow.cpp" diff --git a/apps/sagasu/dataexplorer.rc b/apps/sagasu/dataexplorer.rc index 8a7e98d..66df367 100644 --- a/apps/sagasu/dataexplorer.rc +++ b/apps/sagasu/dataexplorer.rc @@ -1,6 +1,6 @@ + + diff --git a/apps/sagasu/src/mainwindow.cpp b/apps/sagasu/src/mainwindow.cpp index a90b183..15ff301 100644 --- a/apps/sagasu/src/mainwindow.cpp +++ b/apps/sagasu/src/mainwindow.cpp @@ -271,4 +271,6 @@ void MainWindow::setupActions() }); }); actionCollection()->addAction(QStringLiteral("download_list"), downloadList); + + KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection()); }