Author: dchapyshev
Date: Sat Sep 19 18:04:38 2009
New Revision: 43081
URL:
http://svn.reactos.org/svn/reactos?rev=43081&view=rev
Log:
- Implement "Settings" dialog.
- Implement save of position of a window
- Implement installation/deinstallation logs
- Implement auto updating programs list at start
- Remove unused code from loaddlg.c
- Some small changes bug fixes
Added:
trunk/reactos/base/applications/rapps/rappsmsg.mc (with props)
Modified:
trunk/reactos/base/applications/rapps/available.c
trunk/reactos/base/applications/rapps/installed.c
trunk/reactos/base/applications/rapps/lang/bg-BG.rc
trunk/reactos/base/applications/rapps/lang/de-DE.rc
trunk/reactos/base/applications/rapps/lang/en-US.rc
trunk/reactos/base/applications/rapps/lang/es-ES.rc
trunk/reactos/base/applications/rapps/lang/ja-JP.rc
trunk/reactos/base/applications/rapps/lang/no-NO.rc
trunk/reactos/base/applications/rapps/lang/pl-PL.rc
trunk/reactos/base/applications/rapps/lang/ru-RU.rc
trunk/reactos/base/applications/rapps/lang/sk-SK.rc
trunk/reactos/base/applications/rapps/lang/uk-UA.rc
trunk/reactos/base/applications/rapps/loaddlg.c
trunk/reactos/base/applications/rapps/misc.c
trunk/reactos/base/applications/rapps/rapps.h
trunk/reactos/base/applications/rapps/rapps.rbuild
trunk/reactos/base/applications/rapps/rapps.rc
trunk/reactos/base/applications/rapps/resource.h
trunk/reactos/base/applications/rapps/settingsdlg.c
trunk/reactos/base/applications/rapps/toolbar.c
trunk/reactos/base/applications/rapps/winmain.c
Modified: trunk/reactos/base/applications/rapps/available.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/av…
==============================================================================
--- trunk/reactos/base/applications/rapps/available.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/available.c [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -34,6 +34,76 @@
ADD_TEXT(IDS_AINFO_SIZE, Info->szSize, CFE_BOLD, 0);
ADD_TEXT(IDS_AINFO_URLSITE, Info->szUrlSite, CFE_BOLD, CFE_LINK);
ADD_TEXT(IDS_AINFO_DESCRIPTION, Info->szDesc, CFE_BOLD, 0);
+
+ return TRUE;
+}
+
+static BOOL
+DeleteCurrentAppsDB(VOID)
+{
+ HANDLE hFind = INVALID_HANDLE_VALUE;
+ WIN32_FIND_DATAW FindFileData;
+ WCHAR szCabPath[MAX_PATH];
+ WCHAR szSearchPath[MAX_PATH];
+ WCHAR szPath[MAX_PATH];
+ WCHAR szTmp[MAX_PATH];
+
+ if (!GetCurrentDirectoryW(MAX_PATH, szPath))
+ return FALSE;
+
+ swprintf(szCabPath, L"%s\\rappmgr.cab", szPath);
+
+ if (GetFileAttributesW(szCabPath) != INVALID_FILE_ATTRIBUTES)
+ {
+ if (!DeleteFileW(szCabPath))
+ return FALSE;
+ }
+
+ wcscat(szPath, L"\\rapps\\");
+ swprintf(szSearchPath, L"%s*.txt", szPath);
+
+ hFind = FindFirstFileW(szSearchPath, &FindFileData);
+ if (hFind == INVALID_HANDLE_VALUE)
+ return TRUE;
+
+ do
+ {
+ swprintf(szTmp, L"%s%s", szPath, FindFileData.cFileName);
+ if (!DeleteFileW(szTmp))
+ {
+ FindClose(hFind);
+ return FALSE;
+ }
+ }
+ while (FindNextFileW(hFind, &FindFileData) != 0);
+
+ FindClose(hFind);
+
+ return TRUE;
+}
+
+
+BOOL
+UpdateAppsDB(VOID)
+{
+ WCHAR szPath[MAX_PATH];
+ WCHAR szAppsPath[MAX_PATH];
+ WCHAR szCabPath[MAX_PATH];
+
+ if (!DeleteCurrentAppsDB())
+ return FALSE;
+
+ DownloadApplicationsDB(APPLICATION_DATEBASE_URL);
+
+ if (!GetCurrentDirectoryW(MAX_PATH, szPath))
+ return FALSE;
+
+ swprintf(szCabPath, L"%s\\rappmgr.cab", szPath);
+
+ wcscat(szPath, L"\\rapps\\");
+ wcscpy(szAppsPath, szPath);
+
+ ExtractFilesFromCab(szCabPath, szAppsPath);
return TRUE;
}
@@ -75,10 +145,10 @@
hFind = FindFirstFileW(szPath, &FindFileData);
if (hFind == INVALID_HANDLE_VALUE)
{
- if (GetFileAttributesW(szCabPath) == 0xFFFFFFFF)
- DownloadApplicationsDB(APPLICATION_DATEBASE_URL);
+ if (GetFileAttributesW(szCabPath) == INVALID_FILE_ATTRIBUTES)
+ DownloadApplicationsDB(APPLICATION_DATEBASE_URL);
- ExtractFilesFromCab(szCabPath, szAppsPath);
+ ExtractFilesFromCab(szCabPath, szAppsPath);
hFind = FindFirstFileW(szPath, &FindFileData);
if (hFind == INVALID_HANDLE_VALUE)
return FALSE;
Modified: trunk/reactos/base/applications/rapps/installed.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/in…
==============================================================================
--- trunk/reactos/base/applications/rapps/installed.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/installed.c [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -84,6 +84,7 @@
WCHAR szModify[] = L"ModifyPath";
WCHAR szUninstall[] = L"UninstallString";
WCHAR szPath[MAX_PATH];
+ WCHAR szAppName[MAX_STR_LEN];
DWORD dwType, dwSize;
INT ItemIndex;
LVITEM Item;
@@ -102,6 +103,9 @@
{
ItemIndex = Index;
}
+
+ ListView_GetItemText(hListView, ItemIndex, 0, szAppName, sizeof(szAppName) /
sizeof(WCHAR));
+ WriteLogMessage(EVENTLOG_SUCCESS, MSG_SUCCESS_REMOVE, szAppName);
ZeroMemory(&Item, sizeof(LVITEM));
Modified: trunk/reactos/base/applications/rapps/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/bg-BG.rc [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -4,7 +4,7 @@
BEGIN
POPUP "&Ôàéë"
BEGIN
- MENUITEM "Íà&ñòðîéêè", ID_SETTINGS, GRAYED
+ MENUITEM "Íà&ñòðîéêè", ID_SETTINGS
MENUITEM SEPARATOR
MENUITEM "Èç&õîä", ID_EXIT
END
@@ -44,22 +44,39 @@
END
END
-IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Íàñòðîéêè"
+CAPTION "Settings"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "Äîáðå", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Îòêàç", IDCANCEL, 320, 212, 60, 14
+ GROUPBOX "General", -1, 4, 2, 240, 61
+ AUTOCHECKBOX "&Save window position", IDC_SAVE_WINDOW_POS, 15, 12, 219,
12
+ AUTOCHECKBOX "&Update the list of accessible programs at start",
IDC_UPDATE_AVLIST, 15, 29, 219, 12
+ AUTOCHECKBOX "&Log of installation and removal of programs",
IDC_LOG_ENABLED, 15, 46, 219, 12
+
+ GROUPBOX "Downloading", -1, 4, 65, 240, 51
+ LTEXT "Folder for downloadings:", -1, 16, 75, 100, 9
+ EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
+ PUSHBUTTON "&Choose", IDC_CHOOSE, 187, 85, 50, 14
+ AUTOCHECKBOX "&Delete installers of programs after installation",
IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
+
+ PUSHBUTTON "Default", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
+ PUSHBUTTON "OK", IDOK, 116, 124, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 181, 124, 60, 14
END
-IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Ñâàëÿíå è ñëàãàíå"
+CAPTION "Program installation"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "Äîáðå", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Îòêàç", IDCANCEL, 320, 212, 60, 14
+ LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
+
+ AUTORADIOBUTTON "&Install from a disk (CD or DVD)", IDC_CD_INSTALL, 10,
46, 197, 11, WS_GROUP
+ AUTORADIOBUTTON "&Download and install", IDC_DOWNLOAD_INSTALL, 10, 59,
197, 11, NOT WS_TABSTOP
+
+ PUSHBUTTON "OK", IDOK, 86, 78, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 150, 78, 60, 14
END
IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76
@@ -163,5 +180,7 @@
IDS_AVAILABLEFORINST "Íàëè÷íî çà ñëàãàíå"
IDS_UPDATES "Îáíîâëåíèÿ"
IDS_APPLICATIONS "Ïðèëîæåíèÿ"
- IDS_DOWNLOAD_FOLDER "Ñâàëÿíèÿ"
+ IDS_CHOOSE_FOLDER_TEXT "Choose a folder which will be used for downloading of
programs:"
+ IDS_CHOOSE_FOLDER_ERROR "You have specified a nonexistent folder!"
+ IDS_USER_NOT_ADMIN "You should be administrator for start ""ReactOS
Applications Manager""!"
END
Modified: trunk/reactos/base/applications/rapps/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/de-DE.rc [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -4,7 +4,7 @@
BEGIN
POPUP "&Datei"
BEGIN
- MENUITEM "&Einstellungen", ID_SETTINGS, GRAYED
+ MENUITEM "&Einstellungen", ID_SETTINGS
MENUITEM SEPARATOR
MENUITEM "&Beenden", ID_EXIT
END
@@ -44,22 +44,39 @@
END
END
-IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Einstellungen"
+CAPTION "Settings"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Abbrechen", IDCANCEL, 320, 212, 60, 14
+ GROUPBOX "General", -1, 4, 2, 240, 61
+ AUTOCHECKBOX "&Save window position", IDC_SAVE_WINDOW_POS, 15, 12, 219,
12
+ AUTOCHECKBOX "&Update the list of accessible programs at start",
IDC_UPDATE_AVLIST, 15, 29, 219, 12
+ AUTOCHECKBOX "&Log of installation and removal of programs",
IDC_LOG_ENABLED, 15, 46, 219, 12
+
+ GROUPBOX "Downloading", -1, 4, 65, 240, 51
+ LTEXT "Folder for downloadings:", -1, 16, 75, 100, 9
+ EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
+ PUSHBUTTON "&Choose", IDC_CHOOSE, 187, 85, 50, 14
+ AUTOCHECKBOX "&Delete installers of programs after installation",
IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
+
+ PUSHBUTTON "Default", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
+ PUSHBUTTON "OK", IDOK, 116, 124, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 181, 124, 60, 14
END
-IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Herunterladen und installieren"
+CAPTION "Program installation"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Abbrechen", IDCANCEL, 320, 212, 60, 14
+ LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
+
+ AUTORADIOBUTTON "&Install from a disk (CD or DVD)", IDC_CD_INSTALL, 10,
46, 197, 11, WS_GROUP
+ AUTORADIOBUTTON "&Download and install", IDC_DOWNLOAD_INSTALL, 10, 59,
197, 11, NOT WS_TABSTOP
+
+ PUSHBUTTON "OK", IDOK, 86, 78, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 150, 78, 60, 14
END
IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76
@@ -163,5 +180,7 @@
IDS_AVAILABLEFORINST "Zur Installation verfügbar"
IDS_UPDATES "Updates"
IDS_APPLICATIONS "Anwendungen"
- IDS_DOWNLOAD_FOLDER "Downloads"
+ IDS_CHOOSE_FOLDER_TEXT "Choose a folder which will be used for downloading of
programs:"
+ IDS_CHOOSE_FOLDER_ERROR "You have specified a nonexistent folder!"
+ IDS_USER_NOT_ADMIN "You should be administrator for start ""ReactOS
Applications Manager""!"
END
Modified: trunk/reactos/base/applications/rapps/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/en-US.rc [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -4,7 +4,7 @@
BEGIN
POPUP "&File"
BEGIN
- MENUITEM "&Settings", ID_SETTINGS, GRAYED
+ MENUITEM "&Settings", ID_SETTINGS
MENUITEM SEPARATOR
MENUITEM "E&xit", ID_EXIT
END
@@ -44,22 +44,39 @@
END
END
-IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Settings"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Cancel", IDCANCEL, 320, 212, 60, 14
+ GROUPBOX "General", -1, 4, 2, 240, 61
+ AUTOCHECKBOX "&Save window position", IDC_SAVE_WINDOW_POS, 15, 12, 219,
12
+ AUTOCHECKBOX "&Update the list of accessible programs at start",
IDC_UPDATE_AVLIST, 15, 29, 219, 12
+ AUTOCHECKBOX "&Log of installation and removal of programs",
IDC_LOG_ENABLED, 15, 46, 219, 12
+
+ GROUPBOX "Downloading", -1, 4, 65, 240, 51
+ LTEXT "Folder for downloadings:", -1, 16, 75, 100, 9
+ EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
+ PUSHBUTTON "&Choose", IDC_CHOOSE, 187, 85, 50, 14
+ AUTOCHECKBOX "&Delete installers of programs after installation",
IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
+
+ PUSHBUTTON "Default", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
+ PUSHBUTTON "OK", IDOK, 116, 124, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 181, 124, 60, 14
END
-IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Download and Install"
+CAPTION "Program installation"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Cancel", IDCANCEL, 320, 212, 60, 14
+ LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
+
+ AUTORADIOBUTTON "&Install from a disk (CD or DVD)", IDC_CD_INSTALL, 10,
46, 197, 11, WS_GROUP
+ AUTORADIOBUTTON "&Download and install", IDC_DOWNLOAD_INSTALL, 10, 59,
197, 11, NOT WS_TABSTOP
+
+ PUSHBUTTON "OK", IDOK, 86, 78, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 150, 78, 60, 14
END
IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76
@@ -156,12 +173,14 @@
IDS_UNINSTALL "Uninstall"
IDS_MODIFY "Modify"
IDS_APPS_COUNT "Applications count: %d"
- IDS_WELCOME_TITLE "Welcome to ReactOS Application Manager!\n\n"
+ IDS_WELCOME_TITLE "Welcome to ReactOS Applications Manager!\n\n"
IDS_WELCOME_TEXT "Choose a category on the left, then choose a application for
install or uninstall.\nReactOS Web Site: "
IDS_WELCOME_URL "http://www.reactos.org"
IDS_INSTALLED "Installed"
IDS_AVAILABLEFORINST "Available for installation"
IDS_UPDATES "Updates"
IDS_APPLICATIONS "Applications"
- IDS_DOWNLOAD_FOLDER "Downloads"
+ IDS_CHOOSE_FOLDER_TEXT "Choose a folder which will be used for downloading of
programs:"
+ IDS_CHOOSE_FOLDER_ERROR "You have specified a nonexistent folder!"
+ IDS_USER_NOT_ADMIN "You should be administrator for start ""ReactOS
Applications Manager""!"
END
Modified: trunk/reactos/base/applications/rapps/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/es-ES.rc [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -4,7 +4,7 @@
BEGIN
POPUP "&Archivo"
BEGIN
- MENUITEM "&Ajustes", ID_SETTINGS, GRAYED
+ MENUITEM "&Ajustes", ID_SETTINGS
MENUITEM SEPARATOR
MENUITEM "Sa&lir", ID_EXIT
END
@@ -44,22 +44,39 @@
END
END
-IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Ajustes"
+CAPTION "Settings"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "Aceptar", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Cancelar", IDCANCEL, 320, 212, 60, 14
+ GROUPBOX "General", -1, 4, 2, 240, 61
+ AUTOCHECKBOX "&Save window position", IDC_SAVE_WINDOW_POS, 15, 12, 219,
12
+ AUTOCHECKBOX "&Update the list of accessible programs at start",
IDC_UPDATE_AVLIST, 15, 29, 219, 12
+ AUTOCHECKBOX "&Log of installation and removal of programs",
IDC_LOG_ENABLED, 15, 46, 219, 12
+
+ GROUPBOX "Downloading", -1, 4, 65, 240, 51
+ LTEXT "Folder for downloadings:", -1, 16, 75, 100, 9
+ EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
+ PUSHBUTTON "&Choose", IDC_CHOOSE, 187, 85, 50, 14
+ AUTOCHECKBOX "&Delete installers of programs after installation",
IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
+
+ PUSHBUTTON "Default", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
+ PUSHBUTTON "OK", IDOK, 116, 124, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 181, 124, 60, 14
END
-IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Descargar e Instalar"
+CAPTION "Program installation"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "Aceptar", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Cancelar", IDCANCEL, 320, 212, 60, 14
+ LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
+
+ AUTORADIOBUTTON "&Install from a disk (CD or DVD)", IDC_CD_INSTALL, 10,
46, 197, 11, WS_GROUP
+ AUTORADIOBUTTON "&Download and install", IDC_DOWNLOAD_INSTALL, 10, 59,
197, 11, NOT WS_TABSTOP
+
+ PUSHBUTTON "OK", IDOK, 86, 78, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 150, 78, 60, 14
END
IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76
@@ -156,12 +173,14 @@
IDS_UNINSTALL "Desinstalar"
IDS_MODIFY "Modificar"
IDS_APPS_COUNT "Cantidad de aplicaciones: %d"
- IDS_WELCOME_TITLE "Bienvenido a ReactOS Application Manager!\n\n"
+ IDS_WELCOME_TITLE "Bienvenido a ReactOS Applications Manager!\n\n"
IDS_WELCOME_TEXT "Seleccione una categoría a la izquierda, posteriormente
seleccione la aplicación a instalar o desinstalar.\nReactOS Web: "
IDS_WELCOME_URL "http://www.reactos.org"
IDS_INSTALLED "Instaladas"
IDS_AVAILABLEFORINST "Disponible para instalación"
IDS_UPDATES "Actualizaciones"
IDS_APPLICATIONS "Aplicaciones"
- IDS_DOWNLOAD_FOLDER "Descargas"
+ IDS_CHOOSE_FOLDER_TEXT "Choose a folder which will be used for downloading of
programs:"
+ IDS_CHOOSE_FOLDER_ERROR "You have specified a nonexistent folder!"
+ IDS_USER_NOT_ADMIN "You should be administrator for start ""ReactOS
Applications Manager""!"
END
Modified: trunk/reactos/base/applications/rapps/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/ja-JP.rc [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -4,7 +4,7 @@
BEGIN
POPUP "t@C(&F)"
BEGIN
- MENUITEM "Ýè(&S)", ID_SETTINGS, GRAYED
+ MENUITEM "Ýè(&S)", ID_SETTINGS
MENUITEM SEPARATOR
MENUITEM "I¹(&X)", ID_EXIT
END
@@ -44,22 +44,39 @@
END
END
-IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Ýè"
-FONT 9, "MS UI Gothic"
+CAPTION "Settings"
+FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "LZ", IDCANCEL, 320, 212, 60, 14
+ GROUPBOX "General", -1, 4, 2, 240, 61
+ AUTOCHECKBOX "&Save window position", IDC_SAVE_WINDOW_POS, 15, 12, 219,
12
+ AUTOCHECKBOX "&Update the list of accessible programs at start",
IDC_UPDATE_AVLIST, 15, 29, 219, 12
+ AUTOCHECKBOX "&Log of installation and removal of programs",
IDC_LOG_ENABLED, 15, 46, 219, 12
+
+ GROUPBOX "Downloading", -1, 4, 65, 240, 51
+ LTEXT "Folder for downloadings:", -1, 16, 75, 100, 9
+ EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
+ PUSHBUTTON "&Choose", IDC_CHOOSE, 187, 85, 50, 14
+ AUTOCHECKBOX "&Delete installers of programs after installation",
IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
+
+ PUSHBUTTON "Default", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
+ PUSHBUTTON "OK", IDOK, 116, 124, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 181, 124, 60, 14
END
-IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "_E[hÆCXg["
-FONT 9, "MS UI Gothic"
+CAPTION "Program installation"
+FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "LZ", IDCANCEL, 320, 212, 60, 14
+ LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
+
+ AUTORADIOBUTTON "&Install from a disk (CD or DVD)", IDC_CD_INSTALL, 10,
46, 197, 11, WS_GROUP
+ AUTORADIOBUTTON "&Download and install", IDC_DOWNLOAD_INSTALL, 10, 59,
197, 11, NOT WS_TABSTOP
+
+ PUSHBUTTON "OK", IDOK, 86, 78, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 150, 78, 60, 14
END
IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76
@@ -163,5 +180,7 @@
IDS_AVAILABLEFORINST "CXg[Â\\"
IDS_UPDATES "Abvf[g"
IDS_APPLICATIONS "AvP[V"
- IDS_DOWNLOAD_FOLDER "_E[h"
+ IDS_CHOOSE_FOLDER_TEXT "Choose a folder which will be used for downloading of
programs:"
+ IDS_CHOOSE_FOLDER_ERROR "You have specified a nonexistent folder!"
+ IDS_USER_NOT_ADMIN "You should be administrator for start ""ReactOS
Applications Manager""!"
END
Modified: trunk/reactos/base/applications/rapps/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/no-NO.rc [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -4,7 +4,7 @@
BEGIN
POPUP "&Fil"
BEGIN
- MENUITEM "&Innstillinger", ID_SETTINGS, GRAYED
+ MENUITEM "&Innstillinger", ID_SETTINGS
MENUITEM SEPARATOR
MENUITEM "A&vslutt", ID_EXIT
END
@@ -44,22 +44,39 @@
END
END
-IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Innstillinger"
+CAPTION "Settings"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Avbryt", IDCANCEL, 320, 212, 60, 14
+ GROUPBOX "General", -1, 4, 2, 240, 61
+ AUTOCHECKBOX "&Save window position", IDC_SAVE_WINDOW_POS, 15, 12, 219,
12
+ AUTOCHECKBOX "&Update the list of accessible programs at start",
IDC_UPDATE_AVLIST, 15, 29, 219, 12
+ AUTOCHECKBOX "&Log of installation and removal of programs",
IDC_LOG_ENABLED, 15, 46, 219, 12
+
+ GROUPBOX "Downloading", -1, 4, 65, 240, 51
+ LTEXT "Folder for downloadings:", -1, 16, 75, 100, 9
+ EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
+ PUSHBUTTON "&Choose", IDC_CHOOSE, 187, 85, 50, 14
+ AUTOCHECKBOX "&Delete installers of programs after installation",
IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
+
+ PUSHBUTTON "Default", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
+ PUSHBUTTON "OK", IDOK, 116, 124, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 181, 124, 60, 14
END
-IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Last ned og installere"
+CAPTION "Program installation"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Avbryt", IDCANCEL, 320, 212, 60, 14
+ LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
+
+ AUTORADIOBUTTON "&Install from a disk (CD or DVD)", IDC_CD_INSTALL, 10,
46, 197, 11, WS_GROUP
+ AUTORADIOBUTTON "&Download and install", IDC_DOWNLOAD_INSTALL, 10, 59,
197, 11, NOT WS_TABSTOP
+
+ PUSHBUTTON "OK", IDOK, 86, 78, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 150, 78, 60, 14
END
IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76
@@ -163,5 +180,7 @@
IDS_AVAILABLEFORINST "Tilgjengelig for installasjon"
IDS_UPDATES "Oppdateringer"
IDS_APPLICATIONS "Programmer"
- IDS_DOWNLOAD_FOLDER "Nedlastinger"
+ IDS_CHOOSE_FOLDER_TEXT "Choose a folder which will be used for downloading of
programs:"
+ IDS_CHOOSE_FOLDER_ERROR "You have specified a nonexistent folder!"
+ IDS_USER_NOT_ADMIN "You should be administrator for start ""ReactOS
Applications Manager""!"
END
Modified: trunk/reactos/base/applications/rapps/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/pl-PL.rc [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -6,7 +6,7 @@
BEGIN
POPUP "&Plik"
BEGIN
- MENUITEM "&Ustawienia", ID_SETTINGS, GRAYED
+ MENUITEM "&Ustawienia", ID_SETTINGS
MENUITEM SEPARATOR
MENUITEM "&Wyjcie", ID_EXIT
END
@@ -46,22 +46,39 @@
END
END
-IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Ustawienia"
+CAPTION "Settings"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Anuluj", IDCANCEL, 320, 212, 60, 14
+ GROUPBOX "General", -1, 4, 2, 240, 61
+ AUTOCHECKBOX "&Save window position", IDC_SAVE_WINDOW_POS, 15, 12, 219,
12
+ AUTOCHECKBOX "&Update the list of accessible programs at start",
IDC_UPDATE_AVLIST, 15, 29, 219, 12
+ AUTOCHECKBOX "&Log of installation and removal of programs",
IDC_LOG_ENABLED, 15, 46, 219, 12
+
+ GROUPBOX "Downloading", -1, 4, 65, 240, 51
+ LTEXT "Folder for downloadings:", -1, 16, 75, 100, 9
+ EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
+ PUSHBUTTON "&Choose", IDC_CHOOSE, 187, 85, 50, 14
+ AUTOCHECKBOX "&Delete installers of programs after installation",
IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
+
+ PUSHBUTTON "Default", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
+ PUSHBUTTON "OK", IDOK, 116, 124, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 181, 124, 60, 14
END
-IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "ci¹gnij i zainstaluj"
+CAPTION "Program installation"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Anuluj", IDCANCEL, 320, 212, 60, 14
+ LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
+
+ AUTORADIOBUTTON "&Install from a disk (CD or DVD)", IDC_CD_INSTALL, 10,
46, 197, 11, WS_GROUP
+ AUTORADIOBUTTON "&Download and install", IDC_DOWNLOAD_INSTALL, 10, 59,
197, 11, NOT WS_TABSTOP
+
+ PUSHBUTTON "OK", IDOK, 86, 78, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 150, 78, 60, 14
END
IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76
@@ -165,5 +182,7 @@
IDS_AVAILABLEFORINST "Dostêpne"
IDS_UPDATES "Uaktualnienia"
IDS_APPLICATIONS "Aplikacje"
- IDS_DOWNLOAD_FOLDER "ci¹gniête"
+ IDS_CHOOSE_FOLDER_TEXT "Choose a folder which will be used for downloading of
programs:"
+ IDS_CHOOSE_FOLDER_ERROR "You have specified a nonexistent folder!"
+ IDS_USER_NOT_ADMIN "You should be administrator for start ""ReactOS
Applications Manager""!"
END
Modified: trunk/reactos/base/applications/rapps/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/ru-RU.rc [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -4,7 +4,7 @@
BEGIN
POPUP "&Ôàéë"
BEGIN
- MENUITEM "&Ïàðàìåòðû", ID_SETTINGS, GRAYED
+ MENUITEM "&Ïàðàìåòðû", ID_SETTINGS
MENUITEM SEPARATOR
MENUITEM "&Âûõîä", ID_EXIT
END
@@ -44,22 +44,39 @@
END
END
-IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Ïàðàìåòðû"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Îòìåíà", IDCANCEL, 320, 212, 60, 14
+ GROUPBOX "Îáùèå", -1, 4, 2, 240, 61
+ AUTOCHECKBOX "&Ñîõðàíÿòü ïîëîæåíèå îêíà", IDC_SAVE_WINDOW_POS, 15, 12,
219, 12
+ AUTOCHECKBOX "&Îáíîâëÿòü ñïèñîê äîñòóïíûõ ïðîãðàìì ïðè çàïóñêå",
IDC_UPDATE_AVLIST, 15, 29, 219, 12
+ AUTOCHECKBOX "&Âåñòè ëîã óñòàíîâêè/óäàëåíèÿ ïðîãðàìì", IDC_LOG_ENABLED,
15, 46, 219, 12
+
+ GROUPBOX "Çàãðóçêà", -1, 4, 65, 240, 51
+ LTEXT "Ïàïêà äëÿ çàãðóçîê:", -1, 16, 75, 77, 9
+ EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
+ PUSHBUTTON "Â&ûáðàòü", IDC_CHOOSE, 187, 85, 50, 14
+ AUTOCHECKBOX "&Óäàëÿòü èíñòàëëÿòîðû ïðîãðàìì ïîñëå óñòàíîâêè",
IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
+
+ PUSHBUTTON "Ïî óìîë÷àíèþ", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
+ PUSHBUTTON "OK", IDOK, 116, 124, 60, 14
+ PUSHBUTTON "Îòìåíà", IDCANCEL, 181, 124, 60, 14
END
-IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Ñêà÷àòü è óñòàíîâèòü"
+CAPTION "Óñòàíîâêà ïðîãðàììû"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Îòìåíà", IDCANCEL, 320, 212, 60, 14
+ LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
+
+ AUTORADIOBUTTON "&Óñòàíîâèòü ñ äèñêà", IDC_CD_INSTALL, 10, 46, 197, 11,
WS_GROUP
+ AUTORADIOBUTTON "&Ñêà÷àòü è óñòàíîâèòü", IDC_DOWNLOAD_INSTALL, 10, 59,
197, 11, NOT WS_TABSTOP
+
+ PUSHBUTTON "OK", IDOK, 86, 78, 60, 14
+ PUSHBUTTON "Îòìåíà", IDCANCEL, 150, 78, 60, 14
END
IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76
@@ -113,7 +130,7 @@
IDS_INFO_UPDATEINFO "\nÈíôîðìàöèÿ îá îáíîâëåíèÿõ: "
IDS_INFO_INFOABOUT "\nÈíôîðìàöèÿ î ïðîãðàììå: "
IDS_INFO_COMMENTS "\nÊîììåíòàðèè: "
- IDS_INFO_INSTLOCATION "\nÓñòàíîâëåíî èç: "
+ IDS_INFO_INSTLOCATION "\nÓñòàíîâëåíî â: "
IDS_INFO_INSTALLSRC "\nÈñòî÷íèê óñòàíîâêè: "
IDS_INFO_UNINSTALLSTR "\nÑòðîêà äëÿ óäàëåíèÿ: "
IDS_INFO_MODIFYPATH "\nÑòðîêà äëÿ èçìåíåíèÿ: "
@@ -163,5 +180,7 @@
IDS_AVAILABLEFORINST "Äîñòóïíî äëÿ óñòàíîâêè"
IDS_UPDATES "Îáíîâëåíèÿ"
IDS_APPLICATIONS "Ïðèëîæåíèÿ"
- IDS_DOWNLOAD_FOLDER "Downloads"
+ IDS_CHOOSE_FOLDER_TEXT "Âûáåðèòå ïàïêó, êîòîðàÿ áóäåò èñïîëüçîâàòüñÿ äëÿ çàãðóçêè
ïðîãðàìì:"
+ IDS_CHOOSE_FOLDER_ERROR "Âû óêàçàëè íåñóùåñòâóþùóþ ïàïêó!"
+ IDS_USER_NOT_ADMIN "Âû äîëæíû áûòü àäìèíèñòðàòîðîì äëÿ çàïóñêà
""Ìåíåäæåðà ïðèëîæåíèé ReactOS""!"
END
Modified: trunk/reactos/base/applications/rapps/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/sk-SK.rc [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -9,7 +9,7 @@
BEGIN
POPUP "&Súbor"
BEGIN
- MENUITEM "&Nastavenia", ID_SETTINGS, GRAYED
+ MENUITEM "&Nastavenia", ID_SETTINGS
MENUITEM SEPARATOR
MENUITEM "S&konèi", ID_EXIT
END
@@ -49,22 +49,39 @@
END
END
-IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Nastavenia"
+CAPTION "Settings"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Zrui", IDCANCEL, 320, 212, 60, 14
+ GROUPBOX "General", -1, 4, 2, 240, 61
+ AUTOCHECKBOX "&Save window position", IDC_SAVE_WINDOW_POS, 15, 12, 219,
12
+ AUTOCHECKBOX "&Update the list of accessible programs at start",
IDC_UPDATE_AVLIST, 15, 29, 219, 12
+ AUTOCHECKBOX "&Log of installation and removal of programs",
IDC_LOG_ENABLED, 15, 46, 219, 12
+
+ GROUPBOX "Downloading", -1, 4, 65, 240, 51
+ LTEXT "Folder for downloadings:", -1, 16, 75, 100, 9
+ EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
+ PUSHBUTTON "&Choose", IDC_CHOOSE, 187, 85, 50, 14
+ AUTOCHECKBOX "&Delete installers of programs after installation",
IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
+
+ PUSHBUTTON "Default", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
+ PUSHBUTTON "OK", IDOK, 116, 124, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 181, 124, 60, 14
END
-IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Stiahnu a naintalova"
+CAPTION "Program installation"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "OK", IDOK, 255, 212, 60, 14
- PUSHBUTTON "Zrui", IDCANCEL, 320, 212, 60, 14
+ LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
+
+ AUTORADIOBUTTON "&Install from a disk (CD or DVD)", IDC_CD_INSTALL, 10,
46, 197, 11, WS_GROUP
+ AUTORADIOBUTTON "&Download and install", IDC_DOWNLOAD_INSTALL, 10, 59,
197, 11, NOT WS_TABSTOP
+
+ PUSHBUTTON "OK", IDOK, 86, 78, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 150, 78, 60, 14
END
IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76
@@ -168,5 +185,7 @@
IDS_AVAILABLEFORINST "Dostupné pre naintalovanie"
IDS_UPDATES "Aktualizácie"
IDS_APPLICATIONS "Aplikácie"
- IDS_DOWNLOAD_FOLDER "Sahovania" // Downloads
+ IDS_CHOOSE_FOLDER_TEXT "Choose a folder which will be used for downloading of
programs:"
+ IDS_CHOOSE_FOLDER_ERROR "You have specified a nonexistent folder!"
+ IDS_USER_NOT_ADMIN "You should be administrator for start ""ReactOS
Applications Manager""!"
END
Modified: trunk/reactos/base/applications/rapps/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/uk-UA.rc [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -12,7 +12,7 @@
BEGIN
POPUP "&Ôàéë"
BEGIN
- MENUITEM "&Íàëàøòóâàííÿ", ID_SETTINGS, GRAYED
+ MENUITEM "&Íàëàøòóâàííÿ", ID_SETTINGS
MENUITEM SEPARATOR
MENUITEM "Â&èõ³ä", ID_EXIT
END
@@ -52,22 +52,39 @@
END
END
-IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Íàëàøòóâàííÿ"
+CAPTION "Settings"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "Òàê", IDOK, 255, 212, 60, 14
- PUSHBUTTON "ͳ", IDCANCEL, 320, 212, 60, 14
+ GROUPBOX "General", -1, 4, 2, 240, 61
+ AUTOCHECKBOX "&Save window position", IDC_SAVE_WINDOW_POS, 15, 12, 219,
12
+ AUTOCHECKBOX "&Update the list of accessible programs at start",
IDC_UPDATE_AVLIST, 15, 29, 219, 12
+ AUTOCHECKBOX "&Log of installation and removal of programs",
IDC_LOG_ENABLED, 15, 46, 219, 12
+
+ GROUPBOX "Downloading", -1, 4, 65, 240, 51
+ LTEXT "Folder for downloadings:", -1, 16, 75, 100, 9
+ EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
+ PUSHBUTTON "&Choose", IDC_CHOOSE, 187, 85, 50, 14
+ AUTOCHECKBOX "&Delete installers of programs after installation",
IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
+
+ PUSHBUTTON "Default", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
+ PUSHBUTTON "OK", IDOK, 116, 124, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 181, 124, 60, 14
END
-IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 386, 231
+IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Çàâàíòàæèòè ³ âñòàíîâèòè"
+CAPTION "Program installation"
FONT 8, "MS Shell Dlg"
BEGIN
- PUSHBUTTON "Òàê", IDOK, 255, 212, 60, 14
- PUSHBUTTON "ͳ", IDCANCEL, 320, 212, 60, 14
+ LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
+
+ AUTORADIOBUTTON "&Install from a disk (CD or DVD)", IDC_CD_INSTALL, 10,
46, 197, 11, WS_GROUP
+ AUTORADIOBUTTON "&Download and install", IDC_DOWNLOAD_INSTALL, 10, 59,
197, 11, NOT WS_TABSTOP
+
+ PUSHBUTTON "OK", IDOK, 86, 78, 60, 14
+ PUSHBUTTON "Cancel", IDCANCEL, 150, 78, 60, 14
END
IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76
@@ -171,5 +188,7 @@
IDS_AVAILABLEFORINST "Äîñòóïí³ äëÿ âñòàíîâëåííÿ"
IDS_UPDATES "Îíîâëåííÿ"
IDS_APPLICATIONS "Äîäàòêè"
- IDS_DOWNLOAD_FOLDER "Çàâàíòàæåííÿ"
+ IDS_CHOOSE_FOLDER_TEXT "Choose a folder which will be used for downloading of
programs:"
+ IDS_CHOOSE_FOLDER_ERROR "You have specified a nonexistent folder!"
+ IDS_USER_NOT_ADMIN "You should be administrator for start ""ReactOS
Applications Manager""!"
END
Modified: trunk/reactos/base/applications/rapps/loaddlg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/lo…
==============================================================================
--- trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] Sat Sep 19 18:04:38 2009
@@ -37,6 +37,7 @@
#include <urlmon.h>
static PAPPLICATION_INFO AppInfo;
+static HICON hIcon = NULL;
typedef struct _IBindStatusCallbackImpl
{
@@ -220,31 +221,11 @@
DWORD r;
BOOL bCancelled = FALSE;
BOOL bTempfile = FALSE;
- HKEY hKey = NULL;
- DWORD dwSize = MAX_PATH;
+ BOOL bCab = FALSE;
/* built the path for the download */
p = wcsrchr(AppInfo->szUrlDownload, L'/');
if (!p) goto end;
-
- /* Create default download path */
- if (GetWindowsDirectoryW(path, sizeof(path) / sizeof(WCHAR)))
- {
- WCHAR DPath[MAX_PATH];
- int i;
- for (i = 0; i < 4; i++)
- {
- if (i == 3)
- {
- DPath[i] = '\0';
- break;
- }
- DPath[i] = path[i];
- }
- LoadStringW(hInst, IDS_DOWNLOAD_FOLDER, path, sizeof(path) / sizeof(WCHAR));
- wcscat(DPath, path);
- wcscpy(path, DPath);
- }
if (wcslen(AppInfo->szUrlDownload) > 4)
{
@@ -253,32 +234,18 @@
AppInfo->szUrlDownload[wcslen(AppInfo->szUrlDownload) - 2] ==
'a' &&
AppInfo->szUrlDownload[wcslen(AppInfo->szUrlDownload) - 1] ==
'b')
{
+ bCab = TRUE;
if (!GetCurrentDirectoryW(MAX_PATH, path))
goto end;
}
else
{
- if (RegOpenKeyW(HKEY_LOCAL_MACHINE,
- L"Software\\ReactOS\\rappmgr",
- &hKey) == ERROR_SUCCESS)
- {
- if ((RegQueryValueExW(hKey,
- L"DownloadFolder",
- NULL,
- NULL,
- (LPBYTE)&path,
- &dwSize) != ERROR_SUCCESS) && (path[0]
== 0))
- {
- RegCloseKey(hKey);
- goto end;
- }
- RegCloseKey(hKey);
- }
+ wcscpy(path, SettingsInfo.szDownloadDir);
}
}
else goto end;
- if (GetFileAttributesW(path) == 0xFFFFFFFF)
+ if (GetFileAttributesW(path) == INVALID_FILE_ATTRIBUTES)
{
if (!CreateDirectoryW(path, NULL))
goto end;
@@ -292,36 +259,30 @@
dl = CreateDl(Context, &bCancelled);
r = URLDownloadToFileW(NULL, AppInfo->szUrlDownload, path, 0, dl);
if (dl) IBindStatusCallback_Release(dl);
- if (S_OK != r)
- {
- MessageBoxW(0, L"Download error!", NULL, 0);
- goto end;
- }
- else if (bCancelled)
- {
- goto end;
- }
+ if (S_OK != r) goto end;
+ else if (bCancelled) goto end;
+
ShowWindow(Dlg, SW_HIDE);
/* run it */
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
r = CreateProcessW(path, NULL, NULL, NULL, 0, 0, NULL, NULL, &si, &pi);
- if (0 == r)
- {
- goto end;
- }
+ if (0 == r) goto end;
+
CloseHandle(pi.hThread);
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
- end:
- if (bTempfile)
- {
- if (bCancelled)
- DeleteFileW(path);
- }
+end:
+ if (bTempfile)
+ {
+ if (bCancelled || (SettingsInfo.bDelInstaller && !bCab))
+ DeleteFileW(path);
+ }
+
EndDialog(Dlg, 0);
+
return 0;
}
@@ -336,6 +297,13 @@
switch (Msg)
{
case WM_INITDIALOG:
+
+ hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(IDI_MAIN));
+ if (hIcon)
+ {
+ SendMessageW(Dlg, WM_SETICON, ICON_BIG, (LPARAM) hIcon);
+ SendMessageW(Dlg, WM_SETICON, ICON_SMALL, (LPARAM) hIcon);
+ }
SetWindowLongPtrW(Dlg, GWLP_USERDATA, 0);
Item = GetDlgItem(Dlg, IDC_DOWNLOAD_PROGRESS);
@@ -359,6 +327,7 @@
return FALSE;
case WM_CLOSE:
+ if (hIcon) DestroyIcon(hIcon);
EndDialog(Dlg, 0);
return TRUE;
@@ -375,6 +344,8 @@
AppInfo = (PAPPLICATION_INFO) ListViewGetlParam(Index);
if (!AppInfo) return FALSE;
+
+ WriteLogMessage(EVENTLOG_SUCCESS, MSG_SUCCESS_INSTALL, AppInfo->szName);
DialogBoxW(hInst,
MAKEINTRESOURCEW(IDD_DOWNLOAD_DIALOG),
Modified: trunk/reactos/base/applications/rapps/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/mi…
==============================================================================
--- trunk/reactos/base/applications/rapps/misc.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/misc.c [iso-8859-1] Sat Sep 19 18:04:38 2009
@@ -12,6 +12,8 @@
/* SESSION Operation */
#define EXTRACT_FILLFILELIST 0x00000001
#define EXTRACT_EXTRACTFILES 0x00000002
+
+static HANDLE hLog = NULL;
typedef struct
{
@@ -244,3 +246,106 @@
return FALSE;
}
+
+VOID
+InitLogs(VOID)
+{
+ WCHAR szBuf[MAX_PATH] = L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\ReactOS
Application Manager\\ReactOS Application Manager";
+ WCHAR szPath[MAX_PATH];
+ DWORD dwCategoryNum = 1;
+ DWORD dwDisp, dwData;
+ HKEY hKey;
+
+ if (!SettingsInfo.bLogEnabled) return;
+
+ if (RegCreateKeyExW(HKEY_LOCAL_MACHINE,
+ szBuf, 0, NULL,
+ REG_OPTION_NON_VOLATILE,
+ KEY_WRITE, NULL, &hKey, &dwDisp) != ERROR_SUCCESS)
+ {
+ return;
+ }
+
+ if (!GetCurrentDirectoryW(MAX_PATH, szPath)) return;
+ wcscat(szPath, L"\\rapps.exe");
+
+ if (RegSetValueExW(hKey,
+ L"EventMessageFile",
+ 0,
+ REG_EXPAND_SZ,
+ (LPBYTE)szPath,
+ (DWORD)(wcslen(szPath) + 1) * sizeof(WCHAR)) != ERROR_SUCCESS)
+ {
+ RegCloseKey(hKey);
+ return;
+ }
+
+ dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE |
+ EVENTLOG_INFORMATION_TYPE;
+
+ if (RegSetValueExW(hKey,
+ L"TypesSupported",
+ 0,
+ REG_DWORD,
+ (LPBYTE)&dwData,
+ sizeof(DWORD)) != ERROR_SUCCESS)
+ {
+ RegCloseKey(hKey);
+ return;
+ }
+
+ if (RegSetValueExW(hKey,
+ L"CategoryMessageFile",
+ 0,
+ REG_EXPAND_SZ,
+ (LPBYTE)szPath,
+ (DWORD)(wcslen(szPath) + 1) * sizeof(WCHAR)) != ERROR_SUCCESS)
+ {
+ RegCloseKey(hKey);
+ return;
+ }
+
+ if (RegSetValueExW(hKey,
+ L"CategoryCount",
+ 0,
+ REG_DWORD,
+ (LPBYTE)&dwCategoryNum,
+ sizeof(DWORD)) != ERROR_SUCCESS)
+ {
+ RegCloseKey(hKey);
+ return;
+ }
+
+ RegCloseKey(hKey);
+
+ hLog = RegisterEventSourceW(NULL, L"ReactOS Application Manager");
+}
+
+
+VOID
+FreeLogs(VOID)
+{
+ if (hLog) DeregisterEventSource(hLog);
+}
+
+
+BOOL
+WriteLogMessage(WORD wType, DWORD dwEventID, LPWSTR lpMsg)
+{
+ if (!SettingsInfo.bLogEnabled) return TRUE;
+
+ if (!ReportEventW(hLog,
+ wType,
+ 0,
+ dwEventID,
+ NULL,
+ 1,
+ 0,
+ (LPCWSTR*)&lpMsg,
+ NULL))
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
Modified: trunk/reactos/base/applications/rapps/rapps.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/ra…
==============================================================================
--- trunk/reactos/base/applications/rapps/rapps.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/rapps.h [iso-8859-1] Sat Sep 19 18:04:38 2009
@@ -5,7 +5,10 @@
#include <commctrl.h>
#include <richedit.h>
#include <shlwapi.h>
+#include <shlobj.h>
#include <wchar.h>
+
+#include <rappsmsg.h>
#include "resource.h"
@@ -55,9 +58,9 @@
{
INT Category;
WCHAR szName[MAX_PATH];
- WCHAR szRegName[MAX_PATH];
+ WCHAR szRegName[MAX_PATH];
WCHAR szVersion[MAX_PATH];
- WCHAR szLicence[MAX_PATH];
+ WCHAR szLicence[MAX_PATH];
WCHAR szDesc[MAX_PATH];
WCHAR szSize[MAX_PATH];
WCHAR szUrlSite[MAX_PATH];
@@ -66,10 +69,27 @@
} APPLICATION_INFO, *PAPPLICATION_INFO;
+typedef struct
+{
+ BOOL bSaveWndPos;
+ BOOL bUpdateAtStart;
+ BOOL bLogEnabled;
+ WCHAR szDownloadDir[MAX_PATH];
+ BOOL bDelInstaller;
+ /* Window Pos */
+ BOOL Maximized;
+ INT Left;
+ INT Top;
+ INT Right;
+ INT Bottom;
+
+} SETTINGS_INFO, *PSETTINGS_INFO;
+
/* available.c */
typedef BOOL (CALLBACK *AVAILENUMPROC)(APPLICATION_INFO Info);
BOOL EnumAvailableApplications(INT EnumType, AVAILENUMPROC lpEnumProc);
BOOL ShowAvailableAppInfo(INT Index);
+BOOL UpdateAppsDB(VOID);
/* installdlg.c */
BOOL InstallApplication(INT Index);
@@ -86,6 +106,9 @@
extern HWND hMainWnd;
extern HINSTANCE hInst;
extern INT SelectedEnumType;
+extern SETTINGS_INFO SettingsInfo;
+VOID SaveSettings(HWND hwnd);
+VOID FillDafaultSettings(PSETTINGS_INFO pSettingsInfo);
/* listview.c */
extern HWND hListView;
@@ -111,6 +134,9 @@
VOID ShowPopupMenu(HWND hwnd, UINT MenuID);
BOOL StartProcess(LPWSTR lpPath, BOOL Wait);
BOOL ExtractFilesFromCab(LPWSTR lpCabName, LPWSTR lpOutputPath);
+VOID InitLogs(VOID);
+VOID FreeLogs(VOID);
+BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPWSTR lpMsg);
/* parser.c */
INT ParserGetString(LPCWSTR section, LPCWSTR entry, LPWSTR buffer, UINT len, LPCWSTR
filename);
Modified: trunk/reactos/base/applications/rapps/rapps.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/ra…
==============================================================================
--- trunk/reactos/base/applications/rapps/rapps.rbuild [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/rapps.rbuild [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -1,4 +1,7 @@
+<group>
<module name="rapps" type="win32gui"
installbase="system32" installname="rapps.exe"
unicode="yes">
+ <include base="ReactOS">include/reactos</include>
+ <include base="rapps" root="intermediate">.</include>
<include base="rapps">.</include>
<library>advapi32</library>
@@ -11,6 +14,8 @@
<library>shell32</library>
<library>shlwapi</library>
<library>ntdll</library>
+
+ <dependency>rappsmsg</dependency>
<file>aboutdlg.c</file>
<file>available.c</file>
@@ -29,3 +34,7 @@
<file>winmain.c</file>
<file>rapps.rc</file>
</module>
+<module name="rappsmsg" type="messageheader">
+ <file>rappsmsg.mc</file>
+</module>
+</group>
Modified: trunk/reactos/base/applications/rapps/rapps.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/ra…
==============================================================================
--- trunk/reactos/base/applications/rapps/rapps.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/rapps.rc [iso-8859-1] Sat Sep 19 18:04:38 2009
@@ -37,4 +37,6 @@
1 24 DISCARDABLE "manifest.xml"
+#include <rappsmsg.rc>
+
#include "rsrc.rc"
Added: trunk/reactos/base/applications/rapps/rappsmsg.mc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/ra…
==============================================================================
--- trunk/reactos/base/applications/rapps/rappsmsg.mc (added)
+++ trunk/reactos/base/applications/rapps/rappsmsg.mc [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -1,0 +1,28 @@
+MessageIdTypedef=ULONG
+
+SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS
+Informational=0x1:STATUS_SEVERITY_INFORMATIONAL
+Warning=0x2:STATUS_SEVERITY_WARNING
+Error=0x3:STATUS_SEVERITY_ERROR)
+
+FacilityNames=(System=0x0:FACILITY_SYSTEM Application=0xFFF)
+
+LanguageNames=(English=0x409:MSG00409)
+
+MessageId=1
+Severity=Success
+Facility=Application
+SymbolicName=MSG_SUCCESS_INSTALL
+Language=English
+Installation of the program "%1" is called.
+.
+
+MessageId=2
+Severity=Success
+Facility=Application
+SymbolicName=MSG_SUCCESS_REMOVE
+Language=English
+Removal of the program "%1" is called.
+.
+
+; EOF
Propchange: trunk/reactos/base/applications/rapps/rappsmsg.mc
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/base/applications/rapps/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/re…
==============================================================================
--- trunk/reactos/base/applications/rapps/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/resource.h [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -36,6 +36,16 @@
#define IDC_STATUSBAR 1000
#define IDC_DOWNLOAD_PROGRESS 1001
#define IDC_DOWNLOAD_STATUS 1002
+#define IDC_SAVE_WINDOW_POS 1003
+#define IDC_UPDATE_AVLIST 1004
+#define IDC_DOWNLOAD_DIR_EDIT 1005
+#define IDC_DEL_AFTER_INSTALL 1006
+#define IDC_LOG_ENABLED 1007
+#define IDC_CHOOSE 1008
+#define IDC_DEFAULT_SETTINGS 1009
+#define IDC_INSTALL_TEXT 1010
+#define IDC_CD_INSTALL 1011
+#define IDC_DOWNLOAD_INSTALL 1012
/* Dialogs */
#define IDD_SETTINGS_DIALOG 300
@@ -74,7 +84,9 @@
#define IDS_AVAILABLEFORINST 110
#define IDS_UPDATES 111
#define IDS_APPLICATIONS 112
-#define IDS_DOWNLOAD_FOLDER 113
+#define IDS_CHOOSE_FOLDER_TEXT 113
+#define IDS_CHOOSE_FOLDER_ERROR 114
+#define IDS_USER_NOT_ADMIN 115
/* Tooltips */
#define IDS_TOOLTIP_INSTALL 200
Modified: trunk/reactos/base/applications/rapps/settingsdlg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/se…
==============================================================================
--- trunk/reactos/base/applications/rapps/settingsdlg.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/settingsdlg.c [iso-8859-1] Sat Sep 19 18:04:38
2009
@@ -8,6 +8,48 @@
#include "rapps.h"
+SETTINGS_INFO NewSettingsInfo;
+
+#define IS_CHECKED(a, b) \
+ a = (SendDlgItemMessage(hDlg, b, BM_GETCHECK, 0, 0) == BST_CHECKED) ? TRUE : FALSE
+
+BOOL
+ChooseFolder(HWND hwnd)
+{
+ BROWSEINFO fi;
+ LPCITEMIDLIST lpItemList;
+ WCHAR szPath[MAX_PATH], szBuf[MAX_STR_LEN];
+
+ LoadStringW(hInst, IDS_CHOOSE_FOLDER_TEXT, szBuf, sizeof(szBuf) / sizeof(TCHAR));
+
+ ZeroMemory(&fi, sizeof(BROWSEINFO));
+ fi.hwndOwner = hwnd;
+ fi.lpszTitle = szBuf;
+ fi.ulFlags = BIF_DONTGOBELOWDOMAIN | BIF_RETURNONLYFSDIRS | BIF_BROWSEFORCOMPUTER |
BIF_NEWDIALOGSTYLE;
+ fi.lpfn = NULL;
+ fi.lParam = -1;
+ fi.iImage = 0;
+
+ if (!(lpItemList = SHBrowseForFolder(&fi))) return FALSE;
+ SHGetPathFromIDList(lpItemList, szPath);
+
+ if (wcslen(szPath) == 0) return FALSE;
+ SetDlgItemTextW(hwnd, IDC_DOWNLOAD_DIR_EDIT, szPath);
+
+ return TRUE;
+}
+
+static VOID
+InitSettingsControls(HWND hDlg, SETTINGS_INFO Info)
+{
+ SendDlgItemMessage(hDlg, IDC_SAVE_WINDOW_POS, BM_SETCHECK, Info.bSaveWndPos, 0);
+ SendDlgItemMessage(hDlg, IDC_UPDATE_AVLIST, BM_SETCHECK, Info.bUpdateAtStart, 0);
+ SendDlgItemMessage(hDlg, IDC_LOG_ENABLED, BM_SETCHECK, Info.bLogEnabled, 0);
+ SendDlgItemMessage(hDlg, IDC_DEL_AFTER_INSTALL, BM_SETCHECK, Info.bDelInstaller, 0);
+
+ SetWindowTextW(GetDlgItem(hDlg, IDC_DOWNLOAD_DIR_EDIT),
+ Info.szDownloadDir);
+}
static
INT_PTR CALLBACK
@@ -17,7 +59,8 @@
{
case WM_INITDIALOG:
{
-
+ NewSettingsInfo = SettingsInfo;
+ InitSettingsControls(hDlg, SettingsInfo);
}
break;
@@ -25,10 +68,67 @@
{
switch (LOWORD(wParam))
{
+ case IDC_CHOOSE:
+ ChooseFolder(hDlg);
+ break;
+
+ case IDC_SAVE_WINDOW_POS:
+ IS_CHECKED(NewSettingsInfo.bSaveWndPos, IDC_SAVE_WINDOW_POS);
+ break;
+
+ case IDC_UPDATE_AVLIST:
+ IS_CHECKED(NewSettingsInfo.bUpdateAtStart, IDC_UPDATE_AVLIST);
+ break;
+
+ case IDC_LOG_ENABLED:
+ IS_CHECKED(NewSettingsInfo.bLogEnabled, IDC_LOG_ENABLED);
+ break;
+
+ case IDC_DEL_AFTER_INSTALL:
+ IS_CHECKED(NewSettingsInfo.bDelInstaller, IDC_DEL_AFTER_INSTALL);
+ break;
+
+ case IDC_DEFAULT_SETTINGS:
+ FillDafaultSettings(&NewSettingsInfo);
+ InitSettingsControls(hDlg, NewSettingsInfo);
+ break;
+
case IDOK:
+ {
+ WCHAR szDir[MAX_PATH];
+ DWORD dwAttr;
+
+ GetWindowTextW(GetDlgItem(hDlg, IDC_DOWNLOAD_DIR_EDIT),
+ szDir, MAX_PATH);
+
+ dwAttr = GetFileAttributesW(szDir);
+ if (dwAttr != INVALID_FILE_ATTRIBUTES &&
+ (dwAttr & FILE_ATTRIBUTE_DIRECTORY))
+ {
+ wcscpy(NewSettingsInfo.szDownloadDir, szDir);
+ }
+ else
+ {
+ WCHAR szMsgText[MAX_STR_LEN];
+
+ LoadStringW(hInst,
+ IDS_CHOOSE_FOLDER_ERROR,
+ szMsgText, sizeof(szMsgText) / sizeof(WCHAR));
+
+ MessageBoxW(hDlg, szMsgText, NULL, MB_OK | MB_ICONERROR);
+ SetFocus(GetDlgItem(hDlg, IDC_DOWNLOAD_DIR_EDIT));
+ break;
+ }
+
+ SettingsInfo = NewSettingsInfo;
+ SaveSettings(GetParent(hDlg));
+ EndDialog(hDlg, LOWORD(wParam));
+ }
+ break;
+
case IDCANCEL:
EndDialog(hDlg, LOWORD(wParam));
- break;
+ break;
}
}
break;
Modified: trunk/reactos/base/applications/rapps/toolbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/to…
==============================================================================
--- trunk/reactos/base/applications/rapps/toolbar.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/toolbar.c [iso-8859-1] Sat Sep 19 18:04:38 2009
@@ -26,7 +26,7 @@
{ 5, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},
{ 3, ID_REFRESH, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, {0}, 0, 0},
{ 5, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},
- { 4, ID_SETTINGS, TBSTATE_INDETERMINATE, BTNS_BUTTON | BTNS_AUTOSIZE, {0}, 0, 0},
+ { 4, ID_SETTINGS, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, {0}, 0, 0},
{ 5, ID_EXIT, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, {0}, 0, 0}
};
Modified: trunk/reactos/base/applications/rapps/winmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/wi…
==============================================================================
--- trunk/reactos/base/applications/rapps/winmain.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/winmain.c [iso-8859-1] Sat Sep 19 18:04:38 2009
@@ -13,7 +13,70 @@
HIMAGELIST hImageListView = NULL;
HIMAGELIST hImageTreeView = NULL;
INT SelectedEnumType = ENUM_ALL_COMPONENTS;
-
+SETTINGS_INFO SettingsInfo;
+
+VOID
+FillDafaultSettings(PSETTINGS_INFO pSettingsInfo)
+{
+ pSettingsInfo->bSaveWndPos = TRUE;
+ pSettingsInfo->bUpdateAtStart = FALSE;
+ pSettingsInfo->bLogEnabled = TRUE;
+ wcscpy(pSettingsInfo->szDownloadDir, L"C:\\Downloads");
+ pSettingsInfo->bDelInstaller = FALSE;
+
+ pSettingsInfo->Maximized = FALSE;
+ pSettingsInfo->Left = 0;
+ pSettingsInfo->Top = 0;
+ pSettingsInfo->Right = 680;
+ pSettingsInfo->Bottom = 450;
+}
+
+static BOOL
+LoadSettings(VOID)
+{
+ HKEY hKey;
+ DWORD dwSize;
+
+ if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\ReactOS\\rapps", 0,
KEY_READ, &hKey) == ERROR_SUCCESS)
+ {
+ dwSize = sizeof(SETTINGS_INFO);
+ if (RegQueryValueExW(hKey, L"Settings", NULL, NULL,
(LPBYTE)&SettingsInfo, &dwSize) == ERROR_SUCCESS)
+ {
+ RegCloseKey(hKey);
+ return TRUE;
+ }
+
+ RegCloseKey(hKey);
+ }
+
+ return FALSE;
+}
+
+VOID
+SaveSettings(HWND hwnd)
+{
+ WINDOWPLACEMENT wp;
+ HKEY hKey;
+
+ if (SettingsInfo.bSaveWndPos)
+ {
+ wp.length = sizeof(WINDOWPLACEMENT);
+ GetWindowPlacement(hwnd, &wp);
+
+ SettingsInfo.Left = wp.rcNormalPosition.left;
+ SettingsInfo.Top = wp.rcNormalPosition.top;
+ SettingsInfo.Right = wp.rcNormalPosition.right;
+ SettingsInfo.Bottom = wp.rcNormalPosition.bottom;
+ SettingsInfo.Maximized = (IsZoomed(hwnd) || (wp.flags &
WPF_RESTORETOMAXIMIZED));
+ }
+
+ if (RegCreateKeyExW(HKEY_CURRENT_USER, L"Software\\ReactOS\\rapps", 0,
NULL,
+ REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL) == ERROR_SUCCESS)
+ {
+ RegSetValueEx(hKey, L"Settings", 0, REG_BINARY,
(LPBYTE)&SettingsInfo, sizeof(SETTINGS_INFO));
+ RegCloseKey(hKey);
+ }
+}
VOID
FreeInstalledAppList(VOID)
@@ -226,6 +289,15 @@
BOOL
InitControls(HWND hwnd)
{
+ if (SettingsInfo.bSaveWndPos)
+ {
+ MoveWindow(hwnd, SettingsInfo.Left, SettingsInfo.Top,
+ SettingsInfo.Right - SettingsInfo.Left,
+ SettingsInfo.Bottom - SettingsInfo.Top, TRUE);
+
+ if (SettingsInfo.Maximized) ShowWindow(hwnd, SW_MAXIMIZE);
+ }
+
if (CreateStatusBar(hwnd) &&
CreateToolBar(hwnd) &&
CreateListView(hwnd) &&
@@ -347,7 +419,7 @@
HDWP hdwp = BeginDeferWindowPos(5);
INT SearchBarWidth = GetWindowWidth(hSearchBar);
INT RichPos = GetWindowHeight(hRichEdit);
- INT NewPos = GetClientWindowHeight(hMainWnd) - (RichPos + SPLIT_WIDTH +
GetWindowHeight(hStatusBar));
+ INT NewPos = HIWORD(lParam) - (RichPos + SPLIT_WIDTH + GetWindowHeight(hStatusBar));
INT VSplitterPos;
/* Size status bar */
@@ -387,7 +459,7 @@
while (NewPos < SPLIT_WIDTH + GetWindowHeight(hToolBar))
{
RichPos--;
- NewPos = GetClientWindowHeight(hMainWnd) - (RichPos +
+ NewPos = HIWORD(lParam) - (RichPos +
SPLIT_WIDTH + GetWindowHeight(hStatusBar));
}
SetHSplitterPos(NewPos);
@@ -408,7 +480,7 @@
0,
VSplitterPos + SPLIT_WIDTH,
GetHSplitterPos() + SPLIT_WIDTH,
- GetClientWindowWidth(hMainWnd) - (VSplitterPos + SPLIT_WIDTH),
+ LOWORD(lParam) - (VSplitterPos + SPLIT_WIDTH),
RichPos,
SWP_NOZORDER|SWP_NOACTIVATE);
@@ -418,7 +490,7 @@
0,
VSplitterPos + SPLIT_WIDTH,
GetHSplitterPos(),
- GetClientWindowWidth(hMainWnd) - (VSplitterPos + SPLIT_WIDTH),
+ LOWORD(lParam) - (VSplitterPos + SPLIT_WIDTH),
SPLIT_WIDTH,
SWP_NOZORDER|SWP_NOACTIVATE);
@@ -433,6 +505,9 @@
case WM_CREATE:
if (!InitControls(hwnd))
PostMessage(hwnd, WM_CLOSE, 0, 0);
+
+ if (SettingsInfo.bUpdateAtStart)
+ UpdateAppsDB();
break;
case WM_COMMAND:
@@ -624,12 +699,18 @@
case WM_DESTROY:
{
+ ShowWindow(hwnd, SW_HIDE);
+ SaveSettings(hwnd);
+
+ FreeLogs();
+
if (IS_AVAILABLE_ENUM(SelectedEnumType))
FreeAvailableAppList();
if (IS_INSTALLED_ENUM(SelectedEnumType))
FreeInstalledAppList();
if (hImageListView) ImageList_Destroy(hImageListView);
if (hImageTreeView) ImageList_Destroy(hImageTreeView);
+
PostQuitMessage(0);
return 0;
}
@@ -645,8 +726,18 @@
WNDCLASSEXW WndClass = {0};
WCHAR szWindowClass[] = L"ROSAPPMGR";
WCHAR szWindowName[MAX_STR_LEN];
+ WCHAR szErrorText[MAX_STR_LEN];
HANDLE hMutex = NULL;
MSG Msg;
+
+ hInst = hInstance;
+
+ if (!IsUserAnAdmin())
+ {
+ LoadStringW(hInst, IDS_USER_NOT_ADMIN, szErrorText, sizeof(szErrorText) /
sizeof(WCHAR));
+ MessageBox(0, szErrorText, NULL, MB_OK | MB_ICONWARNING);
+ return 1;
+ }
hMutex = CreateMutexW(NULL, FALSE, szWindowClass);
if ((!hMutex) || (GetLastError() == ERROR_ALREADY_EXISTS))
@@ -660,7 +751,12 @@
return 1;
}
- hInst = hInstance;
+ if (!LoadSettings())
+ {
+ FillDafaultSettings(&SettingsInfo);
+ }
+
+ InitLogs();
InitCommonControls();