[ros-diffs] [mf] 14470: show logoff dialog in lean explorer

mf at svn.reactos.com mf at svn.reactos.com
Sun Apr 3 13:38:13 CEST 2005


show logoff dialog in lean explorer
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer-jp.rc
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.h
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.rc
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/mainframe.cp
p
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellbrowser
.cpp
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/desktopbar
.h
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
cpp
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
h
Modified: trunk/reactos/subsys/system/explorer/explorer_intres.rc
Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp
Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.h
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer-jp.rc
(Binary files differ)
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.h
---
branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.h
2005-04-03 11:23:03 UTC (rev 14469)
+++
branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.h
2005-04-03 11:38:08 UTC (rev 14470)
@@ -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
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.rc
---
branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.rc
2005-04-03 11:23:03 UTC (rev 14469)
+++
branches/lean-explorer/reactos/subsys/system/explorer/explorer_intres.rc
2005-04-03 11:38:08 UTC (rev 14470)
@@ -83,6 +83,7 @@

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

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/mainframe.cp
p
---
branches/lean-explorer/reactos/subsys/system/explorer/shell/mainframe.cp
p	2005-04-03 11:23:03 UTC (rev 14469)
+++
branches/lean-explorer/reactos/subsys/system/explorer/shell/mainframe.cp
p	2005-04-03 11:38:08 UTC (rev 14470)
@@ -188,7 +188,7 @@

 	} 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();
 	}
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellbrowser
.cpp
---
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellbrowser
.cpp	2005-04-03 11:23:03 UTC (rev 14469)
+++
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellbrowser
.cpp	2005-04-03 11:38:08 UTC (rev 14470)
@@ -662,9 +662,8 @@

 	}
 
 		//@@ 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)
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/desktopbar
.h
---
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/desktopbar
.h	2005-04-03 11:23:03 UTC (rev 14469)
+++
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/desktopbar
.h	2005-04-03 11:38:08 UTC (rev 14470)
@@ -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
 
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
cpp
---
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
cpp	2005-04-03 11:23:03 UTC (rev 14469)
+++
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
cpp	2005-04-03 11:38:08 UTC (rev 14470)
@@ -1661,6 +1661,9 @@

 		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 @@
 		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::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);
 }
 
 
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
h
---
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
h	2005-04-03 11:23:03 UTC (rev 14469)
+++
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
h	2005-04-03 11:38:08 UTC (rev 14470)
@@ -319,9 +319,11 @@

 #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 @@
 	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();
 };
  _____  

Modified: trunk/reactos/subsys/system/explorer/explorer_intres.rc
--- trunk/reactos/subsys/system/explorer/explorer_intres.rc
2005-04-03 11:23:03 UTC (rev 14469)
+++ trunk/reactos/subsys/system/explorer/explorer_intres.rc
2005-04-03 11:38:08 UTC (rev 14470)
@@ -1926,7 +1926,7 @@

     IDS_TITLE               "Explorador do Reactos"
     IDS_START               "Iniciar"
     IDS_LOGOFF              "Terminar sessÒo..."
-    IDS_TERMINATE           "Terminar"
+    IDS_TERMINATE           "Terminar ROS Explorador"
     IDS_SHUTDOWN            "Desligar..."
     IDS_LAUNCH              "Executar..."
     IDS_START_HELP          "Ajuda"
  _____  

Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp
--- trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp
2005-04-03 11:23:03 UTC (rev 14469)
+++ trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp
2005-04-03 11:38:08 UTC (rev 14470)
@@ -1834,7 +1834,7 @@

 
 	  case IDC_LOGOFF:
 		CloseStartMenu(id);
-		ShowLogoffDialog(g_Globals._hwndDesktopBar, EWX_LOGOFF);
+		ShowLogoffDialog(g_Globals._hwndDesktopBar);
 		break;
 
 	  case IDC_TERMINATE:
@@ -1979,7 +1979,7 @@
 	}
 }
 
-void StartMenuHandler::ShowLogoffDialog(HWND hwndOwner, UINT flags)
+void StartMenuHandler::ShowLogoffDialog(HWND hwndOwner)
 {
 	static DynamicFct<LOGOFFWINDOWSDIALOG>
LogoffWindowsDialog(TEXT("SHELL32"), 54);
 //	static DynamicFct<RESTARTWINDOWSDLG>
RestartDialog(TEXT("SHELL32"), 59);
@@ -1988,7 +1988,7 @@
 		(*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", flags) == 1;	///@todo ANSI string conversion
if needed
+		return (*RestartDialog)(hwndOwner, (LPWSTR)L"You
selected <Log Off>.\n\n", EWX_LOGOFF) == 1;	///@todo ANSI string
conversion if needed
 */
 	else
 		MessageBox(hwndOwner, TEXT("LogoffWindowsDialog() not
yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK);
  _____  

Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.h
--- trunk/reactos/subsys/system/explorer/taskbar/startmenu.h
2005-04-03 11:23:03 UTC (rev 14469)
+++ trunk/reactos/subsys/system/explorer/taskbar/startmenu.h
2005-04-03 11:38:08 UTC (rev 14470)
@@ -349,7 +349,7 @@

 	int		Command(int id, int code);
 
 	static void	ShowLaunchDialog(HWND hwndOwner);
-	static void	ShowLogoffDialog(HWND hwndOwner, UINT flags);
+	static void	ShowLogoffDialog(HWND hwndOwner);
 	static void	ShowSearchDialog();
 	static void	ShowSearchComputer();
 };
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050403/0d70c395/attachment.html


More information about the Ros-diffs mailing list