diff --git a/reactos/base/shell/explorer/CMakeLists.txt b/reactos/base/shell/explorer/CMakeLists.txt index d7fead80292..6640d9e57da 100644 --- a/reactos/base/shell/explorer/CMakeLists.txt +++ b/reactos/base/shell/explorer/CMakeLists.txt @@ -12,8 +12,8 @@ list(APPEND SOURCE shellservice.cpp startctxmnu.cpp startmnu.cpp - startmnusite.cpp startmnucust.cpp + startmnusite.cpp startup.cpp taskband.cpp taskswnd.cpp diff --git a/reactos/base/shell/explorer/lang/en-US.rc b/reactos/base/shell/explorer/lang/en-US.rc index 4ea1b3284bf..456e0a3b755 100644 --- a/reactos/base/shell/explorer/lang/en-US.rc +++ b/reactos/base/shell/explorer/lang/en-US.rc @@ -92,9 +92,9 @@ BEGIN AUTORADIOBUTTON "&Start menu", IDC_TASKBARPROP_STARTMENU, 7, 135, 105, 10, WS_DISABLED LTEXT "This menu style gives you easy access to your folders, favorite programs, and search.", IDC_STATIC, 20, 145, 150, 24, WS_DISABLED PUSHBUTTON "&Customize...", IDC_TASKBARPROP_STARTMENUCUST, 192, 132, 53, 14, WS_DISABLED - AUTORADIOBUTTON "Classic Start &menu", IDC_TASKBARPROP_STARTMENUCLASSIC, 7, 175, 105, 10, WS_DISABLED - LTEXT "This menu style gives you the classic look and functionality", IDC_STATIC, 20, 185, 150, 24, WS_DISABLED - PUSHBUTTON "&Customize...", IDC_TASKBARPROP_STARTMENUCLASSICCUST, 192, 172, 53, 14, WS_DISABLED + AUTORADIOBUTTON "Classic Start &menu", IDC_TASKBARPROP_STARTMENUCLASSIC, 7, 175, 105, 10 + LTEXT "This menu style gives you the classic look and functionality", IDC_STATIC, 20, 185, 150, 24 + PUSHBUTTON "&Customize...", IDC_TASKBARPROP_STARTMENUCLASSICCUST, 192, 172, 53, 14 END IDD_NOTIFICATIONS_CUSTOMIZE DIALOGEX 0, 0, 232, 240 diff --git a/reactos/base/shell/explorer/lang/ms-MY.rc b/reactos/base/shell/explorer/lang/ms-MY.rc index 674789435ff..6b5d0f38aa2 100644 --- a/reactos/base/shell/explorer/lang/ms-MY.rc +++ b/reactos/base/shell/explorer/lang/ms-MY.rc @@ -94,9 +94,9 @@ BEGIN AUTORADIOBUTTON "Menu Mula(&S)", IDC_TASKBARPROP_STARTMENU, 7, 135, 105, 10, WS_DISABLED LTEXT "Gaya menu ini memberikan anda akses ke folder, programs kegemaran anda, dan cari fail anda.", IDC_STATIC, 20, 145, 150, 24, WS_DISABLED PUSHBUTTON "Suaikan...(&C)", IDC_TASKBARPROP_STARTMENUCUST, 192, 132, 53, 14, WS_DISABLED - AUTORADIOBUTTON "Klasik &menu mula", IDC_TASKBARPROP_STARTMENUCLASSIC, 7, 175, 105, 10, WS_DISABLED - LTEXT "Gaya menu ini memberikan anda lihat klasik dan berfungsi", IDC_STATIC, 20, 185, 150, 24, WS_DISABLED - PUSHBUTTON "Suaikan...(&C)", IDC_TASKBARPROP_STARTMENUCLASSICCUST, 192, 172, 53, 14, WS_DISABLED + AUTORADIOBUTTON "Klasik &menu mula", IDC_TASKBARPROP_STARTMENUCLASSIC, 7, 175, 105, 10 + LTEXT "Gaya menu ini memberikan anda lihat klasik dan berfungsi", IDC_STATIC, 20, 185, 150, 24 + PUSHBUTTON "Suaikan...(&C)", IDC_TASKBARPROP_STARTMENUCLASSICCUST, 192, 172, 53, 14 END IDD_NOTIFICATIONS_CUSTOMIZE DIALOGEX 0, 0, 232, 240 diff --git a/reactos/base/shell/explorer/precomp.h b/reactos/base/shell/explorer/precomp.h index c1373495858..d181a1472be 100644 --- a/reactos/base/shell/explorer/precomp.h +++ b/reactos/base/shell/explorer/precomp.h @@ -308,6 +308,12 @@ OUT IMenuBand **ppMenuBand, IN HBITMAP hbmBanner OPTIONAL, IN BOOL bSmallIcons); +/* + * startmnucust.cpp + */ +VOID +ShowCustomizeClassic(HINSTANCE, HWND); + /* * startmnusite.cpp */ @@ -315,12 +321,6 @@ IN BOOL bSmallIcons); HRESULT CreateStartMenuSite(IN OUT ITrayWindow *Tray, const IID & riid, PVOID * ppv); -/* - * startmnucust.cpp - */ -VOID -ShowCustomizeClassic(HINSTANCE, HWND); - /* * trayntfy.c */ diff --git a/reactos/base/shell/explorer/startmnucust.cpp b/reactos/base/shell/explorer/startmnucust.cpp index e1d5e5f7acc..5d542f634af 100644 --- a/reactos/base/shell/explorer/startmnucust.cpp +++ b/reactos/base/shell/explorer/startmnucust.cpp @@ -2,7 +2,7 @@ * ReactOS Explorer * * Copyright 2006 - 2007 Thomas Weidenmueller - * 2015 Robert Naumann * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,16 +21,68 @@ #include "precomp.h" +VOID OnAddStartmenuItems(HWND hDlg) +{ + WCHAR szPath[MAX_PATH]; + + if(SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_STARTMENU, NULL, 0, szPath))) + { + WCHAR szCommand[MAX_PATH] = L"appwiz.cpl,NewLinkHere "; + if(SUCCEEDED(StringCchCatW(szCommand, MAX_PATH, szPath))) + ShellExecuteW(hDlg, L"open", L"rundll32.exe", szCommand, NULL, SW_SHOWNORMAL); + } +} + +VOID OnAdvancedStartMenuItems() +{ + WCHAR szPath[MAX_PATH]; + + if(SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_STARTMENU, NULL, 0, szPath))) + { + ShellExecuteW(NULL, L"explore", szPath, NULL, NULL, SW_SHOWNORMAL); + } +} + +VOID OnClearRecentItems() +{ + WCHAR szPath[MAX_PATH], szFile[MAX_PATH]; + WIN32_FIND_DATA info; + HANDLE hPath; + + if(SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_RECENT, NULL, 0, szPath))) + { + StringCchPrintf(szFile,MAX_PATH, L"%s\\*.*", szPath); + hPath = FindFirstFileW(szFile, &info); + do + { + StringCchPrintf(szFile,MAX_PATH, L"%s\\%s", szPath, info.cFileName); + DeleteFileW(szFile); + + }while(FindNextFileW(hPath, &info)); + FindClose(hPath); + /* FIXME: Disable the button*/ + } +} + BOOL CALLBACK CustomizeClassicProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { switch(Message) { case WM_INITDIALOG: - + /* FIXME: Properly intialize the dialog (check whether 'clear' button must be disabled, for example) */ return TRUE; case WM_COMMAND: switch(LOWORD(wParam)) { + case IDC_CLASSICSTART_ADD: + OnAddStartmenuItems(hwnd); + break; + case IDC_CLASSICSTART_ADVANCED: + OnAdvancedStartMenuItems(); + break; + case IDC_CLASSICSTART_CLEAR: + OnClearRecentItems(); + break; case IDOK: EndDialog(hwnd, IDOK); break;