mirror of
https://github.com/reactos/reactos.git
synced 2024-08-02 09:30:55 +00:00
[EXPLORER]
Implement support for hotkeys for run, show desktop and logoff currently it also causes the startmenu to open, like with win-E, but this is a different bug See issue #1512 for more details. svn path=/trunk/; revision=54076
This commit is contained in:
parent
8605da369f
commit
d5a6da4ea8
|
@ -245,7 +245,10 @@ LRESULT StartButton::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
|||
void DesktopBar::RegisterHotkeys()
|
||||
{
|
||||
// register hotkey WIN+E opening explorer
|
||||
RegisterHotKey(_hwnd, 0, MOD_WIN, 'E');
|
||||
RegisterHotKey(_hwnd, IDHK_EXPLORER, MOD_WIN, 'E');
|
||||
RegisterHotKey(_hwnd, IDHK_RUN, MOD_WIN, 'R');
|
||||
RegisterHotKey(_hwnd, IDHK_DESKTOP, MOD_WIN, 'D');
|
||||
RegisterHotKey(_hwnd, IDHK_LOGOFF, MOD_WIN, 'L');
|
||||
|
||||
///@todo register all common hotkeys
|
||||
}
|
||||
|
@ -253,8 +256,21 @@ void DesktopBar::RegisterHotkeys()
|
|||
void DesktopBar::ProcessHotKey(int id_hotkey)
|
||||
{
|
||||
switch(id_hotkey) {
|
||||
case 0: explorer_show_frame(SW_SHOWNORMAL);
|
||||
break;
|
||||
case IDHK_EXPLORER:
|
||||
explorer_show_frame(SW_SHOWNORMAL);
|
||||
break;
|
||||
|
||||
case IDHK_RUN:
|
||||
_startMenuRoot->Command(IDC_LAUNCH, 0);
|
||||
break;
|
||||
|
||||
case IDHK_LOGOFF:
|
||||
_startMenuRoot->Command(IDC_LOGOFF, 0);
|
||||
break;
|
||||
|
||||
case IDHK_DESKTOP:
|
||||
g_Globals._desktops.ToggleMinimize();
|
||||
break;
|
||||
|
||||
///@todo implement all common hotkeys
|
||||
}
|
||||
|
|
|
@ -63,6 +63,11 @@
|
|||
|
||||
#define IDC_FIRST_MENU 0x3000
|
||||
|
||||
// hotkeys
|
||||
#define IDHK_EXPLORER 0
|
||||
#define IDHK_RUN 1
|
||||
#define IDHK_DESKTOP 2
|
||||
#define IDHK_LOGOFF 3
|
||||
|
||||
/// desktop bar window, also known as "system tray"
|
||||
struct DesktopBar : public
|
||||
|
|
|
@ -1692,6 +1692,10 @@ void StartMenuRoot::TrackStartmenu()
|
|||
}
|
||||
}
|
||||
|
||||
int StartMenuRoot::Command(int id, int code)
|
||||
{
|
||||
return super::Command(id, code);
|
||||
}
|
||||
|
||||
LRESULT StartMenuRoot::Init(LPCREATESTRUCT pcs)
|
||||
{
|
||||
|
@ -2111,10 +2115,10 @@ void StartMenuHandler::ShowSearchComputer()
|
|||
MessageBox(0, TEXT("SHFindComputer() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK);
|
||||
}
|
||||
|
||||
struct RunDialogThread : public Thread
|
||||
{
|
||||
int Run();
|
||||
};
|
||||
struct RunDialogThread : public Thread
|
||||
{
|
||||
int Run();
|
||||
};
|
||||
|
||||
int RunDialogThread::Run()
|
||||
{
|
||||
|
|
|
@ -369,6 +369,7 @@ struct StartMenuRoot : public StartMenuHandler
|
|||
|
||||
static HWND Create(HWND hwndDesktopBar, int icon_size);
|
||||
void TrackStartmenu();
|
||||
int Command(int id, int code);
|
||||
|
||||
HWND _hwndStartButton;
|
||||
|
||||
|
|
Loading…
Reference in a new issue