8 modified files
reactos/subsys/system/explorer
diff -u -r1.10 -r1.11
--- explorer-jp.rc 20 Mar 2004 13:31:09 -0000 1.10
+++ explorer-jp.rc 4 Apr 2004 17:21:27 -0000 1.11
@@ -145,6 +145,7 @@
MENUITEM SEPARATOR
MENUITEM "�c�[���o�[(&T)", ID_VIEW_TOOL_BAR, CHECKED
MENUITEM "�h���C�u�o�[(&D)", ID_VIEW_DRIVE_BAR, CHECKED
+ MENUITEM "&Side bar", ID_VIEW_SIDE_BAR
MENUITEM "�X�e�[�^�X�o�[(&S)", ID_VIEW_STATUSBAR, CHECKED
MENUITEM "�S�����\\��(&U)\tCtrl+Shift+S", ID_VIEW_FULLSCREEN
MENUITEM SEPARATOR
reactos/subsys/system/explorer
diff -u -r1.18 -r1.19
--- explorer.h 28 Mar 2004 14:55:17 -0000 1.18
+++ explorer.h 4 Apr 2004 17:21:27 -0000 1.19
@@ -43,6 +43,7 @@
#define IDW_DRIVEBAR 0x103
#define IDW_ADDRESSBAR 0x104
#define IDW_COMMANDBAR 0x105
+#define IDW_SIDEBAR 0x106
#define IDW_FIRST_CHILD 0xC000 /*0x200*/
reactos/subsys/system/explorer
diff -u -r1.50 -r1.51
--- explorer_intres.h 28 Mar 2004 20:32:21 -0000 1.50
+++ explorer_intres.h 4 Apr 2004 17:21:27 -0000 1.51
@@ -112,6 +112,7 @@
#define ID_VIEW_DRIVE_BAR 507
#define ID_VIEW_TOOL_BAR 508
#define ID_VIEW_EXTRA_BAR 509
+#define ID_VIEW_SIDE_BAR 510
#define IDC_ROS_EXPLORER 1000
#define IDC_ICON_ALIGN_0 1002
#define IDC_ICON_ALIGN_1 1003
reactos/subsys/system/explorer
diff -u -r1.68 -r1.69
--- explorer_intres.rc 28 Mar 2004 20:32:21 -0000 1.68
+++ explorer_intres.rc 4 Apr 2004 17:21:27 -0000 1.69
@@ -38,6 +38,7 @@
MENUITEM "&Extra Bar", ID_VIEW_EXTRA_BAR
MENUITEM "&Drivebar", ID_VIEW_DRIVE_BAR, CHECKED
MENUITEM "&Bara de stare", ID_VIEW_STATUSBAR
+ MENUITEM "&Side Bar", ID_VIEW_SIDE_BAR
MENUITEM SEPARATOR
MENUITEM "F&ull Screen\tCtrl+Shift+S", ID_VIEW_FULLSCREEN
END
@@ -327,6 +328,7 @@
MENUITEM "&Toolbar", ID_VIEW_TOOL_BAR
MENUITEM "&Extra Bar", ID_VIEW_EXTRA_BAR
MENUITEM "Lauf&werkleiste", ID_VIEW_DRIVE_BAR, CHECKED
+ MENUITEM "&Side Bar", ID_VIEW_SIDE_BAR
MENUITEM "&Status Bar", ID_VIEW_STATUSBAR
MENUITEM SEPARATOR
MENUITEM "&Vollbild\tCtrl+Shift+S", ID_VIEW_FULLSCREEN
@@ -569,6 +571,7 @@
MENUITEM "&Toolbar", ID_VIEW_TOOL_BAR
MENUITEM "&Extra Bar", ID_VIEW_EXTRA_BAR
MENUITEM "&Drivebar", ID_VIEW_DRIVE_BAR, CHECKED
+ MENUITEM "&Side Bar", ID_VIEW_SIDE_BAR
MENUITEM "&Status Bar", ID_VIEW_STATUSBAR
MENUITEM SEPARATOR
MENUITEM "F&ull Screen\tCtrl+Shift+S", ID_VIEW_FULLSCREEN
@@ -668,6 +671,7 @@
MENUITEM SEPARATOR
MENUITEM "&Toolbar", ID_VIEW_TOOL_BAR, CHECKED
MENUITEM "&Drivebar", ID_VIEW_DRIVE_BAR, CHECKED
+ MENUITEM "&Side Bar", ID_VIEW_SIDE_BAR
MENUITEM "&Status Bar", ID_VIEW_STATUSBAR, CHECKED
MENUITEM "F&ull Screen\tCtrl+Shift+S", ID_VIEW_FULLSCREEN
MENUITEM SEPARATOR
@@ -993,6 +997,7 @@
MENUITEM "Barre d'&outils", ID_VIEW_TOOL_BAR
MENUITEM "&Extra Bar", ID_VIEW_EXTRA_BAR
MENUITEM "&Drivebar", ID_VIEW_DRIVE_BAR, CHECKED
+ MENUITEM "&Side Bar", ID_VIEW_SIDE_BAR
MENUITEM "Barre d'&�tat", ID_VIEW_STATUSBAR
MENUITEM SEPARATOR
MENUITEM "F&ull Screen\tCtrl+Shift+S", ID_VIEW_FULLSCREEN
@@ -1193,6 +1198,7 @@
MENUITEM SEPARATOR
MENUITEM "Barra de Ferramentas", ID_VIEW_TOOL_BAR, CHECKED
MENUITEM "Barra de Drives", ID_VIEW_DRIVE_BAR, CHECKED
+ MENUITEM "&Side Bar", ID_VIEW_SIDE_BAR
MENUITEM "Barra de Estado", ID_VIEW_STATUSBAR, CHECKED
MENUITEM "Ecr� Cheio\tCtrl+Shift+S", ID_VIEW_FULLSCREEN
MENUITEM SEPARATOR
reactos/subsys/system/explorer/shell
diff -u -r1.51 -r1.52
--- mainframe.cpp 20 Mar 2004 13:49:12 -0000 1.51
+++ mainframe.cpp 4 Apr 2004 17:21:27 -0000 1.52
@@ -275,6 +275,14 @@
_hstatusbar = CreateStatusWindow(WS_CHILD|WS_VISIBLE, 0, hwnd, IDW_STATUSBAR);
CheckMenuItem(_menu_info._hMenuView, ID_VIEW_STATUSBAR, MF_BYCOMMAND|MF_CHECKED);
+
+ _hsidebar = CreateWindowEx(WS_EX_STATICEDGE, WC_TREEVIEW, TEXT("Sidebar"),
+ WS_CHILD|WS_TABSTOP|WS_BORDER|WS_VISIBLE|WS_CHILD|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_NOTOOLTIPS|TVS_SHOWSELALWAYS,
+ -1, -1, 200, 0, _hwnd, (HMENU)IDW_SIDEBAR, g_Globals._hInstance, 0);
+
+ CheckMenuItem(_menu_info._hMenuView, ID_VIEW_SIDE_BAR, MF_BYCOMMAND|MF_CHECKED);
+
+ FillBookmarks();
}
@@ -602,6 +610,10 @@
toggle_child(_hwnd, id, _hstatusbar);
break;
+ case ID_VIEW_SIDE_BAR:
+ toggle_child(_hwnd, id, _hsidebar);
+ break;
+
case ID_EXECUTE: {
ExecuteDialog dlg = {{0}, 0};
@@ -761,27 +773,27 @@
} else {
if (IsWindowVisible(_htoolbar)) {
SendMessage(_htoolbar, WM_SIZE, 0, 0);
- ClientRect rt(_htoolbar);
- prect->top = rt.bottom+3;
- // prect->bottom -= rt.bottom+3;
+ WindowRect rt(_htoolbar);
+ prect->top = rt.bottom;
+ // prect->bottom -= rt.bottom;
}
if (IsWindowVisible(_hextrabar)) {
SendMessage(_hextrabar, WM_SIZE, 0, 0);
- ClientRect rt(_hextrabar);
- int new_top = --prect->top + rt.bottom+3;
+ WindowRect rt(_hextrabar);
+ int new_top = --prect->top + rt.bottom;
MoveWindow(_hextrabar, 0, prect->top, rt.right, new_top, TRUE);
prect->top = new_top;
- // prect->bottom -= rt.bottom+2;
+ // prect->bottom -= rt.bottom;
}
if (IsWindowVisible(_hdrivebar)) {
SendMessage(_hdrivebar, WM_SIZE, 0, 0);
- ClientRect rt(_hdrivebar);
- int new_top = --prect->top + rt.bottom+3;
+ WindowRect rt(_hdrivebar);
+ int new_top = --prect->top + rt.bottom;
MoveWindow(_hdrivebar, 0, prect->top, rt.right, new_top, TRUE);
prect->top = new_top;
- // prect->bottom -= rt.bottom+2;
+ // prect->bottom -= rt.bottom;
}
}
@@ -803,6 +815,13 @@
SetWindowPos(_hcommandedit, 0, mid+1, prect->bottom, prect->right-(mid+1), rt.bottom, SWP_NOACTIVATE|SWP_NOZORDER);
}
+ if (IsWindowVisible(_hsidebar)) {
+ WindowRect rt(_hsidebar);
+ prect->left += rt.right-rt.left;
+
+ SetWindowPos(_hsidebar, 0, -1, prect->top-1, rt.right-rt.left, prect->bottom-prect->top+1, SWP_NOACTIVATE|SWP_NOZORDER);
+ }
+
#ifndef _NO_MDI
MoveWindow(_hmdiclient, prect->left-1, prect->top-1, prect->right-prect->left+2, prect->bottom-prect->top+1, TRUE);
#endif
@@ -986,4 +1005,14 @@
return false;
}
+
+void MainFrame::FillBookmarks()
+{
+ HiddenWindow hide(_hsidebar);
+
+ TreeView_DeleteAllItems(_hsidebar);
+
+ g_Globals._favorites.fill_tree(_hsidebar, TVI_ROOT);
+}
+
#endif
reactos/subsys/system/explorer/shell
diff -u -r1.19 -r1.20
--- mainframe.h 20 Mar 2004 13:49:12 -0000 1.19
+++ mainframe.h 4 Apr 2004 17:21:27 -0000 1.20
@@ -60,6 +60,7 @@
WindowHandle _hdrivebar;
WindowHandle _haddressedit;
WindowHandle _hcommandedit;
+ WindowHandle _hsidebar;
HMENU _hMenuFrame;
HMENU _hMenuWindow;
@@ -82,6 +83,8 @@
BOOL toggle_fullscreen();
void fullscreen_move();
+ void FillBookmarks();
+
HACCEL _hAccel;
TCHAR _drives[BUFFER_LEN];
};
reactos/subsys/system/explorer/taskbar
diff -u -r1.1 -r1.2
--- favorites.cpp 4 Apr 2004 16:04:34 -0000 1.1
+++ favorites.cpp 4 Apr 2004 17:21:27 -0000 1.2
@@ -178,6 +178,38 @@
}
+void BookmarkList::fill_tree(HWND hwnd, HTREEITEM parent) const
+{
+ TV_INSERTSTRUCT tvi;
+
+ tvi.hParent = parent;
+ tvi.hInsertAfter = TVI_LAST;
+
+ TV_ITEM& tv = tvi.item;
+ tv.mask = TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
+
+ for(const_iterator it=begin(); it!=end(); ++it) {
+ const BookmarkNode& node = *it;
+
+ if (node._type == BookmarkNode::BMNT_FOLDER) {
+ const BookmarkFolder& folder = *node._pfolder;
+
+ tv.pszText = (LPTSTR)folder._name.c_str();
+ tv.iSelectedImage = tv.iImage = 0;
+ HTREEITEM hitem = TreeView_InsertItem(hwnd, &tvi);
+
+ folder._bookmarks.fill_tree(hwnd, hitem);
+ } else {
+ const Bookmark& bookmark = *node._pbookmark;
+
+ tv.pszText = (LPTSTR)bookmark._name.c_str();
+ tv.iSelectedImage = tv.iImage = 0;
+ TreeView_InsertItem(hwnd, &tvi);
+ }
+ }
+}
+
+
void BookmarkList::import_IE_favorites(ShellDirectory& dir, HWND hwnd)
{
TCHAR path[MAX_PATH], ext[_MAX_EXT];
reactos/subsys/system/explorer/taskbar
diff -u -r1.1 -r1.2
--- favorites.h 4 Apr 2004 16:04:34 -0000 1.1
+++ favorites.h 4 Apr 2004 17:21:27 -0000 1.2
@@ -67,6 +67,8 @@
void read(const_XMLPos& pos);
void write(XMLPos& pos) const;
+
+ void fill_tree(HWND hwnd, HTREEITEM parent) const;
};
struct BookmarkFolder
CVSspam 0.2.8