qt: Use util::DlgFilter for the shader picker

Also fix the translation for its filter
This commit is contained in:
Alexander Babikov
2025-04-07 19:50:42 +05:00
parent 8f1fa1e5da
commit c08775becf
25 changed files with 51 additions and 48 deletions

View File

@@ -894,7 +894,7 @@ msgstr ""
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "" msgstr ""
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "" msgstr ""
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"

View File

@@ -894,8 +894,8 @@ msgstr "Configuració de Dispositiu %1"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Monitor en mode estalvi" msgstr "Monitor en mode estalvi"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "Shaders OpenGL" msgstr "Shaders GLSL"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "S'està carregant una configuració no suportada" msgstr "S'està carregant una configuració no suportada"

View File

@@ -894,8 +894,8 @@ msgstr "Nastavení zařízení %1"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Monitor je v režimu spánku" msgstr "Monitor je v režimu spánku"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "Shadery OpenGL" msgstr "Shadery GLSL"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Pokoušíte se spustit nepodporovanou konfiguraci" msgstr "Pokoušíte se spustit nepodporovanou konfiguraci"

View File

@@ -897,8 +897,8 @@ msgstr "%1-Gerätekonfiguration"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Monitor im Standbymodus" msgstr "Monitor im Standbymodus"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "OpenGL-Shader" msgstr "GLSL-Shader"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Zur Zeit wird eine nicht unterstützte Konfiguration geladen" msgstr "Zur Zeit wird eine nicht unterstützte Konfiguration geladen"

View File

@@ -894,8 +894,8 @@ msgstr "%1 Configuración de Dispositivo"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Monitor en modo ahorro" msgstr "Monitor en modo ahorro"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "Shaders OpenGL" msgstr "Shaders GLSL"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Está cargando una configuración no soportada" msgstr "Está cargando una configuración no soportada"

View File

@@ -894,8 +894,8 @@ msgstr "%1 - Laitteen määritykset"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Näyttö lepotilassa" msgstr "Näyttö lepotilassa"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "OpenGL-varjostinohjelmat" msgstr "GLSL-varjostinohjelmat"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Olet lataamassa ei-tuettuja määrittelyjä" msgstr "Olet lataamassa ei-tuettuja määrittelyjä"

View File

@@ -894,8 +894,8 @@ msgstr "Configuration du dispositif %1"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Moniteur en mode veille" msgstr "Moniteur en mode veille"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "Shaders OpenGL" msgstr "Shaders GLSL"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Vous chargez une configuration non prise en charge" msgstr "Vous chargez une configuration non prise en charge"

View File

@@ -894,8 +894,8 @@ msgstr "Konfiguracija uređaja %1"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Ekran u stanju mirovanja" msgstr "Ekran u stanju mirovanja"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "OpenGL shaderi" msgstr "GLSL shaderi"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Učitavate nepodržanu konfiguraciju" msgstr "Učitavate nepodržanu konfiguraciju"

View File

@@ -894,8 +894,8 @@ msgstr "%1 eszközkonfiguráció"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Képernyő alvó módban" msgstr "Képernyő alvó módban"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "OpenGL Shaderek" msgstr "GLSL shaderek"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Egy nem támogatott konfigurációt tölt be" msgstr "Egy nem támogatott konfigurációt tölt be"

View File

@@ -894,8 +894,8 @@ msgstr "Configurazione del dispositivo %1"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Monitor in modalità riposo" msgstr "Monitor in modalità riposo"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "Shader OpenGL" msgstr "Shader GLSL"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Stai caricando una configurazione non supportata" msgstr "Stai caricando una configurazione non supportata"

View File

@@ -894,8 +894,8 @@ msgstr "%1 のデバイス設定"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "モニターのスリープモード" msgstr "モニターのスリープモード"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "OpenGLシェーダー" msgstr "GLSLシェーダー"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "サポートされていないコンフィグを読み込んでいます" msgstr "サポートされていないコンフィグを読み込んでいます"

View File

@@ -894,8 +894,8 @@ msgstr "%1 장치 설정"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "모니터 절전 모드" msgstr "모니터 절전 모드"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "OpenGL 쉐이더" msgstr "GLSL 쉐이더"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "지원하지 않는 설정입니다" msgstr "지원하지 않는 설정입니다"

View File

@@ -894,8 +894,8 @@ msgstr "%1 Apparaatconfiguratie"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Monitor in slaapstand" msgstr "Monitor in slaapstand"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "OpenGL Shaders" msgstr "GLSL Shaders"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "U laadt een configuratie die niet wordt ondersteund" msgstr "U laadt een configuratie die niet wordt ondersteund"

View File

@@ -894,8 +894,8 @@ msgstr "Konfiguracja urządzenia %1"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Monitor w trybie czuwania" msgstr "Monitor w trybie czuwania"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "Shadery OpenGL" msgstr "Shadery GLSL"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Ładujesz nieobsługiwaną konfigurację" msgstr "Ładujesz nieobsługiwaną konfigurację"

View File

@@ -894,8 +894,8 @@ msgstr "Configuração do dispositivo %1"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Monitor em modo de suspensão" msgstr "Monitor em modo de suspensão"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "Shaders OpenGL" msgstr "Shaders GLSL"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Você está carregando uma configuração não suportada" msgstr "Você está carregando uma configuração não suportada"

View File

@@ -894,8 +894,8 @@ msgstr "Configuração de dispositivo %1"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Ecrã em modo de sono" msgstr "Ecrã em modo de sono"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "Shaders OpenGL" msgstr "Shaders GLSL"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Está a carregar uma configuração sem suporte!" msgstr "Está a carregar uma configuração sem suporte!"

View File

@@ -894,8 +894,8 @@ msgstr "Конфигурация устройства %1"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Монитор в спящем режиме" msgstr "Монитор в спящем режиме"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "Шейдеры OpenGL" msgstr "Шейдеры GLSL"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Вы загружаете неподдерживаемую конфигурацию" msgstr "Вы загружаете неподдерживаемую конфигурацию"

View File

@@ -894,8 +894,8 @@ msgstr "Konfigurácia zariadenia %1"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Monitor je v režime spánku" msgstr "Monitor je v režime spánku"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "Shadery OpenGL" msgstr "Shadery GLSL"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Pokúšate sa spustiť nepodporovanú konfiguráciu" msgstr "Pokúšate sa spustiť nepodporovanú konfiguráciu"

View File

@@ -894,8 +894,8 @@ msgstr "Konfiguracija naprave %1"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Zaslon v načinu spanja" msgstr "Zaslon v načinu spanja"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "Senčilniki OpenGL" msgstr "Senčilniki GLSL"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Nalagate nepodprto konfiguracijo" msgstr "Nalagate nepodprto konfiguracijo"

View File

@@ -894,8 +894,8 @@ msgstr "%1 cihaz konfigürasyonu"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Monitör uyku modunda" msgstr "Monitör uyku modunda"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "OpenGL gölgelendiricileri" msgstr "GLSL gölgelendiricileri"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Desteklenmeyen bir konfigürasyon kullanıyorsunuz" msgstr "Desteklenmeyen bir konfigürasyon kullanıyorsunuz"

View File

@@ -894,8 +894,8 @@ msgstr "Конфігурація пристрою %1"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Монітор у сплячому режимі" msgstr "Монітор у сплячому режимі"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "Шейдери OpenGL" msgstr "Шейдери GLSL"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Ви завантажуєте непідтримувану конфігурацію" msgstr "Ви завантажуєте непідтримувану конфігурацію"

View File

@@ -894,8 +894,8 @@ msgstr "Tinh chỉnh thiết bị %1"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "Màn hình chế độ chờ/ngủ" msgstr "Màn hình chế độ chờ/ngủ"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "Shader OpenGL" msgstr "Shader GLSL"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "Bạn đang load tinh chỉnh không được hỗ trợ." msgstr "Bạn đang load tinh chỉnh không được hỗ trợ."

View File

@@ -894,8 +894,8 @@ msgstr "%1 设备配置"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "显示器处在睡眠状态" msgstr "显示器处在睡眠状态"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "OpenGL 着色器" msgstr "GLSL 着色器"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "正在载入一个不受支持的配置" msgstr "正在载入一个不受支持的配置"

View File

@@ -894,8 +894,8 @@ msgstr "%1 裝置設定"
msgid "Monitor in sleep mode" msgid "Monitor in sleep mode"
msgstr "顯示器處在睡眠狀態" msgstr "顯示器處在睡眠狀態"
msgid "OpenGL Shaders" msgid "GLSL shaders"
msgstr "OpenGL 著色器" msgstr "GLSL 著色器"
msgid "You are loading an unsupported configuration" msgid "You are loading an unsupported configuration"
msgstr "正在載入一個不受支援的設定" msgstr "正在載入一個不受支援的設定"

View File

@@ -2,6 +2,7 @@
#include "ui_qt_openglshadermanagerdialog.h" #include "ui_qt_openglshadermanagerdialog.h"
#include "qt_mainwindow.hpp" #include "qt_mainwindow.hpp"
#include "qt_util.hpp"
extern MainWindow* main_window; extern MainWindow* main_window;
#include "qt_openglshaderconfig.hpp" #include "qt_openglshaderconfig.hpp"
@@ -9,6 +10,7 @@ extern MainWindow* main_window;
#include <QListWidgetItem> #include <QListWidgetItem>
#include <QFileDialog> #include <QFileDialog>
#include <QMessageBox> #include <QMessageBox>
#include <QStringBuilder>
extern "C" { extern "C" {
#include <86box/86box.h> #include <86box/86box.h>
@@ -166,7 +168,8 @@ void OpenGLShaderManagerDialog::on_buttonMoveDown_clicked()
void OpenGLShaderManagerDialog::on_buttonAdd_clicked() void OpenGLShaderManagerDialog::on_buttonAdd_clicked()
{ {
auto res = QFileDialog::getOpenFileName(this, QString(), QString(), "GLSL Shaders (*.glslp *.glsl);;All files (*.*)"); auto res = QFileDialog::getOpenFileName(this, QString(), QString(),
tr("GLSL shaders") % util::DlgFilter({ "glslp", "glsl" }) % tr("All files") % util::DlgFilter({ "*" }, true));
if (!res.isEmpty()) { if (!res.isEmpty()) {
auto glslp_file = res.toUtf8(); auto glslp_file = res.toUtf8();
glslp_t* shaderfile = glslp_parse(glslp_file.data()); glslp_t* shaderfile = glslp_parse(glslp_file.data());