Commit adfab558 authored by Alexandre Julliard's avatar Alexandre Julliard

winecfg: Build the file filter by hand instead of hardcoding it in resource strings.

parent de105680
......@@ -240,7 +240,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE ", "
IDS_DLL_DISABLED ""
IDS_DEFAULT_SETTINGS "Default Settings"
IDS_EXECUTABLE_FILTER "Wine Programs (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine Programs (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Use global settings"
IDS_SELECT_EXECUTABLE "Select an executable file"
END
......
......@@ -240,7 +240,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "vestavn, nativn"
IDS_DLL_DISABLED "zakzat"
IDS_DEFAULT_SETTINGS "Standardn nastaven"
IDS_EXECUTABLE_FILTER "Programy Wine (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Programy Wine (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Pout veobecn nastaven"
IDS_SELECT_EXECUTABLE "Zvolte spustiteln soubor"
END
......
......@@ -247,7 +247,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "indbygget, indfødt"
IDS_DLL_DISABLED "disabled"
IDS_DEFAULT_SETTINGS "Standard indstillinger"
IDS_EXECUTABLE_FILTER "Wine programmer (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine programmer (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Brug globale indstillinger"
IDS_SELECT_EXECUTABLE "Vælg en program fil"
END
......
......@@ -246,7 +246,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "Builtin, Native"
IDS_DLL_DISABLED "ausgeschaltet"
IDS_DEFAULT_SETTINGS "Standardeinstellungen"
IDS_EXECUTABLE_FILTER "Wine-Programme (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine-Programme (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Globale Einstellung benutzen"
IDS_SELECT_EXECUTABLE "Ausführbares Programm auswählen"
END
......
......@@ -246,7 +246,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "builtin, native"
IDS_DLL_DISABLED "disabled"
IDS_DEFAULT_SETTINGS "Default Settings"
IDS_EXECUTABLE_FILTER "Wine Programs (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine Programs (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Use global settings"
IDS_SELECT_EXECUTABLE "Select an executable file"
END
......
......@@ -245,7 +245,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "interna, nativa"
IDS_DLL_DISABLED "deshabilitada"
IDS_DEFAULT_SETTINGS "Configuracin por defecto"
IDS_EXECUTABLE_FILTER "Programas Wine (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Programas Wine (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Usar la configuracin global"
IDS_SELECT_EXECUTABLE "Seleccione un fichero ejecutable"
END
......
......@@ -234,7 +234,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "sisinen, natiivi"
IDS_DLL_DISABLED "ei kytss"
IDS_DEFAULT_SETTINGS "Default Settings"
IDS_EXECUTABLE_FILTER "Wine Programs (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine Programs (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Use global settings"
IDS_SELECT_EXECUTABLE "Select an executable file"
END
......
......@@ -248,7 +248,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "intégrée, native"
IDS_DLL_DISABLED "désactivée"
IDS_DEFAULT_SETTINGS "Paramètres par défaut"
IDS_EXECUTABLE_FILTER "Programmes de Wine (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Programmes de Wine (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Utiliser les paramètres globaux"
IDS_SELECT_EXECUTABLE "Sélectionnez un fichier exécutable"
END
......
......@@ -234,7 +234,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "beptett, natv"
IDS_DLL_DISABLED "letiltva"
IDS_DEFAULT_SETTINGS "Default Settings"
IDS_EXECUTABLE_FILTER "Wine Programs (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine Programs (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Use global settings"
IDS_SELECT_EXECUTABLE "Select an executable file"
END
......
......@@ -248,7 +248,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "integrata, nativa"
IDS_DLL_DISABLED "disabilitato"
IDS_DEFAULT_SETTINGS "Impostazioni predefinite"
IDS_EXECUTABLE_FILTER "Programmi di Wine (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Programmi di Wine (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Usa impostazioni globali"
IDS_SELECT_EXECUTABLE "Seleziona un file eseguibile"
END
......
......@@ -249,7 +249,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "builtin, native"
IDS_DLL_DISABLED "無効"
IDS_DEFAULT_SETTINGS "既定の設定"
IDS_EXECUTABLE_FILTER "Wine プログラム (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine プログラム (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "全体設定を使う"
IDS_SELECT_EXECUTABLE "実行可能ファイルを選択"
END
......
......@@ -250,7 +250,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "내장, 네이티브"
IDS_DLL_DISABLED "사용하지 않음"
IDS_DEFAULT_SETTINGS "기본 설정"
IDS_EXECUTABLE_FILTER "Wine 프로그램 (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine 프로그램 (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "전체 설정 사용"
IDS_SELECT_EXECUTABLE "실행 파일 선택"
END
......
......@@ -247,7 +247,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "įtaisyta, sava"
IDS_DLL_DISABLED "išjungta"
IDS_DEFAULT_SETTINGS "Numatytosios nuostatos"
IDS_EXECUTABLE_FILTER "Wine programos (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine programos (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Naudoti globalias nuostatas"
IDS_SELECT_EXECUTABLE "Pasirinkite vykdomąjį failą"
END
......
......@@ -248,7 +248,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "builtin, native"
IDS_DLL_DISABLED "uitgeschakeld"
IDS_DEFAULT_SETTINGS "Standaardinstellingen"
IDS_EXECUTABLE_FILTER "Wine toepassingen (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine toepassingen (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Gebruik globale instellingen"
IDS_SELECT_EXECUTABLE "Selecteer een uitvoerbaar bestand"
END
......
......@@ -247,7 +247,7 @@ END
IDS_DLL_BUILTIN_NATIVE "innebygget, innfødt"
IDS_DLL_DISABLED "slått av"
IDS_DEFAULT_SETTINGS "Globale innstillinger"
IDS_EXECUTABLE_FILTER "Wine-programmer (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine-programmer (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Bruk globale innstillinger"
IDS_SELECT_EXECUTABLE "Velg en programfil"
END
......
......@@ -248,7 +248,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "wbudowana, zewntrzna"
IDS_DLL_DISABLED "wyczona"
IDS_DEFAULT_SETTINGS "Ustawienia standardowe"
IDS_EXECUTABLE_FILTER "Programy Wine (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Programy Wine (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Uyj ustawie globalnych"
IDS_SELECT_EXECUTABLE "Wybierz plik wykonywalny"
END
......
......@@ -501,7 +501,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "embutida, nativa"
IDS_DLL_DISABLED "desativada"
IDS_DEFAULT_SETTINGS "Configurações Padrão"
IDS_EXECUTABLE_FILTER "Programas Wine (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Programas Wine (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Usar configurações globais"
IDS_SELECT_EXECUTABLE "Selecione um arquivo executável"
END
......
......@@ -246,7 +246,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "builtin, native"
IDS_DLL_DISABLED "dezactivat"
IDS_DEFAULT_SETTINGS "Setări implicite"
IDS_EXECUTABLE_FILTER "Programe Wine (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Programe Wine (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Folosește setările globale"
IDS_SELECT_EXECUTABLE "Selectează un fișier executabil"
END
......
......@@ -251,7 +251,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "встроенная, сторонняя"
IDS_DLL_DISABLED "отключена"
IDS_DEFAULT_SETTINGS "Установки по умолчанию"
IDS_EXECUTABLE_FILTER "Программы Wine (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Программы Wine (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Использовать по умолчанию"
IDS_SELECT_EXECUTABLE "Выберите исполняемый файл"
END
......
......@@ -246,7 +246,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "vgrajeno, izvorno"
IDS_DLL_DISABLED "onemogočeno"
IDS_DEFAULT_SETTINGS "Privzete (sistemske) nastavitve"
IDS_EXECUTABLE_FILTER "Wine programi (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine programi (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Uporabi sistemske nastavitve"
IDS_SELECT_EXECUTABLE "Izberite izvršljivo datoteko"
END
......
......@@ -247,7 +247,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "builtin, native"
IDS_DLL_DISABLED "isključen"
IDS_DEFAULT_SETTINGS "Osnovno podešavanje"
IDS_EXECUTABLE_FILTER "Wine programi (*.exe,*.exe.so)\\0*.exe;*.exe.so\\0"
IDS_EXECUTABLE_FILTER "Wine programi (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Koristi globalna podešavanja"
IDS_SELECT_EXECUTABLE "Izaberi izvršni fajl"
END
......
......@@ -244,7 +244,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "inbyggd, ursprunglig"
IDS_DLL_DISABLED "inaktiverad"
IDS_DEFAULT_SETTINGS "Standardinstllningar"
IDS_EXECUTABLE_FILTER "Wine-program (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine-program (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Anvnd globala instllningar"
IDS_SELECT_EXECUTABLE "Vlj en krbar fil"
END
......
......@@ -234,7 +234,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "yerleik, doal"
IDS_DLL_DISABLED "devre d"
IDS_DEFAULT_SETTINGS "ntanml Ayarlar"
IDS_EXECUTABLE_FILTER "Wine Programlar (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine Programlar (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Genel ayarlar kullan"
IDS_SELECT_EXECUTABLE "altrlabilir bir dosya sein"
END
......
......@@ -250,7 +250,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "вбудована, стороння"
IDS_DLL_DISABLED "вимкнено"
IDS_DEFAULT_SETTINGS "Стандартні налаштування"
IDS_EXECUTABLE_FILTER "Програми Wine (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Програми Wine (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Використати глобальні параметри"
IDS_SELECT_EXECUTABLE "Виберіть виконуваний файл"
END
......
......@@ -249,7 +249,7 @@ BEGIN
IDS_DLL_BUILTIN_NATIVE "内建先于原装"
IDS_DLL_DISABLED "停用"
IDS_DEFAULT_SETTINGS "默认设置"
IDS_EXECUTABLE_FILTER "Wine 程序 (*.exe,*.exe.so)\0*.exe;*.exe.so\0"
IDS_EXECUTABLE_FILTER "Wine 程序 (*.exe,*.exe.so)"
IDS_USE_GLOBAL_SETTINGS "使用全局设置"
IDS_SELECT_EXECUTABLE "选择可执行文件"
END
......
......@@ -29,6 +29,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "wine/unicode.h"
#include "winecfg.h"
#include "resource.h"
......@@ -311,9 +312,10 @@ static BOOL list_contains_file(HWND listview, WCHAR *filename)
static void on_add_app_click(HWND dialog)
{
static const WCHAR filterW[] = {'%','s','%','c','*','.','e','x','e',';','*','.','e','x','e','.','s','o','%','c',0};
WCHAR filetitle[MAX_PATH];
WCHAR file[MAX_PATH];
WCHAR programsFilter[100];
WCHAR programsFilter[100], filter[MAX_PATH];
WCHAR selectExecutableStr[100];
static const WCHAR pathC[] = { 'c',':','\\',0 };
......@@ -327,9 +329,10 @@ static void on_add_app_click(HWND dialog)
sizeof(selectExecutableStr)/sizeof(selectExecutableStr[0]));
LoadStringW (GetModuleHandle (NULL), IDS_EXECUTABLE_FILTER, programsFilter,
sizeof(programsFilter)/sizeof(programsFilter[0]));
snprintfW( filter, MAX_PATH, filterW, programsFilter, 0, 0 );
ofn.lpstrTitle = selectExecutableStr;
ofn.lpstrFilter = programsFilter;
ofn.lpstrFilter = filter;
ofn.lpstrFileTitle = filetitle;
ofn.lpstrFileTitle[0] = '\0';
ofn.nMaxFileTitle = sizeof(filetitle)/sizeof(filetitle[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment