Dmitry Chapyshev <lentind@yandex.ru>

- Get rid of hardcoded path to downloader.xml, it properly gets the path now. Also changed the logic slightly: now the file is firstly being searched in the local folder, and only then in system32.
- Do a Settings dialog (choose a directory where to download files to, if a user wants to remove installation files after the app has been installed), all options are stored / loaded from the registry. Only the "Update server" option does not work now.
- A few GUI/designs fixes and improvements, now it looks better.
- Add a button for Settings in the main waindow.
- Fixed code formatting in a few places.
- Change bitmap to icons on the Update and Help buttons, imho it's the proper way.
- Add 3 new categories to the list.
- Other misc fixes.
- All translated resources are updated, so no translations are lost!

svn path=/trunk/; revision=29614
This commit is contained in:
Aleksey Bragin 2007-10-15 20:45:06 +00:00
parent bda7147058
commit ef1f939e4f
22 changed files with 790 additions and 246 deletions

View file

@ -5,6 +5,7 @@
* COPYRIGHT: Copyright 2001 John R. Sheets (for CodeWeavers)
* Copyright 2004 Mike McCormack (for CodeWeavers)
* Copyright 2005 Ge van Geldorp (gvg@reactos.org)
* Copyright 2007 Dmitry Chapyshev ()lentind@yandex.ru)
*/
/*
* Based on Wine dlls/shdocvw/shdocvw_main.c
@ -52,17 +53,16 @@ typedef struct _IBindStatusCallbackImpl
static HRESULT WINAPI
dlQueryInterface(IBindStatusCallback* This, REFIID riid, void** ppvObject)
{
if (NULL == ppvObject)
if (NULL == ppvObject)
{
return E_POINTER;
return E_POINTER;
}
if (IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IBindStatusCallback))
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IBindStatusCallback))
{
IBindStatusCallback_AddRef( This );
*ppvObject = This;
return S_OK;
IBindStatusCallback_AddRef( This );
*ppvObject = This;
return S_OK;
}
return E_NOINTERFACE;
@ -71,120 +71,119 @@ dlQueryInterface(IBindStatusCallback* This, REFIID riid, void** ppvObject)
static ULONG WINAPI
dlAddRef(IBindStatusCallback* iface)
{
IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
return InterlockedIncrement(&This->ref);
return InterlockedIncrement(&This->ref);
}
static ULONG WINAPI
dlRelease(IBindStatusCallback* iface)
{
IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
DWORD ref = InterlockedDecrement(&This->ref);
IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
DWORD ref = InterlockedDecrement(&This->ref);
if( !ref )
if( !ref )
{
DestroyWindow( This->hDialog );
HeapFree(GetProcessHeap(), 0, This);
DestroyWindow( This->hDialog );
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
return ref;
}
static HRESULT WINAPI
dlOnStartBinding(IBindStatusCallback* iface, DWORD dwReserved, IBinding* pib)
{
DPRINT1("OnStartBinding not implemented\n");
DPRINT1("OnStartBinding not implemented\n");
return S_OK;
return S_OK;
}
static HRESULT WINAPI
dlGetPriority(IBindStatusCallback* iface, LONG* pnPriority)
{
DPRINT1("GetPriority not implemented\n");
DPRINT1("GetPriority not implemented\n");
return S_OK;
return S_OK;
}
static HRESULT WINAPI
dlOnLowResource( IBindStatusCallback* iface, DWORD reserved)
{
DPRINT1("OnLowResource not implemented\n");
DPRINT1("OnLowResource not implemented\n");
return S_OK;
return S_OK;
}
static HRESULT WINAPI
dlOnProgress(IBindStatusCallback* iface, ULONG ulProgress,
ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
{
IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
HWND Item;
LONG r;
WCHAR OldText[100];
IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
HWND Item;
LONG r;
WCHAR OldText[100];
Item = GetDlgItem(This->hDialog, IDC_PROGRESS);
if (NULL != Item && 0 != ulProgressMax)
Item = GetDlgItem(This->hDialog, IDC_PROGRESS);
if (NULL != Item && 0 != ulProgressMax)
{
SendMessageW(Item, PBM_SETPOS, (ulProgress * 100) / ulProgressMax, 0);
SendMessageW(Item, PBM_SETPOS, (ulProgress * 100) / ulProgressMax, 0);
}
Item = GetDlgItem(This->hDialog, IDC_STATUS);
if (NULL != Item && NULL != szStatusText)
Item = GetDlgItem(This->hDialog, IDC_STATUS);
if (NULL != Item && NULL != szStatusText)
{
SendMessageW(Item, WM_GETTEXT, sizeof(OldText) / sizeof(OldText[0]),
(LPARAM) OldText);
if (sizeof(OldText) / sizeof(OldText[0]) - 1 <= wcslen(OldText) ||
0 != wcscmp(OldText, szStatusText))
SendMessageW(Item, WM_GETTEXT, sizeof(OldText) / sizeof(OldText[0]),
(LPARAM) OldText);
if (sizeof(OldText) / sizeof(OldText[0]) - 1 <= wcslen(OldText) || 0 != wcscmp(OldText, szStatusText))
{
SendMessageW(Item, WM_SETTEXT, 0, (LPARAM) szStatusText);
SendMessageW(Item, WM_SETTEXT, 0, (LPARAM) szStatusText);
}
}
SetLastError(0);
r = GetWindowLongPtrW(This->hDialog, GWLP_USERDATA);
if (0 != r || 0 != GetLastError())
SetLastError(0);
r = GetWindowLongPtrW(This->hDialog, GWLP_USERDATA);
if (0 != r || 0 != GetLastError())
{
*This->pbCancelled = TRUE;
DPRINT("Cancelled\n");
return E_ABORT;
*This->pbCancelled = TRUE;
DPRINT("Cancelled\n");
return E_ABORT;
}
return S_OK;
return S_OK;
}
static HRESULT WINAPI
dlOnStopBinding(IBindStatusCallback* iface, HRESULT hresult, LPCWSTR szError)
{
DPRINT1("OnStopBinding not implemented\n");
DPRINT1("OnStopBinding not implemented\n");
return S_OK;
return S_OK;
}
static HRESULT WINAPI
dlGetBindInfo(IBindStatusCallback* iface, DWORD* grfBINDF, BINDINFO* pbindinfo)
{
DPRINT1("GetBindInfo not implemented\n");
DPRINT1("GetBindInfo not implemented\n");
return S_OK;
return S_OK;
}
static HRESULT WINAPI
dlOnDataAvailable(IBindStatusCallback* iface, DWORD grfBSCF,
DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed)
{
DPRINT1("OnDataAvailable implemented\n");
DPRINT1("OnDataAvailable implemented\n");
return S_OK;
return S_OK;
}
static HRESULT WINAPI
dlOnObjectAvailable(IBindStatusCallback* iface, REFIID riid, IUnknown* punk)
{
DPRINT1("OnObjectAvailable implemented\n");
DPRINT1("OnObjectAvailable implemented\n");
return S_OK;
return S_OK;
}
static const IBindStatusCallbackVtbl dlVtbl =
@ -205,93 +204,124 @@ static const IBindStatusCallbackVtbl dlVtbl =
static IBindStatusCallback*
CreateDl(HWND Dlg, BOOL *pbCancelled)
{
IBindStatusCallbackImpl *This;
IBindStatusCallbackImpl *This;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(IBindStatusCallbackImpl));
This->vtbl = &dlVtbl;
This->ref = 1;
This->hDialog = Dlg;
This->pbCancelled = pbCancelled;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(IBindStatusCallbackImpl));
This->vtbl = &dlVtbl;
This->ref = 1;
This->hDialog = Dlg;
This->pbCancelled = pbCancelled;
return (IBindStatusCallback*) This;
return (IBindStatusCallback*) This;
}
static DWORD WINAPI
ThreadFunc(LPVOID Context)
{
//static const WCHAR szUrl[] = DownloadUrl;
IBindStatusCallback *dl;
WCHAR path[MAX_PATH];
LPWSTR p;
STARTUPINFOW si;
PROCESS_INFORMATION pi;
HWND Dlg = (HWND) Context;
DWORD r;
BOOL bCancelled = FALSE;
BOOL bTempfile = FALSE;
//static const WCHAR szUrl[] = DownloadUrl;
IBindStatusCallback *dl;
WCHAR path[MAX_PATH];
LPWSTR p;
STARTUPINFOW si;
PROCESS_INFORMATION pi;
HWND Dlg = (HWND) Context;
DWORD r;
BOOL bCancelled = FALSE;
BOOL bTempfile = FALSE;
HKEY hKey;
/* built the path for the download */
p = wcsrchr(SelectedApplication->Location, L'/');
if (NULL == p)
/* built the path for the download */
p = wcsrchr(SelectedApplication->Location, L'/');
if (NULL == p)
{
goto end;
goto end;
}
if (! GetTempPathW(MAX_PATH, path))
{
goto end;
}
wcscat(path, p + 1);
if (RegOpenKey(HKEY_LOCAL_MACHINE,
TEXT("Software\\ReactOS\\Download!"),
&hKey) != ERROR_SUCCESS)
{
goto end;
}
DWORD dwSize = MAX_PATH;
if (RegQueryValueEx(hKey,
L"DownloadFolder",
NULL,
NULL,
(LPBYTE)&path,
&dwSize) != ERROR_SUCCESS)
{
goto end;
}
if (GetFileAttributes(path) == 0xFFFFFFFF)
if (!CreateDirectory((LPCTSTR)path,NULL))
{
goto end;
}
wcscat(path, L"\\");
wcscat(path, p + 1);
/* download it */
bTempfile = TRUE;
dl = CreateDl(Context, &bCancelled);
r = URLDownloadToFileW(NULL, SelectedApplication->Location, path, 0, dl);
if (NULL != dl)
/* download it */
bTempfile = TRUE;
dl = CreateDl(Context, &bCancelled);
r = URLDownloadToFileW(NULL, SelectedApplication->Location, path, 0, dl);
if (NULL != dl)
{
IBindStatusCallback_Release(dl);
IBindStatusCallback_Release(dl);
}
if (S_OK != r)
if (S_OK != r)
{
MessageBoxW(0,Strings[IDS_DOWNLOAD_ERROR],0,0);
goto end;
MessageBoxW(0,Strings[IDS_DOWNLOAD_ERROR],0,0);
goto end;
}
else if (bCancelled)
else if (bCancelled)
{
goto end;
goto end;
}
ShowWindow(Dlg, SW_HIDE);
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)
/* 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;
goto end;
}
CloseHandle(pi.hThread);
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
end:
if (bTempfile)
{
DeleteFileW(path);
}
EndDialog(Dlg, 0);
return 0;
end:
if (bTempfile)
{
DWORD dwSize = sizeof(DWORD);
DWORD dwValue, dwType = REG_DWORD;
if (RegQueryValueEx(hKey,
L"DeleteInstaller",
NULL,
&dwType,
(LPBYTE)&dwValue,
&dwSize) == ERROR_SUCCESS)
if (dwValue == 0x1)
DeleteFileW(path);
RegCloseKey(hKey);
}
EndDialog(Dlg, 0);
return 0;
}
INT_PTR CALLBACK
DownloadProc(HWND Dlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{
HANDLE Thread;
DWORD ThreadId;
HWND Item;
HANDLE Thread;
DWORD ThreadId;
HWND Item;
switch (Msg)
switch (Msg)
{
case WM_INITDIALOG:/*
case WM_INITDIALOG:/*
Icon = LoadIconW((HINSTANCE) GetWindowLongPtr(Dlg, GWLP_HINSTANCE),
MAKEINTRESOURCEW(IDI_ICON_MAIN));
if (NULL != Icon)
@ -299,12 +329,12 @@ DownloadProc(HWND Dlg, UINT Msg, WPARAM wParam, LPARAM lParam)
SendMessageW(Dlg, WM_SETICON, ICON_BIG, (LPARAM) Icon);
SendMessageW(Dlg, WM_SETICON, ICON_SMALL, (LPARAM) Icon);
}*/
SetWindowLongPtrW(Dlg, GWLP_USERDATA, 0);
Item = GetDlgItem(Dlg, IDC_PROGRESS);
if (NULL != Item)
SetWindowLongPtrW(Dlg, GWLP_USERDATA, 0);
Item = GetDlgItem(Dlg, IDC_PROGRESS);
if (NULL != Item)
{
SendMessageW(Item, PBM_SETRANGE, 0, MAKELPARAM(0,100));
SendMessageW(Item, PBM_SETPOS, 0, 0);
SendMessageW(Item, PBM_SETRANGE, 0, MAKELPARAM(0,100));
SendMessageW(Item, PBM_SETPOS, 0, 0);
}/*
Item = GetDlgItem(Dlg, IDC_REMOVE);
if (NULL != Item)
@ -320,27 +350,27 @@ DownloadProc(HWND Dlg, UINT Msg, WPARAM wParam, LPARAM lParam)
ShowWindow(Item, SW_HIDE);
}
}*/
Thread = CreateThread(NULL, 0, ThreadFunc, Dlg, 0, &ThreadId);
if (NULL == Thread)
{
return FALSE;
}
CloseHandle(Thread);
return TRUE;
Thread = CreateThread(NULL, 0, ThreadFunc, Dlg, 0, &ThreadId);
if (NULL == Thread)
{
return FALSE;
}
CloseHandle(Thread);
return TRUE;
case WM_COMMAND:
if (wParam == IDCANCEL)
{
SetWindowLongPtrW(Dlg, GWLP_USERDATA, 1);
PostMessage(Dlg, WM_CLOSE, 0, 0);
}
return FALSE;
if (wParam == IDCANCEL)
{
SetWindowLongPtrW(Dlg, GWLP_USERDATA, 1);
PostMessage(Dlg, WM_CLOSE, 0, 0);
}
return FALSE;
case WM_CLOSE:
EndDialog(Dlg, 0);
return TRUE;
default:
return FALSE;
return FALSE;
}
}

View file

@ -161,6 +161,12 @@
<location>http://ovh.dl.sourceforge.net/sourceforge/lgames/lmarbles-1.0.6-win32.exe</location>
</application>
</category>
<category name="Science" icon="11">
</category>
<category name="Edutainment" icon="12">
</category>
<category name="Engineering" icon="13">
</category>
<category name="Tools" icon="7">
<application name="7-Zip">
<regname>7-Zip 4.52</regname>

View file

@ -10,28 +10,48 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON "Abbrechen", IDCANCEL, 85, 58, 50, 15, WS_GROUP | WS_TABSTOP
}
IDD_PROF DIALOGEX 6, 6, 267, 95
STYLE WS_BORDER | WS_THICKFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Proferences"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "Download folder:", -1, 6, 10, 140, 8
EDITTEXT IDC_DOWNLOAD_FOLDER_EDIT, 6, 20, 205, 14, WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "C&hoose...", IDC_CHOOSE_BUTTON, 216, 20, 45, 14
AUTOCHECKBOX "&Delete installation files after setup", IDC_DELINST_FILES_CHECKBOX, 8, 40, 210, 10, WS_GROUP
LTEXT "Update server:", -1, 6, 55, 140, 8
EDITTEXT IDC_UPDATE_SERVER_EDIT, 6, 65, 255, 14, WS_VISIBLE | WS_TABSTOP
DEFPUSHBUTTON "&OK", IDOK, 147, 90, 54, 15
PUSHBUTTON "&Cancel", IDCANCEL, 207, 90, 54, 15
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WINDOW_TITLE "Download ! - ReactOS Downloader"
IDS_WELCOME_TITLE "Willkommen im ReactOS Downloader"
IDS_WELCOME "Bitte wählen Sie links eine Kategorie. Dies ist Version 1.0."
IDS_WELCOME "Bitte wählen Sie links eine Kategorie. Dies ist Version 1.1."
IDS_NO_APP_TITLE "Keine Anwendung ausgewählt"
IDS_NO_APP "Bitte wählen Sie eine Anwendung, bevor Sie die Download-Schaltfläche betätigen. Wenn Sie Hilfe benötigen, drücken Sie die Hilfe-Schaltfläche in der oberen rechten Ecke."
IDS_UPDATE_TITLE "Update"
IDS_UPDATE "Diese Funktion wurde noch nicht implementiert."
IDS_HELP_TITLE "Hilfe"
IDS_HELP "Wählen Sie links eine Kategorie, wählen Sie eine Anwendung und drücken Sie die Download-Schaltfläche. Um die Anwendungsinformationen zu aktualisieren, drücken Sie die Schaltfläche neben der Hilfe-Schaltfläche."
IDS_HELP "Wählen Sie links eine Kategorie, wählen Sie eine Anwendung und drücken Sie die Download-Schaltfläche. Um die Anwendungsinformationen zu aktualisieren, drücken Sie die Schaltfläche neben der Hilfe-Schaltfläche."
IDS_NO_APPS "In dieser Kategorie sind bisher noch keine Anwendungen. Sie können helfen, indem Sie Anwendungen hinzufügen."
IDS_CHOOSE_APP "Bitte wählen Sie eine Anwendung."
IDS_CHOOSE_SUB "Bitte wählen Sie eine Unterkategorie."
IDS_CHOOSE_CATEGORY "Bitte wählen Sie eine Kategorie."
IDS_CHOOSE_CATEGORY "Bitte wählen Sie eine Kategorie."
IDS_CHOOSE_BOTH "Bitte wählen Sie eine Unterkategorie oder eine Anwendung."
IDS_XMLERROR_1 "XML Datei nicht gefunden!"
IDS_XMLERROR_2 "XML Datei kann nicht verarbeitet werden!"
IDS_DOWNLOAD_ERROR "Die Datei konnte nicht runtergeladen werden.\nBitte prüfen sie, ob eine Verbindung zum Internet besteht."
IDS_DOWNLOAD_ERROR "Die Datei konnte nicht runtergeladen werden.\nBitte prüfen sie, ob eine Verbindung zum Internet besteht."
IDS_VERSION "Version: "
IDS_LICENCE "Lizenz: "
IDS_MAINTAINER "Maintainer: "
IDS_APPS_TITLE "Anwendungen"
IDS_CATS_TITLE "Kategorien"
IDS_CHOOSE_FOLDER "Please, choose the folder..."
IDS_NOTCREATE_REGKEY "Could not create the registry key."
IDS_DOWNLOAD_FOLDER "Download!"
IDS_UNABLECREATE_FOLDER "Unable to create a folder with this name!"
IDS_UPDATE_URL "http://svn.reactos.org"
END

View file

@ -10,28 +10,48 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON "Cancel", IDCANCEL, 85, 58, 50, 15, WS_GROUP | WS_TABSTOP
}
IDD_PROF DIALOGEX 6, 6, 267, 110
STYLE WS_BORDER | WS_THICKFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Proferences"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "Download folder:", -1, 6, 10, 140, 8
EDITTEXT IDC_DOWNLOAD_FOLDER_EDIT, 6, 20, 205, 14, WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "C&hoose...", IDC_CHOOSE_BUTTON, 216, 20, 45, 14
AUTOCHECKBOX "&Delete installation files after setup", IDC_DELINST_FILES_CHECKBOX, 8, 40, 210, 10, WS_GROUP
LTEXT "Update server:", -1, 6, 55, 140, 8
EDITTEXT IDC_UPDATE_SERVER_EDIT, 6, 65, 255, 14, WS_VISIBLE | WS_TABSTOP
DEFPUSHBUTTON "&OK", IDOK, 147, 90, 54, 15
PUSHBUTTON "&Cancel", IDCANCEL, 207, 90, 54, 15
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WINDOW_TITLE "Download ! - ReactOS Downloader"
IDS_WELCOME_TITLE "Welcome to the ReactOS Downloader"
IDS_WELCOME "Please choose a category on the left. This is version 1.0."
IDS_WELCOME "Please choose a category on the left. This is version 1.1."
IDS_NO_APP_TITLE "No application selected"
IDS_NO_APP "Please select a Application before you click the download button, if you need assistance please click on the question mark button on the top right corner."
IDS_UPDATE_TITLE "Update"
IDS_UPDATE "Sorry this feature is not implemented yet."
IDS_HELP_TITLE "Help"
IDS_HELP "Choose a category on the left, then choose a application and click the download button. To update the application information click the button next to the help button."
IDS_HELP "Choose a category on the left, then choose a application and click the download button. To update the application information click the button next to the help button."
IDS_NO_APPS "Sorry, there no applications in this category yet. You can help and add more applications."
IDS_CHOOSE_APP "Please choose an application."
IDS_CHOOSE_SUB "Please choose a subcategory."
IDS_CHOOSE_CATEGORY "Please choose a category."
IDS_CHOOSE_CATEGORY "Please choose a category."
IDS_CHOOSE_BOTH "Please choose a subcategory or an application."
IDS_XMLERROR_1 "Could not find the xml file !"
IDS_XMLERROR_2 "Could not parse the xml file !"
IDS_DOWNLOAD_ERROR "Unable to download the file.\nPlease check your internet connection."
IDS_DOWNLOAD_ERROR "Unable to download the file.\nPlease check your internet connection."
IDS_VERSION "Version: "
IDS_LICENCE "Licence: "
IDS_MAINTAINER "Maintainer: "
IDS_APPS_TITLE "Applications"
IDS_CATS_TITLE "Categories"
IDS_CHOOSE_FOLDER "Please, choose the folder..."
IDS_NOTCREATE_REGKEY "Could not create the registry key."
IDS_DOWNLOAD_FOLDER "Download!"
IDS_UNABLECREATE_FOLDER "Unable to create a folder with this name!"
IDS_UPDATE_URL "http://svn.reactos.org"
END

View file

@ -10,28 +10,48 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON "Cancel", IDCANCEL, 85, 58, 50, 15, WS_GROUP | WS_TABSTOP
}
IDD_PROF DIALOGEX 6, 6, 267, 95
STYLE WS_BORDER | WS_THICKFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Proferences"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "Download folder:", -1, 6, 10, 140, 8
EDITTEXT IDC_DOWNLOAD_FOLDER_EDIT, 6, 20, 205, 14, WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "C&hoose...", IDC_CHOOSE_BUTTON, 216, 20, 45, 14
AUTOCHECKBOX "&Delete installation files after setup", IDC_DELINST_FILES_CHECKBOX, 8, 40, 210, 10, WS_GROUP
LTEXT "Update server:", -1, 6, 55, 140, 8
EDITTEXT IDC_UPDATE_SERVER_EDIT, 6, 65, 255, 14, WS_VISIBLE | WS_TABSTOP
DEFPUSHBUTTON "&OK", IDOK, 147, 90, 54, 15
PUSHBUTTON "&Cancel", IDCANCEL, 207, 90, 54, 15
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WINDOW_TITLE "¡Descargar! - Descargador de ReactOS"
IDS_WELCOME_TITLE "Bienvenido al descargador de ReactOS"
IDS_WELCOME "Por favor selecciona una categoría de la izquierda. Esta es la versión 1.0."
IDS_WELCOME "Por favor selecciona una categoría de la izquierda. Esta es la versión 1.1."
IDS_NO_APP_TITLE "Ninguna aplicación seleccionada"
IDS_NO_APP "Please select a Application before you click the download button, if you need assistance please click on the question mark button on the top right corner."
IDS_UPDATE_TITLE "Actualizar"
IDS_UPDATE "Perdona esta característica no a sido implementada todavía."
IDS_HELP_TITLE "Ayuda"
IDS_HELP "Selecciona una categoría de la izquierda, entonces selecciona una aplicación y pulda el botón de descargar. Para actualizar la información de la aplicación pulsa el botón junto al botón de ayuda."
IDS_HELP "Selecciona una categoría de la izquierda, entonces selecciona una aplicación y pulda el botón de descargar. Para actualizar la información de la aplicación pulsa el botón junto al botón de ayuda."
IDS_NO_APPS "Perdón, aun no hay ninguna aplicación en esta categoría. Puedes ayudar y añadir más aplicaciones."
IDS_CHOOSE_APP "Por favor selecciona una aplicación."
IDS_CHOOSE_SUB "Por favor selecciona una subcategoría."
IDS_CHOOSE_CATEGORY "Por favor selecciona una categoría."
IDS_CHOOSE_CATEGORY "Por favor selecciona una categoría."
IDS_CHOOSE_BOTH "Por favor selecciona una subcategoria o una aplicación."
IDS_XMLERROR_1 "¡No se a encontrado el archivo xml!"
IDS_XMLERROR_2 "¡No se ha podido analizar el archivo xml!"
IDS_DOWNLOAD_ERROR "Imposible descargar el archivo.\nPor favor verifica tu conexión a internet."
IDS_DOWNLOAD_ERROR "Imposible descargar el archivo.\nPor favor verifica tu conexión a internet."
IDS_VERSION "Version: "
IDS_LICENCE "Licence: "
IDS_MAINTAINER "Maintainer: "
IDS_APPS_TITLE "Applications"
IDS_CATS_TITLE "Categories"
IDS_CHOOSE_FOLDER "Please, choose the folder..."
IDS_NOTCREATE_REGKEY "Could not create the registry key."
IDS_DOWNLOAD_FOLDER "Download!"
IDS_UNABLECREATE_FOLDER "Unable to create a folder with this name!"
IDS_UPDATE_URL "http://svn.reactos.org"
END

View file

@ -10,28 +10,48 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON "Annuler", IDCANCEL, 85, 58, 50, 15, WS_GROUP | WS_TABSTOP
}
IDD_PROF DIALOGEX 6, 6, 267, 95
STYLE WS_BORDER | WS_THICKFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Proferences"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "Download folder:", -1, 6, 10, 140, 8
EDITTEXT IDC_DOWNLOAD_FOLDER_EDIT, 6, 20, 205, 14, WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "C&hoose...", IDC_CHOOSE_BUTTON, 216, 20, 45, 14
AUTOCHECKBOX "&Delete installation files after setup", IDC_DELINST_FILES_CHECKBOX, 8, 40, 210, 10, WS_GROUP
LTEXT "Update server:", -1, 6, 55, 140, 8
EDITTEXT IDC_UPDATE_SERVER_EDIT, 6, 65, 255, 14, WS_VISIBLE | WS_TABSTOP
DEFPUSHBUTTON "&OK", IDOK, 147, 90, 54, 15
PUSHBUTTON "&Cancel", IDCANCEL, 207, 90, 54, 15
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WINDOW_TITLE "Télécharger ! - Téléchargeur de ReactOS"
IDS_WELCOME_TITLE "Bienvenue dans le Téléchargeur de ReactOS"
IDS_WELCOME "Veuillez choisir une catégorie sur la gauche. C'est la version 1.0."
IDS_WELCOME "Veuillez choisir une catégorie sur la gauche. C'est la version 1.1."
IDS_NO_APP_TITLE "Aucune application selectionnée"
IDS_NO_APP "Veuillez sélectionner une application avant de cliquer sur le bouton Télécharger, si vous avez besoin d'aide, veuillez cliquer sur le point d'interrogation dans le coin supérieur droit."
IDS_UPDATE_TITLE "Mise à jour"
IDS_UPDATE "Désolé, cette fonctionnalité n'est pas encore implémentée."
IDS_HELP_TITLE "Aide"
IDS_HELP "Choisissez une catégorie sur la gauche, puis choisissez une application et cliquez sur le bouton Télécharger. Pour mettre à jour les informations sur l'application, cliquez sur le bouton à côté du bouton d'aide."
IDS_HELP "Choisissez une catégorie sur la gauche, puis choisissez une application et cliquez sur le bouton Télécharger. Pour mettre à jour les informations sur l'application, cliquez sur le bouton à côté du bouton d'aide."
IDS_NO_APPS "Désolé, il n'y a pas encore d'application dans cette catégorie. Vous pouvez contribuer et ajouter plus d'applications."
IDS_CHOOSE_APP "Veuillez choisir une application."
IDS_CHOOSE_SUB "Veuillez choisir une sous-catégorie."
IDS_CHOOSE_CATEGORY "Veuillez choisir une catégorie."
IDS_CHOOSE_CATEGORY "Veuillez choisir une catégorie."
IDS_CHOOSE_BOTH "Veuillez choisir une sous-catégorie ou une application."
IDS_XMLERROR_1 "Impossible de trouver le fichier xml !"
IDS_XMLERROR_2 "Impossible d'analyser le fichier xml !"
IDS_DOWNLOAD_ERROR "Impossible de télécharger le fichier.\nVeuillez vérifier votre connexion Internet."
IDS_DOWNLOAD_ERROR "Impossible de télécharger le fichier.\nVeuillez vérifier votre connexion Internet."
IDS_VERSION "Version: "
IDS_LICENCE "Licence: "
IDS_MAINTAINER "Maintainer: "
IDS_APPS_TITLE "Applications"
IDS_CATS_TITLE "Catégories"
IDS_CHOOSE_FOLDER "Please, choose the folder..."
IDS_NOTCREATE_REGKEY "Could not create the registry key."
IDS_DOWNLOAD_FOLDER "Download!"
IDS_UNABLECREATE_FOLDER "Unable to create a folder with this name!"
IDS_UPDATE_URL "http://svn.reactos.org"
END

View file

@ -10,28 +10,48 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON "Batal", IDCANCEL, 85, 58, 50, 15, WS_GROUP | WS_TABSTOP
}
IDD_PROF DIALOGEX 6, 6, 267, 95
STYLE WS_BORDER | WS_THICKFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Proferences"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "Download folder:", -1, 6, 10, 140, 8
EDITTEXT IDC_DOWNLOAD_FOLDER_EDIT, 6, 20, 205, 14, WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "C&hoose...", IDC_CHOOSE_BUTTON, 216, 20, 45, 14
AUTOCHECKBOX "&Delete installation files after setup", IDC_DELINST_FILES_CHECKBOX, 8, 40, 210, 10, WS_GROUP
LTEXT "Update server:", -1, 6, 55, 140, 8
EDITTEXT IDC_UPDATE_SERVER_EDIT, 6, 65, 255, 14, WS_VISIBLE | WS_TABSTOP
DEFPUSHBUTTON "&OK", IDOK, 147, 90, 54, 15
PUSHBUTTON "&Cancel", IDCANCEL, 207, 90, 54, 15
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WINDOW_TITLE "Download ! - ReactOS Downloader"
IDS_WELCOME_TITLE "Selamat datang di ReactOS Downloader"
IDS_WELCOME "Silahkan pilih kategori di sebelah kiri. Ini versi 1.0."
IDS_WELCOME "Silahkan pilih kategori di sebelah kiri. Ini versi 1.1."
IDS_NO_APP_TITLE "Tidak ada aplikasi yang dipilih"
IDS_NO_APP "Silahkan pilih Aplikasi sebelum anda mengklik tombol download, jika anda membutuhkan asistensi silahkan klik pada tombol di sudut kanan atas."
IDS_UPDATE_TITLE "Mutakhirkan"
IDS_UPDATE "Maaf fitur ini belum diimplementasikan."
IDS_HELP_TITLE "Bantuan"
IDS_HELP "Pilih kategori di sisi kiri, lalu pilih aplikasi dan klik tombol download. Untuk memutakhirkan informasi aplikasi klik tombol disebelah tombol bantuan."
IDS_HELP "Pilih kategori di sisi kiri, lalu pilih aplikasi dan klik tombol download. Untuk memutakhirkan informasi aplikasi klik tombol disebelah tombol bantuan."
IDS_NO_APPS "Maaf, belum ada aplikasi dalam kategori ini. Anda dapat membantu dan menambahkan aplikasi lebih banyak."
IDS_CHOOSE_APP "Silahkan pilih aplikasi."
IDS_CHOOSE_SUB "Silahkan pilih subkategori."
IDS_CHOOSE_CATEGORY "Silahkan pilih kategori."
IDS_CHOOSE_CATEGORY "Silahkan pilih kategori."
IDS_CHOOSE_BOTH "Silahkan pilih subkategori atau aplikasi."
IDS_XMLERROR_1 "Tidak dapat menemukan file xml !"
IDS_XMLERROR_2 "Tidak dapat mengurai file xml !"
IDS_DOWNLOAD_ERROR "Tidak bisa mendownload file.\nSilahkan periksa koneksi internet anda."
IDS_DOWNLOAD_ERROR "Tidak bisa mendownload file.\nSilahkan periksa koneksi internet anda."
IDS_VERSION "Versi: "
IDS_LICENCE "Lisensi: "
IDS_MAINTAINER "Pemelihara: "
IDS_APPS_TITLE "Applications"
IDS_CATS_TITLE "Categories"
IDS_CHOOSE_FOLDER "Please, choose the folder..."
IDS_NOTCREATE_REGKEY "Could not create the registry key."
IDS_DOWNLOAD_FOLDER "Download!"
IDS_UNABLECREATE_FOLDER "Unable to create a folder with this name!"
IDS_UPDATE_URL "http://svn.reactos.org"
END

View file

@ -10,28 +10,48 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON "Cancel", IDCANCEL, 85, 58, 50, 15, WS_GROUP | WS_TABSTOP
}
IDD_PROF DIALOGEX 6, 6, 267, 95
STYLE WS_BORDER | WS_THICKFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Proferences"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "Download folder:", -1, 6, 10, 140, 8
EDITTEXT IDC_DOWNLOAD_FOLDER_EDIT, 6, 20, 205, 14, WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "C&hoose...", IDC_CHOOSE_BUTTON, 216, 20, 45, 14
AUTOCHECKBOX "&Delete installation files after setup", IDC_DELINST_FILES_CHECKBOX, 8, 40, 210, 10, WS_GROUP
LTEXT "Update server:", -1, 6, 55, 140, 8
EDITTEXT IDC_UPDATE_SERVER_EDIT, 6, 65, 255, 14, WS_VISIBLE | WS_TABSTOP
DEFPUSHBUTTON "&OK", IDOK, 147, 90, 54, 15
PUSHBUTTON "&Cancel", IDCANCEL, 207, 90, 54, 15
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WINDOW_TITLE "Download ! - ReactOS Downloader"
IDS_WELCOME_TITLE "Benvenuto al ReactOS Downloader"
IDS_WELCOME "Scegli una categoria a sinistra. Questa è la versione 1.0."
IDS_WELCOME "Scegli una categoria a sinistra. Questa è la versione 1.1."
IDS_NO_APP_TITLE "Nessuna applicazione selezionata"
IDS_NO_APP "Scegli una Applicazione prima di premere il bottone di download, se serve assistenza clicca sul punto di domanda nell'angolo in alto a destra."
IDS_UPDATE_TITLE "Aggiorna"
IDS_UPDATE "Funzione non ancora implementata."
IDS_HELP_TITLE "Aiuto"
IDS_HELP "Scegli una categoria a sinistra, poi scegli una applicazione e clicca il bottone download. Per aggiornare le informazioni sulla applicazione clicca il bottone accanto a quello di aiuto."
IDS_HELP "Scegli una categoria a sinistra, poi scegli una applicazione e clicca il bottone download. Per aggiornare le informazioni sulla applicazione clicca il bottone accanto a quello di aiuto."
IDS_NO_APPS "Non ci sono ancora applicazioni in questa categoria. Puoi aiutare aggiungendone altre."
IDS_CHOOSE_APP "Scegli una applicazione."
IDS_CHOOSE_SUB "Scegli una sottocategoria."
IDS_CHOOSE_CATEGORY "Scegli una categoria."
IDS_CHOOSE_CATEGORY "Scegli una categoria."
IDS_CHOOSE_BOTH "Scegli una sottocategoria o una applicazione."
IDS_XMLERROR_1 "File xml non trovato !"
IDS_XMLERROR_2 "Impossibile trattare il contenuto del file xml !"
IDS_DOWNLOAD_ERROR "Download del file impossibile.\nVerifica la connessione a Internet."
IDS_DOWNLOAD_ERROR "Download del file impossibile.\nVerifica la connessione a Internet."
IDS_VERSION "Versione: "
IDS_LICENCE "Licenza: "
IDS_MAINTAINER "Manutentore: "
IDS_APPS_TITLE "Applications"
IDS_CATS_TITLE "Categories"
IDS_CHOOSE_FOLDER "Please, choose the folder..."
IDS_NOTCREATE_REGKEY "Could not create the registry key."
IDS_DOWNLOAD_FOLDER "Download!"
IDS_UNABLECREATE_FOLDER "Unable to create a folder with this name!"
IDS_UPDATE_URL "http://svn.reactos.org"
END

View file

@ -8,32 +8,52 @@ CAPTION "
FONT 8, "MS Shell Dlg"
{
CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER|PBS_SMOOTH,10,10,200,12
LTEXT "", IDC_STATUS, 10, 30, 200, 10, SS_CENTER
LTEXT "", IDC_STATUS, 10, 30, 200, 17, SS_CENTER
PUSHBUTTON "Отмена", IDCANCEL, 85, 58, 50, 15, WS_GROUP | WS_TABSTOP
}
IDD_PROF DIALOGEX 6, 6, 267, 110
STYLE WS_BORDER | WS_THICKFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Настройки"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "Папка для закачки:", -1, 6, 10, 140, 8
EDITTEXT IDC_DOWNLOAD_FOLDER_EDIT, 6, 20, 205, 14, WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&Выбрать...", IDC_CHOOSE_BUTTON, 216, 20, 45, 14
AUTOCHECKBOX "&Удалять установочные файлы после установки", IDC_DELINST_FILES_CHECKBOX, 8, 40, 210, 10, WS_GROUP
LTEXT "Сервер обновлений:", -1, 6, 55, 140, 8
EDITTEXT IDC_UPDATE_SERVER_EDIT, 6, 65, 255, 14, WS_VISIBLE | WS_TABSTOP
DEFPUSHBUTTON "&OK", IDOK, 147, 90, 54, 15
PUSHBUTTON "О&тмена", IDCANCEL, 207, 90, 54, 15
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WINDOW_TITLE "Скачать! - ReactOS Downloader"
IDS_WELCOME_TITLE "Добро пожаловать в ReactOS Downloader"
IDS_WELCOME "Пожалуйста выберите категорию справа. Версия 1.0."
IDS_WINDOW_TITLE "Скачать! - Менеджер закачек ReactOS"
IDS_WELCOME_TITLE "Добро пожаловать в Менеджер закачек ReactOS"
IDS_WELCOME "Пожалуйста выберите категорию справа. Версия 1.1"
IDS_NO_APP_TITLE "Приложение не выбрано"
IDS_NO_APP "Пожалуйста, выберите приложение прежде, чем нажать кнопку загрузки. Если вам нужна справка, то нажмите кнопку со знаком вопроса в верхнем правом углу."
IDS_UPDATE_TITLE "Обновить"
IDS_UPDATE "Извените, данная возможность на данным момент недоступна."
IDS_HELP_TITLE "Справка"
IDS_HELP "Выберите категорию слева, затем выберите приложение и нажмите кнопку загрузки. Для получения информации об обновлениях нажмите кнопку рядом с кнопкой справки."
IDS_HELP "Выберите категорию слева, затем выберите приложение и нажмите кнопку загрузки. Для получения информации об обновлениях нажмите кнопку рядом с кнопкой справки."
IDS_NO_APPS "Извените, на данный момент в этой категории приложений нет, но вы можете помочь добавить их."
IDS_CHOOSE_APP "Пожалуйста выберите приложение."
IDS_CHOOSE_SUB "Пожалуйста выберите подкатегорию."
IDS_CHOOSE_CATEGORY "Пожалуйста выберите категорию."
IDS_CHOOSE_CATEGORY "Пожалуйста выберите категорию."
IDS_CHOOSE_BOTH "Пожалуйста выберите подкатегорию или приложение."
IDS_XMLERROR_1 "Не удалось найти xml-файл!"
IDS_XMLERROR_2 "Не удалось обработать xml-файл!"
IDS_DOWNLOAD_ERROR "Не удается загрузить файл.\nПожалуйста проверьте ваше подключение к интернет."
IDS_DOWNLOAD_ERROR "Не удается загрузить файл.\nПожалуйста проверьте ваше подключение к интернет."
IDS_VERSION "Версия: "
IDS_LICENCE "Лицензия: "
IDS_MAINTAINER "Производитель: "
IDS_APPS_TITLE "Applications"
IDS_CATS_TITLE "Categories"
IDS_APPS_TITLE "Приложения"
IDS_CATS_TITLE "Категории"
IDS_CHOOSE_FOLDER "Пожалуйства выберите папку..."
IDS_NOTCREATE_REGKEY "Не удалось создать ключ в реестре."
IDS_DOWNLOAD_FOLDER "Скачать!"
IDS_UNABLECREATE_FOLDER "Не удалось создать папку с таким именем!"
IDS_UPDATE_URL "http://svn.reactos.org"
END

View file

@ -18,28 +18,48 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON "Скасувати", IDCANCEL, 85, 58, 50, 15, WS_GROUP | WS_TABSTOP
}
IDD_PROF DIALOGEX 6, 6, 267, 95
STYLE WS_BORDER | WS_THICKFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Proferences"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "Download folder:", -1, 6, 10, 140, 8
EDITTEXT IDC_DOWNLOAD_FOLDER_EDIT, 6, 20, 205, 14, WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "C&hoose...", IDC_CHOOSE_BUTTON, 216, 20, 45, 14
AUTOCHECKBOX "&Delete installation files after setup", IDC_DELINST_FILES_CHECKBOX, 8, 40, 210, 10, WS_GROUP
LTEXT "Update server:", -1, 6, 55, 140, 8
EDITTEXT IDC_UPDATE_SERVER_EDIT, 6, 65, 255, 14, WS_VISIBLE | WS_TABSTOP
DEFPUSHBUTTON "&OK", IDOK, 147, 90, 54, 15
PUSHBUTTON "&Cancel", IDCANCEL, 207, 90, 54, 15
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WINDOW_TITLE "Завантажити ! - Завантажувач ReactOS"
IDS_WELCOME_TITLE "Ласкаво просимо у Завантажувач ReactOS"
IDS_WELCOME "Будь ласка виберіть категорію зліва. Це версія 1.0."
IDS_WELCOME "Áóäü ëàñêà âèáåð³òü êàòåãîð³þ çë³âà. Öå âåðñ³ÿ 1.1."
IDS_NO_APP_TITLE "Додаток не вибраний"
IDS_NO_APP "Будь ласка, виберіть додаток перш ніж натиснути кнопку завантаження. Якщо Вам потрібна допомога, натисніть кнопку зі знаком питання у верхньому правому кутку."
IDS_UPDATE_TITLE "Оновити"
IDS_UPDATE "Вибачте, дана можливість ще недоступна."
IDS_HELP_TITLE "Довідка"
IDS_HELP "Виберіть категорію зліва, потім виберіть додаток і натисніть кнопку завантаження. Для отримання інформації про оновлення натисніть кнопку поряд з кнопкою довідки."
IDS_HELP "Âèáåð³òü êàòåãîð³þ çë³âà, ïîò³ì âèáåð³òü äîäàòîê ³ íàòèñí³òü êíîïêó çàâàíòàæåííÿ. Äëÿ îòðèìàííÿ ³íôîðìàö³¿ ïðî îíîâëåííÿ íàòèñí³òü êíîïêó ïîðÿä ç êíîïêîþ äîâ³äêè."
IDS_NO_APPS "Вибачте, в цій категорії ще немає додатків. Ви можете допомогти і додати більше додатків."
IDS_CHOOSE_APP "Будь ласка виберіть додаток."
IDS_CHOOSE_SUB "Будь ласка виберіть підкатегорію."
IDS_CHOOSE_CATEGORY "Будь ласка виберіть категорію."
IDS_CHOOSE_CATEGORY "Áóäü ëàñêà âèáåð³òü êàòåãîð³þ."
IDS_CHOOSE_BOTH "Будь ласка виберіть підкатегорію або додаток."
IDS_XMLERROR_1 "Не вдалося знайти файл xml !"
IDS_XMLERROR_2 "Не вдалося обробити файл xml !"
IDS_DOWNLOAD_ERROR "Неможливо завантажити файл.\nБудь ласка перевірте ваше інтернет-з'єднання."
IDS_DOWNLOAD_ERROR "Íåìîæëèâî çàâàíòàæèòè ôàéë.\nÁóäü ëàñêà ïåðåâ³ðòå âàøå ³íòåðíåò-ç'ºäíàííÿ."
IDS_VERSION "Версія: "
IDS_LICENCE "Ліцензія: "
IDS_MAINTAINER "Виробник: "
IDS_APPS_TITLE "Applications"
IDS_CATS_TITLE "Categories"
IDS_CHOOSE_FOLDER "Please, choose the folder..."
IDS_NOTCREATE_REGKEY "Could not create the registry key."
IDS_DOWNLOAD_FOLDER "Download!"
IDS_UNABLECREATE_FOLDER "Unable to create a folder with this name!"
IDS_UPDATE_URL "http://svn.reactos.org"
END

View file

@ -8,14 +8,14 @@
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include <tchar.h>
#include <stdio.h>
#include <shlwapi.h>
#include <shlobj.h>
#include "resources.h"
#include "structures.h"
#define XML_PATH "C:\\ReactOS\\system32\\downloader.xml"
HWND hwnd, hCategories, hApps, hDownloadButton, hUninstallButton, hUpdateButton, hHelpButton;
HWND hwnd, hCategories, hApps, hDownloadButton, hUninstallButton, hUpdateButton, hHelpButton, hProfButton;
HBITMAP hLogo, hUnderline;
WCHAR* DescriptionHeadline = L"";
WCHAR* DescriptionText = L"";
@ -30,7 +30,8 @@ VOID FreeTree (struct Category* Node);
WCHAR Strings [STRING_COUNT][MAX_STRING_LENGHT];
BOOL getUninstaller(WCHAR* RegName, WCHAR* Uninstaller) {
BOOL
getUninstaller(WCHAR* RegName, WCHAR* Uninstaller) {
const DWORD ArraySize = 200;
@ -69,7 +70,8 @@ BOOL getUninstaller(WCHAR* RegName, WCHAR* Uninstaller) {
return FALSE;
}
void ShowMessage (WCHAR* title, WCHAR* message)
void
ShowMessage (WCHAR* title, WCHAR* message)
{
DescriptionHeadline = title;
DescriptionText = message;
@ -77,7 +79,8 @@ void ShowMessage (WCHAR* title, WCHAR* message)
UpdateWindow(hwnd);
}
void AddItems (HWND hwnd, struct Category* Category, struct Category* Parent)
void
AddItems(HWND hwnd, struct Category* Category, struct Category* Parent)
{
TV_INSERTSTRUCTW Insert;
@ -99,7 +102,8 @@ void AddItems (HWND hwnd, struct Category* Category, struct Category* Parent)
AddItems (hwnd,Category->Children,Category);
}
void CategoryChoosen (HWND hwnd, struct Category* Category)
void
CategoryChoosen(HWND hwnd, struct Category* Category)
{
struct Application* CurrentApplication;
TV_INSERTSTRUCTW Insert;
@ -139,39 +143,84 @@ void CategoryChoosen (HWND hwnd, struct Category* Category)
}
}
BOOL SetupControls (HWND hwnd)
BOOL
SetupControls (HWND hwnd)
{
TV_INSERTSTRUCTW Insert = {0};
HIMAGELIST hImageList;
HINSTANCE hInstance = GetModuleHandle(NULL);
WCHAR Cats[MAX_STRING_LENGHT], Apps[MAX_STRING_LENGHT];
TCHAR Buf[MAX_PATH];
char Tmp[MAX_PATH];
int i;
// Getting downloader.xml path
if(!GetSystemDirectory(Buf,sizeof(Buf)/sizeof(char))) return FALSE;
lstrcat((LPTSTR)Buf, L"\\downloader.xml");
for (i = 0; i < _tcslen(Buf) + 1; i++) Tmp[i] = Buf[i];
// Parse the XML file
if (ProcessXML (XML_PATH, &Root) == FALSE)
if (!ProcessXML(Tmp, &Root))
return FALSE;
LoadStringW(hInstance, IDS_CATS_TITLE, Cats, MAX_STRING_LENGHT);
LoadStringW(hInstance, IDS_APPS_TITLE, Apps, MAX_STRING_LENGHT);
LoadStringW(hInstance, IDS_CATS_TITLE, Cats, MAX_STRING_LENGHT);
LoadStringW(hInstance, IDS_APPS_TITLE, Apps, MAX_STRING_LENGHT);
// Set up the controls
hCategories = CreateWindowExW(0, WC_TREEVIEWW, Cats, WS_CHILD|WS_VISIBLE|WS_BORDER|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_SHOWSELALWAYS,
hCategories = CreateWindowExW(0, WC_TREEVIEWW, Cats,
WS_CHILD|WS_VISIBLE|WS_BORDER|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_SHOWSELALWAYS,
0, 0, 0, 0, hwnd, NULL, hInstance, NULL);
hApps = CreateWindowExW(0, WC_TREEVIEWW, Apps,
WS_CHILD|WS_VISIBLE|WS_BORDER|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_SHOWSELALWAYS,
0, 0, 0, 0, hwnd, NULL, hInstance, NULL);
hApps = CreateWindowExW(0, WC_TREEVIEWW, Apps, WS_CHILD|WS_VISIBLE|WS_BORDER|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_SHOWSELALWAYS,
0, 0, 0, 0, hwnd, NULL, hInstance, NULL);
hLogo = LoadBitmap(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDB_LOGO));
hUnderline = LoadBitmap(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDB_UNDERLINE));
hLogo = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_LOGO));
hUnderline = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_UNDERLINE));
hHelpButton = CreateWindowW (L"Button", L"", WS_CHILD|WS_VISIBLE|BS_BITMAP, 550, 10, 40, 40, hwnd, 0, hInstance, NULL);
hUpdateButton = CreateWindowW (L"Button", L"", WS_CHILD|WS_VISIBLE|BS_BITMAP, 500, 10, 40, 40, hwnd, 0, hInstance, NULL);
hDownloadButton = CreateWindowW (L"Button", L"", WS_CHILD|WS_VISIBLE|BS_BITMAP, 330, 505, 140, 33, hwnd, 0, hInstance, NULL);
hUninstallButton = CreateWindowW (L"Button", L"", WS_CHILD|WS_VISIBLE|BS_BITMAP, 260, 505, 140, 33, hwnd, 0, hInstance, NULL);
SendMessageW(hHelpButton, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)(HANDLE)LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_HELP)));
SendMessageW(hUpdateButton, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,(LPARAM)(HANDLE)LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_UPDATE)));
SendMessageW(hDownloadButton, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,(LPARAM)(HANDLE)LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_DOWNLOAD)));
SendMessageW(hUninstallButton, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,(LPARAM)(HANDLE)LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_UNINSTALL)));
hHelpButton = CreateWindowW(L"Button", L"",
WS_CHILD | WS_VISIBLE | BS_ICON,
550, 10, 40, 40,
hwnd, 0, hInstance, NULL);
hUpdateButton = CreateWindowW(L"Button", L"",
WS_CHILD | WS_VISIBLE | BS_ICON,
450, 10, 40, 40,
hwnd, 0, hInstance, NULL);
hProfButton = CreateWindowW(L"Button", L"",
WS_CHILD | WS_VISIBLE | BS_ICON,
500, 10, 40, 40,
hwnd, 0, hInstance, NULL);
hDownloadButton = CreateWindowW(L"Button", L"",
WS_CHILD | WS_VISIBLE | BS_BITMAP,
330, 505, 140, 33,
hwnd, 0, hInstance, NULL);
hUninstallButton = CreateWindowW(L"Button", L"",
WS_CHILD | WS_VISIBLE | BS_BITMAP,
260, 505, 140, 33,
hwnd, 0, hInstance, NULL);
SendMessageW(hProfButton,
BM_SETIMAGE,
(WPARAM)IMAGE_ICON,
(LPARAM)(HANDLE)LoadIcon(hInstance,MAKEINTRESOURCE(IDI_PROF)));
SendMessageW(hHelpButton,
BM_SETIMAGE,
(WPARAM)IMAGE_ICON,
(LPARAM)(HANDLE)LoadIcon(hInstance, MAKEINTRESOURCE(IDI_HELP)));
SendMessageW(hUpdateButton,
BM_SETIMAGE,
(WPARAM)IMAGE_ICON,
(LPARAM)(HANDLE)LoadIcon(hInstance, MAKEINTRESOURCE(IDI_UPDATE)));
SendMessageW(hDownloadButton,
BM_SETIMAGE,
(WPARAM)IMAGE_BITMAP,
(LPARAM)(HANDLE)LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_DOWNLOAD)));
SendMessageW(hUninstallButton,
BM_SETIMAGE,
(WPARAM)IMAGE_BITMAP,
(LPARAM)(HANDLE)LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_UNINSTALL)));
ShowWindow(hUninstallButton, SW_HIDE);
// Set deflaut entry for hApps
@ -186,17 +235,34 @@ BOOL SetupControls (HWND hwnd)
SendMessageW(hCategories, TVM_SETIMAGELIST, TVSIL_NORMAL, (LPARAM)(HIMAGELIST)hImageList);
SendMessageW(hApps, TVM_SETIMAGELIST, TVSIL_NORMAL, (LPARAM)(HIMAGELIST)hImageList);
ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_0)), NULL);
ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_1)), NULL);
ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_2)), NULL);
ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_3)), NULL);
ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_4)), NULL);
ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_5)), NULL);
ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_6)), NULL);
ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_7)), NULL);
ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_8)), NULL);
ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_9)), NULL);
ImageList_Add(hImageList, LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_10)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_0)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_1)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_2)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_3)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_4)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_5)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_6)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_7)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_8)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_9)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_10)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_11)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_12)), NULL);
ImageList_Add(hImageList,
LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_13)), NULL);
// Fill the TreeViews
AddItems (hCategories, Root.Children, NULL);
@ -204,13 +270,15 @@ BOOL SetupControls (HWND hwnd)
return TRUE;
}
static void ResizeControl (HWND hwnd, int x1, int y1, int x2, int y2)
static void
ResizeControl (HWND hwnd, int x1, int y1, int x2, int y2)
{
// Make resizing a little easier
MoveWindow(hwnd, x1, y1, x2-x1, y2-y1, TRUE);
}
static void DrawBitmap (HDC hdc, int x, int y, HBITMAP hBmp)
static void
DrawBitmap (HDC hdc, int x, int y, HBITMAP hBmp)
{
BITMAP bm;
HDC hdcMem = CreateCompatibleDC(hdc);
@ -222,7 +290,8 @@ static void DrawBitmap (HDC hdc, int x, int y, HBITMAP hBmp)
DeleteDC(hdcMem);
}
static void DrawDescription (HDC hdc, RECT DescriptionRect)
static void
DrawDescription (HDC hdc, RECT DescriptionRect)
{
int i;
HFONT Font;
@ -237,16 +306,16 @@ static void DrawDescription (HDC hdc, RECT DescriptionRect)
// Headline
Font = CreateFont(-16 , 0, 0, 0, FW_EXTRABOLD, FALSE, FALSE, FALSE, ANSI_CHARSET,
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, L"Arial");
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, L"Arial");
SelectObject(hdc, Font);
DrawTextW(hdc, DescriptionHeadline, lstrlenW(DescriptionHeadline), &Rect, DT_SINGLELINE|DT_NOPREFIX);
DeleteObject(Font);
// Description
Font = CreateFont(-13 , 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, L"Arial");
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, L"Arial");
SelectObject(hdc, Font);
Rect.top += 40;
Rect.top += 50;
Rect.bottom = DescriptionRect.bottom-2;
DrawTextW(hdc, DescriptionText, lstrlenW(DescriptionText), &Rect, DT_WORDBREAK|DT_NOPREFIX); // ToDo: Call TabbedTextOut to draw a nice table
DeleteObject(Font);
@ -257,7 +326,7 @@ void showUninstaller() {
int Split_Vertical = 200;
RECT Rect;
GetClientRect(hwnd,&Rect);
GetClientRect(hwnd,&Rect);
ShowWindow(hUninstallButton,SW_SHOW);
MoveWindow(hDownloadButton,(Split_Vertical+Rect.right-Rect.left)/2,Rect.bottom-Rect.top-45,140,35,TRUE);;
}
@ -266,7 +335,7 @@ void hideUninstaller() {
int Split_Vertical = 200;
RECT Rect;
GetClientRect(hwnd,&Rect);
GetClientRect(hwnd,&Rect);
ShowWindow(hUninstallButton,SW_HIDE);
MoveWindow(hDownloadButton,(Split_Vertical+Rect.right-Rect.left)/2-70,Rect.bottom-Rect.top-45,140,35,TRUE);
}
@ -281,10 +350,257 @@ void startUninstaller(WCHAR* Uninstaller) {
CloseHandle(pi.hThread);
// WaitForSingleObject(pi.hProcess, INFINITE); // If you want to wait for the Unistaller
CloseHandle(pi.hProcess);
hideUninstaller();
hideUninstaller();
}
LRESULT CALLBACK WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
BOOL
SaveSettings(HWND hwnd)
{
HKEY hKey;
TCHAR szBuf[MAX_PATH];
if (RegOpenKey(HKEY_LOCAL_MACHINE,
TEXT("Software\\ReactOS\\Download!"),
&hKey) != ERROR_SUCCESS)
return FALSE;
SendMessage(GetDlgItem(hwnd, IDC_DOWNLOAD_FOLDER_EDIT), WM_GETTEXT, sizeof(szBuf)/sizeof(TCHAR), (LPARAM)szBuf);
if (GetFileAttributes(szBuf) == 0xFFFFFFFF)
if (!CreateDirectory((LPCTSTR)szBuf,NULL))
{
LoadString(GetModuleHandle(NULL), IDS_UNABLECREATE_FOLDER, szBuf, sizeof(szBuf) / sizeof(TCHAR));
MessageBox(hwnd, (LPCTSTR)szBuf, NULL, MB_ICONSTOP);
return FALSE;
}
if (RegSetValueEx(hKey,
L"DownloadFolder",
0,
REG_SZ,
(LPBYTE)szBuf,
(DWORD)(sizeof(szBuf) / sizeof(TCHAR))))
return FALSE;
SendMessage(GetDlgItem(hwnd, IDC_UPDATE_SERVER_EDIT), WM_GETTEXT, sizeof(szBuf)/sizeof(TCHAR), (LPARAM)szBuf);
if (RegSetValueEx(hKey,
L"UpdateServer",
0,
REG_SZ,
(LPBYTE)szBuf,
(DWORD)(sizeof(szBuf) / sizeof(TCHAR))))
return FALSE;
DWORD dwValue;
if (SendMessage(GetDlgItem(hwnd, IDC_DELINST_FILES_CHECKBOX), BM_GETCHECK, 0, 0) == BST_CHECKED)
dwValue = 0x1;
else
dwValue = 0x0;
if (RegSetValueEx(hKey,
L"DeleteInstaller",
0,
REG_DWORD,
(LPBYTE)&dwValue,
sizeof(DWORD)))
return FALSE;
RegCloseKey(hKey);
return TRUE;
}
BOOL
InitProfDlg(HWND hwnd)
{
HKEY hKey;
TCHAR Buf[MAX_PATH];
DWORD dwDisp, dwSize;
if (RegOpenKey(HKEY_LOCAL_MACHINE,
TEXT("Software\\ReactOS\\Download!"),
&hKey) != ERROR_SUCCESS)
{
if (RegCreateKeyEx(HKEY_LOCAL_MACHINE, L"Software\\ReactOS\\Download!",
0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hKey, &dwDisp))
{
LoadString(GetModuleHandle(NULL), IDS_NOTCREATE_REGKEY, Buf, sizeof(Buf) / sizeof(TCHAR));
MessageBox(hwnd, (LPCTSTR)Buf, NULL, MB_ICONSTOP);
return FALSE;
}
}
dwSize = MAX_PATH;
if (RegQueryValueEx(hKey,
L"DownloadFolder",
NULL,
NULL,
(LPBYTE)&Buf,
&dwSize) == ERROR_SUCCESS)
{
SendMessage(GetDlgItem(hwnd, IDC_DOWNLOAD_FOLDER_EDIT), WM_SETTEXT, -1, (LPARAM)Buf);
}
else
{
if (!GetWindowsDirectory(Buf, sizeof(Buf) / sizeof(TCHAR))) return FALSE;
TCHAR DPath[256];
int i;
for (i = 0; i < 4; i++)
{
if (i == 3)
{
DPath[i] = '\0';
break;
}
DPath[i] = Buf[i];
}
LoadString(GetModuleHandle(NULL), IDS_DOWNLOAD_FOLDER, Buf, sizeof(Buf) / sizeof(TCHAR));
lstrcat((LPTSTR)DPath, Buf);
if (RegSetValueEx(hKey,
L"DownloadFolder",
0,
REG_SZ,
(LPBYTE)DPath,
(DWORD)(sizeof(DPath) / sizeof(TCHAR))))
return FALSE;
else
{
if (GetFileAttributes(DPath) == 0xFFFFFFFF)
if (!CreateDirectory((LPCTSTR)DPath,NULL)) return FALSE;
SendMessage(GetDlgItem(hwnd, IDC_DOWNLOAD_FOLDER_EDIT), WM_SETTEXT, -1, (LPARAM)DPath);
}
}
dwSize = MAX_PATH;
if (RegQueryValueEx(hKey,
L"UpdateServer",
NULL,
NULL,
(LPBYTE)&Buf,
&dwSize) == ERROR_SUCCESS)
{
SendMessage(GetDlgItem(hwnd, IDC_UPDATE_SERVER_EDIT), WM_SETTEXT, -1, (LPARAM)Buf);
}
else
{
LoadString(GetModuleHandle(NULL), IDS_UPDATE_URL, Buf, sizeof(Buf) / sizeof(TCHAR));
if (RegSetValueEx(hKey,
L"UpdateServer",
0,
REG_SZ,
(LPBYTE)Buf,
(DWORD)(sizeof(Buf) / sizeof(TCHAR))))
return FALSE;
else
{
SendMessage(GetDlgItem(hwnd, IDC_UPDATE_SERVER_EDIT), WM_SETTEXT, -1, (LPARAM)Buf);
}
}
DWORD dwValue, dwType = REG_DWORD;
dwSize = sizeof(DWORD);
if (RegQueryValueEx(hKey,
L"DeleteInstaller",
NULL,
&dwType,
(LPBYTE)&dwValue,
&dwSize) == ERROR_SUCCESS)
{
if (dwValue == 0x1)
SendMessage(GetDlgItem(hwnd, IDC_DELINST_FILES_CHECKBOX), BM_SETCHECK, 1, 1);
}
else
{
dwValue = 0x0;
if (RegSetValueEx(hKey,
L"DeleteInstaller",
0,
REG_DWORD,
(LPBYTE)&dwValue,
sizeof(DWORD)))
return FALSE;
}
RegCloseKey(hKey);
return TRUE;
}
BOOL
ChooseFolder(HWND hwnd)
{
BROWSEINFO fi;
LPCITEMIDLIST lpItemList;
TCHAR szPath[MAX_PATH],Buf[256];
ZeroMemory(&fi, sizeof(BROWSEINFO));
fi.hwndOwner = hwnd;
LoadString(GetModuleHandle(NULL), IDS_CHOOSE_FOLDER, Buf, sizeof(Buf) / sizeof(TCHAR));
fi.lpszTitle = (LPCTSTR)Buf;
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 (_tcslen(szPath) == 0) return FALSE;
SendMessage(GetDlgItem(hwnd, IDC_DOWNLOAD_FOLDER_EDIT), WM_SETTEXT, -1, (LPARAM)szPath);
return TRUE;
}
INT_PTR CALLBACK
ProfDlgProc(HWND hDlg,
UINT message,
WPARAM wParam,
LPARAM lParam)
{
static HICON hIcon;
UNREFERENCED_PARAMETER(lParam);
switch (message)
{
case WM_INITDIALOG:
{
hIcon = LoadImage(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_MAIN),IMAGE_ICON,16,16,0);
SendMessage(hDlg,WM_SETICON,ICON_SMALL,(LPARAM)hIcon);
InitProfDlg(hDlg);
}
break;
case WM_COMMAND:
{
switch (wParam)
{
case IDC_CHOOSE_BUTTON:
ChooseFolder(hDlg);
break;
case IDOK:
{
SaveSettings(hDlg);
DestroyIcon(hIcon);
EndDialog(hDlg,LOWORD(wParam));
return TRUE;
}
break;
case IDCANCEL:
{
DestroyIcon(hIcon);
EndDialog(hDlg,LOWORD(wParam));
return TRUE;
}
break;
}
}
break;
}
return FALSE;
}
LRESULT CALLBACK
WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
static RECT DescriptionRect;
@ -321,6 +637,13 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
if(HIWORD(wParam) == BN_CLICKED)
{
if (lParam == (LPARAM)hProfButton)
{
DialogBox(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDD_PROF),
hwnd,
ProfDlgProc);
}
if (lParam == (LPARAM)hDownloadButton)
{
if(SelectedApplication)
@ -425,7 +748,8 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
DescriptionRect = Rect;
MoveWindow(hHelpButton, LOWORD(lParam)-50, 10, 40, 40, TRUE);
MoveWindow(hUpdateButton, LOWORD(lParam)-100, 10, 40, 40, TRUE);
MoveWindow(hUpdateButton, LOWORD(lParam)-150, 10, 40, 40, TRUE);
MoveWindow(hProfButton, LOWORD(lParam)-100, 10, 40, 40, TRUE);
if(IsWindowVisible(hUninstallButton))
MoveWindow(hDownloadButton, (Split_Vertical+LOWORD(lParam))/2, HIWORD(lParam)-45, 140, 35, TRUE);
else
@ -448,8 +772,11 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
return DefWindowProc (hwnd, Message, wParam, lParam);
}
INT WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInst,
LPTSTR lpCmdLine, INT nCmdShow)
INT WINAPI
wWinMain (HINSTANCE hInstance,
HINSTANCE hPrevInst,
LPTSTR lpCmdLine,
INT nCmdShow)
{
int i;
WNDCLASSEXW WndClass = {0};
@ -477,7 +804,7 @@ INT WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInst,
WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN,
CW_USEDEFAULT,
CW_USEDEFAULT,
600, 550,
650, 550,
NULL, NULL,
hInstance,
NULL);

View file

@ -1,11 +1,12 @@
#define IDI_MAIN 0x0
#define IDI_UPDATE 5000
#define IDI_HELP 5001
#define IDI_PROF 5002
#define IDB_UNDERLINE 0x100
#define IDB_LOGO 0x101
#define IDB_HELP 0x102
#define IDB_UPDATE 0x103
#define IDB_DOWNLOAD 0x104
#define IDB_UNINSTALL 0x105
#define IDB_DOWNLOAD 0x102
#define IDB_UNINSTALL 0x103
#define IDB_TREEVIEW_ICON_0 0x900
#define IDB_TREEVIEW_ICON_1 0x901
#define IDB_TREEVIEW_ICON_2 0x902
@ -17,33 +18,47 @@
#define IDB_TREEVIEW_ICON_8 0x908
#define IDB_TREEVIEW_ICON_9 0x909
#define IDB_TREEVIEW_ICON_10 0x910
#define IDB_TREEVIEW_ICON_11 0x911
#define IDB_TREEVIEW_ICON_12 0x912
#define IDB_TREEVIEW_ICON_13 0x913
#define IDD_DOWNLOAD 0x100
#define IDC_PROGRESS 0x1000
#define IDC_STATUS 0x1001
#define IDC_REMOVE 0x1002
#define IDC_DOWNLOAD_FOLDER_EDIT 0x1003
#define IDC_CHOOSE_BUTTON 0x1004
#define IDC_UPDATE_SERVER_EDIT 0x1005
#define IDC_DELINST_FILES_CHECKBOX 0x1006
#define IDS_WINDOW_TITLE 0
#define IDS_WELCOME_TITLE 1
#define IDS_WELCOME 2
#define IDS_NO_APP_TITLE 3
#define IDS_NO_APP 4
#define IDS_UPDATE_TITLE 5
#define IDS_UPDATE 6
#define IDS_HELP_TITLE 7
#define IDS_HELP 8
#define IDS_NO_APPS 9
#define IDS_CHOOSE_APP 10
#define IDS_CHOOSE_SUB 11
#define IDS_CHOOSE_CATEGORY 12
#define IDS_CHOOSE_BOTH 13
#define IDS_XMLERROR_1 14
#define IDS_XMLERROR_2 15
#define IDS_DOWNLOAD_ERROR 16
#define IDS_VERSION 17
#define IDS_LICENCE 18
#define IDS_MAINTAINER 19
#define IDS_APPS_TITLE 20
#define IDS_CATS_TITLE 21
#define IDS_WINDOW_TITLE 0
#define IDS_WELCOME_TITLE 1
#define IDS_WELCOME 2
#define IDS_NO_APP_TITLE 3
#define IDS_NO_APP 4
#define IDS_UPDATE_TITLE 5
#define IDS_UPDATE 6
#define IDS_HELP_TITLE 7
#define IDS_HELP 8
#define IDS_NO_APPS 9
#define IDS_CHOOSE_APP 10
#define IDS_CHOOSE_SUB 11
#define IDS_CHOOSE_CATEGORY 12
#define IDS_CHOOSE_BOTH 13
#define IDS_XMLERROR_1 14
#define IDS_XMLERROR_2 15
#define IDS_DOWNLOAD_ERROR 16
#define IDS_VERSION 17
#define IDS_LICENCE 18
#define IDS_MAINTAINER 19
#define IDS_APPS_TITLE 20
#define IDS_CATS_TITLE 21
#define IDS_CHOOSE_FOLDER 22
#define IDS_NOTCREATE_REGKEY 23
#define IDS_DOWNLOAD_FOLDER 24
#define IDS_UNABLECREATE_FOLDER 25
#define IDS_UPDATE_URL 26
#define IDD_PROF 6000
#define STRING_COUNT 20

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

View file

@ -1,9 +1,12 @@
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDI_MAIN ICON DISCARDABLE "resources/main.ico"
IDI_UPDATE ICON DISCARDABLE "resources/update.ico"
IDI_HELP ICON DISCARDABLE "resources/help.ico"
IDI_PROF ICON DISCARDABLE "resources/preferences.ico"
IDB_LOGO BITMAP DISCARDABLE "resources/logo.bmp"
IDB_HELP BITMAP DISCARDABLE "resources/help.bmp"
IDB_UPDATE BITMAP DISCARDABLE "resources/update.bmp"
//IDB_HELP BITMAP DISCARDABLE "resources/help.bmp"
//IDB_UPDATE BITMAP DISCARDABLE "resources/update.bmp"
IDB_DOWNLOAD BITMAP DISCARDABLE "resources/download.bmp"
IDB_UNINSTALL BITMAP DISCARDABLE "resources/uninstall.bmp"
IDB_UNDERLINE BITMAP DISCARDABLE "resources/underline.bmp"
@ -18,6 +21,9 @@ IDB_TREEVIEW_ICON_7 BITMAP DISCARDABLE "resources/7.bmp"
IDB_TREEVIEW_ICON_8 BITMAP DISCARDABLE "resources/8.bmp"
IDB_TREEVIEW_ICON_9 BITMAP DISCARDABLE "resources/9.bmp"
IDB_TREEVIEW_ICON_10 BITMAP DISCARDABLE "resources/10.bmp"
IDB_TREEVIEW_ICON_11 BITMAP DISCARDABLE "resources/11.bmp"
IDB_TREEVIEW_ICON_12 BITMAP DISCARDABLE "resources/12.bmp"
IDB_TREEVIEW_ICON_13 BITMAP DISCARDABLE "resources/13.bmp"
#include "lang/de-DE.rc"

View file

@ -170,10 +170,10 @@ BOOL ProcessXML (const char* filename, struct Category* Root)
Current = Root;
TagOpen = TRUE;
file = fopen(filename, "r");
file = fopen("downloader.xml", "r");
if(!file)
{
file = fopen("downloader.xml", "r");
file = fopen(filename, "r");
if(!file)
{
MessageBoxW(0,Strings[IDS_XMLERROR_1],0,0);