Commit in reactos/subsys/system/explorer on MAIN
explorer-cfg-template.xml+2-21.4 -> 1.5
explorer.dsp+81.59 -> 1.60
explorer_intres.h+5-11.59 -> 1.60
explorer_intres.rc+141.82 -> 1.83
doc/changes.txt+11.49 -> 1.50
res/notify_l.ico[binary]added 1.1
   /notify_r.ico[binary]added 1.1
taskbar/traynotify.cpp+60-181.66 -> 1.67
       /traynotify.h+31.25 -> 1.26
+93-21
2 added + 7 modified, total 9 files
notification area button to toggle hidden icons

reactos/subsys/system/explorer
explorer-cfg-template.xml 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- explorer-cfg-template.xml	22 Sep 2004 22:56:59 -0000	1.4
+++ explorer-cfg-template.xml	20 Nov 2004 22:35:05 -0000	1.5
@@ -11,7 +11,7 @@
   </desktop>
 
   <desktopbar>
-    <options show-clock="TRUE"/>
+    <options show-clock="true"/>
     <positions>
 	  <bar name="quicklaunch" left="10" top="2" width="250" height="22"/>
 	  <bar name="taskbar" left="300" top="2" width="400" height="22"/>
@@ -22,7 +22,7 @@
   </taskbar>
 
   <notify-icons>
-    <options hide-inactive="TRUE" show-hidden="FALSE"/>
+    <options hide-inactive="true" show-button="true" show-hidden="false"/>
     <icon name="Volume Control" text="Volume" show="show"/>
   </notify-icons>
 

reactos/subsys/system/explorer
explorer.dsp 1.59 -> 1.60
diff -u -r1.59 -r1.60
--- explorer.dsp	3 Aug 2004 19:43:45 -0000	1.59
+++ explorer.dsp	20 Nov 2004 22:35:05 -0000	1.60
@@ -518,6 +518,14 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\res\notify_l.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\notify_r.ico
+# End Source File
+# Begin Source File
+
 SOURCE=.\res\notify_t.ico
 # End Source File
 # Begin Source File

reactos/subsys/system/explorer
explorer_intres.h 1.59 -> 1.60
diff -u -r1.59 -r1.60
--- explorer_intres.h	20 Nov 2004 19:30:41 -0000	1.59
+++ explorer_intres.h	20 Nov 2004 22:35:05 -0000	1.60
@@ -44,6 +44,8 @@
 #define IDS_NOTIFY_SHOW                 40
 #define IDS_NOTIFY_HIDE                 41
 #define IDS_NOTIFY_AUTOHIDE             42
+#define IDS_SHOW_HIDDEN_ICONS           43
+#define IDS_HIDE_ICONS                  44
 #define IDI_REACTOS                     100
 #define IDI_EXPLORER                    101
 #define IDI_STARTMENU                   102
@@ -109,6 +111,8 @@
 #define IDI_DOT_RED                     165
 #define IDI_ARROW_UP                    166
 #define IDI_ARROW_DOWN                  167
+#define IDI_NOTIFY_L                    168
+#define IDI_NOTIFY_R                    169
 #define ID_VIEW_NAME                    401
 #define ID_VIEW_ALL_ATTRIBUTES          402
 #define ID_VIEW_SELECTED_ATTRIBUTES     403
@@ -211,7 +215,7 @@
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        166
+#define _APS_NEXT_RESOURCE_VALUE        169
 #define _APS_NEXT_COMMAND_VALUE         40024
 #define _APS_NEXT_CONTROL_VALUE         1033
 #define _APS_NEXT_SYMED_VALUE           101

reactos/subsys/system/explorer
explorer_intres.rc 1.82 -> 1.83
diff -u -r1.82 -r1.83
--- explorer_intres.rc	20 Nov 2004 19:30:41 -0000	1.82
+++ explorer_intres.rc	20 Nov 2004 22:35:05 -0000	1.83
@@ -174,6 +174,8 @@
     IDS_NOTIFY_SHOW         "show"
     IDS_NOTIFY_HIDE         "hide"
     IDS_NOTIFY_AUTOHIDE     "autohide"
+    IDS_SHOW_HIDDEN_ICONS   "Show hidden icons"
+    IDS_HIDE_ICONS          "Hide icons"
 END
 
 #endif    // Romanian resources
@@ -568,6 +570,8 @@
 IDI_DOT_RED             ICON    DISCARDABLE     "res/dot_red.ico"
 IDI_ARROW_UP            ICON    DISCARDABLE     "res/arrow_up.ico"
 IDI_ARROW_DOWN          ICON    DISCARDABLE     "res/arrow_dwn.ico"
+IDI_NOTIFY_L            ICON    DISCARDABLE     "res\\notify_l.ico"
+IDI_NOTIFY_R            ICON    DISCARDABLE     "res/notify_r.ico"
 
 /////////////////////////////////////////////////////////////////////////////
 //
@@ -627,6 +631,8 @@
     IDS_NOTIFY_SHOW         "sichtbar"
     IDS_NOTIFY_HIDE         "versteckt"
     IDS_NOTIFY_AUTOHIDE     "automatisch"
+    IDS_SHOW_HIDDEN_ICONS   "Zeige versteckte Icons"
+    IDS_HIDE_ICONS          "Verstecke Icons"
 END
 
 #endif    // German (Germany) resources
@@ -1117,6 +1123,8 @@
     IDS_NOTIFY_SHOW         "show"
     IDS_NOTIFY_HIDE         "hide"
     IDS_NOTIFY_AUTOHIDE     "autohide"
+    IDS_SHOW_HIDDEN_ICONS   "Show hidden icons"
+    IDS_HIDE_ICONS          "Hide icons"
 END
 
 #endif    // English (U.S.) resources
@@ -1578,6 +1586,8 @@
     IDS_NOTIFY_SHOW         "mostrar"
     IDS_NOTIFY_HIDE         "ocultar"
     IDS_NOTIFY_AUTOHIDE     "autoocultar"
+    IDS_SHOW_HIDDEN_ICONS   "Show hidden icons"
+    IDS_HIDE_ICONS          "Hide icons"
 END
 
 #endif    // Spanish (Castilian) resources
@@ -1746,6 +1756,8 @@
     IDS_NOTIFY_SHOW         "show"
     IDS_NOTIFY_HIDE         "hide"
     IDS_NOTIFY_AUTOHIDE     "autohide"
+    IDS_SHOW_HIDDEN_ICONS   "Show hidden icons"
+    IDS_HIDE_ICONS          "Hide icons"
 END
 
 #endif    // French (France) resources
@@ -1957,6 +1969,8 @@
     IDS_NOTIFY_SHOW         "show"
     IDS_NOTIFY_HIDE         "hide"
     IDS_NOTIFY_AUTOHIDE     "autohide"
+    IDS_SHOW_HIDDEN_ICONS   "Show hidden icons"
+    IDS_HIDE_ICONS          "Hide icons"
 END
 
 #endif    // Portuguese (Portugal) resources

reactos/subsys/system/explorer/doc
changes.txt 1.49 -> 1.50
diff -u -r1.49 -r1.50
--- changes.txt	20 Nov 2004 19:30:41 -0000	1.49
+++ changes.txt	20 Nov 2004 22:35:06 -0000	1.50
@@ -90,3 +90,4 @@
 17.09.2004	m. fuchs	handle "." and ".." as special direcory names and move them at the very first beginning of directory listings
 23.09.2004	m. fuchs	configuration dialog to choose between MDI and SDI mode with persistent storage
 20.11.2004	m. fuchs	display notification icon change times
+						notification area button to toggle hidden icons

reactos/subsys/system/explorer/taskbar
traynotify.cpp 1.66 -> 1.67
diff -u -r1.66 -r1.67
--- traynotify.cpp	20 Nov 2004 19:30:41 -0000	1.66
+++ traynotify.cpp	20 Nov 2004 22:35:06 -0000	1.67
@@ -118,7 +118,7 @@
 		if (_hIcon)
 			DestroyIcon(_hIcon);
 
-		_hIcon = (HICON) CopyImage(pnid->hIcon, IMAGE_ICON, 16, 16, 0);
+		_hIcon = (HICON) CopyImage(pnid->hIcon, IMAGE_ICON, NOTIFYICON_SIZE, NOTIFYICON_SIZE, 0);
 	}
 
 #ifdef NIF_STATE	// as of 21.08.2003 missing in MinGW headers
@@ -227,6 +227,7 @@
 
 		_hide_inactive = XMLBool(options, "hide-inactive", true);	///@todo read default setting from registry
 		_show_hidden = XMLBool(options, "show-hidden", false);	///@todo read default setting from registry
+		_show_button = XMLBool(options, "show-button", true);
 
 		XMLChildrenFilter icons(cfg_pos, "icon");
 
@@ -272,6 +273,7 @@
 	XMLPos options(cfg_pos, "options");
 	XMLBoolRef(options, "hide-inactive") = _hide_inactive;
 	XMLBoolRef(options, "show-hidden") = _show_hidden;
+	XMLBoolRef(options, "show-button") = _show_button;
 
 	for(NotifyIconCfgList::iterator it=_cfg.begin(); it!=_cfg.end(); ++it) {
 		NotifyIconConfig& cfg = *it;
@@ -365,8 +367,11 @@
 		SetWindowPos(_hwndClock, 0, cx-_clock_width, 0, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
 		break;}
 
-	  case PM_GET_WIDTH:
-		return _sorted_icons.size()*NOTIFYICON_DIST + NOTIFYAREA_SPACE + _clock_width;
+	  case PM_GET_WIDTH: {
+		int w = _sorted_icons.size()*NOTIFYICON_DIST + NOTIFYAREA_SPACE + _clock_width;
+		if (_show_button)
+			w += NOTIFYICON_DIST;
+		return w;}
 
 	  case PM_REFRESH_CONFIG:
 		read_config();
@@ -402,9 +407,11 @@
 				|| nmsg==WM_XBUTTONDOWN
 #endif
 				)
+
 				CancelModes();
 
-			NotifyIconSet::const_iterator found = IconHitTest(Point(lparam));
+			Point pt(lparam);
+			NotifyIconSet::const_iterator found = IconHitTest(pt);
 
 			if (found != _sorted_icons.end()) {
 				const NotifyInfo& entry = const_cast<NotifyInfo&>(*found);	// Why does GCC 3.3 need this additional const_cast ?!
@@ -446,7 +453,13 @@
 				}
 				else if (_icon_map.erase(entry))	// delete icons without valid owner window
 					UpdateIcons();
-			}
+			} else
+				 // handle clicks on notification area button "show hidden icons"
+				if (_show_button)
+					if (nmsg == WM_LBUTTONDOWN)
+						if (pt.x>=NOTIFYICON_X && pt.x<NOTIFYICON_X+NOTIFYICON_SIZE &&
+							pt.y>=NOTIFYICON_Y && pt.y<NOTIFYICON_Y+NOTIFYICON_SIZE)
+							PostMessage(_hwnd, WM_COMMAND, MAKEWPARAM(ID_SHOW_HIDDEN_ICONS,0), 0);
 		}
 
 		return super::WndProc(nmsg, wparam, lparam);
@@ -491,12 +504,22 @@
 		Point pt(GetMessagePos());
 		ScreenToClient(_hwnd, &pt);
 
-		NotifyIconSet::iterator found = IconHitTest(pt);
+		if (_show_button &&
+			pt.x>=NOTIFYICON_X && pt.x<NOTIFYICON_X+NOTIFYICON_SIZE &&
+			pt.y>=NOTIFYICON_Y && pt.y<NOTIFYICON_Y+NOTIFYICON_SIZE)
+		{
+			static ResString sShowIcons(IDS_SHOW_HIDDEN_ICONS);
+			static ResString sHideIcons(IDS_HIDE_ICONS);
 
-		if (found != _sorted_icons.end()) {
-			NotifyInfo& entry = const_cast<NotifyInfo&>(*found);	// Why does GCC 3.3 need this additional const_cast ?!
+			pdi->lpszText = (LPTSTR)(_show_hidden?sHideIcons:sShowIcons).c_str();
+		} else {
+			NotifyIconSet::iterator found = IconHitTest(pt);
+
+			if (found != _sorted_icons.end()) {
+				NotifyInfo& entry = const_cast<NotifyInfo&>(*found);	// Why does GCC 3.3 need this additional const_cast ?!
 
-			pdi->lpszText = (LPTSTR)entry._tipText.c_str();
+				pdi->lpszText = (LPTSTR)entry._tipText.c_str();
+			}
 		}
 	}
 
@@ -581,10 +604,18 @@
 
 	 // sync tooltip areas to current icon number
 	if (_sorted_icons.size() != _last_icon_count) {
-		RECT rect = {2, 3, 2+16, 3+16};
-		size_t icon_cnt = _sorted_icons.size();
+		RECT rect = {NOTIFYICON_X, NOTIFYICON_Y, NOTIFYICON_X+NOTIFYICON_SIZE, NOTIFYICON_Y+NOTIFYICON_SIZE};
 
 		size_t tt_idx = 0;
+
+		if (_show_button) {
+			_tooltip.add(_hwnd, tt_idx++, rect);
+
+			rect.left += NOTIFYICON_DIST;
+			rect.right += NOTIFYICON_DIST;
+		}
+
+		size_t icon_cnt = _sorted_icons.size();
 		while(tt_idx < icon_cnt) {
 			_tooltip.add(_hwnd, tt_idx++, rect);
 
@@ -612,11 +643,19 @@
 	FillRect(canvas, &canvas.rcPaint, GetSysColorBrush(COLOR_BTNFACE));
 
 	 // draw icons
-	int x = 2;
-	int y = 3;
+	int x = NOTIFYICON_X;
+	int y = NOTIFYICON_Y;
+
+	if (_show_button) {
+		static SmallIcon leftArrowIcon(IDI_NOTIFY_L);
+		static SmallIcon rightArrowIcon(IDI_NOTIFY_R);
+
+		DrawIconEx(canvas, x, y, _show_hidden?rightArrowIcon:leftArrowIcon, NOTIFYICON_SIZE, NOTIFYICON_SIZE, 0, 0, DI_NORMAL);
+		x += NOTIFYICON_DIST;
+	}
 
 	for(NotifyIconSet::const_iterator it=_sorted_icons.begin(); it!=_sorted_icons.end(); ++it) {
-		DrawIconEx(canvas, x, y, it->_hIcon, 16, 16, 0, 0, DI_NORMAL);
+		DrawIconEx(canvas, x, y, it->_hIcon, NOTIFYICON_SIZE, NOTIFYICON_SIZE, 0, 0, DI_NORMAL);
 
 		x += NOTIFYICON_DIST;
 	}
@@ -676,17 +715,20 @@
  /// search for a icon at a given client coordinate position
 NotifyIconSet::iterator NotifyArea::IconHitTest(const POINT& pos)
 {
-	if (pos.y<2 || pos.y>=2+16)
+	if (pos.y<NOTIFYICON_Y || pos.y>=NOTIFYICON_Y+NOTIFYICON_SIZE)
 		return _sorted_icons.end();
 
 	NotifyIconSet::iterator it = _sorted_icons.begin();
 
-	int x = 2;
+	int x = NOTIFYICON_X;
+
+	if (_show_button)
+		x += NOTIFYICON_DIST;
 
 	for(; it!=_sorted_icons.end(); ++it) {
 		//NotifyInfo& entry = const_cast<NotifyInfo&>(*it);	// Why does GCC 3.3 need this additional const_cast ?!
 
-		if (pos.x>=x && pos.x<x+16)
+		if (pos.x>=x && pos.x<x+NOTIFYICON_SIZE)
 			break;
 
 		x += NOTIFYICON_DIST;
@@ -1096,7 +1138,7 @@
 	if (!lparam)
 		return;
 
-	NotifyIconConfig& entry = *(NotifyIconConfig*)lparam;
+	NotifyIconConfig& entry = _info[lparam];
 
 	if (entry._mode != mode) {
 		entry._mode = mode;

reactos/subsys/system/explorer/taskbar
traynotify.h 1.25 -> 1.26
diff -u -r1.25 -r1.26
--- traynotify.h	20 Nov 2004 19:30:41 -0000	1.25
+++ traynotify.h	20 Nov 2004 22:35:06 -0000	1.26
@@ -34,6 +34,9 @@
 #define	NOTIFYAREA_WIDTH_DEF	100
 #define	NOTIFYICON_DIST			20
 #define	NOTIFYAREA_SPACE		10
+#define	NOTIFYICON_SIZE			16
+#define	NOTIFYICON_X			2
+#define	NOTIFYICON_Y			3
 
 #define	ICON_AUTOHIDE_SECONDS	300
 
CVSspam 0.2.8