Author: janderwald
Date: Fri Oct 12 20:07:41 2007
New Revision: 29542
URL:
http://svn.reactos.org/svn/reactos?rev=29542&view=rev
Log:
- dont allow creating a link to a shortcut
See issue #2735 for more details.
Modified:
trunk/reactos/dll/win32/shell32/shell32_De.rc
trunk/reactos/dll/win32/shell32/shell32_En.rc
trunk/reactos/dll/win32/shell32/shelllink.c
Modified: trunk/reactos/dll/win32/shell32/shell32_De.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32_…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shell32_De.rc (original)
+++ trunk/reactos/dll/win32/shell32/shell32_De.rc Fri Oct 12 20:07:41 2007
@@ -175,15 +175,15 @@
LTEXT "Zielpfad:", 14006, 10, 40, 70, 10
LTEXT "", 14007, 70, 40, 150, 10
LTEXT "Ziel:", 14008, 10, 55, 45, 10
- EDITTEXT 14009, 70, 55, 150, 10, ES_LEFT
+ EDITTEXT 14009, 70, 55, 150, 10, ES_LEFT | ES_AUTOHSCROLL
LTEXT "&Starten in:",14010, 10, 65, 57, 10
- EDITTEXT 14011, 70, 65, 150, 10, ES_LEFT
+ EDITTEXT 14011, 70, 65, 150, 10, ES_LEFT | ES_AUTOHSCROLL
LTEXT "&Kurztasten:", 14014, 10, 80, 57, 10
EDITTEXT 14015, 70, 80, 150, 10, ES_LEFT
LTEXT "Ausführen:", 14016, 10, 90, 57, 10
- EDITTEXT 14017, 70, 90, 150, 10
+ EDITTEXT 14017, 70, 90, 150, 10, ES_AUTOHSCROLL
LTEXT "K&ommentar:", 14018, 10, 100, 57, 10
- EDITTEXT 14019, 70, 100, 150, 10, ES_LEFT
+ EDITTEXT 14019, 70, 100, 150, 10, ES_LEFT | ES_AUTOHSCROLL
PUSHBUTTON "&Ziel finden...", 14020, 10, 115, 63, 14, ES_LEFT
PUSHBUTTON "I&con wechseln...", 14021, 83, 115, 63, 14, ES_LEFT
PUSHBUTTON "Er&weitert...", 14022, 156, 115, 63, 14, ES_LEFT
@@ -335,7 +335,7 @@
CONTROL "", 14000, "SysListView32", LVS_REPORT |
LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50
GROUPBOX "Settings for selected location", -1, 10, 80, 220, 70
RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10
- EDITTEXT 14002, 90, 90, 50, 10, WS_TABSTOP
+ EDITTEXT 14002, 90, 90, 50, 10, WS_TABSTOP | ES_NUMBER
LTEXT "M&aximum size(MB):", -1, 20, 100, 70, 10
RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately
when deleted.", 14003, 20, 115, 170, 20, BS_MULTILINE | WS_TABSTOP
RADIOBUTTON"&Display delete confirmation dialog", 14004, 20, 155, 140,
10, WS_TABSTOP
Modified: trunk/reactos/dll/win32/shell32/shell32_En.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32_…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shell32_En.rc (original)
+++ trunk/reactos/dll/win32/shell32/shell32_En.rc Fri Oct 12 20:07:41 2007
@@ -173,15 +173,15 @@
LTEXT "Target location:", 14006, 10, 40, 70, 10
LTEXT "", 14007, 70, 40, 150, 10
LTEXT "Target:", 14008, 10, 55, 45, 10
- EDITTEXT 14009, 70, 55, 150, 10, ES_LEFT
+ EDITTEXT 14009, 70, 55, 150, 10, ES_LEFT | ES_AUTOHSCROLL
LTEXT "&Start in:",14010, 10, 65, 57, 10
- EDITTEXT 14011, 70, 65, 150, 10, ES_LEFT
+ EDITTEXT 14011, 70, 65, 150, 10, ES_LEFT | ES_AUTOHSCROLL
LTEXT "Shortcut &key:", 14014, 10, 80, 57, 10
EDITTEXT 14015, 70, 80, 150, 10, ES_LEFT
LTEXT "Run:", 14016, 10, 90, 57, 10
- EDITTEXT 14017, 70, 90, 150, 10
+ EDITTEXT 14017, 70, 90, 150, 10, ES_AUTOHSCROLL
LTEXT "C&omment:", 14018, 10, 100, 57, 10
- EDITTEXT 14019, 70, 100, 150, 10, ES_LEFT
+ EDITTEXT 14019, 70, 100, 150, 10, ES_LEFT | ES_AUTOHSCROLL
PUSHBUTTON "&Find Target...", 14020, 10, 115, 63, 14, ES_LEFT
PUSHBUTTON "&Change Icon...", 14021, 83, 115, 63, 14, ES_LEFT
PUSHBUTTON "A&dvanced...", 14022, 156, 115, 63, 14, ES_LEFT
@@ -335,7 +335,7 @@
CONTROL "", 14000, "SysListView32", LVS_REPORT |
LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50
GROUPBOX "Settings for selected location", -1, 10, 80, 220, 70
RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10
- EDITTEXT 14002, 90, 90, 50, 10, WS_TABSTOP
+ EDITTEXT 14002, 90, 90, 50, 10, WS_TABSTOP | ES_NUMBER
LTEXT "M&aximum size(MB):", -1, 20, 100, 70, 10
RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately
when deleted.", 14003, 20, 115, 170, 20, BS_MULTILINE | WS_TABSTOP
RADIOBUTTON"&Display delete confirmation dialog", 14004, 20, 155, 140,
10, WS_TABSTOP
Modified: trunk/reactos/dll/win32/shell32/shelllink.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shelllin…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shelllink.c (original)
+++ trunk/reactos/dll/win32/shell32/shelllink.c Fri Oct 12 20:07:41 2007
@@ -2595,6 +2595,7 @@
IShellLinkImpl *This;
HWND hDlgCtrl;
WCHAR szBuffer[MAX_PATH];
+ WCHAR * ptr;
int IconIndex;
INT_PTR result;
@@ -2643,10 +2644,20 @@
SendMessageW( hDlgCtrl, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)szBuffer);
if ( !SHELL_ExistsFileW(szBuffer) )
{
+ //FIXME load localized error msg
MessageBoxW( hwndDlg, L"file not existing", szBuffer, MB_OK );
SetWindowLong( hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE );
return TRUE;
}
+ ptr = wcsrchr(szBuffer, L'.');
+ if (ptr && !wcsnicmp(ptr, L".lnk", 4))
+ {
+ // FIXME load localized error msg
+ MessageBoxW( hwndDlg, L"You cannot create a link to a
shortcut", L"Error", MB_ICONERROR );
+ SetWindowLong( hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE );
+ return TRUE;
+ }
+
IShellLinkW_fnSetPath((IShellLinkW*)&This->lpvtblw, szBuffer);
TRACE("This %p sLinkPath %S\n", This, This->sLinkPath);