mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
Qt: do not use localized filenames for default current config and default stylesheet
This commit is contained in:
parent
c13d345604
commit
1bbc60c3e7
13 changed files with 54 additions and 46 deletions
|
@ -1250,11 +1250,13 @@
|
|||
<ClCompile Include="rpcs3qt\debugger_list.cpp" />
|
||||
<ClCompile Include="rpcs3qt\gui_application.cpp" />
|
||||
<ClCompile Include="rpcs3qt\input_dialog.cpp" />
|
||||
<ClCompile Include="rpcs3qt\localized.cpp" />
|
||||
<ClCompile Include="rpcs3qt\osk_dialog_frame.cpp" />
|
||||
<ClCompile Include="rpcs3qt\pkg_install_dialog.cpp" />
|
||||
<ClCompile Include="rpcs3qt\persistent_settings.cpp" />
|
||||
<ClCompile Include="rpcs3qt\settings.cpp" />
|
||||
<ClCompile Include="rpcs3qt\skylander_dialog.cpp" />
|
||||
<ClCompile Include="rpcs3qt\tooltips.cpp" />
|
||||
<ClCompile Include="rpcs3qt\update_manager.cpp" />
|
||||
<ClCompile Include="rpcs3qt\_discord_utils.cpp" />
|
||||
<ClCompile Include="rpcs3qt\find_dialog.cpp" />
|
||||
|
@ -1742,6 +1744,7 @@
|
|||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">.\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D%(PreprocessorDefinitions) "-I$(VULKAN_SDK)\Include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)" "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras"</Command>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="rpcs3qt\category.h" />
|
||||
<ClInclude Include="rpcs3qt\custom_dock_widget.h" />
|
||||
<CustomBuild Include="rpcs3qt\debugger_list.h">
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
|
|
|
@ -862,6 +862,12 @@
|
|||
<ClCompile Include="QTGeneratedFiles\Debug - LLVM\moc_localized.cpp">
|
||||
<Filter>Generated Files\Debug - LLVM</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rpcs3qt\localized.cpp">
|
||||
<Filter>Gui\settings</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rpcs3qt\tooltips.cpp">
|
||||
<Filter>Gui\settings</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="\rpcs3qt\*.h">
|
||||
|
@ -957,6 +963,9 @@
|
|||
<ClInclude Include="Input/mm_joystick_handler.h">
|
||||
<Filter>Io\MMJoystick</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rpcs3qt\category.h">
|
||||
<Filter>Gui\game list</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="debug\moc_predefs.h.cbt">
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
input_dialog.cpp
|
||||
instruction_editor_dialog.cpp
|
||||
kernel_explorer.cpp
|
||||
localized.cpp
|
||||
log_frame.cpp
|
||||
main_window.cpp
|
||||
memory_string_searcher.cpp
|
||||
|
@ -43,6 +44,7 @@
|
|||
settings_dialog.cpp
|
||||
skylander_dialog.cpp
|
||||
syntax_highlighter.cpp
|
||||
tooltips.cpp
|
||||
trophy_manager_dialog.cpp
|
||||
trophy_notification_frame.cpp
|
||||
trophy_notification_helper.cpp
|
||||
|
|
|
@ -48,4 +48,4 @@ namespace category
|
|||
const QStringList media = { cat_app_photo, cat_app_video, cat_bc_video, cat_app_music, cat_app_tv, cat_web_tv };
|
||||
const QStringList data = { cat_ps3_data, cat_ps2_data, cat_ps3_save, cat_psp_save };
|
||||
const QStringList others = { cat_network, cat_store_fe };
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "persistent_settings.h"
|
||||
#include "game_compatibility.h"
|
||||
#include "category.h"
|
||||
#include "localized.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QToolBar>
|
||||
|
|
|
@ -12,10 +12,8 @@ inline std::string sstr(const QString& _in) { return _in.toStdString(); }
|
|||
|
||||
gui_settings::gui_settings(QObject* parent) : settings(parent)
|
||||
{
|
||||
const Localized localized;
|
||||
|
||||
m_current_name = localized.constants.Settings;
|
||||
m_settings = new QSettings(ComputeSettingsDir() + localized.constants.Settings + ".ini", QSettings::Format::IniFormat, parent);
|
||||
m_current_name = gui::Settings;
|
||||
m_settings = new QSettings(ComputeSettingsDir() + gui::Settings + ".ini", QSettings::Format::IniFormat, parent);
|
||||
|
||||
const QString settings_name = GetValue(gui::m_currentConfig).toString();
|
||||
|
||||
|
@ -49,17 +47,15 @@ bool gui_settings::ChangeToConfig(const QString& friendly_name)
|
|||
return false;
|
||||
}
|
||||
|
||||
const Localized localized;
|
||||
|
||||
if (friendly_name != localized.constants.Settings)
|
||||
if (friendly_name != gui::Settings)
|
||||
{
|
||||
if (m_current_name == localized.constants.Settings)
|
||||
if (m_current_name == gui::Settings)
|
||||
{
|
||||
SetValue(gui::m_currentConfig, friendly_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
QSettings tmp(m_settings_dir.absoluteFilePath(localized.constants.Settings + ".ini"), QSettings::Format::IniFormat, parent());
|
||||
QSettings tmp(m_settings_dir.absoluteFilePath(gui::Settings + ".ini"), QSettings::Format::IniFormat, parent());
|
||||
tmp.beginGroup(gui::m_currentConfig.key);
|
||||
tmp.setValue(gui::m_currentConfig.name, friendly_name);
|
||||
tmp.endGroup();
|
||||
|
@ -243,18 +239,16 @@ void gui_settings::SetCustomColor(int col, const QColor& val)
|
|||
|
||||
void gui_settings::SaveCurrentConfig(const QString& friendly_name)
|
||||
{
|
||||
const Localized localized;
|
||||
|
||||
if (friendly_name != localized.constants.Settings)
|
||||
if (friendly_name != gui::Settings)
|
||||
{
|
||||
if (m_current_name == localized.constants.Settings)
|
||||
if (m_current_name == gui::Settings)
|
||||
{
|
||||
SetValue(gui::m_currentConfig, friendly_name);
|
||||
m_settings->sync();
|
||||
}
|
||||
else
|
||||
{
|
||||
QSettings tmp(m_settings_dir.absoluteFilePath(localized.constants.Settings + ".ini"), QSettings::Format::IniFormat, parent());
|
||||
QSettings tmp(m_settings_dir.absoluteFilePath(gui::Settings + ".ini"), QSettings::Format::IniFormat, parent());
|
||||
tmp.beginGroup(gui::m_currentConfig.key);
|
||||
tmp.setValue(gui::m_currentConfig.name, friendly_name);
|
||||
tmp.endGroup();
|
||||
|
@ -333,11 +327,11 @@ QString gui_settings::GetCurrentStylesheetPath()
|
|||
|
||||
QString stylesheet = GetValue(gui::m_currentStylesheet).toString();
|
||||
|
||||
if (stylesheet == localized.constants.Default)
|
||||
if (stylesheet == gui::Default)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else if (stylesheet == localized.constants.None)
|
||||
else if (stylesheet == gui::None)
|
||||
{
|
||||
return "-";
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include "settings.h"
|
||||
#include "Utilities/Log.h"
|
||||
#include "localized.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QVariant>
|
||||
|
@ -95,6 +94,10 @@ namespace gui
|
|||
return q_string_pair(path, title.simplified()); // simplified() forces single line text
|
||||
}
|
||||
|
||||
const QString Settings = "CurrentSettings";
|
||||
const QString Default = "default";
|
||||
const QString None = "none";
|
||||
|
||||
const QString main_window = "main_window";
|
||||
const QString game_list = "GameList";
|
||||
const QString logger = "Logger";
|
||||
|
@ -180,8 +183,8 @@ namespace gui
|
|||
const gui_save rsx_geometry = gui_save(rsx, "geometry", QByteArray());
|
||||
const gui_save rsx_states = gui_save(rsx, "states", QVariantMap());
|
||||
|
||||
const gui_save m_currentConfig = gui_save(meta, "currentConfig", Localized().constants.Settings);
|
||||
const gui_save m_currentStylesheet = gui_save(meta, "currentStylesheet", Localized().constants.Default);
|
||||
const gui_save m_currentConfig = gui_save(meta, "currentConfig", Settings);
|
||||
const gui_save m_currentStylesheet = gui_save(meta, "currentStylesheet", Default);
|
||||
const gui_save m_saveNotes = gui_save(meta, "saveNotes", QVariantMap());
|
||||
const gui_save m_showDebugTab = gui_save(meta, "showDebugTab", false);
|
||||
const gui_save m_enableUIColors = gui_save(meta, "enableUIColors", false);
|
||||
|
|
5
rpcs3/rpcs3qt/localized.cpp
Normal file
5
rpcs3/rpcs3qt/localized.cpp
Normal file
|
@ -0,0 +1,5 @@
|
|||
#include "localized.h"
|
||||
|
||||
Localized::Localized()
|
||||
{
|
||||
}
|
|
@ -15,15 +15,7 @@ class Localized : public QObject
|
|||
|
||||
public:
|
||||
|
||||
Localized() {};
|
||||
~Localized() {};
|
||||
|
||||
const struct constants
|
||||
{
|
||||
const QString Settings = tr("CurrentSettings");
|
||||
const QString Default = tr("default");
|
||||
const QString None = tr("none");
|
||||
} constants;
|
||||
Localized();
|
||||
|
||||
const struct category // (see PARAM.SFO in psdevwiki.com) TODO: Disc Categories
|
||||
{
|
||||
|
|
|
@ -987,7 +987,7 @@ void pad_settings_dialog::ChangeInputType()
|
|||
m_handler = GetHandler(g_cfg_input.player[player]->handler);
|
||||
const auto device_list = m_handler->ListDevices();
|
||||
|
||||
// Tooltips
|
||||
// Localized tooltips
|
||||
Tooltips tooltips;
|
||||
|
||||
// Change the description
|
||||
|
|
|
@ -55,7 +55,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
ui->buttonBox->button(QDialogButtonBox::StandardButton::Save)->setText(tr("Save custom configuration"));
|
||||
}
|
||||
|
||||
// Localized strings
|
||||
// Localized tooltips
|
||||
Tooltips tooltips;
|
||||
|
||||
// Add description labels
|
||||
|
@ -1407,9 +1407,8 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
{
|
||||
if (reset)
|
||||
{
|
||||
const Localized localized;
|
||||
m_currentConfig = localized.constants.Default;
|
||||
m_currentStylesheet = localized.constants.Default;
|
||||
m_currentConfig = gui::Default;
|
||||
m_currentStylesheet = gui::Default;
|
||||
ui->combo_configs->setCurrentIndex(0);
|
||||
ui->combo_stylesheets->setCurrentIndex(0);
|
||||
}
|
||||
|
@ -1436,7 +1435,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
{
|
||||
ApplyGuiOptions(true);
|
||||
xgui_settings->Reset(true);
|
||||
xgui_settings->ChangeToConfig(Localized().constants.Default);
|
||||
xgui_settings->ChangeToConfig(gui::Default);
|
||||
Q_EMIT GuiSettingsSyncRequest(true);
|
||||
AddConfigs();
|
||||
AddStylesheets();
|
||||
|
@ -1634,15 +1633,13 @@ void settings_dialog::SnapSlider(QSlider *slider, int interval)
|
|||
|
||||
void settings_dialog::AddConfigs()
|
||||
{
|
||||
const Localized localized;
|
||||
|
||||
ui->combo_configs->clear();
|
||||
|
||||
ui->combo_configs->addItem(localized.constants.Default);
|
||||
ui->combo_configs->addItem(gui::Default);
|
||||
|
||||
for (const QString& entry : xgui_settings->GetConfigEntries())
|
||||
{
|
||||
if (entry != localized.constants.Default)
|
||||
if (entry != gui::Default)
|
||||
{
|
||||
ui->combo_configs->addItem(entry);
|
||||
}
|
||||
|
@ -1663,16 +1660,14 @@ void settings_dialog::AddConfigs()
|
|||
|
||||
void settings_dialog::AddStylesheets()
|
||||
{
|
||||
const Localized localized;
|
||||
|
||||
ui->combo_stylesheets->clear();
|
||||
|
||||
ui->combo_stylesheets->addItem("None", localized.constants.None);
|
||||
ui->combo_stylesheets->addItem("Default (Bright)", localized.constants.Default);
|
||||
ui->combo_stylesheets->addItem(tr("None"), gui::None);
|
||||
ui->combo_stylesheets->addItem(tr("Default (Bright)"), gui::Default);
|
||||
|
||||
for (const QString& entry : xgui_settings->GetStylesheetEntries())
|
||||
{
|
||||
if (entry != localized.constants.Default)
|
||||
if (entry != gui::Default)
|
||||
{
|
||||
ui->combo_stylesheets->addItem(entry, entry);
|
||||
}
|
||||
|
|
5
rpcs3/rpcs3qt/tooltips.cpp
Normal file
5
rpcs3/rpcs3qt/tooltips.cpp
Normal file
|
@ -0,0 +1,5 @@
|
|||
#include "tooltips.h"
|
||||
|
||||
Tooltips::Tooltips()
|
||||
{
|
||||
}
|
|
@ -9,8 +9,7 @@ class Tooltips : public QObject
|
|||
|
||||
public:
|
||||
|
||||
Tooltips() {};
|
||||
~Tooltips() {};
|
||||
Tooltips();
|
||||
|
||||
const struct settings
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue