Index: base/shell/explorer/CMakeLists.txt =================================================================== --- base/shell/explorer/CMakeLists.txt (revision 60677) +++ base/shell/explorer/CMakeLists.txt (working copy) @@ -5,7 +5,6 @@ add_definitions( -DWIN32 - -D__MINGW32__ -D__WINDRES__) #add_pch(explorer precomp.h) Index: base/shell/explorer/explorer.cpp =================================================================== --- base/shell/explorer/explorer.cpp (revision 60677) +++ base/shell/explorer/explorer.cpp (working copy) @@ -69,9 +69,7 @@ #endif _log = NULL; -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) _SHRestricted = 0; -#endif _hwndDesktopBar = 0; _hwndShellView = 0; _hwndDesktop = 0; @@ -81,11 +79,7 @@ void ExplorerGlobals::init(HINSTANCE hInstance) { _hInstance = hInstance; - -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) _SHRestricted = (DWORD(STDAPICALLTYPE*)(RESTRICTIONS)) GetProcAddress(GetModuleHandle(TEXT("SHELL32")), "SHRestricted"); -#endif - _icon_cache.init(); } @@ -999,38 +993,6 @@ } - // MinGW does not provide a Unicode startup routine, so we have to implement an own. -#if defined(__MINGW32__) && defined(UNICODE) - -#define _tWinMain wWinMain -int WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int); - -int main(int argc, char* argv[]) -{ - CONTEXT("main"); - - STARTUPINFO startupinfo; - int nShowCmd = SW_SHOWNORMAL; - - GetStartupInfo(&startupinfo); - - if (startupinfo.dwFlags & STARTF_USESHOWWINDOW) - nShowCmd = startupinfo.wShowWindow; - - LPWSTR cmdline = GetCommandLineW(); - - while(*cmdline && !_istspace((unsigned)*cmdline)) - ++cmdline; - - while(_istspace((unsigned)*cmdline)) - ++cmdline; - - return wWinMain(GetModuleHandle(NULL), 0, cmdline, nShowCmd); -} - -#endif // __MINGW && UNICODE - - static bool SetShellReadyEvent(LPCTSTR evtName) { HANDLE hEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, evtName); Index: base/shell/explorer/globals.h =================================================================== --- base/shell/explorer/globals.h (revision 60677) +++ base/shell/explorer/globals.h (working copy) @@ -279,9 +279,7 @@ FILE* _log; -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) DWORD(STDAPICALLTYPE* _SHRestricted)(RESTRICTIONS); -#endif FileTypeManager _ftype_mgr; IconCache _icon_cache; Index: base/shell/explorer/shell/shellbrowser.cpp =================================================================== --- base/shell/explorer/shell/shellbrowser.cpp (revision 60677) +++ base/shell/explorer/shell/shellbrowser.cpp (working copy) @@ -39,11 +39,7 @@ ShellBrowser::ShellBrowser(HWND hwnd, HWND hwndFrame, HWND left_hwnd, WindowHandle& right_hwnd, ShellPathInfo& create_info, BrowserCallback* cb, CtxMenuInterfaces& cm_ifs) -#ifndef __MINGW32__ // IShellFolderViewCB missing in MinGW (as of 25.09.2005) : super(IID_IShellFolderViewCB), -#else - : -#endif _hwnd(hwnd), _hwndFrame(hwndFrame), _left_hwnd(left_hwnd), @@ -449,7 +445,6 @@ fs.fFlags = FWF_NOCLIENTEDGE|FWF_BESTFITWINDOW; } -#ifndef __MINGW32__ // IShellFolderViewCB missing in MinGW (as of 25.09.2005) SFV_CREATE sfv_create; sfv_create.cbSize = sizeof(SFV_CREATE); @@ -458,9 +453,6 @@ sfv_create.psfvcb = this; HRESULT hr = SHCreateShellFolderView(&sfv_create, &_pShellView); -#else - HRESULT hr = folder->CreateViewObject(_hwnd, IID_IShellView, (void**)&_pShellView); -#endif if (FAILED(hr)) { _pShellView = NULL; @@ -480,9 +472,6 @@ _pShellView->UIActivate(SVUIA_ACTIVATE_NOFOCUS); } - -#ifndef __MINGW32__ // IShellFolderViewCB missing in MinGW (as of 25.09.2005) - /// shell view callback HRESULT STDMETHODCALLTYPE ShellBrowser::MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam) { @@ -495,9 +484,7 @@ return E_NOTIMPL; } -#endif - HRESULT ShellBrowser::OnDefaultCommand(LPIDA pida) { CONTEXT("ShellBrowser::OnDefaultCommand()"); Index: base/shell/explorer/shell/shellbrowser.h =================================================================== --- base/shell/explorer/shell/shellbrowser.h (revision 60677) +++ base/shell/explorer/shell/shellbrowser.h (working copy) @@ -58,9 +58,7 @@ /// Implementation of IShellBrowserImpl interface in explorer child windows struct ShellBrowser : public IShellBrowserImpl -#ifndef __MINGW32__ // IShellFolderViewCB missing in MinGW (as of 25.09.2005) , public IComSrvBase, public SimpleComObject -#endif { ShellBrowser(HWND hwnd, HWND hwndFrame, HWND left_hwnd, WindowHandle& right_hwnd, ShellPathInfo& create_info, BrowserCallback* cb, CtxMenuInterfaces& cm_ifs); @@ -168,12 +166,10 @@ void InitializeTree(); bool InitDragDrop(); -#ifndef __MINGW32__ // IShellFolderViewCB missing in MinGW (as of 25.09.2005) typedef IComSrvBase super; // IShellFolderViewCB virtual HRESULT STDMETHODCALLTYPE MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam); -#endif map _image_map; Index: base/shell/explorer/taskbar/desktopbar.cpp =================================================================== --- base/shell/explorer/taskbar/desktopbar.cpp (revision 60677) +++ base/shell/explorer/taskbar/desktopbar.cpp (working copy) @@ -114,9 +114,7 @@ // create task bar _hwndTaskBar = TaskBar::Create(_hwnd); -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) if (!g_Globals._SHRestricted || !SHRestricted(REST_NOTRAYITEMSDISPLAY)) -#endif // create tray notification area _hwndNotify = NotifyArea::Create(_hwnd); Index: base/shell/explorer/taskbar/startmenu.cpp =================================================================== --- base/shell/explorer/taskbar/startmenu.cpp (revision 60677) +++ base/shell/explorer/taskbar/startmenu.cpp (working copy) @@ -1560,9 +1560,7 @@ : super(hwnd, info._icon_size), _hwndStartButton(0) { -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) if (!g_Globals._SHRestricted || !SHRestricted(REST_NOCOMMONGROUPS)) -#endif try { // insert directory "All Users\Start Menu" ShellDirectory cmn_startmenu(GetDesktopFolder(), SpecialFolderPath(CSIDL_COMMON_STARTMENU, _hwnd), _hwnd); @@ -1706,34 +1704,12 @@ AddSeparator(); -#ifdef __MINGW32__ - HKEY hkey, hkeyAdv; - DWORD value, len; - - if (RegOpenKey(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer"), &hkey)) - hkey = 0; - - if (RegOpenKey(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced"), &hkeyAdv)) - hkeyAdv = 0; - -#define IS_VALUE_ZERO(hk, name) \ - (!hk || (len=sizeof(value),RegQueryValueEx(hk, name, NULL, NULL, (LPBYTE)&value, &len) || !value)) - -#define IS_VALUE_NOT_ZERO(hk, name) \ - (!hk || (len=sizeof(value),RegQueryValueEx(hk, name, NULL, NULL, (LPBYTE)&value, &len) || value>0)) -#endif - - // insert hard coded start entries AddButton(ResString(IDS_PROGRAMS), ICID_APPS, true, IDC_PROGRAMS); AddButton(ResString(IDS_DOCUMENTS), ICID_DOCUMENTS, true, IDC_DOCUMENTS); -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) if (!g_Globals._SHRestricted || !SHRestricted(REST_NORECENTDOCSMENU)) -#else - if (IS_VALUE_ZERO(hkey, _T("NoRecentDocsMenu"))) -#endif AddButton(ResString(IDS_RECENT), ICID_RECENT, true, IDC_RECENT); AddButton(ResString(IDS_FAVORITES), ICID_FAVORITES, true, IDC_FAVORITES); @@ -1742,42 +1718,26 @@ AddButton(ResString(IDS_BROWSE), ICID_FOLDER, true, IDC_BROWSE); -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) if (!g_Globals._SHRestricted || !SHRestricted(REST_NOFIND)) -#else - if (IS_VALUE_ZERO(hkey, _T("NoFind"))) -#endif AddButton(ResString(IDS_SEARCH), ICID_SEARCH, true, IDC_SEARCH); AddButton(ResString(IDS_START_HELP), ICID_INFO, false, IDC_START_HELP); -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) if (!g_Globals._SHRestricted || !SHRestricted(REST_NORUN)) -#else - if (IS_VALUE_ZERO(hkey, _T("NoRun"))) -#endif AddButton(ResString(IDS_LAUNCH), ICID_ACTION, false, IDC_LAUNCH); AddSeparator(); -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) if (!g_Globals._SHRestricted || SHRestricted(REST_STARTMENULOGOFF) != 1) -#else - if (IS_VALUE_NOT_ZERO(hkeyAdv, _T("StartMenuLogoff"))) -#endif AddButton(ResString(IDS_LOGOFF), ICID_LOGOFF, false, IDC_LOGOFF); #ifdef __REACTOS__ AddButton(ResString(IDS_RESTART), ICID_RESTART, false, IDC_RESTART); #endif -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) if (!g_Globals._SHRestricted || !SHRestricted(REST_NOCLOSE)) -#else - if (IS_VALUE_ZERO(hkey, _T("NoClose"))) -#endif AddButton(ResString(IDS_SHUTDOWN), ICID_SHUTDOWN, false, IDC_SHUTDOWN); #ifndef __REACTOS__ @@ -1785,10 +1745,6 @@ #endif -#ifdef __MINGW32__ - RegCloseKey(hkeyAdv); - RegCloseKey(hkey); -#endif #ifdef _LIGHT_STARTMENU @@ -2205,18 +2161,14 @@ AddButton(ResString(IDS_ADMIN), ICID_ADMIN, true, IDC_ADMIN); -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) if (!g_Globals._SHRestricted || !SHRestricted(REST_NOCONTROLPANEL)) -#endif - AddButton(ResString(IDS_SETTINGS_MENU), ICID_CONFIG, true, IDC_SETTINGS_MENU); + AddButton(ResString(IDS_SETTINGS_MENU), ICID_CONFIG, true, IDC_SETTINGS_MENU); AddButton(ResString(IDS_DESKTOPBAR_SETTINGS), ICID_DESKSETTING, false, ID_DESKTOPBAR_SETTINGS); AddButton(ResString(IDS_PRINTERS), ICID_PRINTER, false, IDC_PRINTERS); -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) if (!g_Globals._SHRestricted || !SHRestricted(REST_NOCONTROLPANEL)) -#endif AddButton(ResString(IDS_CONTROL_PANEL), ICID_CONTROLPAN, false, IDC_CONTROL_PANEL); } @@ -2224,9 +2176,7 @@ { super::AddEntries(); -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) if (!g_Globals._SHRestricted || !SHRestricted(REST_NONETHOOD)) // or REST_NOENTIRENETWORK ? -#endif #if defined(ROSSHELL) || defined(__REACTOS__) // __REACTOS__ to be removed when printer/network will be implemented AddButton(ResString(IDS_NETWORK), ICID_NETWORK, false, IDC_NETWORK); #else @@ -2242,9 +2192,7 @@ AddButton(ResString(IDS_SEARCH_FILES), ICID_SEARCH_DOC, false, IDC_SEARCH_FILES); -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) if (!g_Globals._SHRestricted || !SHRestricted(REST_HASFINDCOMPUTERS)) -#endif AddButton(ResString(IDS_SEARCH_COMPUTER),ICID_COMPUTER, false, IDC_SEARCH_COMPUTER); AddButton(ResString(IDS_SEARCH_PRG), ICID_APPS, false, IDC_SEARCH_PROGRAM); Index: base/shell/explorer/taskbar/taskbar.cpp =================================================================== --- base/shell/explorer/taskbar/taskbar.cpp (revision 60677) +++ base/shell/explorer/taskbar/taskbar.cpp (working copy) @@ -133,7 +133,6 @@ //SetWindowFont(_htoolbar, GetStockFont(ANSI_VAR_FONT), FALSE); //SendMessage(_htoolbar, TB_SETPADDING, 0, MAKELPARAM(8,8)); -#ifndef __MINGW32__ // TBMETRICS missing in MinGW (as of 20.09.2005) // set metrics for the Taskbar toolbar to enable button spacing TBMETRICS metrics; @@ -145,7 +144,6 @@ metrics.cyButtonSpacing = 3; SendMessage(_htoolbar, TB_SETMETRICS, 0, (LPARAM)&metrics); -#endif _next_id = IDC_FIRST_APP; @@ -264,11 +262,9 @@ ActivateApp(it, false, false); // don't restore minimized windows on right button click -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) static DynamicFct pSHRestricted(TEXT("SHELL32"), "SHRestricted"); if (pSHRestricted && !(*pSHRestricted)(REST_NOTRAYCONTEXTMENU)) -#endif ShowAppSystemMenu(it); } break;} Index: base/shell/explorer/taskbar/traynotify.cpp =================================================================== --- base/shell/explorer/taskbar/traynotify.cpp (revision 60677) +++ base/shell/explorer/taskbar/traynotify.cpp (working copy) @@ -133,7 +133,6 @@ changes = true; ///@todo compare icon } -#ifdef NIF_STATE // as of 21.08.2003 missing in MinGW headers if (pnid->uFlags & NIF_STATE) { DWORD new_state = (_dwState&~pnid->dwStateMask) | (pnid->dwState&pnid->dwStateMask); @@ -142,7 +141,6 @@ changes = true; } } -#endif // store tool tip text if (pnid->uFlags & NIF_TIP) { @@ -252,9 +250,7 @@ // read notification icon settings from XML configuration XMLPos cfg_pos = g_Globals.get_cfg(); -#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) if (!g_Globals._SHRestricted || !SHRestricted(REST_HIDECLOCK)) -#endif { if (cfg_pos.go_down("desktopbar")) { clock_visible = XMLBoolRef(XMLPos(cfg_pos,"options"), "show-clock", !get_hide_clock_from_registry()); @@ -609,12 +605,10 @@ */ bool changes = entry.modify(pnid); -#if NOTIFYICON_VERSION>=3 // as of 21.08.2003 missing in MinGW headers if (DetermineHideState(entry) && entry._mode==NIM_HIDE) { entry._dwState |= NIS_HIDDEN; changes = true; } -#endif if (changes) UpdateIcons(); ///@todo call only if really changes occurred @@ -635,7 +629,6 @@ } break;} -#if NOTIFYICON_VERSION>=3 // as of 21.08.2003 missing in MinGW headers case NIM_SETFOCUS: SetForegroundWindow(_hwnd); return TRUE; @@ -648,7 +641,6 @@ return TRUE; } else return FALSE; -#endif } return FALSE; @@ -662,9 +654,7 @@ for(NotifyIconMap::const_iterator it=_icon_map.begin(); it!=_icon_map.end(); ++it) { const NotifyInfo& entry = it->second; -#ifdef NIF_STATE // as of 21.08.2003 missing in MinGW headers if (_show_hidden || !(entry._dwState & NIS_HIDDEN)) -#endif _sorted_icons.insert(entry); } @@ -830,8 +820,6 @@ } -#if NOTIFYICON_VERSION>=3 // as of 21.08.2003 missing in MinGW headers - bool NotifyIconConfig::match(const NotifyIconConfig& props) const { if (!_tipText.empty() && !props._tipText.empty()) @@ -873,7 +861,6 @@ return false; } -#endif String string_from_mode(NOTIFYICONMODE mode) Index: base/shell/explorer/utility/shellclasses.cpp =================================================================== --- base/shell/explorer/utility/shellclasses.cpp (revision 60677) +++ base/shell/explorer/utility/shellclasses.cpp (working copy) @@ -483,20 +483,15 @@ void CtxMenuInterfaces::reset() { _pctxmenu2 = NULL; - -#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) _pctxmenu3 = NULL; -#endif } bool CtxMenuInterfaces::HandleMenuMsg(UINT nmsg, WPARAM wparam, LPARAM lparam) { -#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) if (_pctxmenu3) { if (SUCCEEDED(_pctxmenu3->HandleMenuMsg(nmsg, wparam, lparam))) return true; } -#endif if (_pctxmenu2) if (SUCCEEDED(_pctxmenu2->HandleMenuMsg(nmsg, wparam, lparam))) @@ -512,11 +507,9 @@ reset(); // Get the higher version context menu interfaces. -#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) if (pcm1->QueryInterface(IID_IContextMenu3, (void**)&pcm) == NOERROR) _pctxmenu3 = (LPCONTEXTMENU3)pcm; else -#endif if (pcm1->QueryInterface(IID_IContextMenu2, (void**)&pcm) == NOERROR) _pctxmenu2 = (LPCONTEXTMENU2)pcm; Index: base/shell/explorer/utility/shellclasses.h =================================================================== --- base/shell/explorer/utility/shellclasses.h (revision 60677) +++ base/shell/explorer/utility/shellclasses.h (working copy) @@ -1114,9 +1114,7 @@ IContextMenu2* _pctxmenu2; -#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) IContextMenu3* _pctxmenu3; -#endif }; template struct ExtContextMenuHandlerT @@ -1151,7 +1149,6 @@ break; -#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) case WM_MENUCHAR: // only supported by IContextMenu3 if (_cm_ifs._pctxmenu3) { LRESULT lResult = 0; @@ -1162,7 +1159,6 @@ } return 0; -#endif } return super::WndProc(nmsg, wparam, lparam);