Commit in reactos/subsys/system/explorer on MAIN
explorer_intres.h+2-11.49 -> 1.50
explorer_intres.rc+12-101.67 -> 1.68
desktop/desktop.cpp+48-361.58 -> 1.59
       /desktop.h+51.18 -> 1.19
dialogs/settings.cpp+35-61.7 -> 1.8
       /settings.h+31.6 -> 1.7
utility/utility.cpp+191.18 -> 1.19
       /utility.h+31.63 -> 1.64
       /window.cpp+3-121.55 -> 1.56
       /window.h-11.52 -> 1.53
       /xmlstorage.h+17-21.7 -> 1.8
+147-68
11 modified files
option "display version on desktop background"

reactos/subsys/system/explorer
explorer_intres.h 1.49 -> 1.50
diff -u -r1.49 -r1.50
--- explorer_intres.h	28 Mar 2004 14:55:17 -0000	1.49
+++ explorer_intres.h	28 Mar 2004 20:32:21 -0000	1.50
@@ -142,6 +142,7 @@
 #define IDC_LABEL4                      1023
 #define ID_HIDE_INACTIVE_ICONS          1025
 #define ID_SHOW_CLOCK                   1026
+#define ID_DESKTOP_VERSION              1027
 #define ID_REFRESH                      1704
 #define ID_ABOUT_WINEFILE               1705
 #define IDC_FILETREE                    10001
@@ -193,7 +194,7 @@
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        166
 #define _APS_NEXT_COMMAND_VALUE         40019
-#define _APS_NEXT_CONTROL_VALUE         1026
+#define _APS_NEXT_CONTROL_VALUE         1028
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif

reactos/subsys/system/explorer
explorer_intres.rc 1.67 -> 1.68
diff -u -r1.67 -r1.68
--- explorer_intres.rc	28 Mar 2004 14:55:17 -0000	1.67
+++ explorer_intres.rc	28 Mar 2004 20:32:21 -0000	1.68
@@ -768,7 +768,7 @@
                     WS_TABSTOP,7,25,130,33
 END
 
-IDD_DESKBAR_DESKTOP DIALOG DISCARDABLE  0, 0, 212, 172
+IDD_DESKBAR_DESKTOP DIALOG DISCARDABLE  0, 0, 212, 194
 STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
 CAPTION "Desktop Properties"
 FONT 8, "MS Sans Serif"
@@ -799,22 +799,24 @@
                     BS_BOTTOM | WS_TABSTOP,110,121,46,44
     CONTROL         "",IDC_ICON_ALIGN_11,"Button",BS_OWNERDRAW | BS_BOTTOM | 
                     WS_TABSTOP,159,121,46,44
+    CONTROL         "Display &Version Number",ID_DESKTOP_VERSION,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10
 END
 
-IDD_DESKBAR_TASKBAR DIALOG DISCARDABLE  0, 0, 210, 154
+IDD_DESKBAR_TASKBAR DIALOG DISCARDABLE  0, 0, 210, 194
 STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
 CAPTION "Taskbar Properties"
 FONT 8, "MS Sans Serif"
 BEGIN
     CONTROL         "show &clock",ID_SHOW_CLOCK,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,7,113,52,10
+                    WS_TABSTOP,7,152,52,10
     CONTROL         "&hide inactive notification icons",
                     ID_HIDE_INACTIVE_ICONS,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,7,135,111,10
-    PUSHBUTTON      "&Notifications...",ID_CONFIG_NOTIFYAREA,153,133,50,14
+                    WS_TABSTOP,7,174,111,10
+    PUSHBUTTON      "&Notifications...",ID_CONFIG_NOTIFYAREA,153,173,50,14
 END
 
-IDD_DESKBAR_STARTMENU DIALOG DISCARDABLE  0, 0, 210, 154
+IDD_DESKBAR_STARTMENU DIALOG DISCARDABLE  0, 0, 210, 194
 STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
 CAPTION "Startmenu Properties"
 FONT 8, "MS Sans Serif"
@@ -826,7 +828,7 @@
     WS_SYSMENU | WS_THICKFRAME
 EXSTYLE WS_EX_APPWINDOW
 CAPTION "Configure Notification Icons"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
     CONTROL         "Tree1",IDC_NOTIFY_ICONS,"SysTreeView32",TVS_HASLINES | 
                     TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,193,31
@@ -872,7 +874,7 @@
         LEFTMARGIN, 7
         RIGHTMARGIN, 205
         TOPMARGIN, 7
-        BOTTOMMARGIN, 165
+        BOTTOMMARGIN, 187
     END
 
     IDD_DESKBAR_TASKBAR, DIALOG
@@ -880,7 +882,7 @@
         LEFTMARGIN, 7
         RIGHTMARGIN, 203
         TOPMARGIN, 7
-        BOTTOMMARGIN, 147
+        BOTTOMMARGIN, 187
     END
 
     IDD_DESKBAR_STARTMENU, DIALOG
@@ -888,7 +890,7 @@
         LEFTMARGIN, 7
         RIGHTMARGIN, 203
         TOPMARGIN, 7
-        BOTTOMMARGIN, 147
+        BOTTOMMARGIN, 187
     END
 
     IDD_NOTIFYAREA, DIALOG

reactos/subsys/system/explorer/desktop
desktop.cpp 1.58 -> 1.59
diff -u -r1.58 -r1.59
--- desktop.cpp	20 Mar 2004 13:49:12 -0000	1.58
+++ desktop.cpp	28 Mar 2004 20:32:21 -0000	1.59
@@ -257,56 +257,37 @@
 }
 
 
-static void draw_desktop_background(HWND hwnd, HDC hdc)
-{
-	ClientRect rect(hwnd);
-
-	PaintDesktop(hdc);
-/*
-	HBRUSH bkgndBrush = CreateSolidBrush(RGB(0,32,160));	// dark blue
-	FillRect(hdc, &rect, bkgndBrush);
-	DeleteBrush(bkgndBrush);
-*/
-
-	rect.left = rect.right - 280;
-	rect.top = rect.bottom - 56 - DESKTOPBARBAR_HEIGHT;
-	rect.right = rect.left + 250;
-	rect.bottom = rect.top + 40;
-
-#include "../buildno.h"
-	static const LPCTSTR BkgndText = TEXT("ReactOS ")TEXT(KERNEL_VERSION_STR)TEXT(" Explorer\nby Martin Fuchs");
-
-	BkMode bkMode(hdc, TRANSPARENT);
-
-	TextColor textColor(hdc, RGB(128,128,192));
-	DrawText(hdc, BkgndText, -1, &rect, DT_RIGHT);
-
-	SetTextColor(hdc, RGB(255,255,255));
-	--rect.right;
-	++rect.top;
-	DrawText(hdc, BkgndText, -1, &rect, DT_RIGHT);
-}
-
-
 BackgroundWindow::BackgroundWindow(HWND hwnd)
  :	super(hwnd)
 {
 	 // set background brush for the short moment of displaying the
 	 // background color while moving foreground windows
 	SetClassLong(hwnd, GCL_HBRBACKGROUND, COLOR_BACKGROUND+1);
+
+	_display_version = RegGetDWORDValue(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), TEXT("PaintDesktopVersion"), 1);
 }
 
 LRESULT BackgroundWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
 {
 	switch(nmsg) {
 	  case WM_ERASEBKGND:
-		PaintDesktop((HDC)wparam);
+		DrawDesktopBkgnd((HDC)wparam);
 		return TRUE;
 
 	  case WM_MBUTTONDBLCLK:
 		explorer_show_frame(SW_SHOWNORMAL);
 		break;
 
+	  case PM_DISPLAY_VERSION:
+		if (lparam || wparam) {
+			DWORD or_mask = wparam;
+			DWORD reset_mask = LOWORD(lparam);
+			DWORD xor_mask = HIWORD(lparam);
+			_display_version = ((_display_version&~reset_mask) | or_mask) ^ xor_mask;
+			InvalidateRect(_hwnd, NULL, TRUE);
+		}
+		return _display_version;
+
 	  default:
 		return super::WndProc(nmsg, wparam, lparam);
 	}
@@ -314,6 +295,38 @@
 	return 0;
 }
 
+void BackgroundWindow::DrawDesktopBkgnd(HDC hdc)
+{
+	PaintDesktop(hdc);
+
+/* special solid background
+	HBRUSH bkgndBrush = CreateSolidBrush(RGB(0,32,160));	// dark blue
+	FillRect(hdc, &rect, bkgndBrush);
+	DeleteBrush(bkgndBrush);
+*/
+	if (_display_version) {
+		ClientRect rect(_hwnd);
+
+		rect.left = rect.right - 280;
+		rect.top = rect.bottom - 56 - DESKTOPBARBAR_HEIGHT;
+		rect.right = rect.left + 250;
+		rect.bottom = rect.top + 40;
+
+	#include "../buildno.h"
+		static const LPCTSTR BkgndText = TEXT("ReactOS ")TEXT(KERNEL_VERSION_STR)TEXT(" Explorer\nby Martin Fuchs");
+
+		BkMode bkMode(hdc, TRANSPARENT);
+
+		TextColor textColor(hdc, RGB(128,128,192));
+		DrawText(hdc, BkgndText, -1, &rect, DT_RIGHT);
+
+		SetTextColor(hdc, RGB(255,255,255));
+		--rect.right;
+		++rect.top;
+		DrawText(hdc, BkgndText, -1, &rect, DT_RIGHT);
+	}
+}
+
 
 DesktopWindow::DesktopWindow(HWND hwnd)
  :	super(hwnd)
@@ -436,10 +449,6 @@
 LRESULT DesktopWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
 {
 	switch(nmsg) {
-	  case WM_PAINT:
-		draw_desktop_background(_hwnd, PaintCanvas(_hwnd));
-		break;
-
 	  case WM_LBUTTONDBLCLK:
 	  case WM_RBUTTONDBLCLK:
 	  case WM_MBUTTONDBLCLK:
@@ -554,6 +563,9 @@
 	  case PM_GET_ICON_ALGORITHM:
 		return _icon_algo;
 
+	  case PM_DISPLAY_VERSION:
+		return SendMessage(_hwndListView, nmsg, wparam, lparam);
+
 	  default:
 		return super::WndProc(nmsg, wparam, lparam);
 	}

reactos/subsys/system/explorer/desktop
desktop.h 1.18 -> 1.19
diff -u -r1.18 -r1.19
--- desktop.h	20 Mar 2004 13:49:12 -0000	1.18
+++ desktop.h	28 Mar 2004 20:32:21 -0000	1.19
@@ -28,6 +28,7 @@
 
 #define	PM_SET_ICON_ALGORITHM	(WM_APP+0x19)
 #define	PM_GET_ICON_ALGORITHM	(WM_APP+0x1A)
+#define	PM_DISPLAY_VERSION		(WM_APP+0x24)
 
 
  /// subclassed Background window behind the visible desktop window
@@ -39,6 +40,10 @@
 
 protected:
 	LRESULT	WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam);
+
+	void	DrawDesktopBkgnd(HDC hdc);
+
+	int		_display_version;
 };
 
 

reactos/subsys/system/explorer/dialogs
settings.cpp 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- settings.cpp	28 Mar 2004 14:55:17 -0000	1.7
+++ settings.cpp	28 Mar 2004 20:32:22 -0000	1.8
@@ -95,6 +95,9 @@
 
 	_alignment_cur = SendMessage(g_Globals._hwndShellView, PM_GET_ICON_ALGORITHM, 0, 0);
 	_alignment_tmp = _alignment_cur;
+
+	_display_version_org = SendMessage(g_Globals._hwndShellView, PM_DISPLAY_VERSION, 0, MAKELONG(0,0));
+	CheckDlgButton(hwnd, ID_DESKTOP_VERSION, _display_version_org? BST_CHECKED: BST_UNCHECKED);
 }
 
 #ifndef PSN_QUERYINITIALFOCUS	// currently (as of 18.01.2004) missing in MinGW headers
@@ -110,11 +113,13 @@
 
 	  case PSN_APPLY:
 		_alignment_cur = _alignment_tmp;
+		_display_version_org = SendMessage(g_Globals._hwndShellView, PM_DISPLAY_VERSION, 0, MAKELONG(0,0));
 		break;
 
 	  case PSN_RESET:
 		if (_alignment_tmp != _alignment_cur)
 			SendMessage(g_Globals._hwndShellView, PM_SET_ICON_ALGORITHM, _alignment_cur, 0);
+		SendMessage(g_Globals._hwndShellView, PM_DISPLAY_VERSION, _display_version_org, MAKELONG(1,0));
 		break;
 
 	  default:
@@ -140,7 +145,17 @@
 		return 0;
 	}
 
-	return 1;
+	switch(id) {
+	  case ID_DESKTOP_VERSION:
+		SendMessage(g_Globals._hwndShellView, PM_DISPLAY_VERSION, 0, MAKELONG(0,1));	// toggle version display flag
+		PropSheet_Changed(GetParent(_hwnd), _hwnd);
+		break;
+
+	  default:
+		return 1;
+	}
+
+	return 0;
 }
 
 
@@ -152,6 +167,25 @@
 	CheckDlgButton(hwnd, ID_HIDE_INACTIVE_ICONS, XMLBool(g_Globals.get_cfg("notify-icons"), "options", "hide-inactive", true)? BST_CHECKED: BST_UNCHECKED);
 }
 
+int TaskbarSettingsDlg::Notify(int id, NMHDR* pnmh)
+{
+	switch(pnmh->code) {
+	  case PSN_APPLY:
+		_cfg_org = g_Globals._cfg;
+		break;
+
+	  case PSN_RESET:
+		g_Globals._cfg = _cfg_org;
+		SendMessage(g_Globals._hwndDesktopBar, PM_REFRESH_CONFIG, 0, 0);
+		break;
+
+	  default:
+		return super::Notify(id, pnmh);
+	}
+
+	return 0;
+}
+
 int	TaskbarSettingsDlg::Command(int id, int code)
 {
 	switch(id) {
@@ -171,11 +205,6 @@
 		PropSheet_Changed(GetParent(_hwnd), _hwnd);
 		break;
 
-	  case PSN_RESET:
-		g_Globals._cfg = _cfg_org;
-		SendMessage(g_Globals._hwndDesktopBar, PM_REFRESH_CONFIG, 0, 0);
-		break;
-
 	  default:
 		return 1;
 	}

reactos/subsys/system/explorer/dialogs
settings.h 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- settings.h	28 Mar 2004 14:55:17 -0000	1.6
+++ settings.h	28 Mar 2004 20:32:22 -0000	1.7
@@ -54,6 +54,8 @@
 	int	_alignment_cur;
 	int	_alignment_tmp;
 
+	int	_display_version_org;
+
 	virtual int Command(int id, int code);
 	virtual int Notify(int id, NMHDR* pnmh);
 };
@@ -67,6 +69,7 @@
 	TaskbarSettingsDlg(HWND hwnd);
 
 	virtual int	Command(int id, int code);
+	virtual int Notify(int id, NMHDR* pnmh);
 
 protected:
 	XMLDoc	_cfg_org;

reactos/subsys/system/explorer/utility
utility.cpp 1.18 -> 1.19
diff -u -r1.18 -r1.19
--- utility.cpp	20 Mar 2004 13:49:13 -0000	1.18
+++ utility.cpp	28 Mar 2004 20:32:22 -0000	1.19
@@ -333,3 +333,22 @@
 
 	return TRUE;
 }
+
+
+DWORD RegGetDWORDValue(HKEY root, LPCTSTR path, LPCTSTR valueName, DWORD def)
+{
+	HKEY hkey;
+	DWORD ret;
+
+	if (!RegOpenKey(root, path, &hkey)) {
+		DWORD len = sizeof(ret);
+
+		if (RegQueryValueEx(hkey, valueName, 0, NULL, (LPBYTE)&ret, &len))
+			ret = def;
+
+		RegCloseKey(hkey);
+
+		return ret;
+	} else
+		return def;
+}

reactos/subsys/system/explorer/utility
utility.h 1.63 -> 1.64
diff -u -r1.63 -r1.64
--- utility.h	27 Mar 2004 18:08:42 -0000	1.63
+++ utility.h	28 Mar 2004 20:32:22 -0000	1.64
@@ -149,6 +149,9 @@
  // create a directory with all missing parent directories
 BOOL RecursiveCreateDirectory(LPCTSTR path_in);
 
+ // read DWORD value from registry
+DWORD RegGetDWORDValue(HKEY root, LPCTSTR path, LPCTSTR valueName, DWORD def);
+
 
 #ifdef __cplusplus
 } // extern "C"

reactos/subsys/system/explorer/utility
window.cpp 1.55 -> 1.56
diff -u -r1.55 -r1.56
--- window.cpp	21 Mar 2004 00:31:14 -0000	1.55
+++ window.cpp	28 Mar 2004 20:32:22 -0000	1.56
@@ -649,11 +649,6 @@
 	unregister_dialog(_hwnd);
 }
 
-LRESULT Dialog::Init(LPCREATESTRUCT pcs)
-{
-	return TRUE;	// set standard focus
-}
-
 int Dialog::DoModal(UINT nid, CREATORFUNC creator, HWND hwndParent)
 {
 	Lock lock(GetStaticWindowData()._create_crit_sect);	// protect access to s_window_creator and s_new_info
@@ -685,7 +680,7 @@
 	if (pThis) {
 		switch(nmsg) {
 		  case WM_COMMAND:
-			SetWindowLong(hwnd, DWL_MSGRESULT, (LPARAM)pThis->Command(LOWORD(wparam), HIWORD(wparam)));
+			pThis->Command(LOWORD(wparam), HIWORD(wparam));
 			return TRUE;	// message has been processed
 
 		  case WM_NOTIFY:
@@ -708,8 +703,6 @@
 
 		if (pThis)
 			return pThis->Init(NULL);
-
-		return TRUE;
 	}
 
 	return FALSE;	// message has not been processed
@@ -1373,7 +1366,7 @@
 	if (pThis) {
 		switch(nmsg) {
 		  case WM_COMMAND:
-			SetWindowLong(hwnd, DWL_MSGRESULT, (LPARAM)pThis->Command(LOWORD(wparam), HIWORD(wparam)));
+			pThis->Command(LOWORD(wparam), HIWORD(wparam));
 			return TRUE;	// message has been processed
 
 		  case WM_NOTIFY:
@@ -1401,8 +1394,6 @@
 			if (pThis)
 				return pThis->Init(NULL);
 		}
-
-		return TRUE;
 	}
 
 	return FALSE;	// message has not been processed
@@ -1412,5 +1403,5 @@
 {
 	// override call to EndDialog in Dialog::Command();
 
-	return 1;
+	return FALSE;
 }

reactos/subsys/system/explorer/utility
window.h 1.52 -> 1.53
diff -u -r1.52 -r1.53
--- window.h	21 Mar 2004 00:31:14 -0000	1.52
+++ window.h	28 Mar 2004 20:32:22 -0000	1.53
@@ -371,7 +371,6 @@
 	static int DoModal(UINT nid, CREATORFUNC_INFO creator, const void* info, HWND hwndParent=0);
 
 protected:
-	LRESULT	Init(LPCREATESTRUCT pcs);
 	LRESULT	WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam);
 	int		Command(int id, int code);
 };

reactos/subsys/system/explorer/utility
xmlstorage.h 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- xmlstorage.h	28 Mar 2004 18:10:48 -0000	1.7
+++ xmlstorage.h	28 Mar 2004 20:32:22 -0000	1.8
@@ -303,6 +303,21 @@
 		}
 	}
 
+	XMLNode& operator=(const XMLNode& other)
+	{
+		_children.clear();
+
+		for(Children::const_iterator it=other._children.begin(); it!=other._children.end(); ++it)
+			_children.push_back(new XMLNode(**it));
+
+		_attributes = other._attributes;
+
+		_content = other._content;
+		_trailing = other._trailing;
+
+		return *this;
+	}
+
 	 /// add a new child node
 	void add_child(XMLNode* child)
 	{
@@ -329,7 +344,7 @@
 	 /// convenient value access in children node
 	String value(const String& name, const String& attr_name) const
 	{
-		XMLNode* node = find_first(name);
+		const XMLNode* node = find_first(name);
 
 		if (node)
 			return (*node)[attr_name];
@@ -365,7 +380,7 @@
 	 /// convenient value access in children node
 	String value(const char* name, const char* attr_name) const
 	{
-		XMLNode* node = find_first(name);
+		const XMLNode* node = find_first(name);
 
 		if (node)
 			return (*node)[attr_name];
CVSspam 0.2.8