[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

svn path=/trunk/; revision=70001
This commit is contained in:
Robert Naumann 2015-11-22 09:28:45 +00:00
parent 58f084ebff
commit 84d8c79180
5 changed files with 67 additions and 15 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
*/

View file

@ -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;