Author: dchapyshev
Date: Thu May 1 10:25:12 2008
New Revision: 33215
URL:
http://svn.reactos.org/svn/reactos?rev=33215&view=rev
Log:
- Implement deleting layouts
Modified:
trunk/reactos/dll/cpl/input/lang/bg-BG.rc
trunk/reactos/dll/cpl/input/lang/de-DE.rc
trunk/reactos/dll/cpl/input/lang/el-GR.rc
trunk/reactos/dll/cpl/input/lang/en-US.rc
trunk/reactos/dll/cpl/input/lang/es-ES.rc
trunk/reactos/dll/cpl/input/lang/fr-FR.rc
trunk/reactos/dll/cpl/input/lang/it-IT.rc
trunk/reactos/dll/cpl/input/lang/pl-PL.rc
trunk/reactos/dll/cpl/input/lang/ru-RU.rc
trunk/reactos/dll/cpl/input/lang/sk-SK.rc
trunk/reactos/dll/cpl/input/lang/uk-UA.rc
trunk/reactos/dll/cpl/input/resource.h
trunk/reactos/dll/cpl/input/settings.c
Modified: trunk/reactos/dll/cpl/input/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/bg-BG.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/lang/bg-BG.rc [iso-8859-1] Thu May 1 10:25:12 2008
@@ -85,6 +85,8 @@
IDS_WHATS_THIS "Êàêâî å òîâà?"
IDS_LANGUAGE "Åçèê"
IDS_LAYOUT "Êëàâèàòóðíà ïîäðåäáà"
+ IDS_REM_QUESTION "Do you want to remove selected keyboard layout?"
+ IDS_CONFIRMATION "Confirmation"
END
STRINGTABLE
Modified: trunk/reactos/dll/cpl/input/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/de-DE.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/lang/de-DE.rc [iso-8859-1] Thu May 1 10:25:12 2008
@@ -86,6 +86,8 @@
IDS_WHATS_THIS "Was ist das?"
IDS_LANGUAGE "Sprache"
IDS_LAYOUT "Tastaturlayout"
+ IDS_REM_QUESTION "Do you want to remove selected keyboard layout?"
+ IDS_CONFIRMATION "Confirmation"
END
STRINGTABLE
Modified: trunk/reactos/dll/cpl/input/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/el-GR.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/el-GR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/lang/el-GR.rc [iso-8859-1] Thu May 1 10:25:12 2008
@@ -85,6 +85,8 @@
IDS_WHATS_THIS "Ôé åßíáé áõôü;"
IDS_LANGUAGE "Ãëþóóá"
IDS_LAYOUT "ÄéÜôáîç ðëçêôñïëïãßïõ"
+ IDS_REM_QUESTION "Do you want to remove selected keyboard layout?"
+ IDS_CONFIRMATION "Confirmation"
END
STRINGTABLE
Modified: trunk/reactos/dll/cpl/input/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/en-US.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/lang/en-US.rc [iso-8859-1] Thu May 1 10:25:12 2008
@@ -85,6 +85,8 @@
IDS_WHATS_THIS "What's This?"
IDS_LANGUAGE "Language"
IDS_LAYOUT "Keyboard Layout"
+ IDS_REM_QUESTION "Do you want to remove selected keyboard layout?"
+ IDS_CONFIRMATION "Confirmation"
END
STRINGTABLE
Modified: trunk/reactos/dll/cpl/input/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/es-ES.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/lang/es-ES.rc [iso-8859-1] Thu May 1 10:25:12 2008
@@ -90,6 +90,8 @@
IDS_WHATS_THIS "¿Qué es esto?"
IDS_LANGUAGE "Idioma"
IDS_LAYOUT "Distribución del teclado"
+ IDS_REM_QUESTION "Do you want to remove selected keyboard layout?"
+ IDS_CONFIRMATION "Confirmation"
END
STRINGTABLE
Modified: trunk/reactos/dll/cpl/input/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/fr-FR.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/lang/fr-FR.rc [iso-8859-1] Thu May 1 10:25:12 2008
@@ -85,6 +85,8 @@
IDS_WHATS_THIS "Qu'est-ce que c'est ?"
IDS_LANGUAGE "Language"
IDS_LAYOUT "Keyboard Layout"
+ IDS_REM_QUESTION "Do you want to remove selected keyboard layout?"
+ IDS_CONFIRMATION "Confirmation"
END
/* FIXME : To improve/complete */
Modified: trunk/reactos/dll/cpl/input/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/it-IT.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/lang/it-IT.rc [iso-8859-1] Thu May 1 10:25:12 2008
@@ -85,6 +85,8 @@
IDS_WHATS_THIS "Cosa è questo?"
IDS_LANGUAGE "Lingua"
IDS_LAYOUT "Disposizione tastiera"
+ IDS_REM_QUESTION "Do you want to remove selected keyboard layout?"
+ IDS_CONFIRMATION "Confirmation"
END
STRINGTABLE
Modified: trunk/reactos/dll/cpl/input/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/pl-PL.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/lang/pl-PL.rc [iso-8859-1] Thu May 1 10:25:12 2008
@@ -92,6 +92,8 @@
IDS_WHATS_THIS "Co to jest?"
IDS_LANGUAGE "Jêzyk"
IDS_LAYOUT "Uk³ad klawiatury"
+ IDS_REM_QUESTION "Do you want to remove selected keyboard layout?"
+ IDS_CONFIRMATION "Confirmation"
END
STRINGTABLE
Modified: trunk/reactos/dll/cpl/input/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/ru-RU.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/lang/ru-RU.rc [iso-8859-1] Thu May 1 10:25:12 2008
@@ -85,6 +85,8 @@
IDS_WHATS_THIS "×òî ýòî?"
IDS_LANGUAGE "ßçûê ââîäà"
IDS_LAYOUT "Ðàñêëàäêà"
+ IDS_REM_QUESTION "Âû äåéñòâèòåëüíî õîòèòå óäàëèòü âûáðàííóþ ðàñêëàäêó
êëàâèàòóðû?"
+ IDS_CONFIRMATION "Ïîäòâåðæäåíèå"
END
STRINGTABLE
Modified: trunk/reactos/dll/cpl/input/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/sk-SK.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/lang/sk-SK.rc [iso-8859-1] Thu May 1 10:25:12 2008
@@ -89,6 +89,8 @@
IDS_WHATS_THIS "Èo je toto?"
IDS_LANGUAGE "Language"
IDS_LAYOUT "Keyboard Layout"
+ IDS_REM_QUESTION "Do you want to remove selected keyboard layout?"
+ IDS_CONFIRMATION "Confirmation"
END
STRINGTABLE
Modified: trunk/reactos/dll/cpl/input/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/uk-UA.r…
==============================================================================
--- trunk/reactos/dll/cpl/input/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/lang/uk-UA.rc [iso-8859-1] Thu May 1 10:25:12 2008
@@ -94,6 +94,8 @@
IDS_WHATS_THIS "Ùî öå?"
IDS_LANGUAGE "Language"
IDS_LAYOUT "Keyboard Layout"
+ IDS_REM_QUESTION "Do you want to remove selected keyboard layout?"
+ IDS_CONFIRMATION "Confirmation"
END
STRINGTABLE
Modified: trunk/reactos/dll/cpl/input/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/resource.h?r…
==============================================================================
--- trunk/reactos/dll/cpl/input/resource.h [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/resource.h [iso-8859-1] Thu May 1 10:25:12 2008
@@ -49,6 +49,8 @@
#define IDS_WHATS_THIS 7
#define IDS_LANGUAGE 8
#define IDS_LAYOUT 9
+#define IDS_REM_QUESTION 10
+#define IDS_CONFIRMATION 11
/* Layouts */
#define IDS_US_LAYOUT 5000
Modified: trunk/reactos/dll/cpl/input/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/settings.c?r…
==============================================================================
--- trunk/reactos/dll/cpl/input/settings.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/settings.c [iso-8859-1] Thu May 1 10:25:12 2008
@@ -126,6 +126,7 @@
item.pszText = lItem.IndName;
item.iItem = (INT) dwIndex;
+ item.lParam = (LPARAM)_ttoi(lItem.ValName);
i = ListView_InsertItem(hList, &item);
ListView_SetItemText(hList, i, 1, lItem.LangName);
@@ -153,12 +154,39 @@
static VOID
DeleteLayout(VOID)
{
- INT iIndex;
-
- iIndex = (INT) SendMessage(GetDlgItem(MainDlgWnd, IDC_KEYLAYOUT_LIST),
LVM_GETNEXTITEM, -1, LVNI_FOCUSED);
+ INT iIndex, LayoutNum;
+ LVITEM item;
+ HKEY hKey;
+ HWND hLayoutList = GetDlgItem(MainDlgWnd, IDC_KEYLAYOUT_LIST);
+ TCHAR szLayoutNum[10 + 1], szTitle[MAX_PATH], szConf[MAX_PATH];
+
+ iIndex = (INT) SendMessage(hLayoutList, LVM_GETNEXTITEM, -1, LVNI_FOCUSED);
+
if (iIndex != -1)
{
- MessageBox(0, _T("Not implemented!"), NULL, MB_OK);
+ LoadString(hApplet, IDS_REM_QUESTION, szConf, sizeof(szConf) / sizeof(TCHAR));
+ LoadString(hApplet, IDS_CONFIRMATION, szTitle, sizeof(szTitle) / sizeof(TCHAR));
+
+ if (MessageBox(MainDlgWnd, szConf, szTitle, MB_YESNO | MB_ICONQUESTION) ==
IDYES)
+ {
+ ZeroMemory(&item, sizeof(LVITEM));
+
+ item.mask = LVIF_PARAM;
+ item.iItem = iIndex;
+
+ (VOID) ListView_GetItem(hLayoutList, &item);
+ LayoutNum = (INT) item.lParam;
+
+ if (RegOpenKeyEx(HKEY_CURRENT_USER, _T("Keyboard Layout\\Preload"),
0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS)
+ {
+ _ultot(LayoutNum, szLayoutNum, 10);
+ if (RegDeleteValue(hKey, szLayoutNum) == ERROR_SUCCESS)
+ {
+ UpdateLayoutsList();
+ }
+ }
+ RegCloseKey(hKey);
+ }
}
}