[ros-diffs] [gedmurphy] 36666: - Add an address bar to serve as the web browser and folder history list (not yet functional) - Hide the drivebar by default. It's cleaner this way - Remove the old rebar hack. This should get rid of those annoying blue marks at the end of the toolbars

gedmurphy at svn.reactos.org gedmurphy at svn.reactos.org
Mon Oct 6 20:42:18 CEST 2008


Author: gedmurphy
Date: Mon Oct  6 13:42:17 2008
New Revision: 36666

URL: http://svn.reactos.org/svn/reactos?rev=36666&view=rev
Log:
- Add an address bar to serve as the web browser and folder history list (not yet functional)
 - Hide the drivebar by default. It's cleaner this way
- Remove the old rebar hack. This should get rid of those annoying blue marks at the end of the toolbars

Modified:
    trunk/reactos/base/shell/explorer/explorer-cz.rc
    trunk/reactos/base/shell/explorer/explorer-de.rc
    trunk/reactos/base/shell/explorer/explorer-en.rc
    trunk/reactos/base/shell/explorer/explorer-es.rc
    trunk/reactos/base/shell/explorer/explorer-fr.rc
    trunk/reactos/base/shell/explorer/explorer-jp.rc
    trunk/reactos/base/shell/explorer/explorer-ro.rc
    trunk/reactos/base/shell/explorer/explorer-ru.rc
    trunk/reactos/base/shell/explorer/explorer-sv.rc
    trunk/reactos/base/shell/explorer/explorer.h
    trunk/reactos/base/shell/explorer/shell/mainframe.cpp
    trunk/reactos/base/shell/explorer/shell/mainframe.h

Modified: trunk/reactos/base/shell/explorer/explorer-cz.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explorer-cz.rc?rev=36666&r1=36665&r2=36666&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer-cz.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer-cz.rc [iso-8859-1] Mon Oct  6 13:42:17 2008
@@ -38,7 +38,7 @@
     BEGIN
         MENUITEM "Panel &nástrojù",              ID_VIEW_TOOL_BAR
         MENUITEM "Panel &extra",                 ID_VIEW_EXTRA_BAR
-        MENUITEM "L&išta diskù",                 ID_VIEW_DRIVE_BAR, CHECKED
+        MENUITEM "L&išta diskù",                 ID_VIEW_DRIVE_BAR
         MENUITEM "&Boèní panel",                 ID_VIEW_SIDE_BAR
         MENUITEM "&Stavový øádek",               ID_VIEW_STATUSBAR
         MENUITEM SEPARATOR

Modified: trunk/reactos/base/shell/explorer/explorer-de.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explorer-de.rc?rev=36666&r1=36665&r2=36666&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer-de.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer-de.rc [iso-8859-1] Mon Oct  6 13:42:17 2008
@@ -41,7 +41,7 @@
     BEGIN
         MENUITEM "&Werkzeugleiste",             ID_VIEW_TOOL_BAR
         MENUITEM "&Extraleiste",                ID_VIEW_EXTRA_BAR
-        MENUITEM "&Laufwerksleiste",            ID_VIEW_DRIVE_BAR, CHECKED
+        MENUITEM "&Laufwerksleiste",            ID_VIEW_DRIVE_BAR
         MENUITEM "Se&itenleiste",               ID_VIEW_SIDE_BAR
         MENUITEM "&Statusleiste",               ID_VIEW_STATUSBAR
         MENUITEM SEPARATOR

Modified: trunk/reactos/base/shell/explorer/explorer-en.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explorer-en.rc?rev=36666&r1=36665&r2=36666&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer-en.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer-en.rc [iso-8859-1] Mon Oct  6 13:42:17 2008
@@ -38,7 +38,7 @@
     BEGIN
         MENUITEM "&Toolbar",                    ID_VIEW_TOOL_BAR
         MENUITEM "&Extra Bar",                  ID_VIEW_EXTRA_BAR
-        MENUITEM "&Drivebar",                   ID_VIEW_DRIVE_BAR, CHECKED
+        MENUITEM "&Drivebar",                   ID_VIEW_DRIVE_BAR
         MENUITEM "S&ide Bar",                   ID_VIEW_SIDE_BAR
         MENUITEM "&Status Bar",                 ID_VIEW_STATUSBAR
         MENUITEM SEPARATOR

Modified: trunk/reactos/base/shell/explorer/explorer-es.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explorer-es.rc?rev=36666&r1=36665&r2=36666&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer-es.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer-es.rc [iso-8859-1] Mon Oct  6 13:42:17 2008
@@ -38,7 +38,7 @@
     BEGIN
         MENUITEM "&Herramientas",               ID_VIEW_TOOL_BAR
         MENUITEM "Barra &Extra",                ID_VIEW_EXTRA_BAR
-        MENUITEM "Barra de &Unidades",          ID_VIEW_DRIVE_BAR, CHECKED
+        MENUITEM "Barra de &Unidades",          ID_VIEW_DRIVE_BAR
         MENUITEM "Barra &Lateral",              ID_VIEW_SIDE_BAR
         MENUITEM "Barra de &Estado",            ID_VIEW_STATUSBAR
         MENUITEM SEPARATOR

Modified: trunk/reactos/base/shell/explorer/explorer-fr.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explorer-fr.rc?rev=36666&r1=36665&r2=36666&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer-fr.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer-fr.rc [iso-8859-1] Mon Oct  6 13:42:17 2008
@@ -38,7 +38,7 @@
     BEGIN
         MENUITEM "Barre d'&outils",             ID_VIEW_TOOL_BAR
         MENUITEM "Barre d'&extras",             ID_VIEW_EXTRA_BAR
-        MENUITEM "&Barre des lecteurs",         ID_VIEW_DRIVE_BAR, CHECKED
+        MENUITEM "&Barre des lecteurs",         ID_VIEW_DRIVE_BAR
         MENUITEM "&Volet latéral",              ID_VIEW_SIDE_BAR
         MENUITEM "Barre d'&état",               ID_VIEW_STATUSBAR
         MENUITEM SEPARATOR

Modified: trunk/reactos/base/shell/explorer/explorer-jp.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explorer-jp.rc?rev=36666&r1=36665&r2=36666&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer-jp.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer-jp.rc [iso-8859-1] Mon Oct  6 13:42:17 2008
@@ -38,7 +38,7 @@
     BEGIN
         MENUITEM "ƒc[ƒ‹ ƒo[(&T)",             ID_VIEW_TOOL_BAR
         MENUITEM "ƒGƒLƒXƒgƒ‰ ƒo[(&E)",         ID_VIEW_EXTRA_BAR
-        MENUITEM "ƒhƒ‰ƒCƒuƒo[(&D)",            ID_VIEW_DRIVE_BAR, CHECKED
+        MENUITEM "ƒhƒ‰ƒCƒuƒo[(&D)",            ID_VIEW_DRIVE_BAR
         MENUITEM "ƒTƒCƒh ƒo[(&I)",             ID_VIEW_SIDE_BAR
         MENUITEM "ƒXƒe[ƒ^ƒX ƒo[(&S)",         ID_VIEW_STATUSBAR
         MENUITEM SEPARATOR

Modified: trunk/reactos/base/shell/explorer/explorer-ro.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explorer-ro.rc?rev=36666&r1=36665&r2=36666&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer-ro.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer-ro.rc [iso-8859-1] Mon Oct  6 13:42:17 2008
@@ -41,7 +41,7 @@
     BEGIN
         MENUITEM "&Bara cu instrumente",        ID_VIEW_TOOL_BAR
         MENUITEM "&Extra Bar",                  ID_VIEW_EXTRA_BAR
-        MENUITEM "&Drivebar",                   ID_VIEW_DRIVE_BAR, CHECKED
+        MENUITEM "&Drivebar",                   ID_VIEW_DRIVE_BAR
         MENUITEM "&Bara de stare",              ID_VIEW_STATUSBAR
         MENUITEM "&Side Bar",                   ID_VIEW_SIDE_BAR
         MENUITEM SEPARATOR

Modified: trunk/reactos/base/shell/explorer/explorer-ru.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explorer-ru.rc?rev=36666&r1=36665&r2=36666&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer-ru.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer-ru.rc [iso-8859-1] Mon Oct  6 13:42:17 2008
@@ -38,7 +38,7 @@
     BEGIN
         MENUITEM "&Ïàíåëü èíñòðóìåíòîâ",        ID_VIEW_TOOL_BAR
         MENUITEM "&Äîïîëíèòåëüíàÿ ïàíåëü",      ID_VIEW_EXTRA_BAR
-        MENUITEM "&Äèñêè",                      ID_VIEW_DRIVE_BAR, CHECKED
+        MENUITEM "&Äèñêè",                      ID_VIEW_DRIVE_BAR
         MENUITEM "È&çáðàííîå",                  ID_VIEW_SIDE_BAR
         MENUITEM "&Ñòðîêà ñîñòîÿíèÿ",           ID_VIEW_STATUSBAR
         MENUITEM SEPARATOR

Modified: trunk/reactos/base/shell/explorer/explorer-sv.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explorer-sv.rc?rev=36666&r1=36665&r2=36666&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer-sv.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer-sv.rc [iso-8859-1] Mon Oct  6 13:42:17 2008
@@ -76,7 +76,7 @@
     BEGIN
         MENUITEM "&Verktygsfält",               ID_VIEW_TOOL_BAR
         MENUITEM "&Extrafält",                  ID_VIEW_EXTRA_BAR
-        MENUITEM "E&nhetsfält",                 ID_VIEW_DRIVE_BAR, CHECKED
+        MENUITEM "E&nhetsfält",                 ID_VIEW_DRIVE_BAR
         MENUITEM "S&idfält",                    ID_VIEW_SIDE_BAR
         MENUITEM "&Statusfält",                 ID_VIEW_STATUSBAR
         MENUITEM SEPARATOR

Modified: trunk/reactos/base/shell/explorer/explorer.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explorer.h?rev=36666&r1=36665&r2=36666&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer.h [iso-8859-1] Mon Oct  6 13:42:17 2008
@@ -54,7 +54,6 @@
 #define	IDW_EXTRABAR			0x102
 #define	IDW_DRIVEBAR			0x103
 #define	IDW_ADDRESSBAR			0x104
-#define	IDW_COMMANDBAR			0x105
 #define	IDW_SIDEBAR				0x106
 #define	IDW_FIRST_CHILD			0xC000	/*0x200*/
 

Modified: trunk/reactos/base/shell/explorer/shell/mainframe.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/shell/mainframe.cpp?rev=36666&r1=36665&r2=36666&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/shell/mainframe.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/shell/mainframe.cpp [iso-8859-1] Mon Oct  6 13:42:17 2008
@@ -186,10 +186,21 @@
 	CheckMenuItem(_menu_info._hMenuView, ID_VIEW_TOOL_BAR, MF_BYCOMMAND|MF_CHECKED);
 
 
-	 // address & command bar
-	WindowCanvas canvas(hwnd);
-	RECT rect = {0, 0, 0, 0};
-	DrawText(canvas, TEXT("My"), -1, &rect, DT_SINGLELINE|DT_NOPREFIX|DT_CALCRECT);
+	 // address bar 
+	_haddrcombo = CreateWindowEx(0,
+								WC_COMBOBOX,
+								TEXT("Address"),
+								WS_CHILD|WS_TABSTOP|WS_BORDER|WS_VISIBLE|CBS_DROPDOWN|
+								CCS_NOPARENTALIGN|CCS_NORESIZE|CCS_NODIVIDER|CCS_NOMOVEY,
+								0, 0, 0, 0,
+								hwnd,
+								(HMENU)IDW_ADDRESSBAR,
+								g_Globals._hInstance,
+								0);
+
+	HFONT hFont = (HFONT)GetStockObject(ANSI_VAR_FONT);
+	SendMessageW(_haddrcombo, WM_SETFONT, (WPARAM)hFont, 0);
+
 
 	_hstatusbar = CreateStatusWindow(WS_CHILD|WS_VISIBLE, 0, hwnd, IDW_STATUSBAR);
 	CheckMenuItem(_menu_info._hMenuView, ID_VIEW_STATUSBAR, MF_BYCOMMAND|MF_CHECKED);
@@ -205,11 +216,16 @@
 
 	 // create rebar window to manage toolbar and drivebar
 #ifndef _NO_REBAR
-	_hwndrebar = CreateWindowEx(WS_EX_TOOLWINDOW, REBARCLASSNAME, NULL,
-					WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|
-					RBS_VARHEIGHT|RBS_DBLCLKTOGGLE|
-					WS_BORDER|RBS_AUTOSIZE|RBS_BANDBORDERS,
-					0, 0, 0, 0, _hwnd, 0, g_Globals._hInstance, 0);
+	_hwndrebar = CreateWindowEx(WS_EX_TOOLWINDOW,
+								REBARCLASSNAME,
+								NULL,
+								WS_CHILD|WS_VISIBLE|WS_BORDER|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|
+								 RBS_VARHEIGHT|RBS_DBLCLKTOGGLE| RBS_AUTOSIZE|RBS_BANDBORDERS,
+								0, 0, 0, 0,
+								_hwnd,
+								NULL,
+								g_Globals._hInstance,
+								0);
 
 	int btn_hgt = HIWORD(SendMessage(_htoolbar, TB_GETBUTTONSIZE, 0, 0));
 
@@ -217,9 +233,6 @@
 
 	rbBand.cbSize = sizeof(REBARBANDINFO);
 	rbBand.fMask  = RBBIM_TEXT|RBBIM_STYLE|RBBIM_CHILD|RBBIM_CHILDSIZE|RBBIM_SIZE;
-#ifndef RBBS_HIDETITLE // missing in MinGW headers as of 25.02.2004
-#define RBBS_HIDETITLE	0x400
-#endif
 	rbBand.fStyle = RBBS_CHILDEDGE|RBBS_GRIPPERALWAYS|RBBS_HIDETITLE;
 
 	rbBand.cxMinChild = 0;
@@ -233,7 +246,16 @@
 	rbBand.cxMinChild = 0;
 	rbBand.cyMinChild = btn_hgt;
 	rbBand.cx = 284;
-	SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand);
+	SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)0, (LPARAM)&rbBand);
+
+	rbBand.fStyle &= ~RBBS_HIDETITLE;
+	rbBand.fStyle |= RBBS_BREAK;
+    rbBand.lpText = TEXT("Address :");
+	rbBand.hwndChild = _haddrcombo;
+	rbBand.cxMinChild = 0;
+	rbBand.cyMinChild = btn_hgt;
+	rbBand.cx = 400;
+	SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)3, (LPARAM)&rbBand);
 #endif
 }
 
@@ -284,13 +306,8 @@
 		break;
 
 	  case WM_SIZE: {
-#ifdef __REACTOS__	///@todo Work around to display rebar in ROS (with flickering) as long as the control isn't fixed
-		int height = SendMessage(_hwndrebar, RB_GETBARHEIGHT, 0, 0);
-		MoveWindow(_hwndrebar, 0, 0, LOWORD(lparam), height, TRUE);
-#else
 		resize_frame(LOWORD(lparam), HIWORD(lparam));
 		SendMessage(_hwndrebar, WM_SIZE, 0, 0);
-#endif
 		break;}	// do not pass message to DefFrameProc
 
 	  case WM_GETMINMAXINFO: {
@@ -472,6 +489,8 @@
         int height = SendMessage(_hwndrebar, RB_GETBARHEIGHT, 0, 0);
 		rect.top += height;
         rect.top += 5;
+
+		SetWindowPos(_haddrcombo, NULL, 0, 0, cx, height, SWP_NOMOVE);
 	} else {
 		if (IsWindowVisible(_htoolbar)) {
 			SendMessage(_htoolbar, WM_SIZE, 0, 0);
@@ -747,7 +766,7 @@
 #endif
 #endif
 
-	CheckMenuItem(_menu_info._hMenuView, ID_VIEW_DRIVE_BAR, MF_BYCOMMAND|MF_CHECKED);
+	CheckMenuItem(_menu_info._hMenuView, ID_VIEW_DRIVE_BAR, MF_BYCOMMAND|MF_UNCHECKED);
 
 
 #ifndef _NO_WIN_FS
@@ -795,7 +814,7 @@
 	rbBand.cxMinChild = 0;
 	rbBand.cyMinChild = btn_hgt;
 	rbBand.cx = 284;
-	SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand);
+	SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)1, (LPARAM)&rbBand);
 
 #ifndef _NO_WIN_FS
 	rbBand.fStyle |= RBBS_BREAK;
@@ -805,7 +824,10 @@
 	rbBand.cxMinChild = 0;
 	rbBand.cyMinChild = btn_hgt;
 	rbBand.cx = 400;
-	SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand);
+	SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)2, (LPARAM)&rbBand);
+
+	// hide the drivebar by default
+	SendMessage(_hwndrebar, RB_SHOWBAND, 2, FALSE);
 #endif
 #endif
 }
@@ -1587,6 +1609,15 @@
 	resize_children();
 }
 
+void SDIMainFrame::set_url(LPCTSTR url)
+{
+	if (_url != url) {
+		_url = url;
+		SetWindowText(_haddrcombo, url);
+	}
+}
+
+
 void SDIMainFrame::jump_to(LPCTSTR path, int mode)
 {/*@@todo
 	if (_shellBrowser.get() && (_shellpath_info._open_mode&~OWM_PIDL)==(mode&~OWM_PIDL)) {

Modified: trunk/reactos/base/shell/explorer/shell/mainframe.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/shell/mainframe.h?rev=36666&r1=36665&r2=36666&view=diff
==============================================================================
--- trunk/reactos/base/shell/explorer/shell/mainframe.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/shell/mainframe.h [iso-8859-1] Mon Oct  6 13:42:17 2008
@@ -51,6 +51,7 @@
 	WindowHandle _hwndrebar;
 
 	WindowHandle _htoolbar;
+	WindowHandle _haddrcombo;
 	WindowHandle _hstatusbar;
 
 	WindowHandle _hsidebar;
@@ -176,4 +177,6 @@
 
 	 // interface BrowserCallback
 	virtual void	entry_selected(Entry* entry);
+
+	void	set_url(LPCTSTR url);
 };



More information about the Ros-diffs mailing list