- Use PeekMessage loop around GetMessage.

- Added German resource file.
- Realign some dialog parts.
- "Property" -> "Properties"
- Add some traces.
This commit is contained in:
Andreas Mohr 2002-07-01 23:22:48 +00:00 committed by Alexandre Julliard
parent 5691dea7b8
commit 17a2fe0f71
8 changed files with 151 additions and 46 deletions

View File

@ -820,8 +820,8 @@ static BOOL WCUSER_FillMenu(HMENU hMenu, BOOL sep)
InsertMenu(hMenu, -1, MF_BYPOSITION|MF_STRING|MF_POPUP, (UINT_PTR)hSubMenu, buff);
LoadString(hInstance, IDS_DEFAULT, buff, sizeof(buff) / sizeof(WCHAR));
InsertMenu(hMenu, -1, MF_BYPOSITION|MF_STRING, IDS_DEFAULT, buff);
LoadString(hInstance, IDS_PROPERTY, buff, sizeof(buff) / sizeof(WCHAR));
InsertMenu(hMenu, -1, MF_BYPOSITION|MF_STRING, IDS_PROPERTY, buff);
LoadString(hInstance, IDS_PROPERTIES, buff, sizeof(buff) / sizeof(WCHAR));
InsertMenu(hMenu, -1, MF_BYPOSITION|MF_STRING, IDS_PROPERTIES, buff);
return TRUE;
}
@ -1260,7 +1260,7 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
case IDS_DEFAULT:
WCUSER_GetProperties(data, FALSE);
break;
case IDS_PROPERTY:
case IDS_PROPERTIES:
WCUSER_GetProperties(data, TRUE);
break;
default:
@ -1273,7 +1273,7 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
case IDS_DEFAULT:
WCUSER_GetProperties(data, FALSE);
break;
case IDS_PROPERTY:
case IDS_PROPERTIES:
WCUSER_GetProperties(data, TRUE);
break;
case IDS_MARK:
@ -1345,22 +1345,29 @@ static int WCUSER_MainLoop(struct inner_data* data)
for (;;)
{
switch (MsgWaitForMultipleObjects(1, &data->hSynchro, FALSE, INFINITE, QS_ALLINPUT))
switch(MsgWaitForMultipleObjects(1, &data->hSynchro, FALSE, INFINITE, QS_ALLINPUT))
{
case WAIT_OBJECT_0:
if (!WINECON_GrabChanges(data) && data->curcfg.exit_on_die)
PostQuitMessage(0);
break;
case WAIT_OBJECT_0+1:
switch (GetMessage(&msg, 0, 0, 0))
/* need to use PeekMessage loop instead of simple GetMessage:
* multiple messages might have arrived in between,
* so GetMessage would lead to delayed processing */
while (PeekMessage(&msg, 0, 0, 0, PM_NOREMOVE))
{
case -1: /* the event handle became invalid, so exit */
return -1;
case 0: /* WM_QUIT has been posted */
return 0;
default:
DispatchMessage(&msg);
break;
switch (GetMessage(&msg, 0, 0, 0))
{
case -1: /* the event handle became invalid, so exit */
return -1;
case 0: /* WM_QUIT has been posted */
return 0;
default:
WINE_TRACE("dispatching msg %04x\n", msg.message);
DispatchMessage(&msg);
break;
}
}
break;
default:
@ -1421,4 +1428,3 @@ BOOL WCUSER_InitBackend(struct inner_data* data)
return TRUE;
}

View File

@ -376,7 +376,7 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, void* pid)
/* the handles here are created without the whistles and bells required by console
* (mainly because wineconsole doesn't need it)
* - there are not inheritable
* - they are not inheritable
* - hConIn is not synchronizable
*/
SERVER_START_REQ(alloc_console)
@ -390,6 +390,7 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, void* pid)
}
SERVER_END_REQ;
if (!ret) goto error;
WINE_TRACE("using hConIn event %p, hSynchro event %p\n", data->hConIn, data->hSynchro);
SERVER_START_REQ( set_console_input_info )
{

View File

@ -0,0 +1,99 @@
/*
* Copyright 2002 Andreas Mohr
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_EDIT, "Edi&tieren"
IDS_DEFAULT, "Stan&dard"
IDS_PROPERTIES, "&Eigenschaften"
IDS_MARK, "&Markieren"
IDS_COPY, "&Copy"
IDS_PASTE, "&Paste"
IDS_SELECTALL, "&Alles auswählen"
IDS_SCROLL, "Sc&rollen"
IDS_SEARCH, "&Suchen"
IDS_FNT_DISPLAY, "Jeder Buchstabe ist %ld Pixel breit und %ld Pixel hoch"
IDS_FNT_PREVIEW_1, "Dies ist ein Test"
IDS_FNT_PREVIEW_2, ""
IDS_DLG_TIT_DEFAULT "Setup - Standardeinstellungen"
IDS_DLG_TIT_CURRENT "Setup - aktuelle Einstellungen"
END
IDD_OPTION DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION " Optionen "
FONT 8, "Helv"
{
GROUPBOX "Cursorgrösse", -1, 10, 11, 60, 44, BS_GROUPBOX
AUTORADIOBUTTON "&Klein", IDC_OPT_CURSOR_SMALL, 14, 23, 44, 10, WS_TABSTOP
AUTORADIOBUTTON "&Mittel", IDC_OPT_CURSOR_MEDIUM, 14, 33, 44, 10, WS_TABSTOP
AUTORADIOBUTTON "&Gross", IDC_OPT_CURSOR_LARGE, 14, 43, 44, 10, WS_TABSTOP
GROUPBOX "Steuerung", -1, 75, 11, 125, 44, BS_GROUPBOX
LTEXT "Popup-Menü", -1, 79, 23, 50, 10
AUTOCHECKBOX "&Strg", IDC_OPT_CONF_CTRL, 129, 23, 60, 10, WS_TABSTOP
AUTOCHECKBOX "&Umschalt", IDC_OPT_CONF_SHIFT, 129, 33, 60, 10, WS_TABSTOP
LTEXT "Quick-Edit", -1, 79, 43, 50, 10
AUTOCHECKBOX "&aktiv", IDC_OPT_QUICK_EDIT, 129, 43, 60, 10, WS_TABSTOP
GROUPBOX "Befehlshistorie", -1, 10, 57, 190, 35, BS_GROUPBOX
LTEXT "&Anzahl gemerkter Befehle :", -1, 14, 67, 78, 18
EDITTEXT IDC_OPT_HIST_SIZE, 92, 69, 31, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_OPT_HIST_SIZE_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
AUTOCHECKBOX "&Entferne doppelte", IDC_OPT_HIST_DOUBLE, 130, 67, 50, 18, WS_TABSTOP|BS_MULTILINE
}
IDD_FONT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION " Schriftart "
FONT 8, "Helv"
{
LTEXT "&Schriftart", -1, 5, 5, 24, 8
LISTBOX IDC_FNT_LIST_FONT, 5, 18, 90, 42, LBS_SORT|WS_VSCROLL
LTEXT "F&arbe", -1, 100, 5, 50, 8
CONTROL "", IDC_FNT_COLOR_FG, "WineConColorPreview", 0L, 100, 18, 48, 16
CONTROL "", IDC_FNT_COLOR_BK, "WineConColorPreview", 0L, 100, 40, 48, 16
LTEXT "&Grösse", -1, 158, 5, 40, 8
LISTBOX IDC_FNT_LIST_SIZE, 158, 18, 40, 60, WS_VSCROLL
CONTROL "", IDC_FNT_PREVIEW, "WineConFontPreview", 0L, 5, 60, 109, 40
LTEXT "", IDC_FNT_FONT_INFO, 128, 76, 80, 18
}
IDD_CONFIG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION " Konfiguration "
FONT 8, "Helv"
{
GROUPBOX "Pufferbereich", -1, 10, 11, 110, 42, BS_GROUPBOX
LTEXT "&Breite :", -1, 14, 25, 54, 9
EDITTEXT IDC_CNF_SB_WIDTH, 78, 23, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_SB_WIDTH_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
LTEXT "&Höhe :", -1, 14, 39, 54, 9
EDITTEXT IDC_CNF_SB_HEIGHT, 78, 37, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_SB_HEIGHT_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
GROUPBOX "Fenstergrösse", -1, 10, 55, 110, 42
LTEXT "Brei&te :", -1, 14, 69, 54, 9
EDITTEXT IDC_CNF_WIN_WIDTH, 78, 67, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_WIN_WIDTH_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
LTEXT "Höh&e :", -1, 14, 83, 54, 9
EDITTEXT IDC_CNF_WIN_HEIGHT, 78, 81, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_WIN_HEIGHT_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
}

View File

@ -22,7 +22,7 @@ STRINGTABLE
BEGIN
IDS_EDIT, "&Edit"
IDS_DEFAULT, "&Default"
IDS_PROPERTY, "&Property"
IDS_PROPERTIES, "&Properties"
IDS_MARK, "&Mark"
IDS_COPY, "&Copy"
IDS_PASTE, "&Paste"
@ -41,19 +41,20 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION " Options "
FONT 8, "Helv"
{
GROUPBOX "Cursor size", -1, 10, 11, 100, 44, BS_GROUPBOX
AUTORADIOBUTTON "&Small", IDC_OPT_CURSOR_SMALL, 14, 23, 84, 10, WS_TABSTOP
AUTORADIOBUTTON "&Medium", IDC_OPT_CURSOR_MEDIUM, 14, 33, 84, 10, WS_TABSTOP
AUTORADIOBUTTON "&Large", IDC_OPT_CURSOR_LARGE, 14, 43, 84, 10, WS_TABSTOP
GROUPBOX "Cursor size", -1, 10, 11, 60, 44, BS_GROUPBOX
AUTORADIOBUTTON "&Small", IDC_OPT_CURSOR_SMALL, 14, 23, 44, 10, WS_TABSTOP
AUTORADIOBUTTON "&Medium", IDC_OPT_CURSOR_MEDIUM, 14, 33, 44, 10, WS_TABSTOP
AUTORADIOBUTTON "&Large", IDC_OPT_CURSOR_LARGE, 14, 43, 44, 10, WS_TABSTOP
GROUPBOX "Control", -1, 115, 11, 85, 44, BS_GROUPBOX
LTEXT "Popup menu", -1, 119, 23, 40, 10
AUTOCHECKBOX "&Control", IDC_OPT_CONF_CTRL, 159, 23, 40, 10, WS_TABSTOP
AUTOCHECKBOX "S&hift", IDC_OPT_CONF_SHIFT, 159, 33, 40, 10, WS_TABSTOP
AUTOCHECKBOX "&Quick edit", IDC_OPT_QUICK_EDIT, 119, 44, 40, 10, WS_TABSTOP|BS_MULTILINE|BS_LEFTTEXT
GROUPBOX "Control", -1, 75, 11, 125, 44, BS_GROUPBOX
LTEXT "Popup menu", -1, 79, 23, 40, 10
AUTOCHECKBOX "&Control", IDC_OPT_CONF_CTRL, 129, 23, 60, 10, WS_TABSTOP
AUTOCHECKBOX "S&hift", IDC_OPT_CONF_SHIFT, 129, 33, 60, 10, WS_TABSTOP
LTEXT "Quick edit", -1, 79, 43, 50, 10
AUTOCHECKBOX "&enable", IDC_OPT_QUICK_EDIT, 129, 43, 60, 10, WS_TABSTOP
GROUPBOX "Command history", -1, 10, 57, 190, 35, BS_GROUPBOX
LTEXT "&Numbers of recalled commands :", -1, 14, 67, 78, 18
LTEXT "&Number of recalled commands :", -1, 14, 67, 78, 18
EDITTEXT IDC_OPT_HIST_SIZE, 92, 69, 31, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_OPT_HIST_SIZE_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
AUTOCHECKBOX "&Remove doubles", IDC_OPT_HIST_DOUBLE, 130, 67, 50, 18, WS_TABSTOP|BS_MULTILINE

View File

@ -22,7 +22,7 @@ STRINGTABLE
BEGIN
IDS_EDIT, "&Editer"
IDS_DEFAULT, "Par &défaut"
IDS_PROPERTY, "&Propriétés"
IDS_PROPERTIES, "&Propriétés"
IDS_MARK, "&Marquer"
IDS_COPY, "&Copier"
IDS_PASTE, "C&oller"
@ -41,16 +41,17 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION " Options "
FONT 8, "Helv"
{
GROUPBOX "Taille du curseur", -1, 10, 11, 100, 44, BS_GROUPBOX
AUTORADIOBUTTON "&Petit", IDC_OPT_CURSOR_SMALL, 14, 23, 84, 10, WS_TABSTOP
AUTORADIOBUTTON "&Moyen", IDC_OPT_CURSOR_MEDIUM, 14, 33, 84, 10, WS_TABSTOP
AUTORADIOBUTTON "&Grand", IDC_OPT_CURSOR_LARGE, 14, 43, 84, 10, WS_TABSTOP
GROUPBOX "Taille du curseur", -1, 10, 11, 60, 44, BS_GROUPBOX
AUTORADIOBUTTON "&Petit", IDC_OPT_CURSOR_SMALL, 14, 23, 44, 10, WS_TABSTOP
AUTORADIOBUTTON "&Moyen", IDC_OPT_CURSOR_MEDIUM, 14, 33, 44, 10, WS_TABSTOP
AUTORADIOBUTTON "&Grand", IDC_OPT_CURSOR_LARGE, 14, 43, 44, 10, WS_TABSTOP
GROUPBOX "Contrôle", -1, 115, 11, 85, 44, BS_GROUPBOX
LTEXT "Popup menu", -1, 119, 23, 40, 10
AUTOCHECKBOX "&Control", IDC_OPT_CONF_CTRL, 159, 23, 40, 10, WS_TABSTOP
AUTOCHECKBOX "S&hift", IDC_OPT_CONF_SHIFT, 159, 33, 40, 10, WS_TABSTOP
AUTOCHECKBOX "&Edition rapide", IDC_OPT_QUICK_EDIT, 119, 44, 60, 10, WS_TABSTOP|BS_MULTILINE|BS_LEFTTEXT
GROUPBOX "Contrôle", -1, 75, 11, 125, 44, BS_GROUPBOX
LTEXT "Popup menu", -1, 79, 23, 50, 10
AUTOCHECKBOX "&Control", IDC_OPT_CONF_CTRL, 129, 23, 60, 10, WS_TABSTOP
AUTOCHECKBOX "S&hift", IDC_OPT_CONF_SHIFT, 129, 33, 60, 10, WS_TABSTOP
LTEXT "Edition rapide", -1, 79, 43, 50, 10
AUTOCHECKBOX "&activer", IDC_OPT_QUICK_EDIT, 129, 43, 60, 10, WS_TABSTOP
GROUPBOX "Historique des commandes", -1, 10, 57, 190, 35, BS_GROUPBOX
LTEXT "&Taille de la mémoire tampon :", -1, 14, 67, 78, 18
@ -96,4 +97,3 @@ FONT 8, "Helv"
EDITTEXT IDC_CNF_WIN_HEIGHT, 78, 81, 36, 12, WS_TABSTOP|WS_BORDER|ES_NUMBER
CONTROL "", IDC_CNF_WIN_HEIGHT_UD, "msctls_updown32", UDS_SETBUDDYINT|UDS_ALIGNRIGHT|UDS_AUTOBUDDY|UDS_ARROWKEYS|UDS_NOTHOUSANDS, 0, 0, 0, 0
}

View File

@ -21,7 +21,7 @@
/* strings */
#define IDS_EDIT 0x100
#define IDS_DEFAULT 0x101
#define IDS_PROPERTY 0x102
#define IDS_PROPERTIES 0x102
#define IDS_MARK 0x110
#define IDS_COPY 0x111
@ -67,4 +67,3 @@
#define IDC_CNF_WIN_WIDTH_UD 0x0306
#define IDC_CNF_WIN_HEIGHT 0x0307
#define IDC_CNF_WIN_HEIGHT_UD 0x0308

View File

@ -24,3 +24,4 @@
#include "wineconsole_En.rc"
#include "wineconsole_Fr.rc"
#include "wineconsole_De.rc"

View File

@ -270,7 +270,7 @@ static struct screen_buffer *create_console_output( struct console_input *consol
{
console_input->active = (struct screen_buffer*)grab_object( screen_buffer );
/* generate the fist events */
/* generate the initial events */
evt.event = CONSOLE_RENDERER_ACTIVE_SB_EVENT;
console_input_events_append( console_input->evt, &evt );
@ -411,7 +411,7 @@ static int propagate_console_signal_cb(struct process *process, void *user)
return FALSE;
}
static void propagate_console_signal( struct console_input *console,
static void propagate_console_signal( struct console_input *console,
int sig, void* group_id )
{
struct console_signal_info csi;
@ -498,13 +498,13 @@ static int write_console_input( struct console_input* console, int count,
int i = 0;
while (i < count)
{
if (records[i].EventType == KEY_EVENT &&
if (records[i].EventType == KEY_EVENT &&
records[i].Event.KeyEvent.uChar.UnicodeChar == 'C' - 64 &&
!(records[i].Event.KeyEvent.dwControlKeyState & ENHANCED_KEY))
{
if (i != count - 1)
memcpy( &console->records[console->recnum + i],
&console->records[console->recnum + i + 1],
memcpy( &console->records[console->recnum + i],
&console->records[console->recnum + i + 1],
(count - i - 1) * sizeof(INPUT_RECORD) );
count--;
if (records[i].Event.KeyEvent.bKeyDown)
@ -1470,5 +1470,3 @@ DECL_HANDLER(send_console_signal)
else
propagate_console_signal( current->process->console, req->signal, group );
}