Apply requested changes
- Remove icon functions from plat.h. - Fix some indentation problems. - Remove unused parameter from win_stbar.c - Rename win_lang.c to win_progsett.c - Remove stub functions from unix.c - Move win_load_icon_set() to ui_init() - Replace the translated texts to English, and let the translators translate them - Fix the control IDs in dialogs.rc. - Use the requested solution in win_icon.c for setting the array variables.
This commit is contained in:
@@ -715,9 +715,6 @@ usage:
|
||||
if (lang_init)
|
||||
set_language(lang_init);
|
||||
|
||||
/* Load the desired iconset */
|
||||
plat_load_icon_set();
|
||||
|
||||
/* All good! */
|
||||
return(1);
|
||||
}
|
||||
|
@@ -125,11 +125,6 @@ extern void plat_vid_reload_options(void);
|
||||
extern uint32_t plat_language_code(char* langcode);
|
||||
extern void plat_language_code_r(uint32_t lcid, char* outbuf, int len);
|
||||
|
||||
extern void plat_clear_icon_set();
|
||||
extern void plat_system_icon_set();
|
||||
extern void plat_load_icon_set();
|
||||
extern void plat_get_icons_path(char* path_root);
|
||||
|
||||
/* Resource management. */
|
||||
extern void set_language(uint32_t id);
|
||||
extern wchar_t *plat_get_string(int id);
|
||||
|
@@ -107,7 +107,7 @@ extern HWND hwndMain,
|
||||
hwndRender;
|
||||
extern HANDLE ghMutex;
|
||||
extern HICON hIcon[256];
|
||||
extern int dpi;
|
||||
extern int dpi;
|
||||
extern RECT oldclip;
|
||||
extern int sbar_height, user_resize;
|
||||
extern int acp_utf8;
|
||||
@@ -149,6 +149,11 @@ extern int win_get_system_metrics(int i, int dpi);
|
||||
|
||||
extern LPARAM win_get_string(int id);
|
||||
|
||||
extern void win_clear_icon_set();
|
||||
extern void win_system_icon_set();
|
||||
extern void win_load_icon_set();
|
||||
extern void win_get_icons_path(char* path_root);
|
||||
|
||||
extern intptr_t fdd_type_to_icon(int type);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
|
@@ -1245,31 +1245,6 @@ plat_language_code_r(uint32_t lcid, char* outbuf, int len)
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
plat_clear_icon_set()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
plat_system_icon_set()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
plat_load_icon_set()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
plat_get_icons_path(char* path_root)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void joystick_init(void) {}
|
||||
void joystick_close(void) {}
|
||||
void joystick_process(void) {}
|
||||
|
@@ -20,7 +20,7 @@ add_library(plat OBJECT win.c win_dynld.c win_cdrom.c win_thread.c
|
||||
|
||||
add_library(ui OBJECT win_ui.c win_icon.c win_stbar.c win_sdl.c win_dialog.c win_about.c
|
||||
win_settings.c win_devconf.c win_snd_gain.c win_specify_dim.c win_new_floppy.c
|
||||
win_jsconf.c win_media_menu.c win_lang.c 86Box.rc)
|
||||
win_jsconf.c win_media_menu.c win_progsett.c 86Box.rc)
|
||||
|
||||
if(MSVC)
|
||||
# MSVC complains when we include the manifest from 86Box.rc...
|
||||
|
@@ -408,7 +408,7 @@ else
|
||||
UIOBJ := win_ui.o win_icon.o win_stbar.o \
|
||||
win_sdl.o \
|
||||
win_dialog.o win_about.o \
|
||||
win_settings.o win_devconf.o win_snd_gain.o win_specify_dim.o win_lang.o \
|
||||
win_settings.o win_devconf.o win_snd_gain.o win_specify_dim.o win_progsett.o \
|
||||
win_new_floppy.o win_jsconf.o win_media_menu.o
|
||||
endif
|
||||
|
||||
|
@@ -101,7 +101,7 @@ BEGIN
|
||||
MENUITEM "&Nastavení...", IDM_CONFIG
|
||||
MENUITEM "&Aktualizovat ikony stavového řádku", IDM_UPDATE_ICONS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Změnit jazyk zobrazení...", IDM_VID_PROG_SETT
|
||||
MENUITEM "Change program &settings...", IDM_VID_PROG_SETT
|
||||
# ifdef USE_DISCORD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Povolit integraci s &Discordem", IDM_DISCORD
|
||||
@@ -273,7 +273,7 @@ END
|
||||
// Dialog
|
||||
//
|
||||
|
||||
#define STR_PROG_SETT "Změnit jazyk zobrazení"
|
||||
#define STR_PROG_SETT "Program Settings"
|
||||
#define STR_SND_GAIN "Zesílení zvuku"
|
||||
#define STR_NEW_FLOPPY "Nový obraz"
|
||||
#define STR_CONFIG "Nastavení emulátoru 86Box"
|
||||
@@ -284,7 +284,7 @@ END
|
||||
#define STR_GLOBAL "Uložit toto nastavení jako &globální výchozí stav"
|
||||
#define STR_DEFAULT "&Výchozí"
|
||||
#define STR_LANGUAGE "Jazyk:"
|
||||
#define STR_ICONSET "Sada ikon:"
|
||||
#define STR_ICONSET "Iconset:"
|
||||
|
||||
#define STR_GAIN "Zesílení"
|
||||
|
||||
|
@@ -101,7 +101,7 @@ BEGIN
|
||||
MENUITEM "&Einstellungen...", IDM_CONFIG
|
||||
MENUITEM "&Statusleistenicons aktualisieren", IDM_UPDATE_ICONS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Anzeigesprache ändern...", IDM_VID_PROG_SETT
|
||||
MENUITEM "Change program &settings...", IDM_VID_PROG_SETT
|
||||
# ifdef USE_DISCORD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Discord-Integration aktivieren", IDM_DISCORD
|
||||
@@ -273,7 +273,7 @@ END
|
||||
// Dialog
|
||||
//
|
||||
|
||||
#define STR_PROG_SETT "Anzeigesprache ändern"
|
||||
#define STR_PROG_SETT "Program Settings"
|
||||
#define STR_SND_GAIN "Klangverstärkung"
|
||||
#define STR_NEW_FLOPPY "Neues Image"
|
||||
#define STR_CONFIG "86Box-Einstellungen"
|
||||
@@ -284,7 +284,7 @@ END
|
||||
#define STR_GLOBAL "Einstellungen als &globalen Standard speichern"
|
||||
#define STR_DEFAULT "&Standard"
|
||||
#define STR_LANGUAGE "Sprache:"
|
||||
#define STR_ICONSET "Ikonensatz:"
|
||||
#define STR_ICONSET "Iconset:"
|
||||
|
||||
#define STR_GAIN "Verstärkung"
|
||||
|
||||
|
@@ -10,8 +10,8 @@ BEGIN
|
||||
COMBOBOX IDC_COMBO_ICON, 13, 50, 213, 22, CBS_DROPDOWNLIST | CBS_HASSTRINGS
|
||||
PUSHBUTTON STR_DEFAULT, IDC_BUTTON_DEFICON, 162, 64, 60, 14
|
||||
AUTOCHECKBOX STR_GLOBAL, IDC_CHECKBOX_GLOBAL, 13, 82, 217, 8 , WS_DISABLED
|
||||
LTEXT STR_LANGUAGE, 0, 13, 8, 100, 8
|
||||
LTEXT STR_ICONSET, 0, 13, 40, 100, 8
|
||||
LTEXT STR_LANGUAGE, 1001, 13, 8, 100, 8
|
||||
LTEXT STR_ICONSET, 1002, 13, 40, 100, 8
|
||||
END
|
||||
|
||||
DLG_SND_GAIN DIALOG DISCARDABLE 0, 0, 113, 136
|
||||
|
@@ -101,7 +101,7 @@ BEGIN
|
||||
MENUITEM "&Settings...", IDM_CONFIG
|
||||
MENUITEM "&Update status bar icons", IDM_UPDATE_ICONS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Change dis&play language...", IDM_VID_PROG_SETT
|
||||
MENUITEM "Change program &settings...", IDM_VID_PROG_SETT
|
||||
# ifdef USE_DISCORD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Enable &Discord integration", IDM_DISCORD
|
||||
@@ -273,7 +273,7 @@ END
|
||||
// Dialog
|
||||
//
|
||||
|
||||
#define STR_PROG_SETT "Change Display Language"
|
||||
#define STR_PROG_SETT "Program Settings"
|
||||
#define STR_SND_GAIN "Sound Gain"
|
||||
#define STR_NEW_FLOPPY "New Image"
|
||||
#define STR_CONFIG "86Box Settings"
|
||||
@@ -284,7 +284,7 @@ END
|
||||
#define STR_GLOBAL "Save these settings as &global defaults"
|
||||
#define STR_DEFAULT "&Default"
|
||||
#define STR_LANGUAGE "Language:"
|
||||
#define STR_ICONSET "Iconset:"
|
||||
#define STR_ICONSET "Iconset:"
|
||||
|
||||
#define STR_GAIN "Gain"
|
||||
|
||||
|
@@ -101,7 +101,7 @@ BEGIN
|
||||
MENUITEM "&Postavke...", IDM_CONFIG
|
||||
MENUITEM "&Ažuriranje ikone statusne trake", IDM_UPDATE_ICONS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Promijeni jezik prikaza...", IDM_VID_PROG_SETT
|
||||
MENUITEM "Change program &settings...", IDM_VID_PROG_SETT
|
||||
# ifdef USE_DISCORD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Omogući integraciju &Discord-a", IDM_DISCORD
|
||||
@@ -273,7 +273,7 @@ END
|
||||
// Dialog
|
||||
//
|
||||
|
||||
#define STR_PROG_SETT "Promjena jezika prikaza"
|
||||
#define STR_PROG_SETT "Program Settings"
|
||||
#define STR_SND_GAIN "Pojačavanje zvuka"
|
||||
#define STR_NEW_FLOPPY "Nova image daoteka"
|
||||
#define STR_CONFIG "86Box postavke"
|
||||
@@ -284,7 +284,7 @@ END
|
||||
#define STR_GLOBAL "Spremite ove postavke kao &globalne zadane postavke"
|
||||
#define STR_DEFAULT "&Standard"
|
||||
#define STR_LANGUAGE "Jezik:"
|
||||
#define STR_ICONSET "Skup ikona:"
|
||||
#define STR_ICONSET "Iconset:"
|
||||
|
||||
#define STR_GAIN "Pojačavanje"
|
||||
|
||||
|
@@ -104,7 +104,7 @@ BEGIN
|
||||
MENUITEM "&Beállítások...", IDM_CONFIG
|
||||
MENUITEM "Állapotsori ikonok &frissítése", IDM_UPDATE_ICONS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "A &program nyelvének módosítása...", IDM_VID_PROG_SETT
|
||||
MENUITEM "Program&beállítások...", IDM_VID_PROG_SETT
|
||||
# ifdef USE_DISCORD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Discord integráció engedélyezése", IDM_DISCORD
|
||||
@@ -276,7 +276,7 @@ END
|
||||
// Dialog
|
||||
//
|
||||
|
||||
#define STR_PROG_SETT "Nyelvi beállítások"
|
||||
#define STR_PROG_SETT "Programbeállítások"
|
||||
#define STR_SND_GAIN "Hangerőszabályzó"
|
||||
#define STR_NEW_FLOPPY "Új képfájl létrehozása"
|
||||
#define STR_CONFIG "86Box beállítások"
|
||||
@@ -287,7 +287,7 @@ END
|
||||
#define STR_GLOBAL "Beállítások mentése &globális alapértékként"
|
||||
#define STR_DEFAULT "&Alapértelmezett"
|
||||
#define STR_LANGUAGE "Nyelv:"
|
||||
#define STR_ICONSET "Ikonkészlet:"
|
||||
#define STR_ICONSET "Ikonkészlet:"
|
||||
|
||||
#define STR_GAIN "Hangerő"
|
||||
|
||||
|
@@ -101,7 +101,7 @@ BEGIN
|
||||
MENUITEM "&Impostazioni...", IDM_CONFIG
|
||||
MENUITEM "&Aggiorna icone della barra di stato", IDM_UPDATE_ICONS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Cambia li&ngua...", IDM_VID_PROG_SETT
|
||||
MENUITEM "Change program &settings...", IDM_VID_PROG_SETT
|
||||
# ifdef USE_DISCORD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Abilita &integrazione Discord", IDM_DISCORD
|
||||
@@ -273,7 +273,7 @@ END
|
||||
// Dialog
|
||||
//
|
||||
|
||||
#define STR_PROG_SETT "Cambia lingua dell'interfaccia"
|
||||
#define STR_PROG_SETT "Program Settings"
|
||||
#define STR_SND_GAIN "Guadagno del suono"
|
||||
#define STR_NEW_FLOPPY "Nuova immagine"
|
||||
#define STR_CONFIG "Impostazioni di 86Box"
|
||||
@@ -284,7 +284,7 @@ END
|
||||
#define STR_GLOBAL "Salva queste impostazioni come &predefinite globali"
|
||||
#define STR_DEFAULT "&Predefinito"
|
||||
#define STR_LANGUAGE "Lingua:"
|
||||
#define STR_ICONSET "Set di Icone:"
|
||||
#define STR_ICONSET "Iconset:"
|
||||
|
||||
#define STR_GAIN "Guadagno"
|
||||
|
||||
|
@@ -102,7 +102,7 @@ BEGIN
|
||||
MENUITEM "&Configurações...", IDM_CONFIG
|
||||
MENUITEM "&Atualizar ícones da barra de status", IDM_UPDATE_ICONS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Alterar o &idioma de exibição...", IDM_VID_PROG_SETT
|
||||
MENUITEM "Change program &settings...", IDM_VID_PROG_SETT
|
||||
# ifdef USE_DISCORD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Ativar integração com o &Discord", IDM_DISCORD
|
||||
@@ -274,7 +274,7 @@ END
|
||||
// Dialog
|
||||
//
|
||||
|
||||
#define STR_PROG_SETT "Alterar idioma de exibição"
|
||||
#define STR_PROG_SETT "Program Settings"
|
||||
#define STR_SND_GAIN "Ganho de som"
|
||||
#define STR_NEW_FLOPPY "Nova imagem de disquete"
|
||||
#define STR_CONFIG "Configurações do 86Box"
|
||||
@@ -285,7 +285,7 @@ END
|
||||
#define STR_GLOBAL "Usar estas configurações como &padrões globais"
|
||||
#define STR_DEFAULT "&Padrão"
|
||||
#define STR_LANGUAGE "Idioma:"
|
||||
#define STR_ICONSET "Conjunto de ícones:"
|
||||
#define STR_ICONSET "Iconset:"
|
||||
|
||||
#define STR_GAIN "Ganho"
|
||||
|
||||
|
@@ -101,7 +101,7 @@ BEGIN
|
||||
MENUITEM "&Definições...", IDM_CONFIG
|
||||
MENUITEM "&Atualizar ícones da barra de estado", IDM_UPDATE_ICONS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Mudar idioma de a&presentação...", IDM_VID_PROG_SETT
|
||||
MENUITEM "Change program &settings...", IDM_VID_PROG_SETT
|
||||
# ifdef USE_DISCORD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Ativar integração com &Discord", IDM_DISCORD
|
||||
@@ -273,7 +273,7 @@ END
|
||||
// Dialog
|
||||
//
|
||||
|
||||
#define STR_PROG_SETT "Mudar idioma de apresentação"
|
||||
#define STR_PROG_SETT "Program Settings"
|
||||
#define STR_SND_GAIN "Ganho de som"
|
||||
#define STR_NEW_FLOPPY "Nova imagem"
|
||||
#define STR_CONFIG "Definições do 86Box"
|
||||
@@ -284,7 +284,7 @@ END
|
||||
#define STR_GLOBAL "Guardar estas definições como padrões &globais"
|
||||
#define STR_DEFAULT "&Padrão"
|
||||
#define STR_LANGUAGE "Idioma:"
|
||||
#define STR_ICONSET "Conjunto de ícones:"
|
||||
#define STR_ICONSET "Iconset:"
|
||||
|
||||
#define STR_GAIN "Ganho"
|
||||
|
||||
|
@@ -30,7 +30,7 @@
|
||||
HICON hIcon[256]; /* icon data loaded from resources */
|
||||
char icon_set[256] = ""; /* name of the iconset to be used */
|
||||
|
||||
void plat_clear_icon_set()
|
||||
void win_clear_icon_set()
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -42,7 +42,7 @@ void plat_clear_icon_set()
|
||||
}
|
||||
}
|
||||
|
||||
void plat_system_icon_set()
|
||||
void win_system_icon_set()
|
||||
{
|
||||
int i, x = win_get_system_metrics(SM_CXSMICON, dpi), y = win_get_system_metrics(SM_CYSMICON, dpi);
|
||||
|
||||
@@ -103,7 +103,7 @@ const _ICON_DATA icon_files[] =
|
||||
{252, "storage_controllers.ico"}
|
||||
};
|
||||
|
||||
void plat_get_icons_path(char* path_root)
|
||||
void win_get_icons_path(char* path_root)
|
||||
{
|
||||
char roms_root[1024] = {0};
|
||||
if (rom_path[0])
|
||||
@@ -115,10 +115,10 @@ void plat_get_icons_path(char* path_root)
|
||||
plat_path_slash(path_root);
|
||||
}
|
||||
|
||||
void plat_load_icon_set()
|
||||
void win_load_icon_set()
|
||||
{
|
||||
plat_clear_icon_set();
|
||||
plat_system_icon_set();
|
||||
win_clear_icon_set();
|
||||
win_system_icon_set();
|
||||
|
||||
if (strlen(icon_set) == 0)
|
||||
return;
|
||||
@@ -126,7 +126,7 @@ void plat_load_icon_set()
|
||||
char path_root[2048] = {0}, temp[2048] = {0};
|
||||
wchar_t wtemp[2048] = {0};
|
||||
|
||||
plat_get_icons_path(path_root);
|
||||
win_get_icons_path(path_root);
|
||||
strcat(path_root, icon_set);
|
||||
plat_path_slash(path_root);
|
||||
|
||||
@@ -141,10 +141,9 @@ void plat_load_icon_set()
|
||||
ictemp = LoadImageW(NULL, (LPWSTR)wtemp, IMAGE_ICON, x, y, LR_LOADFROMFILE | LR_DEFAULTCOLOR);
|
||||
if (ictemp)
|
||||
{
|
||||
HICON* helper = &hIcon[icon_files[i].id];
|
||||
if (*helper)
|
||||
DestroyIcon(*helper);
|
||||
*helper = ictemp;
|
||||
if (hIcon[icon_files[i].id])
|
||||
DestroyIcon(hIcon[icon_files[i].id]);
|
||||
hIcon[icon_files[i].id] = ictemp;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -6,8 +6,7 @@
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Handle the dialog for changing the program's language.
|
||||
*
|
||||
* Handle the dialog for changing the program's language and other global settings.
|
||||
*
|
||||
*
|
||||
* Authors: Laci bá'
|
||||
@@ -100,7 +99,7 @@ progsett_fill_iconsets(HWND hdlg)
|
||||
WIN32_FIND_DATA data;
|
||||
|
||||
char icon_path_root[512];
|
||||
plat_get_icons_path(icon_path_root);
|
||||
win_get_icons_path(icon_path_root);
|
||||
|
||||
wchar_t search[512];
|
||||
mbstowcs(search, icon_path_root, strlen(icon_path_root) + 1);
|
||||
@@ -187,7 +186,7 @@ progsett_settings_save(void)
|
||||
|
||||
/* Iconset */
|
||||
strcpy(icon_set, temp_icon_set);
|
||||
plat_load_icon_set(hinstance);
|
||||
win_load_icon_set(hinstance);
|
||||
|
||||
/* Update title bar */
|
||||
update_mouse_msg();
|
@@ -877,7 +877,7 @@ StatusBarPopupMenu(HWND hwnd, POINT pt, int id)
|
||||
/* API: Load status bar icons */
|
||||
void
|
||||
StatusBarLoadIcon(HINSTANCE hInst) {
|
||||
plat_load_icon_set(hInst);
|
||||
win_load_icon_set();
|
||||
}
|
||||
|
||||
/* Handle messages for the Status Bar window. */
|
||||
|
@@ -68,6 +68,7 @@ int user_resize = 0;
|
||||
int fixed_size_x = 0, fixed_size_y = 0;
|
||||
int kbd_req_capture = 0;
|
||||
int hide_status_bar = 0;
|
||||
int dpi = 96;
|
||||
|
||||
extern char openfilestring[512];
|
||||
extern WCHAR wopenfilestring[512];
|
||||
@@ -77,7 +78,6 @@ extern WCHAR wopenfilestring[512];
|
||||
static wchar_t wTitle[512];
|
||||
static int manager_wm = 0;
|
||||
static int save_window_pos = 0, pause_state = 0;
|
||||
int dpi = 96;
|
||||
static int padded_frame = 0;
|
||||
static int vis = -1;
|
||||
|
||||
@@ -1064,7 +1064,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
plat_clear_icon_set();
|
||||
win_clear_icon_set();
|
||||
KillTimer(hwnd, TIMER_1SEC);
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
@@ -1395,6 +1395,9 @@ ui_init(int nCmdShow)
|
||||
/* Reset all menus to their defaults. */
|
||||
ResetAllMenus();
|
||||
media_menu_init();
|
||||
|
||||
/* Load the desired iconset */
|
||||
win_load_icon_set();
|
||||
|
||||
/* Make the window visible on the screen. */
|
||||
ShowWindow(hwnd, nCmdShow);
|
||||
|
Reference in New Issue
Block a user