Author: dchapyshev
Date: Fri May 2 02:58:03 2008
New Revision: 33231
URL:
http://svn.reactos.org/svn/reactos?rev=33231&view=rev
Log:
- The division of right and the left menu
- Fix formatting in translations
Modified:
trunk/reactos/base/applications/kbswitch/kbswitch.c
trunk/reactos/base/applications/kbswitch/lang/cs-CZ.rc
trunk/reactos/base/applications/kbswitch/lang/fr-FR.rc
trunk/reactos/base/applications/kbswitch/lang/pl-PL.rc
Modified: trunk/reactos/base/applications/kbswitch/kbswitch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/kbswitch…
==============================================================================
--- trunk/reactos/base/applications/kbswitch/kbswitch.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/kbswitch/kbswitch.c [iso-8859-1] Fri May 2 02:58:03
2008
@@ -272,14 +272,11 @@
}
static HMENU
-BuildPopupMenu()
+BuildLeftPopupMenu()
{
HMENU hMenu;
- HMENU hMenuTemplate;
HKEY hKey;
DWORD dwIndex, dwSize;
- LPTSTR pszMenuItem;
- MENUITEMINFO mii;
TCHAR szLayoutNum[CCH_ULONG_DEC + 1];
TCHAR szName[MAX_PATH];
@@ -303,6 +300,21 @@
RegCloseKey(hKey);
}
+ return hMenu;
+}
+
+static HMENU
+BuildRightPopupMenu()
+{
+ HMENU hMenu;
+ HMENU hMenuTemplate;
+ DWORD dwIndex;
+ LPTSTR pszMenuItem;
+ MENUITEMINFO mii;
+
+ // Add the keyboard layouts to the popup menu
+ hMenu = BuildLeftPopupMenu();
+
// Add the menu items from the popup menu template
hMenuTemplate = GetSubMenu(LoadMenu(hInst, MAKEINTRESOURCE(IDR_POPUP)), 0);
dwIndex = 0;
@@ -340,26 +352,30 @@
LRESULT CALLBACK
WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
- static HMENU hPopupMenu;
+ static HMENU hLeftPopupMenu, hRightPopupMenu;
switch (Message)
{
case WM_CREATE:
AddTrayIcon(hwnd);
- hPopupMenu = BuildPopupMenu(hwnd);
+ hLeftPopupMenu = BuildLeftPopupMenu(hwnd);
+ hRightPopupMenu = BuildRightPopupMenu(hwnd);
break;
case WM_NOTIFYICONMSG:
switch (lParam)
{
+ case WM_RBUTTONDOWN:
case WM_LBUTTONDOWN:
- case WM_RBUTTONDOWN:
{
POINT pt;
GetCursorPos(&pt);
SetForegroundWindow(hwnd);
- TrackPopupMenu(hPopupMenu, 0, pt.x, pt.y, 0, hwnd, NULL);
+ if (lParam == WM_LBUTTONDOWN)
+ TrackPopupMenu(hLeftPopupMenu, 0, pt.x, pt.y, 0, hwnd, NULL);
+ else
+ TrackPopupMenu(hRightPopupMenu, 0, pt.x, pt.y, 0, hwnd, NULL);
PostMessage(hwnd, WM_NULL, 0, 0);
break;
}
@@ -396,7 +412,8 @@
break;
case WM_DESTROY:
- DestroyMenu(hPopupMenu);
+ DestroyMenu(hLeftPopupMenu);
+ DestroyMenu(hRightPopupMenu);
DelTrayIcon(hwnd);
PostQuitMessage(0);
break;
Modified: trunk/reactos/base/applications/kbswitch/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/kbswitch…
==============================================================================
--- trunk/reactos/base/applications/kbswitch/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/kbswitch/lang/cs-CZ.rc [iso-8859-1] Fri May 2
02:58:03 2008
@@ -11,6 +11,6 @@
BEGIN
MENUITEM SEPARATOR
MENUITEM "&Pøedvolby...", ID_PREFERENCES
- MENUITEM "&Ukonèit", ID_EXIT
+ MENUITEM "&Ukonèit", ID_EXIT
END
END
Modified: trunk/reactos/base/applications/kbswitch/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/kbswitch…
==============================================================================
--- trunk/reactos/base/applications/kbswitch/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/kbswitch/lang/fr-FR.rc [iso-8859-1] Fri May 2
02:58:03 2008
@@ -6,6 +6,6 @@
BEGIN
MENUITEM SEPARATOR
MENUITEM "&Préférences...", ID_PREFERENCES
- MENUITEM "Quitt&er", ID_EXIT
+ MENUITEM "Quitt&er", ID_EXIT
END
END
Modified: trunk/reactos/base/applications/kbswitch/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/kbswitch…
==============================================================================
--- trunk/reactos/base/applications/kbswitch/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/kbswitch/lang/pl-PL.rc [iso-8859-1] Fri May 2
02:58:03 2008
@@ -13,6 +13,6 @@
BEGIN
MENUITEM SEPARATOR
MENUITEM "&Ustawienia...", ID_PREFERENCES
- MENUITEM "&Wyjcie", ID_EXIT
+ MENUITEM "&Wyjcie", ID_EXIT
END
END