[ros-diffs] [martinf] 33506: display available command line options when started with "-?"

martinf at svn.reactos.org martinf at svn.reactos.org
Tue May 13 23:01:09 CEST 2008


Author: martinf
Date: Tue May 13 16:01:09 2008
New Revision: 33506

URL: http://svn.reactos.org/svn/reactos?rev=33506&view=rev
Log:
display available command line options when started with "-?"

Modified:
    trunk/reactos/base/shell/explorer/explorer.cpp

Modified: trunk/reactos/base/shell/explorer/explorer.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explorer.cpp?rev=33506&r1=33505&r2=33506&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer.cpp [iso-8859-1] Tue May 13 16:01:09 2008
@@ -633,12 +633,11 @@
 
 IconCache::~IconCache()
 {
-	for (int index = s_next_id; index >= 0; index--)
-	{
+/* We don't need to free cached resources - they are automatically freed at process termination
+	for (int index = s_next_id; index >= 0; index--) {
 		IconMap::iterator found = _icons.find(index);
 
-		if (found != _icons.end()) 
-		{
+		if (found != _icons.end()) {
 			Icon& icon = found->second;
 
 			if ((icon.get_icontype() == IT_DYNAMIC) || 
@@ -649,6 +648,7 @@
 			}
 		}
 	}
+*/
 }
 
 void IconCache::free_icon(int icon_id)
@@ -726,7 +726,7 @@
 	XMLPos explorer_options = g_Globals.get_cfg("general/explorer");
 	XS_String mdiStr = XMLString(explorer_options, "mdi");
 
-	 // If there isn't yet the "mdi" setting in the configuration, display MDI/SDI dialog.
+	 // If there isn't yet the "mdi" setting in the configuration, display the MDI/SDI dialog.
 	if (mdiStr.empty())
 		Dialog::DoModal(IDD_MDI_SDI, WINDOW_CREATOR(MdiSdiDlg), g_Globals._hwndDesktop);
 
@@ -1201,6 +1201,31 @@
 #endif
 	}
 
+	if (_tcsstr(ext_options,TEXT("-?"))) {
+		MessageBoxA(g_Globals._hwndDesktop,
+			"/e		open cabinet window in explorer mode\r\n"
+			"/root		open cabinet window in rooted mode\r\n"
+			"/mdi		open cabinet window in MDI mode\r\n"
+			"/sdi		open cabinet window in SDI mode\r\n"
+			"\r\n"
+			"-?		display command line options\r\n"
+			"\r\n"
+			"-desktop		start in desktop mode regardless of an already running shell\r\n"
+			"-nodesktop	disable desktop mode\r\n"
+			"-explorer		display cabinet window regardless of enabled desktop mode\r\n"
+			"\r\n"
+			"-install		replace previous shell application with ROS Explorer\r\n"
+			"\r\n"
+			"-noautostart	disable autostarts\r\n"
+			"-autostart	enable autostarts regardless of debug build\r\n"
+			"\r\n"
+			"-console		open debug console\r\n"
+			"\r\n"
+			"-debug		activate GDB remote debugging stub\r\n"
+			"-break		activate debugger breakpoint\r\n",
+			"ROS Explorer - command line options", MB_OK);
+	}
+
 	Thread* pSSOThread = NULL;
 
 	if (startup_desktop) {



More information about the Ros-diffs mailing list