Make menu more reasonably organized (#1230)

* Make menu more reasonably organized
* Revert name and order change of configs

---------

Co-authored-by: wuweiran <wwrnfls@126.com>
This commit is contained in:
Weiran Wu 2024-03-07 10:25:42 +08:00 committed by GitHub
parent ecb69a240a
commit 613bd4038a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 138 additions and 168 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-15 14:15-0500\n"
"POT-Creation-Date: 2024-03-06 18:49+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -262,7 +262,7 @@ msgstr ""
msgid "New Value"
msgstr ""
#: guiinit.cpp:2794
#: guiinit.cpp:2796
msgid "JoyBus host invalid; disabling"
msgstr ""
@ -539,33 +539,33 @@ msgstr ""
msgid "Waiting for GDB..."
msgstr ""
#: cmdevents.cpp:2215 panel.cpp:260 panel.cpp:372
#: cmdevents.cpp:2207 panel.cpp:260 panel.cpp:372
msgid "Could not initialize the sound driver!"
msgstr ""
#: cmdevents.cpp:2284
#: cmdevents.cpp:2276
msgid ""
"YOUR CONFIGURATION WILL BE DELETED!\n"
"\n"
"Are you sure?"
msgstr ""
#: cmdevents.cpp:2285
#: cmdevents.cpp:2277
msgid "FACTORY RESET"
msgstr ""
#: cmdevents.cpp:2320
#: cmdevents.cpp:2312
msgid "Nintendo Game Boy / Color / Advance emulator."
msgstr ""
#: cmdevents.cpp:2321
#: cmdevents.cpp:2313
msgid ""
"Copyright (C) 1999-2003 Forgotten\n"
"Copyright (C) 2004-2006 VBA development team\n"
"Copyright (C) 2007-2020 VBA-M development team"
msgstr ""
#: cmdevents.cpp:2323
#: cmdevents.cpp:2315
msgid ""
"This program is free software: you can redistribute it and / or modify\n"
"it under the terms of the GNU General Public License as published by\n"
@ -581,15 +581,15 @@ msgid ""
"along with this program. If not, see http://www.gnu.org/licenses ."
msgstr ""
#: cmdevents.cpp:2508
#: cmdevents.cpp:2500
msgid "Cannot use Game Boy BIOS when Colorizer Hack is enabled."
msgstr ""
#: cmdevents.cpp:2564
#: cmdevents.cpp:2566
msgid "LAN link is already active. Disable link mode to disconnect."
msgstr ""
#: cmdevents.cpp:2570
#: cmdevents.cpp:2572
msgid "Network is not supported in local mode."
msgstr ""
@ -1320,8 +1320,8 @@ msgstr ""
#: config/internal/option-internal.cpp:666
#: config/internal/option-internal.cpp:686
#: config/internal/option-internal.cpp:707
#: config/internal/option-internal.cpp:727
#: config/internal/option-internal.cpp:747
#: config/internal/option-internal.cpp:738
#: config/internal/option-internal.cpp:758
#, c-format
msgid "Invalid value %s for option %s; valid values are %s"
msgstr ""
@ -2689,7 +2689,7 @@ msgid ""
"entire contents if too small."
msgstr ""
#: xrc/JoyPanel.xrc:14 xrc/MainMenu.xrc:456
#: xrc/JoyPanel.xrc:14 xrc/MainMenu.xrc:452
msgid "Up"
msgstr ""
@ -2697,7 +2697,7 @@ msgstr ""
msgid "A"
msgstr ""
#: xrc/JoyPanel.xrc:60 xrc/MainMenu.xrc:460
#: xrc/JoyPanel.xrc:60 xrc/MainMenu.xrc:456
msgid "Down"
msgstr ""
@ -2705,7 +2705,7 @@ msgstr ""
msgid "B"
msgstr ""
#: xrc/JoyPanel.xrc:106 xrc/MainMenu.xrc:464
#: xrc/JoyPanel.xrc:106 xrc/MainMenu.xrc:460
msgid "Left"
msgstr ""
@ -2713,7 +2713,7 @@ msgstr ""
msgid "L"
msgstr ""
#: xrc/JoyPanel.xrc:152 xrc/MainMenu.xrc:468
#: xrc/JoyPanel.xrc:152 xrc/MainMenu.xrc:464
msgid "Right"
msgstr ""
@ -2721,11 +2721,11 @@ msgstr ""
msgid "R"
msgstr ""
#: xrc/JoyPanel.xrc:199 xrc/MainMenu.xrc:488
#: xrc/JoyPanel.xrc:199 xrc/MainMenu.xrc:484
msgid "Select"
msgstr ""
#: xrc/JoyPanel.xrc:222 xrc/MainMenu.xrc:492
#: xrc/JoyPanel.xrc:222 xrc/MainMenu.xrc:488
msgid "Start"
msgstr ""
@ -3137,8 +3137,8 @@ msgstr ""
msgid "&Speed hack"
msgstr ""
#: xrc/MainMenu.xrc:310 xrc/MainMenu.xrc:316 xrc/MainMenu.xrc:387
#: xrc/MainMenu.xrc:423
#: xrc/MainMenu.xrc:310 xrc/MainMenu.xrc:316 xrc/MainMenu.xrc:383
#: xrc/MainMenu.xrc:419
msgid "&Configure..."
msgstr ""
@ -3199,286 +3199,294 @@ msgid "&Keep window on top"
msgstr ""
#: xrc/MainMenu.xrc:372
msgid "&Status bar"
msgstr ""
#: xrc/MainMenu.xrc:376
msgid "&Disable on-screen display"
msgstr ""
#: xrc/MainMenu.xrc:380
#: xrc/MainMenu.xrc:376
msgid "&Transparent on-screen display"
msgstr ""
#: xrc/MainMenu.xrc:385
#: xrc/MainMenu.xrc:381
msgid "&Audio"
msgstr ""
#: xrc/MainMenu.xrc:390
#: xrc/MainMenu.xrc:386
msgid "&Increase volume"
msgstr ""
#: xrc/MainMenu.xrc:394
#: xrc/MainMenu.xrc:390
msgid "&Decrease volume"
msgstr ""
#: xrc/MainMenu.xrc:398
#: xrc/MainMenu.xrc:394
msgid "&Toggle sound"
msgstr ""
#: xrc/MainMenu.xrc:403
#: xrc/MainMenu.xrc:399
msgid "&Game Boy Advance sound interpolation"
msgstr ""
#: xrc/MainMenu.xrc:408
#: xrc/MainMenu.xrc:404
msgid "&Game Boy sound enhancement"
msgstr ""
#: xrc/MainMenu.xrc:412
#: xrc/MainMenu.xrc:408
msgid "&Game Boy surround sound effect"
msgstr ""
#: xrc/MainMenu.xrc:416
#: xrc/MainMenu.xrc:412
msgid "&Game Boy sound declicking"
msgstr ""
#: xrc/MainMenu.xrc:421
#: xrc/MainMenu.xrc:417
msgid "&Input"
msgstr ""
#: xrc/MainMenu.xrc:426
#: xrc/MainMenu.xrc:422
msgid "Allow &keyboard background input"
msgstr ""
#: xrc/MainMenu.xrc:430
#: xrc/MainMenu.xrc:426
msgid "Allow &joystick background input"
msgstr ""
#: xrc/MainMenu.xrc:435
#: xrc/MainMenu.xrc:431
msgid "&Autofire"
msgstr ""
#: xrc/MainMenu.xrc:454
#: xrc/MainMenu.xrc:450
msgid "&Autohold"
msgstr ""
#: xrc/MainMenu.xrc:472
#: xrc/MainMenu.xrc:468
msgid "&A"
msgstr ""
#: xrc/MainMenu.xrc:476
#: xrc/MainMenu.xrc:472
msgid "&B"
msgstr ""
#: xrc/MainMenu.xrc:480
#: xrc/MainMenu.xrc:476
msgid "&L"
msgstr ""
#: xrc/MainMenu.xrc:484
#: xrc/MainMenu.xrc:480
msgid "&R"
msgstr ""
#: xrc/MainMenu.xrc:500 xrc/MainMenu.xrc:523
#: xrc/MainMenu.xrc:496 xrc/MainMenu.xrc:519
msgid "Configure..."
msgstr ""
#: xrc/MainMenu.xrc:504
#: xrc/MainMenu.xrc:500
msgid "&Real-time clock"
msgstr ""
#: xrc/MainMenu.xrc:508
#: xrc/MainMenu.xrc:504
msgid "&Use BIOS file"
msgstr ""
#: xrc/MainMenu.xrc:512
#: xrc/MainMenu.xrc:508
msgid "&Debug print"
msgstr ""
#: xrc/MainMenu.xrc:516 xrc/MainMenu.xrc:531
#: xrc/MainMenu.xrc:512 xrc/MainMenu.xrc:527
msgid "&LCD Filter"
msgstr ""
#: xrc/MainMenu.xrc:527
#: xrc/MainMenu.xrc:523
msgid "&Game Boy color option"
msgstr ""
#: xrc/MainMenu.xrc:535
#: xrc/MainMenu.xrc:531
msgid "&Game Boy Colorizer Hack (requires restart)"
msgstr ""
#: xrc/MainMenu.xrc:539
#: xrc/MainMenu.xrc:535
msgid "&Game Boy printer"
msgstr ""
#: xrc/MainMenu.xrc:543
#: xrc/MainMenu.xrc:539
msgid "&Gather a full page before printing"
msgstr ""
#: xrc/MainMenu.xrc:547
#: xrc/MainMenu.xrc:543
msgid "&Save printouts as screen captures"
msgstr ""
#: xrc/MainMenu.xrc:552
#: xrc/MainMenu.xrc:548
msgid "&Use Game Boy BIOS file (requires restart)"
msgstr ""
#: xrc/MainMenu.xrc:556
#: xrc/MainMenu.xrc:552
msgid "&Use Game Boy Color BIOS file"
msgstr ""
#: xrc/MainMenu.xrc:561
#: xrc/MainMenu.xrc:557
msgid "&General..."
msgstr ""
#: xrc/MainMenu.xrc:564
#: xrc/MainMenu.xrc:560
msgid "&Speedup / Turbo..."
msgstr ""
#: xrc/MainMenu.xrc:567
#: xrc/MainMenu.xrc:563
msgid "D&irectories..."
msgstr ""
#: xrc/MainMenu.xrc:570
#: xrc/MainMenu.xrc:566
msgid "&Key Shortcuts..."
msgstr ""
#: xrc/MainMenu.xrc:573
msgid "&UI Settings..."
#: xrc/MainMenu.xrc:569
msgid "UI Settings"
msgstr ""
#: xrc/MainMenu.xrc:577
msgid "&Tools"
#: xrc/MainMenu.xrc:571
msgid "Enable &Status bar"
msgstr ""
#: xrc/MainMenu.xrc:575
msgid "Hide &Menu Bar"
msgstr ""
#: xrc/MainMenu.xrc:579
msgid "Suspend &Screen Saver"
msgstr ""
#: xrc/MainMenu.xrc:585
msgid "&Tools"
msgstr ""
#: xrc/MainMenu.xrc:587
msgid "&Cheats"
msgstr ""
#: xrc/MainMenu.xrc:581
#: xrc/MainMenu.xrc:589
msgid "List &cheats..."
msgstr ""
#: xrc/MainMenu.xrc:584
#: xrc/MainMenu.xrc:592
msgid "Find c&heat..."
msgstr ""
#: xrc/MainMenu.xrc:588
#: xrc/MainMenu.xrc:596
msgid "A&utomatically save / load cheats"
msgstr ""
#: xrc/MainMenu.xrc:592
#: xrc/MainMenu.xrc:600
msgid "&Enable cheats"
msgstr ""
#: xrc/MainMenu.xrc:599
#: xrc/MainMenu.xrc:607
msgid "&Break into GDB"
msgstr ""
#: xrc/MainMenu.xrc:603
#: xrc/MainMenu.xrc:611
msgid "&Configure port..."
msgstr ""
#: xrc/MainMenu.xrc:606
#: xrc/MainMenu.xrc:614
msgid "&Break on load"
msgstr ""
#: xrc/MainMenu.xrc:611
#: xrc/MainMenu.xrc:619
msgid "&Disconnect"
msgstr ""
#: xrc/MainMenu.xrc:616
#: xrc/MainMenu.xrc:624
msgid "&Disassemble..."
msgstr ""
#: xrc/MainMenu.xrc:619
#: xrc/MainMenu.xrc:627
msgid "&Logging..."
msgstr ""
#: xrc/MainMenu.xrc:622
#: xrc/MainMenu.xrc:630
msgid "&IO Viewer..."
msgstr ""
#: xrc/MainMenu.xrc:625
#: xrc/MainMenu.xrc:633
msgid "&Map Viewer..."
msgstr ""
#: xrc/MainMenu.xrc:628
#: xrc/MainMenu.xrc:636
msgid "M&emory Viewer..."
msgstr ""
#: xrc/MainMenu.xrc:631
#: xrc/MainMenu.xrc:639
msgid "&OAM Viewer..."
msgstr ""
#: xrc/MainMenu.xrc:634
#: xrc/MainMenu.xrc:642
msgid "&Palette Viewer..."
msgstr ""
#: xrc/MainMenu.xrc:637
#: xrc/MainMenu.xrc:645
msgid "&Tile Viewer..."
msgstr ""
#: xrc/MainMenu.xrc:642
#: xrc/MainMenu.xrc:650
msgid "Show all video layers"
msgstr ""
#: xrc/MainMenu.xrc:685
#: xrc/MainMenu.xrc:693
msgid "&View Layers"
msgstr ""
#: xrc/MainMenu.xrc:689
#: xrc/MainMenu.xrc:697
msgid "Channel &1"
msgstr ""
#: xrc/MainMenu.xrc:694
#: xrc/MainMenu.xrc:702
msgid "Channel &2"
msgstr ""
#: xrc/MainMenu.xrc:699
#: xrc/MainMenu.xrc:707
msgid "Channel &3"
msgstr ""
#: xrc/MainMenu.xrc:704
#: xrc/MainMenu.xrc:712
msgid "Channel &4"
msgstr ""
#: xrc/MainMenu.xrc:709
#: xrc/MainMenu.xrc:717
msgid "Direct Sound &A"
msgstr ""
#: xrc/MainMenu.xrc:714
#: xrc/MainMenu.xrc:722
msgid "Direct Sound &B"
msgstr ""
#: xrc/MainMenu.xrc:718
#: xrc/MainMenu.xrc:726
msgid "&Sound Channels"
msgstr ""
#: xrc/MainMenu.xrc:722
#: xrc/MainMenu.xrc:730
msgid "&Help"
msgstr ""
#: xrc/MainMenu.xrc:724
#: xrc/MainMenu.xrc:732
msgid "Report &Bugs"
msgstr ""
#: xrc/MainMenu.xrc:727
#: xrc/MainMenu.xrc:735
msgid "Visual Boy Advance-M Support &Forum"
msgstr ""
#: xrc/MainMenu.xrc:730
#: xrc/MainMenu.xrc:738
msgid "Translations"
msgstr ""
#: xrc/MainMenu.xrc:738
#: xrc/MainMenu.xrc:746
msgid "Check for updates"
msgstr ""
#: xrc/MainMenu.xrc:741
#: xrc/MainMenu.xrc:749
msgid "&Factory Reset..."
msgstr ""
#: xrc/MainMenu.xrc:745
#: xrc/MainMenu.xrc:753
msgid "&About..."
msgstr ""
@ -3697,15 +3705,3 @@ msgstr ""
#: xrc/SpeedupConfig.xrc:50
msgid "Frame skip"
msgstr ""
#: xrc/UIConfig.xrc:4
msgid "User Interface Settings"
msgstr ""
#: xrc/UIConfig.xrc:9
msgid "Hide Menu Bar"
msgstr ""
#: xrc/UIConfig.xrc:16
msgid "Suspend ScreenSaver"
msgstr ""

View File

@ -652,7 +652,6 @@ set(
xrc/SoundConfig.xrc
xrc/TileViewer.xrc
xrc/SpeedupConfig.xrc
xrc/UIConfig.xrc
)
# wxrc does not support xrs files in -c output (> 10x compression)

View File

@ -1957,14 +1957,6 @@ EVT_HANDLER(SpeedupConfigure, "Speedup / Turbo options...")
}
}
EVT_HANDLER(UIConfigure, "UI Settings...")
{
wxDialog* dlg = GetXRCDialog("UIConfig");
if (ShowModal(dlg) == wxID_OK)
update_opts();
}
EVT_HANDLER(GameBoyConfigure, "Game Boy options...")
{
ShowModal(GetXRCDialog("GameBoyConfig"));
@ -2521,6 +2513,16 @@ EVT_HANDLER(VSync, "Wait for vertical sync")
GetMenuOptionConfig("VSync", config::OptionID::kPrefVsync);
}
EVT_HANDLER(HideMenuBar, "Hide menu bar when mouse is inactive")
{
GetMenuOptionConfig("HideMenuBar", config::OptionID::kUIHideMenuBar);
}
EVT_HANDLER(SuspendScreenSaver, "Suspend screensaver when game is running")
{
GetMenuOptionConfig("SuspendScreenSaver", config::OptionID::kUISuspendScreenSaver);
}
#ifndef NO_LINK
void MainFrame::EnableNetworkMenu()

View File

@ -574,8 +574,8 @@ const std::array<OptionData, kNbOptions + 1> kAllOptionsData = {
OptionData{"ui/allowJoystickBackgroundInput",
"AllowJoystickBackgroundInput",
_("Capture joy events while on background")},
OptionData{"ui/hideMenuBar", "", _("Hide menu bar when mouse is inactive")},
OptionData{"ui/suspendScreenSaver", "", _("Suspend screensaver when game is running")},
OptionData{"ui/hideMenuBar", "HideMenuBar", _("Hide menu bar when mouse is inactive")},
OptionData{"ui/suspendScreenSaver", "SuspendScreenSaver", _("Suspend screensaver when game is running")},
/// Sound
OptionData{"Sound/AudioAPI", "",

View File

@ -2612,18 +2612,18 @@ bool MainFrame::BindControls()
d->Fit();
}
d = LoadXRCDialog("UIConfig");
{ getcbb("HideMenuBar", gopts.hide_menu_bar); }
wxMenuItem* suspend_scr_saver_mi = XRCITEM("SuspendScreenSaver");
if (suspend_scr_saver_mi)
{
getcbb("SuspendScreenSaver", gopts.suspend_screensaver);
// TODO: change preprocessor directive to fit other platforms
// TODO: change preprocessor directive to fit other platforms
#if !defined(HAVE_XSS)
cb->Hide();
suspend_scr_saver_mi->GetMenu()->Remove(suspend_scr_saver_mi);
#else
if (wxGetApp().UsingWayland())
cb->Hide();
if (wxGetApp().UsingWayland())
suspend_scr_saver_mi->GetMenu()->Remove(suspend_scr_saver_mi);
#endif // !HAVE_XSS
}
wxFilePickerCtrl* fp;
#define getfp(n, o, l) \
do { \

View File

@ -1900,14 +1900,14 @@ void DrawingPanelBase::DrawArea(uint8_t** data)
// draw OSD text old-style (directly into output buffer), if needed
// new style flickers too much, so we'll stick to this for now
if (wxGetApp().frame->IsFullScreen() || !OPTION(kGenStatusBar)) {
if (wxGetApp().frame->IsFullScreen() || !OPTION(kPrefDisableStatus)) {
GameArea* panel = wxGetApp().frame->GetPanel();
if (panel->osdstat.size())
drawText(todraw + outstride * (systemColorDepth != 24), outstride,
10, 20, UTF8(panel->osdstat), OPTION(kPrefShowSpeedTransparent));
if (!OPTION(kPrefDisableStatus) && !panel->osdtext.empty()) {
if (!panel->osdtext.empty()) {
if (systemGetClock() - panel->osdtime < OSD_TIME) {
wxString message = panel->osdtext;
int linelen = std::ceil(width * scale - 20) / 8;

View File

@ -368,10 +368,6 @@
<checkable>1</checkable>
</object>
<object class="separator"/>
<object class="wxMenuItem" name="StatusBar">
<label>_Status bar</label>
<checkable>1</checkable>
</object>
<object class="wxMenuItem" name="NoStatusMsg">
<label>_Disable on-screen display</label>
<checkable>1</checkable>
@ -569,8 +565,20 @@
<object class="wxMenuItem" name="Customize">
<label>_Key Shortcuts...</label>
</object>
<object class="wxMenuItem" name="UIConfigure">
<label>_UI Settings...</label>
<object class="wxMenu" name="UIConfigure">
<label>UI Settings</label>
<object class="wxMenuItem" name="StatusBar">
<label>Enable _Status bar</label>
<checkable>1</checkable>
</object>
<object class="wxMenuItem" name="HideMenuBar">
<label>Hide _Menu Bar</label>
<checkable>1</checkable>
</object>
<object class="wxMenuItem" name="SuspendScreenSaver">
<label>Suspend _Screen Saver</label>
<checkable>1</checkable>
</object>
</object>
</object>
<object class="wxMenu">

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">
<object class="wxDialog" name="UIConfig">
<title>User Interface Settings</title>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxCheckBox" name="HideMenuBar">
<label>Hide Menu Bar</label>
</object>
<flag>wxALL</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxCheckBox" name="SuspendScreenSaver">
<label>Suspend ScreenSaver</label>
</object>
<flag>wxALL</flag>
<border>5</border>
</object>
<object class="sizeritem">
<flag>wxALL|wxEXPAND</flag>
<border>5</border>
<object class="wxStdDialogButtonSizer">
<object class="button">
<object class="wxButton" name="wxID_OK"/>
</object>
<object class="button">
<object class="wxButton" name="wxID_CANCEL"/>
</object>
</object>
</object>
</object>
</object>
</resource>