From: Colin Finck Date: Wed, 14 May 2008 14:18:11 +0000 (+0000) Subject: Carlo Bramini (carlo DOT bramix AT libero DOT it) X-Git-Tag: ReactOS-0.3.5~563 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=451afd1750d284ed228a178bf40dfd666ef53d79 Carlo Bramini (carlo DOT bramix AT libero DOT it) - Italian translations and various fixes to Magnify (fixes part of bug #3241 as well) Changes by me: - Shorten the german dialog string a bit, so that it won't be truncated. Strings for Static controls can only be 256 characters long. A french translator should change the text as well, because it's longer than 256 characters. See issue #3245 for more details. svn path=/trunk/; revision=33513 --- diff --git a/rosapps/magnify/lang/bg-BG.rc b/rosapps/magnify/lang/bg-BG.rc index b5c64e22da7..e88d2539e04 100644 --- a/rosapps/magnify/lang/bg-BG.rc +++ b/rosapps/magnify/lang/bg-BG.rc @@ -34,7 +34,7 @@ CAPTION " FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Èçõîä",IDOK,96,161,50,14 - PUSHBUTTON "Ïîìîù",IDOK,38,161,50,14 + PUSHBUTTON "Ïîìîù",IDC_BUTTON_HELP,38,161,50,14 LTEXT "Óâåëè÷åíèå:",IDC_STATIC,6,8,68,8 COMBOBOX IDC_ZOOM,72,6,63,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP GROUPBOX "Ïðîñëåäÿâàíå",IDC_STATIC,7,25,195,59 @@ -64,3 +64,4 @@ BEGIN END + diff --git a/rosapps/magnify/lang/de-DE.rc b/rosapps/magnify/lang/de-DE.rc index 925400a7c6f..a330489832a 100644 --- a/rosapps/magnify/lang/de-DE.rc +++ b/rosapps/magnify/lang/de-DE.rc @@ -34,7 +34,7 @@ CAPTION "Einstellungen" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Beenden",IDOK,96,161,50,14 - PUSHBUTTON "Hilfe",IDOK,38,161,50,14 + PUSHBUTTON "Hilfe",IDC_BUTTON_HELP,38,161,50,14 LTEXT "Vergrößerungsgrad:",IDC_STATIC,6,12,68,8 COMBOBOX IDC_ZOOM,72,6,63,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP GROUPBOX "Folgen",IDC_STATIC,7,25,139,59 @@ -54,7 +54,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,193,76,50,14 ICON IDI_ICON,IDC_STATIC,7,17,20,20 - LTEXT "Die Bildschirmlupe ist für Personen mit leichten visuellen Einschränkungen gedacht und stellt lediglich Grundfunktionen zur Verfügung. Die meisten Nutzer mit visuellen Einschränkungen werden eine Bildschirm-Lupe mit mehr Funktionen für die alltägliche Nutzung benötigen.",IDC_STATIC,36,7,207,33 + LTEXT "Die Bildschirmlupe ist für Personen mit leichten visuellen Einschränkungen gedacht und stellt lediglich Grundfunktionen zur Verfügung. Die meisten Nutzer werden jedoch eine Bildschirmlupe mit mehr Funktionen für die alltägliche Nutzung benötigen.",IDC_STATIC,36,7,207,33 CONTROL "Diese Nachricht nicht mehr anzeigen",IDC_SHOWWARNINGCHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,43,80,137,10 END diff --git a/rosapps/magnify/lang/en-US.rc b/rosapps/magnify/lang/en-US.rc index 823cb4799d0..3ed196b7972 100644 --- a/rosapps/magnify/lang/en-US.rc +++ b/rosapps/magnify/lang/en-US.rc @@ -34,7 +34,7 @@ CAPTION "Magnifier Settings" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Exit",IDOK,96,161,50,14 - PUSHBUTTON "Help",IDOK,38,161,50,14 + PUSHBUTTON "Help",IDC_BUTTON_HELP,38,161,50,14 LTEXT "Magnification level:",IDC_STATIC,6,8,68,8 COMBOBOX IDC_ZOOM,72,6,63,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP GROUPBOX "Tracking",IDC_STATIC,7,25,139,59 diff --git a/rosapps/magnify/lang/es-ES.rc b/rosapps/magnify/lang/es-ES.rc index fdac22afddf..0c2b350e966 100644 --- a/rosapps/magnify/lang/es-ES.rc +++ b/rosapps/magnify/lang/es-ES.rc @@ -37,7 +37,7 @@ CAPTION "Configurar Magnifier" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Salir",IDOK,96,161,50,14 - PUSHBUTTON "Ayuda",IDOK,38,161,50,14 + PUSHBUTTON "Ayuda",IDC_BUTTON_HELP,38,161,50,14 LTEXT "Nivel de aumento:",IDC_STATIC,6,8,68,8 COMBOBOX IDC_ZOOM,72,6,63,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP GROUPBOX "Rastreando",IDC_STATIC,7,25,139,59 diff --git a/rosapps/magnify/lang/fr-FR.rc b/rosapps/magnify/lang/fr-FR.rc index b4dedf41020..f1c74c88193 100644 --- a/rosapps/magnify/lang/fr-FR.rc +++ b/rosapps/magnify/lang/fr-FR.rc @@ -34,7 +34,7 @@ CAPTION "Param FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Quitter",IDOK,96,161,50,14 - PUSHBUTTON "Aider",IDOK,38,161,50,14 + PUSHBUTTON "Aider",IDC_BUTTON_HELP,38,161,50,14 LTEXT "Coefficient d'agrandissement:",IDC_STATIC,6,8,68,8 COMBOBOX IDC_ZOOM,72,6,63,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP GROUPBOX "Poursuite",IDC_STATIC,7,25,139,59 diff --git a/rosapps/magnify/lang/it-IT.rc b/rosapps/magnify/lang/it-IT.rc new file mode 100644 index 00000000000..729cf79f2f1 --- /dev/null +++ b/rosapps/magnify/lang/it-IT.rc @@ -0,0 +1,64 @@ +LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL + +IDC_MAGNIFIER MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "E&sci", IDM_EXIT + MENUITEM "&Opzioni", IDM_OPTIONS + MENUITEM SEPARATOR + MENUITEM "&Informazioni su Magnifier", IDM_ABOUT + END +END + +IDC_MAGNIFIER ACCELERATORS +BEGIN + "?", IDM_ABOUT, ASCII, ALT + "/", IDM_ABOUT, ASCII, ALT +END + +IDD_ABOUTBOX DIALOGEX 22, 17, 220, 75 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_CAPTION | WS_SYSMENU +CAPTION "Informazioni Magnifier" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_ICON,IDC_MYICON,14,9,20,20 + LTEXT "Magnifier Versione 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX + LTEXT "Copyright (C) 2007 Marc Piulachs (marc.piulachs@codexchange.net)",IDC_STATIC,48,24,125,22 + PUSHBUTTON "OK",IDOK,162,48,50,14 +END + +IDD_DIALOGOPTIONS DIALOGEX 0, 0, 153, 182 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Impostazioni di Magnifier" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "Uscita",IDOK,96,161,50,14 + PUSHBUTTON "Aiuto",IDC_BUTTON_HELP,38,161,50,14 + LTEXT "Livello d'ingrandimento:",IDC_STATIC,6,8,78,8 + COMBOBOX IDC_ZOOM,96,6,48,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Proseguimento",IDC_STATIC,7,25,139,59 + GROUPBOX "Presentazione",IDC_STATIC,7,87,139,57 + CONTROL "Seguire il cursore del mouse",IDC_FOLLOWMOUSECHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,42,114,10 + CONTROL "Seguire la selezione da tastiera",IDC_FOLLOWKEYBOARDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,120,10 + CONTROL "Seguire l'immissione di testo",IDC_FOLLOWTEXTEDITINGCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,114,10 + CONTROL "Inverti i colori",IDC_INVERTCOLORSCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,102,114,10 + CONTROL "Avvio in minimizzato",IDC_STARTMINIMIZEDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,114,114,10 + CONTROL "Mostra Magnifier",IDC_SHOWMAGNIFIERCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,126,114,10 +END + +IDD_WARNINGDIALOG DIALOGEX 0, 0, 250, 97 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION +CAPTION "ReactOS Magnifier" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,193,76,50,14 + ICON IDI_ICON,IDC_STATIC,7,17,20,20 + LTEXT "Magnifier é stato realizzato per fornire un livello minimo di funzionalità agli utenti affetti da problemi visivi. La maggior parte di questi utenti avrà bisogno di un programma di utilità dotato di maggiori funzioni per l'uso quotidiano.",IDC_STATIC,36,7,207,33 + CONTROL "Non mostrare più questo messaggio",IDC_SHOWWARNINGCHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,43,80,137,10 +END + +STRINGTABLE +BEGIN + IDS_APP_TITLE "Lente d'ingrandimento" +END diff --git a/rosapps/magnify/lang/pl-PL.rc b/rosapps/magnify/lang/pl-PL.rc index f234a3cbeb0..7f53a881961 100644 --- a/rosapps/magnify/lang/pl-PL.rc +++ b/rosapps/magnify/lang/pl-PL.rc @@ -41,7 +41,7 @@ CAPTION "Ustawienia" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Wyjœcie",IDOK,96,161,50,14 - PUSHBUTTON "Pomoc",IDOK,38,161,50,14 + PUSHBUTTON "Pomoc",IDC_BUTTON_HELP,38,161,50,14 LTEXT "Stopieñ powiêkszenia:",IDC_STATIC,6,8,68,8 COMBOBOX IDC_ZOOM,72,6,63,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP GROUPBOX "Œledzenia",IDC_STATIC,7,25,139,59 diff --git a/rosapps/magnify/lang/ru-RU.rc b/rosapps/magnify/lang/ru-RU.rc index 7f7e434f9e8..12097918c3e 100644 --- a/rosapps/magnify/lang/ru-RU.rc +++ b/rosapps/magnify/lang/ru-RU.rc @@ -34,7 +34,7 @@ CAPTION " FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Â&ûõîä",IDOK,94,158,50,14 - PUSHBUTTON "&Ñïðàâêà",IDOK,34,158,50,14 + PUSHBUTTON "&Ñïðàâêà",IDC_BUTTON_HELP,34,158,50,14 LTEXT "Óâåëè÷åíèå:",IDC_STATIC,6,8,68,8 COMBOBOX IDC_ZOOM,92,6,85,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP GROUPBOX "Ñëåæåíèå",IDC_STATIC,7,25,170,59 diff --git a/rosapps/magnify/lang/sk-SK.rc b/rosapps/magnify/lang/sk-SK.rc index 767a8eea7ba..143f14c43c0 100644 --- a/rosapps/magnify/lang/sk-SK.rc +++ b/rosapps/magnify/lang/sk-SK.rc @@ -39,7 +39,7 @@ CAPTION "Nastavenia Lupy" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Koniec",IDOK,96,161,50,14 - PUSHBUTTON "Pomocník",IDOK,38,161,50,14 + PUSHBUTTON "Pomocník",IDC_BUTTON_HELP,38,161,50,14 LTEXT "Úroveò zväèšenia:",IDC_STATIC,6,8,68,8 COMBOBOX IDC_ZOOM,72,6,63,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP GROUPBOX "Sledovanie",IDC_STATIC,7,25,139,59 diff --git a/rosapps/magnify/lang/uk-UA.rc b/rosapps/magnify/lang/uk-UA.rc index 3bbdad054d8..296d7c24dfb 100644 --- a/rosapps/magnify/lang/uk-UA.rc +++ b/rosapps/magnify/lang/uk-UA.rc @@ -42,7 +42,7 @@ CAPTION " FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Âèõ³ä",IDOK,96,161,50,14 - PUSHBUTTON "Äîâ³äêà",IDOK,38,161,50,14 + PUSHBUTTON "Äîâ³äêà",IDC_BUTTON_HELP,38,161,50,14 LTEXT "Çá³ëüøåííÿ:",IDC_STATIC,6,8,68,8 COMBOBOX IDC_ZOOM,72,6,63,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP GROUPBOX "³äñòåæåííÿ",IDC_STATIC,7,25,139,59 diff --git a/rosapps/magnify/magnifier.c b/rosapps/magnify/magnifier.c index 29e80bf7282..7f0600aaca3 100644 --- a/rosapps/magnify/magnifier.c +++ b/rosapps/magnify/magnifier.c @@ -44,13 +44,13 @@ INT_PTR CALLBACK WarningProc(HWND, UINT, WPARAM, LPARAM); int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { - UNREFERENCED_PARAMETER(hPrevInstance); - UNREFERENCED_PARAMETER(lpCmdLine); - // TODO: Place code here. MSG msg; HACCEL hAccelTable; + UNREFERENCED_PARAMETER(hPrevInstance); + UNREFERENCED_PARAMETER(lpCmdLine); + // Initialize global strings LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); MyRegisterClass(hInstance); @@ -143,9 +143,14 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) return FALSE; } - ShowWindow(hMainWnd, nCmdShow); + ShowWindow(hMainWnd, (bStartMinimized) ? SW_MINIMIZE : nCmdShow); UpdateWindow(hMainWnd); + if (bShowWarning) + { + DialogBox (hInstance, MAKEINTRESOURCE(IDD_WARNINGDIALOG), hMainWnd, (DLGPROC)WarningProc); + } + return TRUE; } @@ -168,18 +173,21 @@ void Draw(HDC aDc) RECT R; RECT appRect; DWORD rop = SRCCOPY; - HCURSOR hCursor; - CURSORINFO info; + CURSORINFO cinfo; + ICONINFO iinfo; + + int Width, Height, AppWidth, AppHeight; + LONG blitAreaWidth, blitAreaHeight, blitAreaX, blitAreaY; desktopHdc = GetWindowDC (hDesktopWindow); GetClientRect(hMainWnd, &appRect); GetWindowRect(hDesktopWindow, &R); - memset(&info, 0, sizeof(info)); - info.cbSize = sizeof(info); - GetCursorInfo(&info); - hCursor = info.hCursor; + memset(&cinfo, 0, sizeof(cinfo)); + cinfo.cbSize = sizeof(cinfo); + GetCursorInfo(&cinfo); + GetIconInfo(cinfo.hCursor, &iinfo); /* Create a memory DC compatible with client area DC.*/ HdcStrech = CreateCompatibleDC(desktopHdc); @@ -208,21 +216,21 @@ void Draw(HDC aDc) /* Draw the mouse pointer in the right position */ DrawIcon( HdcStrech , - pMouse.x - 10, - pMouse.y - 10, - hCursor); + pMouse.x - iinfo.xHotspot, // - 10, + pMouse.y - iinfo.yHotspot, // - 10, + cinfo.hCursor); - int Width = (R.right - R.left); - int Height = (R.bottom - R.top); + Width = (R.right - R.left); + Height = (R.bottom - R.top); - int AppWidth = (appRect.right - appRect.left); - int AppHeight = (appRect.bottom - appRect.top); + AppWidth = (appRect.right - appRect.left); + AppHeight = (appRect.bottom - appRect.top); - LONG blitAreaWidth = AppWidth / iZoom; - LONG blitAreaHeight = AppHeight / iZoom; + blitAreaWidth = AppWidth / iZoom; + blitAreaHeight = AppHeight / iZoom; - LONG blitAreaX = (cp.x) - (blitAreaWidth /2); - LONG blitAreaY = (cp.y) - (blitAreaHeight /2); + blitAreaX = (cp.x) - (blitAreaWidth /2); + blitAreaY = (cp.y) - (blitAreaHeight /2); if (blitAreaX < 0) { @@ -302,24 +310,26 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) POINT pNewMouse; POINT pNewCaret; POINT pNewFocus; + HWND hwnd1, hwnd2, hwnd3; + DWORD a, b; + RECT controlRect; //Get current mouse position GetCursorPos (&pNewMouse); //Get caret position - HWND hwnd1 = GetForegroundWindow (); - DWORD a = GetWindowThreadProcessId(hwnd1, NULL); - DWORD b = GetCurrentThreadId(); + hwnd1 = GetForegroundWindow (); + a = GetWindowThreadProcessId(hwnd1, NULL); + b = GetCurrentThreadId(); AttachThreadInput (a, b, TRUE); - HWND hwnd2 = GetFocus(); + hwnd2 = GetFocus(); GetCaretPos( &pNewCaret); ClientToScreen (hwnd2, (LPPOINT) &pNewCaret); AttachThreadInput (a, b, FALSE); //Get current control focus - HWND hwnd3 = GetFocus (); - RECT controlRect; + hwnd3 = GetFocus (); GetWindowRect (hwnd3 , &controlRect); pNewFocus.x = controlRect.left; pNewFocus.y = controlRect.top; @@ -392,16 +402,6 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) //Get the desktop window hDesktopWindow = GetDesktopWindow(); - if (bShowWarning) - { - DialogBox (hInst, MAKEINTRESOURCE(IDD_WARNINGDIALOG), hWnd, (DLGPROC)WarningProc); - } - - if (bStartMinimized) - { - ShowWindow (hMainWnd, SW_MINIMIZE ); - } - //Set the timer SetTimer (hWnd , 1, REPAINT_SPEED , NULL); break; @@ -473,20 +473,17 @@ INT_PTR CALLBACK OptionsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPar return (INT_PTR)TRUE; } case WM_COMMAND: - if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) - { - EndDialog(hDlg, LOWORD(wParam)); - return (INT_PTR)TRUE; - } - if (LOWORD(wParam) == IDOK) - { - } - if (LOWORD(wParam) == IDHELP) - { - MessageBox(hDlg , TEXT("Magnifier help not available yet!") , TEXT("Help") , MB_OK); - } switch(LOWORD(wParam)) { + case IDOK: + case IDCANCEL: + EndDialog(hDlg, LOWORD(wParam)); + return (INT_PTR)TRUE; + + case IDC_BUTTON_HELP: + /* unimplemented */ + MessageBox(hDlg , TEXT("Magnifier help not available yet!") , TEXT("Help") , MB_OK); + break; case IDC_ZOOM: if(HIWORD(wParam) == CBN_SELCHANGE) { diff --git a/rosapps/magnify/resource.h b/rosapps/magnify/resource.h index e7af469567c..610ad096ad3 100644 --- a/rosapps/magnify/resource.h +++ b/rosapps/magnify/resource.h @@ -12,7 +12,6 @@ #define IDD_DIALOGOPTIONS 129 #define IDD_WARNINGDIALOG 130 #define IDC_ZOOM 1000 -#define IDC_CHECK1 1001 #define IDC_FOLLOWKEYBOARDCHECK 1002 #define IDC_FOLLOWTEXTEDITINGCHECK 1003 #define IDC_INVERTCOLORSCHECK 1004 @@ -20,8 +19,8 @@ #define IDC_SHOWMAGNIFIER 1006 #define IDC_SHOWMAGNIFIERCHECK 1006 #define IDC_FOLLOWMOUSECHECK 1007 +#define IDC_BUTTON_HELP 1008 #define IDC_SHOWWARNINGCHECK 1009 -#define IDC_BUTTON1 1008 #define ID_FILE_OPTIONS 32771 #define ID_OPTIONS 32772 #define IDM_OPTIONS 32773 diff --git a/rosapps/magnify/rsrc.rc b/rosapps/magnify/rsrc.rc index 157b0f55d6b..4ac906a51fd 100644 --- a/rosapps/magnify/rsrc.rc +++ b/rosapps/magnify/rsrc.rc @@ -6,6 +6,7 @@ #include "lang/es-ES.rc" #include "lang/de-DE.rc" #include "lang/fr-FR.rc" +#include "lang/it-IT.rc" #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" #include "lang/sk-SK.rc"