From 0eb003d59929fdb2438eeb83be63bf21dda139d3 Mon Sep 17 00:00:00 2001
From: NinjaCheetah <58050615+NinjaCheetah@users.noreply.github.com>
Date: Fri, 9 May 2025 12:56:26 -0400
Subject: [PATCH] Keep "About NUSGet" and "About Qt" under the application menu
on macOS Defined menu roles for those items so that Qt knows they belong
under "NUSGet" when on macOS. This worked automatically somehow in English,
but when loading a localization they'd be relocated to "Help" like they are
on Windows and Linux. They'll now stay in the correct place for all
languages.
---
qt/py/ui_MainMenu.py | 4 +++-
qt/ui/MainMenu.ui | 8 +++++++-
resources/translations/nusget_de.ts | 10 +++++++---
resources/translations/nusget_es.ts | 12 ++++++------
resources/translations/nusget_fr.ts | 12 ++++++------
resources/translations/nusget_it.ts | 12 ++++++------
resources/translations/nusget_ko.ts | 10 +++++++---
resources/translations/nusget_nb.ts | 12 ++++++------
resources/translations/nusget_no.ts | 12 ++++++------
resources/translations/nusget_ro.ts | 12 ++++++------
10 files changed, 60 insertions(+), 44 deletions(-)
diff --git a/qt/py/ui_MainMenu.py b/qt/py/ui_MainMenu.py
index bd8c96e..d9600f8 100644
--- a/qt/py/ui_MainMenu.py
+++ b/qt/py/ui_MainMenu.py
@@ -35,9 +35,11 @@ class Ui_MainWindow(object):
self.actionAbout.setObjectName(u"actionAbout")
icon = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.HelpAbout))
self.actionAbout.setIcon(icon)
+ self.actionAbout.setMenuRole(QAction.MenuRole.ApplicationSpecificRole)
self.actionAbout_Qt = QAction(MainWindow)
self.actionAbout_Qt.setObjectName(u"actionAbout_Qt")
self.actionAbout_Qt.setIcon(icon)
+ self.actionAbout_Qt.setMenuRole(QAction.MenuRole.ApplicationSpecificRole)
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName(u"centralwidget")
self.horizontalLayout_3 = QHBoxLayout(self.centralwidget)
@@ -332,7 +334,7 @@ class Ui_MainWindow(object):
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None))
- self.actionAbout.setText(QCoreApplication.translate("MainWindow", u"About", None))
+ self.actionAbout.setText(QCoreApplication.translate("MainWindow", u"About NUSGet", None))
self.actionAbout_Qt.setText(QCoreApplication.translate("MainWindow", u"About Qt", None))
self.tree_filter_input.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Search", None))
self.tree_filter_reset_btn.setText(QCoreApplication.translate("MainWindow", u"Clear", None))
diff --git a/qt/ui/MainMenu.ui b/qt/ui/MainMenu.ui
index 1909cf3..7ae2af6 100755
--- a/qt/ui/MainMenu.ui
+++ b/qt/ui/MainMenu.ui
@@ -461,7 +461,10 @@ li.checked::marker { content: "\2612"; }
- About
+ About NUSGet
+
+
+ QAction::MenuRole::ApplicationSpecificRole
@@ -471,6 +474,9 @@ li.checked::marker { content: "\2612"; }
About Qt
+
+ QAction::MenuRole::ApplicationSpecificRole
+
diff --git a/resources/translations/nusget_de.ts b/resources/translations/nusget_de.ts
index e9f8109..ea42173 100644
--- a/resources/translations/nusget_de.ts
+++ b/resources/translations/nusget_de.ts
@@ -469,11 +469,15 @@ li.checked::marker { content: "\2612"; }
- About
- Über
+ About NUSGet
+ Über NUSGet
-
+ About
+ Über
+
+
+
About Qt
Über Qt
diff --git a/resources/translations/nusget_es.ts b/resources/translations/nusget_es.ts
index dae3afd..128dd71 100644
--- a/resources/translations/nusget_es.ts
+++ b/resources/translations/nusget_es.ts
@@ -152,6 +152,11 @@ li.checked::marker { content: "\2612"; }
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;"><br /></p></body></html>
+
+
+ About NUSGet
+
+
Pack installable archive (WAD/TAD)
@@ -213,12 +218,7 @@ li.checked::marker { content: "\2612"; }
-
- About
-
-
-
-
+
About Qt
diff --git a/resources/translations/nusget_fr.ts b/resources/translations/nusget_fr.ts
index b2b05f6..5e57c17 100644
--- a/resources/translations/nusget_fr.ts
+++ b/resources/translations/nusget_fr.ts
@@ -411,6 +411,11 @@ li.checked::marker { content: "\2612"; }
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;"><br /></p></body></html>
+
+
+ About NUSGet
+
+
Pack installable archive (WAD/TAD)
@@ -481,12 +486,7 @@ li.checked::marker { content: "\2612"; }
-
- About
-
-
-
-
+
About Qt
diff --git a/resources/translations/nusget_it.ts b/resources/translations/nusget_it.ts
index 0a5d4e5..c06fc6b 100644
--- a/resources/translations/nusget_it.ts
+++ b/resources/translations/nusget_it.ts
@@ -140,6 +140,11 @@
General Settings
Impostazioni generali
+
+
+ About NUSGet
+
+
Pack installable archive (WAD/TAD)
@@ -217,12 +222,7 @@ li.checked::marker { content: "\2612"; }
-
- About
-
-
-
-
+
About Qt
diff --git a/resources/translations/nusget_ko.ts b/resources/translations/nusget_ko.ts
index 0775c02..d6104cc 100644
--- a/resources/translations/nusget_ko.ts
+++ b/resources/translations/nusget_ko.ts
@@ -140,6 +140,11 @@
General Settings
일반 설정
+
+
+ About NUSGet
+ NUSGet 정보
+
Pack installable archive (WAD/TAD)
@@ -217,12 +222,11 @@ li.checked::marker { content: "\2612"; }
도움말
-
About
- 정보
+ 정보
-
+
About Qt
Qt 정보
diff --git a/resources/translations/nusget_nb.ts b/resources/translations/nusget_nb.ts
index 685ad6f..0281ec7 100644
--- a/resources/translations/nusget_nb.ts
+++ b/resources/translations/nusget_nb.ts
@@ -140,6 +140,11 @@
General Settings
Generelle Instillinger
+
+
+ About NUSGet
+
+
Pack installable archive (WAD/TAD)
@@ -217,12 +222,7 @@ li.checked::marker { content: "\2612"; }
-
- About
-
-
-
-
+
About Qt
diff --git a/resources/translations/nusget_no.ts b/resources/translations/nusget_no.ts
index 685ad6f..0281ec7 100644
--- a/resources/translations/nusget_no.ts
+++ b/resources/translations/nusget_no.ts
@@ -140,6 +140,11 @@
General Settings
Generelle Instillinger
+
+
+ About NUSGet
+
+
Pack installable archive (WAD/TAD)
@@ -217,12 +222,7 @@ li.checked::marker { content: "\2612"; }
-
- About
-
-
-
-
+
About Qt
diff --git a/resources/translations/nusget_ro.ts b/resources/translations/nusget_ro.ts
index 25e1a8a..18a91d8 100644
--- a/resources/translations/nusget_ro.ts
+++ b/resources/translations/nusget_ro.ts
@@ -449,6 +449,11 @@ li.checked::marker { content: "\2612"; }
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;"><br /></p></body></html>
+
+
+ About NUSGet
+
+
Pack installable archive (WAD/TAD)
@@ -519,12 +524,7 @@ li.checked::marker { content: "\2612"; }
-
- About
-
-
-
-
+
About Qt