reactos/subsys/system/explorer
diff -u -r1.81 -r1.82
--- explorer_intres.rc 30 Oct 2004 20:23:59 -0000 1.81
+++ explorer_intres.rc 20 Nov 2004 19:30:41 -0000 1.82
@@ -821,6 +821,7 @@
POPUP ""
BEGIN
MENUITEM "&Show hidden icons", ID_SHOW_HIDDEN_ICONS
+ MENUITEM "Show Icon &Button", ID_SHOW_ICON_BUTTON
MENUITEM "&Configure Notifications...", ID_CONFIG_NOTIFYAREA
MENUITEM "Adjust Date/&Time...", ID_CONFIG_TIME
MENUITEM SEPARATOR
@@ -948,33 +949,36 @@
BEGIN
END
-IDD_NOTIFYAREA DIALOGEX 0, 0, 207, 150
+IDD_NOTIFYAREA DIALOGEX 0, 0, 208, 174
STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "Configure Notification Icons"
-FONT 8, "MS Sans Serif", 0, 0, 0x1
+FONT 8, "MS Sans Serif"
BEGIN
CONTROL "Tree1",IDC_NOTIFY_ICONS,"SysTreeView32",TVS_HASLINES |
- TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,193,31
+ TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,194,31
LTEXT "&Tooltip Text:",IDC_LABEL1,7,44,40,8
- EDITTEXT IDC_NOTIFY_TOOLTIP,55,42,145,14,ES_AUTOHSCROLL
+ EDITTEXT IDC_NOTIFY_TOOLTIP,58,42,143,14,ES_AUTOHSCROLL
LTEXT "W&indow Title:",IDC_LABEL2,7,63,44,8
- EDITTEXT IDC_NOTIFY_TITLE,55,60,145,14,ES_AUTOHSCROLL
+ EDITTEXT IDC_NOTIFY_TITLE,58,60,143,14,ES_AUTOHSCROLL
LTEXT "&Module Path:",IDC_LABEL3,7,81,43,8
- EDITTEXT IDC_NOTIFY_MODULE,55,78,145,14,ES_AUTOHSCROLL
- GROUPBOX "&Display Mode",IDC_LABEL4,7,95,157,28
+ EDITTEXT IDC_NOTIFY_MODULE,58,78,143,14,ES_AUTOHSCROLL
+ GROUPBOX "&Display Mode",IDC_LABEL4,7,96,157,28
CONTROL "&show",IDC_NOTIFY_SHOW,"Button",BS_AUTORADIOBUTTON |
- WS_TABSTOP,15,107,33,10
+ WS_TABSTOP,15,108,33,10
CONTROL "&hide",IDC_NOTIFY_HIDE,"Button",BS_AUTORADIOBUTTON,66,
- 107,29,10
+ 108,29,10
CONTROL "a&utohide",IDC_NOTIFY_AUTOHIDE,"Button",
- BS_AUTORADIOBUTTON,112,107,43,10
- ICON "",IDC_PICTURE,173,100,20,20
+ BS_AUTORADIOBUTTON,112,108,43,10
+ ICON "",IDC_PICTURE,173,101,21,20
+ LTEXT "&Last Change:",IDC_LABEL6,7,132,43,8
+ EDITTEXT IDC_LAST_CHANGE,59,129,105,14,ES_AUTOHSCROLL |
+ ES_READONLY
CONTROL "sho&w hidden",ID_SHOW_HIDDEN_ICONS,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,7,131,56,10
- DEFPUSHBUTTON "&OK",IDOK,91,129,50,14,WS_GROUP
- PUSHBUTTON "&Cancel",IDCANCEL,150,129,50,14
+ BS_AUTOCHECKBOX | WS_TABSTOP,7,154,56,10
+ DEFPUSHBUTTON "&OK",IDOK,91,153,50,14,WS_GROUP
+ PUSHBUTTON "&Cancel",IDCANCEL,151,153,50,14
END
IDD_MDI_SDI DIALOGEX 0, 0, 188, 126
@@ -1039,9 +1043,9 @@
IDD_NOTIFYAREA, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 200
+ RIGHTMARGIN, 201
TOPMARGIN, 7
- BOTTOMMARGIN, 143
+ BOTTOMMARGIN, 167
END
IDD_MDI_SDI, DIALOG
@@ -1304,6 +1308,7 @@
POPUP ""
BEGIN
MENUITEM "&Mostrar iconos ocultos", ID_SHOW_HIDDEN_ICONS
+ MENUITEM "Show Icon &Button", ID_SHOW_ICON_BUTTON
MENUITEM "&Configurar Notificaciones...", ID_CONFIG_NOTIFYAREA
MENUITEM "Ajustar Fecha/&Hora...", ID_CONFIG_TIME
MENUITEM SEPARATOR
@@ -1431,33 +1436,36 @@
BEGIN
END
-IDD_NOTIFYAREA DIALOGEX 0, 0, 207, 150
+IDD_NOTIFYAREA DIALOGEX 0, 0, 208, 174
STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "Configure Notification Icons"
-FONT 8, "MS Sans Serif", 0, 0, 0x1
+FONT 8, "MS Sans Serif"
BEGIN
CONTROL "Tree1",IDC_NOTIFY_ICONS,"SysTreeView32",TVS_HASLINES |
- TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,193,31
- LTEXT "&Texto de Info de herramientas:",IDC_LABEL1,7,44,40,8
- EDITTEXT IDC_NOTIFY_TOOLTIP,55,42,145,14,ES_AUTOHSCROLL
- LTEXT "Titulo de la V&entana:",IDC_LABEL2,7,63,44,8
- EDITTEXT IDC_NOTIFY_TITLE,55,60,145,14,ES_AUTOHSCROLL
- LTEXT "Parche del &Modulo:",IDC_LABEL3,7,81,43,8
- EDITTEXT IDC_NOTIFY_MODULE,55,78,145,14,ES_AUTOHSCROLL
+ TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,194,31
+ LTEXT "&Texto de Info:",IDC_LABEL1,7,44,45,8
+ EDITTEXT IDC_NOTIFY_TOOLTIP,84,42,117,14,ES_AUTOHSCROLL
+ LTEXT "Titulo de la V&entana:",IDC_LABEL2,7,63,66,8
+ EDITTEXT IDC_NOTIFY_TITLE,84,60,117,14,ES_AUTOHSCROLL
+ LTEXT "&Parche del Modulo:",IDC_LABEL3,7,81,62,8
+ EDITTEXT IDC_NOTIFY_MODULE,84,78,117,14,ES_AUTOHSCROLL
GROUPBOX "Modo de &Display",IDC_LABEL4,7,95,157,28
CONTROL "&Mostrar",IDC_NOTIFY_SHOW,"Button",BS_AUTORADIOBUTTON |
WS_TABSTOP,15,107,33,10
CONTROL "&Ocultar",IDC_NOTIFY_HIDE,"Button",BS_AUTORADIOBUTTON,
- 66,107,29,10
+ 63,107,29,10
CONTROL "A&utoocultar",IDC_NOTIFY_AUTOHIDE,"Button",
- BS_AUTORADIOBUTTON,112,107,43,10
+ BS_AUTORADIOBUTTON,104,107,51,10
ICON "",IDC_PICTURE,173,100,20,20
- CONTROL "Mostrar Ocultos",ID_SHOW_HIDDEN_ICONS,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,7,131,56,10
- DEFPUSHBUTTON "&Aceptar",IDOK,91,129,50,14,WS_GROUP
- PUSHBUTTON "&Cancelar",IDCANCEL,150,129,50,14
+ LTEXT "&Last Change:",IDC_LABEL6,7,132,43,8
+ EDITTEXT IDC_LAST_CHANGE,59,129,105,14,ES_AUTOHSCROLL |
+ ES_READONLY
+ CONTROL "Mostrar Ocu<os",ID_SHOW_HIDDEN_ICONS,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,7,153,65,10
+ DEFPUSHBUTTON "&Aceptar",IDOK,91,153,50,14,WS_GROUP
+ PUSHBUTTON "&Cancelar",IDCANCEL,151,153,50,14
END
@@ -1504,9 +1512,9 @@
IDD_NOTIFYAREA, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 200
+ RIGHTMARGIN, 201
TOPMARGIN, 7
- BOTTOMMARGIN, 143
+ BOTTOMMARGIN, 167
END
END
#endif // APSTUDIO_INVOKED
reactos/subsys/system/explorer/taskbar
diff -u -r1.65 -r1.66
--- traynotify.cpp 26 Sep 2004 15:13:16 -0000 1.65
+++ traynotify.cpp 20 Nov 2004 19:30:41 -0000 1.66
@@ -175,6 +175,7 @@
_last_icon_count = 0;
_show_hidden = false;
_hide_inactive = true;
+ _show_button = true;
}
NotifyArea::~NotifyArea()
@@ -379,6 +380,7 @@
PopupMenu menu(IDM_NOTIFYAREA);
SetMenuDefaultItem(menu, 0, MF_BYPOSITION);
CheckMenuItem(menu, ID_SHOW_HIDDEN_ICONS, MF_BYCOMMAND|(_show_hidden?MF_CHECKED:MF_UNCHECKED));
+ CheckMenuItem(menu, ID_SHOW_ICON_BUTTON, MF_BYCOMMAND|(_show_button?MF_CHECKED:MF_UNCHECKED));
menu.TrackPopupMenu(_hwnd, MAKEPOINTS(lparam));
}
break;}
@@ -461,6 +463,11 @@
UpdateIcons();
break;
+ case ID_SHOW_ICON_BUTTON:
+ _show_button = !_show_button;
+ UpdateIcons();
+ break;
+
case ID_CONFIG_NOTIFYAREA:
Dialog::DoModal(IDD_NOTIFYAREA, WINDOW_CREATOR(TrayNotifyDlg), GetParent(_hwnd));
break;
@@ -804,6 +811,9 @@
_resize_mgr.Add(IDC_PICTURE, MOVE);
_resize_mgr.Add(ID_SHOW_HIDDEN_ICONS,MOVE_Y);
+ _resize_mgr.Add(IDC_LABEL6, MOVE_Y);
+ _resize_mgr.Add(IDC_LAST_CHANGE, MOVE_Y);
+
_resize_mgr.Add(IDOK, MOVE);
_resize_mgr.Add(IDCANCEL, MOVE);
@@ -861,6 +871,8 @@
_hitemCurrent_hidden = TreeView_InsertItem(_tree_ctrl, &tvi);
if (_pNotifyArea) {
+ _info.clear();
+
tv.mask |= TVIF_PARAM;
WindowCanvas canvas(_hwnd);
@@ -913,9 +925,12 @@
InsertItem(hparent, after, entry, hdc, entry._hIcon, entry._mode);
}
-void TrayNotifyDlg::InsertItem(HTREEITEM hparent, HTREEITEM after, const NotifyIconConfig& entry,
+void TrayNotifyDlg::InsertItem(HTREEITEM hparent, HTREEITEM after, const NotifyIconDlgInfo& entry,
HDC hdc, HICON hicon, NOTIFYICONMODE mode)
{
+ int idx = _info.size();
+ _info[idx] = entry;
+
String mode_str = string_from_mode(mode);
switch(mode) {
@@ -934,7 +949,7 @@
TV_ITEM& tv = tvi.item;
tv.mask = TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM;
- tv.lParam = (LPARAM)&entry;
+ tv.lParam = (LPARAM)idx;
tv.pszText = (LPTSTR)txt.c_str();
tv.iSelectedImage = tv.iImage = ImageList_AddAlphaIcon(_himl, hicon, GetStockBrush(WHITE_BRUSH), hdc);
TreeView_InsertItem(_tree_ctrl, &tvi);
@@ -1026,7 +1041,7 @@
LPARAM lparam = pnmtv->itemNew.lParam;
if (lparam) {
- const NotifyIconConfig& entry = *(NotifyIconConfig*)lparam;
+ const NotifyIconDlgInfo& entry = _info[lparam];
SetDlgItemText(_hwnd, IDC_NOTIFY_TOOLTIP, entry._tipText);
SetDlgItemText(_hwnd, IDC_NOTIFY_TITLE, entry._windowTitle);
@@ -1034,6 +1049,11 @@
CheckRadioButton(_hwnd, IDC_NOTIFY_SHOW, IDC_NOTIFY_AUTOHIDE, IDC_NOTIFY_SHOW+entry._mode);
+ String change_str;
+ if (entry._lastChange)
+ change_str.printf(TEXT("before %d s"), (GetTickCount()-entry._lastChange+500)/1000);
+ SetDlgItemText(_hwnd, IDC_LAST_CHANGE, change_str);
+
HICON hicon = 0; //get_window_icon_big(entry._hWnd, false);
// If we could not find an icon associated with the owner window, try to load one from the owning module.