From cc8c53a925c111d52cf980d4dc675dad901f7586 Mon Sep 17 00:00:00 2001 From: Kamil Hornicek Date: Sun, 16 Oct 2011 16:12:55 +0000 Subject: [PATCH] [EXPLORER] Make the Network connections start menu item open the net connections folder. Trim a misleading message. svn path=/trunk/; revision=54164 --- .../base/shell/explorer/taskbar/startmenu.cpp | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/reactos/base/shell/explorer/taskbar/startmenu.cpp b/reactos/base/shell/explorer/taskbar/startmenu.cpp index 2418c3e2659..5ec7f5db1f0 100644 --- a/reactos/base/shell/explorer/taskbar/startmenu.cpp +++ b/reactos/base/shell/explorer/taskbar/startmenu.cpp @@ -2039,26 +2039,29 @@ int StartMenuHandler::Command(int id, int code) #endif break; - case IDC_CONNECTIONS: + case IDC_CONNECTIONS:{ + CloseStartMenu(id); #ifndef ROSSHELL -#ifdef __REACTOS__ // to be removed when RAS will be implemented - MessageBox(0, TEXT("RAS folder not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); -#else - CreateSubmenu(id, CSIDL_CONNECTIONS, ResString(IDS_CONNECTIONS)); - //CloseStartMenu(id); - //MainFrame::Create(SpecialFolderPath(CSIDL_CONNECTIONS, _hwnd), OWM_PIDL); +#ifndef _NO_MDI + XMLPos explorer_options = g_Globals.get_cfg("general/explorer"); + bool mdi = XMLBool(explorer_options, "mdi", true); + + if (mdi) + MDIMainFrame::Create(SHELLPATH_NET_CONNECTIONS, 0); + else #endif + SDIMainFrame::Create(SHELLPATH_NET_CONNECTIONS, 0); #else launch_file(_hwnd, SHELLPATH_NET_CONNECTIONS); #endif - break; + break;} // browse menu case IDC_NETWORK: #ifdef __REACTOS__ ///@todo to be removed when network browsing will be implemented in shell namespace - MessageBox(0, TEXT("network not yet implemented"), ResString(IDS_TITLE), MB_OK); + MessageBox(0, TEXT("not yet implemented"), ResString(IDS_TITLE), MB_OK); #else CreateSubmenu(id, CSIDL_NETWORK, ResString(IDS_NETWORK)); #endif @@ -2192,13 +2195,14 @@ void SettingsMenu::AddEntries() { super::AddEntries(); -#if defined(ROSSHELL) || defined(__REACTOS__) // __REACTOS__ to be removed when printer/network will be implemented +#if defined(ROSSHELL) || defined(__REACTOS__) // __REACTOS__ to be removed when printers will be implemented //TODO AddButton(ResString(IDS_PRINTERS), ICID_PRINTER, false, IDC_PRINTERS_MENU); - AddButton(ResString(IDS_CONNECTIONS), ICID_NETWORK, false, IDC_CONNECTIONS); #else //TODO AddButton(ResString(IDS_PRINTERS), ICID_PRINTER, true, IDC_PRINTERS_MENU); - AddButton(ResString(IDS_CONNECTIONS), ICID_NETCONNS, false, IDC_CONNECTIONS); #endif + + AddButton(ResString(IDS_CONNECTIONS), ICID_NETCONNS, false, IDC_CONNECTIONS); + AddButton(ResString(IDS_ADMIN), ICID_ADMIN, true, IDC_ADMIN); #ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003)