Author: rnaumann Date: Sun Nov 22 09:28:45 2015 New Revision: 70001
URL: http://svn.reactos.org/svn/reactos?rev=70001&view=rev Log: [EXPLORER] -Implement The "Add...", "Advanced" and "Clear" buttons of the Startmenu customization dialog -Enable some controls that shouldn't be disabled -> Spotted by Jared -Yesterday I heard the whispered word "alphabet", correctly order file/fuction names
Modified: trunk/reactos/base/shell/explorer/CMakeLists.txt trunk/reactos/base/shell/explorer/lang/en-US.rc trunk/reactos/base/shell/explorer/lang/ms-MY.rc trunk/reactos/base/shell/explorer/precomp.h trunk/reactos/base/shell/explorer/startmnucust.cpp
Modified: trunk/reactos/base/shell/explorer/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/CMakeLi... ============================================================================== --- trunk/reactos/base/shell/explorer/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/CMakeLists.txt [iso-8859-1] Sun Nov 22 09:28:45 2015 @@ -12,8 +12,8 @@ shellservice.cpp startctxmnu.cpp startmnu.cpp + startmnucust.cpp startmnusite.cpp - startmnucust.cpp startup.cpp taskband.cpp taskswnd.cpp
Modified: trunk/reactos/base/shell/explorer/lang/en-US.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/lang/en... ============================================================================== --- trunk/reactos/base/shell/explorer/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/lang/en-US.rc [iso-8859-1] Sun Nov 22 09:28:45 2015 @@ -92,9 +92,9 @@ 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
Modified: trunk/reactos/base/shell/explorer/lang/ms-MY.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/lang/ms... ============================================================================== --- trunk/reactos/base/shell/explorer/lang/ms-MY.rc [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/lang/ms-MY.rc [iso-8859-1] Sun Nov 22 09:28:45 2015 @@ -94,9 +94,9 @@ 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
Modified: trunk/reactos/base/shell/explorer/precomp.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/precomp... ============================================================================== --- trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] Sun Nov 22 09:28:45 2015 @@ -309,17 +309,17 @@ IN BOOL bSmallIcons);
/* + * startmnucust.cpp + */ +VOID +ShowCustomizeClassic(HINSTANCE, HWND); + +/* * startmnusite.cpp */
HRESULT CreateStartMenuSite(IN OUT ITrayWindow *Tray, const IID & riid, PVOID * ppv); - -/* - * startmnucust.cpp - */ -VOID -ShowCustomizeClassic(HINSTANCE, HWND);
/* * trayntfy.c
Modified: trunk/reactos/base/shell/explorer/startmnucust.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/startmn... ============================================================================== --- trunk/reactos/base/shell/explorer/startmnucust.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/startmnucust.cpp [iso-8859-1] Sun Nov 22 09:28:45 2015 @@ -2,7 +2,7 @@ * ReactOS Explorer * * Copyright 2006 - 2007 Thomas Weidenmueller w3seek@reactos.org - * 2015 Robert Naumann <gonzomdx@gmail.com| + * 2015 Robert Naumann gonzomdx@gmail.com * * 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;