mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
show logoff dialog in lean explorer
svn path=/branches/lean-explorer/; revision=14470
This commit is contained in:
parent
00bf273c43
commit
89e885955c
8 changed files with 35 additions and 16 deletions
|
@ -146,6 +146,7 @@ BEGIN
|
|||
IDS_TITLE "ReactOS Explorer"
|
||||
IDS_START "スタート"
|
||||
IDS_LOGOFF "ログオフ..."
|
||||
IDS_TERMINATE "ログオフ"
|
||||
IDS_SHUTDOWN "シャットダウン..."
|
||||
IDS_LAUNCH "ファイル名を指定して実行..."
|
||||
IDS_START_HELP "ヘルプ"
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#define IDS_STARTMENU 32
|
||||
#define IDS_MINIMIZE_ALL 33
|
||||
#define IDS_DESKTOP_NUM 34
|
||||
#define IDS_TERMINATE 45
|
||||
#define IDI_REACTOS 100
|
||||
#define IDI_EXPLORER 101
|
||||
#define IDI_STARTMENU 102
|
||||
|
|
|
@ -83,6 +83,7 @@ BEGIN
|
|||
IDS_TITLE "ReactOS Explorer"
|
||||
IDS_START "Începe"
|
||||
IDS_LOGOFF "Închide sesiunea ..."
|
||||
IDS_TERMINATE "Închide"
|
||||
IDS_SHUTDOWN "Oprire calculator ..."
|
||||
IDS_LAUNCH "Pornire ..."
|
||||
IDS_START_HELP "Ajutor"
|
||||
|
@ -338,6 +339,7 @@ BEGIN
|
|||
IDS_TITLE "Reactos Explorer"
|
||||
IDS_START "Start"
|
||||
IDS_LOGOFF "Abmelden..."
|
||||
IDS_TERMINATE "ROS Explorer beenden"
|
||||
IDS_SHUTDOWN "Herunterfahren..."
|
||||
IDS_LAUNCH "Starten..."
|
||||
IDS_START_HELP "Hilfe"
|
||||
|
@ -551,6 +553,7 @@ BEGIN
|
|||
IDS_TITLE "Reactos Explorer"
|
||||
IDS_START "Start"
|
||||
IDS_LOGOFF "Log Off..."
|
||||
IDS_TERMINATE "Terminate ROS Explorer"
|
||||
IDS_SHUTDOWN "Turn Off..."
|
||||
IDS_LAUNCH "Run..."
|
||||
IDS_START_HELP "Help"
|
||||
|
@ -665,6 +668,7 @@ BEGIN
|
|||
IDS_TITLE "Explorateur Reactos"
|
||||
IDS_START "Démarrer"
|
||||
IDS_LOGOFF "Déconnexion ..."
|
||||
IDS_TERMINATE "Déconnexion"
|
||||
IDS_SHUTDOWN "Arrêter..."
|
||||
IDS_LAUNCH "Exécuter..."
|
||||
IDS_START_HELP "Aide"
|
||||
|
@ -749,6 +753,7 @@ BEGIN
|
|||
IDS_TITLE "Explorador do Reactos"
|
||||
IDS_START "Iniciar"
|
||||
IDS_LOGOFF "Terminar sessão..."
|
||||
IDS_TERMINATE "Terminar ROS Explorer"
|
||||
IDS_SHUTDOWN "Desligar..."
|
||||
IDS_LAUNCH "Executar..."
|
||||
IDS_START_HELP "Ajuda"
|
||||
|
|
|
@ -188,7 +188,7 @@ void MainFrame::jump_to(LPCITEMIDLIST path, int mode)
|
|||
} else {
|
||||
_create_info._open_mode = mode;
|
||||
_create_info._shell_path = path;
|
||||
_create_info._root_shell_path = path;//DesktopFolderPath(); //@@
|
||||
_create_info._root_shell_path = SpecialFolderPath(CSIDL_DRIVES, _hwnd); //@@
|
||||
|
||||
update_explorer_view();
|
||||
}
|
||||
|
|
|
@ -662,9 +662,8 @@ void ShellBrowserChild::jump_to(LPCITEMIDLIST pidl)
|
|||
}
|
||||
|
||||
//@@ work around as long as we don't iterate correctly through the ShellEntry tree
|
||||
if (!entry) {
|
||||
if (!entry)
|
||||
UpdateFolderView(ShellFolder(pidl));
|
||||
}
|
||||
}
|
||||
|
||||
void ShellBrowserChild::jump_to(Entry* entry)
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#define IDC_CONTROL_PANEL 0x1012
|
||||
#define IDC_PRINTERS 0x1013
|
||||
#define IDC_SEARCH 0x1016
|
||||
#define IDC_TERMINATE 0x1017
|
||||
|
||||
#define IDC_FIRST_MENU 0x3000
|
||||
|
||||
|
|
|
@ -1661,6 +1661,9 @@ LRESULT StartMenuRoot::Init(LPCREATESTRUCT pcs)
|
|||
AddButton(ResString(IDS_SHUTDOWN), ICID_LOGOFF, false, IDC_SHUTDOWN);
|
||||
|
||||
|
||||
AddButton(ResString(IDS_TERMINATE), ICID_LOGOFF, false, IDC_TERMINATE);
|
||||
|
||||
|
||||
#ifdef __MINGW32__
|
||||
RegCloseKey(hkeyAdv);
|
||||
RegCloseKey(hkey);
|
||||
|
@ -1793,9 +1796,11 @@ int StartMenuHandler::Command(int id, int code)
|
|||
break;
|
||||
|
||||
case IDC_LOGOFF:
|
||||
/* The shell32 Dialog prompts about some system setting change. This is not what we want to display here.
|
||||
CloseStartMenu(id);
|
||||
ShowRestartDialog(g_Globals._hwndDesktopBar, EWX_LOGOFF);*/
|
||||
ShowLogoffDialog(g_Globals._hwndDesktopBar);
|
||||
break;
|
||||
|
||||
case IDC_TERMINATE:
|
||||
DestroyWindow(GetParent(_hwnd));
|
||||
break;
|
||||
|
||||
|
@ -1900,24 +1905,29 @@ void StartMenuHandler::ShowLaunchDialog(HWND hwndOwner)
|
|||
}
|
||||
}
|
||||
|
||||
void StartMenuHandler::ShowRestartDialog(HWND hwndOwner, UINT flags)
|
||||
void StartMenuHandler::ShowLogoffDialog(HWND hwndOwner)
|
||||
{
|
||||
static DynamicFct<RESTARTWINDOWSDLG> RestartDlg(TEXT("SHELL32"), 59);
|
||||
static DynamicFct<LOGOFFWINDOWSDIALOG> LogoffWindowsDialog(TEXT("SHELL32"), 54);
|
||||
// static DynamicFct<RESTARTWINDOWSDLG> RestartDialog(TEXT("SHELL32"), 59);
|
||||
|
||||
if (RestartDlg)
|
||||
(*RestartDlg)(hwndOwner, (LPWSTR)L"You selected <Log Off>.\n\n", flags); ///@todo ANSI string conversion if needed
|
||||
if (LogoffWindowsDialog)
|
||||
(*LogoffWindowsDialog)(0);
|
||||
/* The RestartDialog function prompts about some system setting change. This is not what we want to display here.
|
||||
else if (RestartDialog)
|
||||
return (*RestartDialog)(hwndOwner, (LPWSTR)L"You selected <Log Off>.\n\n", EWX_LOGOFF) == 1; ///@todo ANSI string conversion if needed
|
||||
*/
|
||||
else
|
||||
MessageBox(hwndOwner, TEXT("RestartDlg() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK);
|
||||
MessageBox(hwndOwner, TEXT("LogoffWindowsDialog() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK);
|
||||
}
|
||||
|
||||
void ShowExitWindowsDialog(HWND hwndOwner)
|
||||
{
|
||||
static DynamicFct<EXITWINDOWSDLG> ExitWindowsDlg(TEXT("SHELL32"), 60);
|
||||
static DynamicFct<EXITWINDOWSDLG> ExitWindowsDialog(TEXT("SHELL32"), 60);
|
||||
|
||||
if (ExitWindowsDlg)
|
||||
(*ExitWindowsDlg)(hwndOwner);
|
||||
if (ExitWindowsDialog)
|
||||
(*ExitWindowsDialog)(hwndOwner);
|
||||
else
|
||||
MessageBox(hwndOwner, TEXT("ExitWindowsDlg() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK);
|
||||
MessageBox(hwndOwner, TEXT("ExitWindowsDialog() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -319,9 +319,11 @@ typedef void (WINAPI* RUNFILEDLG)(HWND hwndOwner, HICON hIcon, LPCSTR lpstrDirec
|
|||
#define RFF_NOSEPARATEMEM 0x20 // Removes the Separate Memory Space check box (Windows NT only).
|
||||
|
||||
|
||||
// declare more undocumented shell32 functions
|
||||
// declare more previously undocumented shell32 functions
|
||||
typedef void (WINAPI* EXITWINDOWSDLG)(HWND hwndOwner);
|
||||
typedef int (WINAPI* LOGOFFWINDOWSDIALOG)(UINT flags);
|
||||
typedef int (WINAPI* RESTARTWINDOWSDLG)(HWND hwndOwner, LPCWSTR reason, UINT flags);
|
||||
typedef int (WINAPI* RESTARTWINDOWSDLGEX)(HWND hWndOwner, LPCWSTR lpwstrReason, DWORD uFlags, DWORD uReason);
|
||||
typedef BOOL (WINAPI* SHFINDFILES)(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch);
|
||||
typedef BOOL (WINAPI* SHFINDCOMPUTER)(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch);
|
||||
|
||||
|
@ -345,7 +347,7 @@ protected:
|
|||
int Command(int id, int code);
|
||||
|
||||
static void ShowLaunchDialog(HWND hwndOwner);
|
||||
static void ShowRestartDialog(HWND hwndOwner, UINT flags);
|
||||
static void ShowLogoffDialog(HWND hwndOwner);
|
||||
static void ShowSearchDialog();
|
||||
static void ShowSearchComputer();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue