Author: khornicek Date: Thu Oct 13 12:38:24 2011 New Revision: 54105
URL: http://svn.reactos.org/svn/reactos?rev=54105&view=rev Log: [SYSSETUP] Allow creating of shortcuts with icon indexes != 0. [EXPLORER] Shuffle the resources a bit so icons with indexes 0 and 1 match those in windows explorer. See issue #6544 for more details.
Modified: trunk/reactos/base/shell/explorer/explorer_intres.rc trunk/reactos/base/shell/explorer/resource.h trunk/reactos/dll/win32/syssetup/install.c
Modified: trunk/reactos/base/shell/explorer/explorer_intres.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explore... ============================================================================== --- trunk/reactos/base/shell/explorer/explorer_intres.rc [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/explorer_intres.rc [iso-8859-1] Thu Oct 13 12:38:24 2011 @@ -151,7 +151,7 @@
// Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDI_REACTOS ICON DISCARDABLE "res/reactos.ico" +IDI_COMPUTER ICON DISCARDABLE "res/computer.ico" IDI_EXPLORER ICON DISCARDABLE "res/explorer.ico" IDI_STARTMENU ICON DISCARDABLE "res/startmenu.ico" IDI_LOGOFF ICON DISCARDABLE "res/logoff.ico" @@ -173,7 +173,7 @@ IDI_SEARCH_DOC ICON DISCARDABLE "res/search-doc.ico" IDI_PRINTER ICON DISCARDABLE "res/printer.ico" IDI_NETWORK ICON DISCARDABLE "res/network.ico" -IDI_COMPUTER ICON DISCARDABLE "res/computer.ico" +IDI_REACTOS ICON DISCARDABLE "res/reactos.ico" IDI_SPEAKER ICON DISCARDABLE "res/speaker.ico" IDI_DOT ICON DISCARDABLE "res/dot.ico" IDI_DOT_TRANS ICON DISCARDABLE "res/dot_trans.ico"
Modified: trunk/reactos/base/shell/explorer/resource.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/resourc... ============================================================================== --- trunk/reactos/base/shell/explorer/resource.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/resource.h [iso-8859-1] Thu Oct 13 12:38:24 2011 @@ -2,7 +2,6 @@ // Microsoft Developer Studio generated include file. // Used by explorer_intres.rc // -#define IDI_COMPUTER 0 #define IDS_TITLE 1 #define MANIFEST_RESOURCE_ID 1 #define IDS_START 2 @@ -53,7 +52,7 @@ #define IDS_NAMECOLUMN 47 #define IDS_PATHCOLUMN 48 #define IDS_MENUCOLUMN 49 -#define IDI_REACTOS 100 +#define IDI_COMPUTER 100 #define IDI_EXPLORER 101 #define IDI_STARTMENU 102 #define IDB_TOOLBAR 103 @@ -92,6 +91,7 @@ #define IDI_SEARCH_DOC 146 #define IDI_PRINTER 147 #define IDI_NETWORK 148 +#define IDI_REACTOS 149 #define IDM_DESKTOPBAR 150 #define IDM_VOLUME 151 #define IDM_NOTIFYAREA 152
Modified: trunk/reactos/dll/win32/syssetup/install.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/install.... ============================================================================== --- trunk/reactos/dll/win32/syssetup/install.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/syssetup/install.c [iso-8859-1] Thu Oct 13 12:38:24 2011 @@ -120,7 +120,7 @@
static BOOL -CreateShortcut(int csidl, LPCTSTR folder, UINT nIdName, LPCTSTR command, UINT nIdTitle, BOOL bCheckExistence) +CreateShortcut(int csidl, LPCTSTR folder, UINT nIdName, LPCTSTR command, UINT nIdTitle, BOOL bCheckExistence, INT iIconNr) { TCHAR path[MAX_PATH]; TCHAR exeName[MAX_PATH]; @@ -193,7 +193,7 @@ return FALSE;
// FIXME: we should pass 'command' straight in here, but shell32 doesn't expand it - return SUCCEEDED(CreateShellLink(path, exeName, _T(""), lpWorkingDir, NULL, 0, title)); + return SUCCEEDED(CreateShellLink(path, exeName, _T(""), lpWorkingDir, exeName, iIconNr, title)); }
@@ -752,59 +752,59 @@ CoInitialize(NULL);
/* Create desktop shortcuts */ - CreateShortcut(CSIDL_DESKTOP, NULL, IDS_SHORT_CMD, _T("%SystemRoot%\system32\cmd.exe"), IDS_CMT_CMD, TRUE); + CreateShortcut(CSIDL_DESKTOP, NULL, IDS_SHORT_CMD, _T("%SystemRoot%\system32\cmd.exe"), IDS_CMT_CMD, TRUE, 0);
/* Create program startmenu shortcuts */ - CreateShortcut(CSIDL_PROGRAMS, NULL, IDS_SHORT_EXPLORER, _T("%SystemRoot%\explorer.exe"), IDS_CMT_EXPLORER, TRUE); - CreateShortcut(CSIDL_PROGRAMS, NULL, IDS_SHORT_DOWNLOADER, _T("%SystemRoot%\system32\rapps.exe"), IDS_CMT_DOWNLOADER, TRUE); + CreateShortcut(CSIDL_PROGRAMS, NULL, IDS_SHORT_EXPLORER, _T("%SystemRoot%\explorer.exe"), IDS_CMT_EXPLORER, TRUE, 1); + CreateShortcut(CSIDL_PROGRAMS, NULL, IDS_SHORT_DOWNLOADER, _T("%SystemRoot%\system32\rapps.exe"), IDS_CMT_DOWNLOADER, TRUE, 0);
/* Create administrative tools startmenu shortcuts */ - CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, IDS_SHORT_SERVICE, _T("%SystemRoot%\system32\servman.exe"), IDS_CMT_SERVMAN, TRUE); - CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, IDS_SHORT_DEVICE, _T("%SystemRoot%\system32\devmgmt.exe"), IDS_CMT_DEVMGMT, TRUE); - CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, IDS_SHORT_EVENTVIEW, _T("%SystemRoot%\system32\eventvwr.exe"), IDS_CMT_EVENTVIEW, TRUE); - CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, IDS_SHORT_MSCONFIG, _T("%SystemRoot%\system32\msconfig.exe"), IDS_CMT_MSCONFIG, TRUE); + CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, IDS_SHORT_SERVICE, _T("%SystemRoot%\system32\servman.exe"), IDS_CMT_SERVMAN, TRUE, 0); + CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, IDS_SHORT_DEVICE, _T("%SystemRoot%\system32\devmgmt.exe"), IDS_CMT_DEVMGMT, TRUE, 0); + CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, IDS_SHORT_EVENTVIEW, _T("%SystemRoot%\system32\eventvwr.exe"), IDS_CMT_EVENTVIEW, TRUE, 0); + CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, IDS_SHORT_MSCONFIG, _T("%SystemRoot%\system32\msconfig.exe"), IDS_CMT_MSCONFIG, TRUE, 0);
/* Create and fill Accessories subfolder */ if (CreateShortcutFolder(CSIDL_PROGRAMS, IDS_ACCESSORIES, szFolder, sizeof(szFolder)/sizeof(szFolder[0]))) { - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_CALC, _T("%SystemRoot%\system32\calc.exe"), IDS_CMT_CALC, TRUE); - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_CMD, _T("%SystemRoot%\system32\cmd.exe"), IDS_CMT_CMD, TRUE); - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_NOTEPAD, _T("%SystemRoot%\system32\notepad.exe"), IDS_CMT_NOTEPAD, TRUE); - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_RDESKTOP, _T("%SystemRoot%\system32\mstsc.exe"), IDS_CMT_RDESKTOP, TRUE); - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_SNAP, _T("%SystemRoot%\system32\screenshot.exe"), IDS_CMT_SCREENSHOT, TRUE); - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_WORDPAD, _T("%SystemRoot%\system32\wordpad.exe"), IDS_CMT_WORDPAD, TRUE); - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_PAINT, _T("%SystemRoot%\system32\mspaint.exe"), IDS_CMT_PAINT, TRUE); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_CALC, _T("%SystemRoot%\system32\calc.exe"), IDS_CMT_CALC, TRUE, 0); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_CMD, _T("%SystemRoot%\system32\cmd.exe"), IDS_CMT_CMD, TRUE, 0); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_NOTEPAD, _T("%SystemRoot%\system32\notepad.exe"), IDS_CMT_NOTEPAD, TRUE, 0); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_RDESKTOP, _T("%SystemRoot%\system32\mstsc.exe"), IDS_CMT_RDESKTOP, TRUE, 0); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_SNAP, _T("%SystemRoot%\system32\screenshot.exe"), IDS_CMT_SCREENSHOT, TRUE, 0); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_WORDPAD, _T("%SystemRoot%\system32\wordpad.exe"), IDS_CMT_WORDPAD, TRUE, 0); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_PAINT, _T("%SystemRoot%\system32\mspaint.exe"), IDS_CMT_PAINT, TRUE, 0); }
/* Create System Tools subfolder and fill if the exe is available */ if (CreateShortcutFolder(CSIDL_PROGRAMS, IDS_SYS_TOOLS, szFolder, sizeof(szFolder)/sizeof(szFolder[0]))) { - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_CHARMAP, _T("%SystemRoot%\system32\charmap.exe"), IDS_CMT_CHARMAP, TRUE); - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_KBSWITCH, _T("%SystemRoot%\system32\kbswitch.exe"), IDS_CMT_KBSWITCH, TRUE); - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_REGEDIT, _T("%SystemRoot%\regedit.exe"), IDS_CMT_REGEDIT, TRUE); - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_DXDIAG, _T("%SystemRoot%\system32\dxdiag.exe"), IDS_CMT_DXDIAG, TRUE); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_CHARMAP, _T("%SystemRoot%\system32\charmap.exe"), IDS_CMT_CHARMAP, TRUE, 0); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_KBSWITCH, _T("%SystemRoot%\system32\kbswitch.exe"), IDS_CMT_KBSWITCH, TRUE, 0); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_REGEDIT, _T("%SystemRoot%\regedit.exe"), IDS_CMT_REGEDIT, TRUE, 0); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_DXDIAG, _T("%SystemRoot%\system32\dxdiag.exe"), IDS_CMT_DXDIAG, TRUE, 0); }
/* Create Accessibility subfolder and fill if the exe is available */ if (CreateShortcutFolder(CSIDL_PROGRAMS, IDS_SYS_ACCESSIBILITY, szFolder, sizeof(szFolder)/sizeof(szFolder[0]))) { - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_MAGNIFY, _T("%SystemRoot%\system32\magnify.exe"), IDS_CMT_MAGNIFY, TRUE); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_MAGNIFY, _T("%SystemRoot%\system32\magnify.exe"), IDS_CMT_MAGNIFY, TRUE, 0); }
/* Create Entertainment subfolder and fill if the exe is available */ if (CreateShortcutFolder(CSIDL_PROGRAMS, IDS_SYS_ENTERTAINMENT, szFolder, sizeof(szFolder)/sizeof(szFolder[0]))) { - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_MPLAY32, _T("%SystemRoot%\system32\mplay32.exe"), IDS_CMT_MPLAY32, TRUE); - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_SNDVOL32, _T("%SystemRoot%\system32\sndvol32.exe"), IDS_CMT_SNDVOL32, TRUE); - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_SNDREC32, _T("%SystemRoot%\system32\sndrec32.exe"), IDS_CMT_SNDREC32, TRUE); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_MPLAY32, _T("%SystemRoot%\system32\mplay32.exe"), IDS_CMT_MPLAY32, TRUE, 0); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_SNDVOL32, _T("%SystemRoot%\system32\sndvol32.exe"), IDS_CMT_SNDVOL32, TRUE, 0); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_SNDREC32, _T("%SystemRoot%\system32\sndrec32.exe"), IDS_CMT_SNDREC32, TRUE, 0); }
/* Create Games subfolder and fill if the exe is available */ if (CreateShortcutFolder(CSIDL_PROGRAMS, IDS_GAMES, szFolder, sizeof(szFolder)/sizeof(szFolder[0]))) { - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_SOLITAIRE, _T("%SystemRoot%\system32\sol.exe"), IDS_CMT_SOLITAIRE, TRUE); - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_WINEMINE, _T("%SystemRoot%\system32\winmine.exe"), IDS_CMT_WINEMINE, TRUE); - CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_SPIDER, _T("%SystemRoot%\system32\spider.exe"), IDS_CMT_SPIDER, TRUE); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_SOLITAIRE, _T("%SystemRoot%\system32\sol.exe"), IDS_CMT_SOLITAIRE, TRUE, 0); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_WINEMINE, _T("%SystemRoot%\system32\winmine.exe"), IDS_CMT_WINEMINE, TRUE, 0); + CreateShortcut(CSIDL_PROGRAMS, szFolder, IDS_SHORT_SPIDER, _T("%SystemRoot%\system32\spider.exe"), IDS_CMT_SPIDER, TRUE, 0); }
CoUninitialize();