From b3a6d5d41d74264623964461553d9e8409d339c7 Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Wed, 29 Jul 1998 21:23:40 +0000 Subject: [PATCH] Use new CDockedRDFCoordinator and bumped saved state version #. (rev saari, appr sdagley) --- cmd/macfe/gui/CBrowserWindow.cp | 47 +++++---------------------------- cmd/macfe/gui/CBrowserWindow.h | 4 +-- 2 files changed, 9 insertions(+), 42 deletions(-) diff --git a/cmd/macfe/gui/CBrowserWindow.cp b/cmd/macfe/gui/CBrowserWindow.cp index d25d95e91f5..b3f6fa8e2d1 100644 --- a/cmd/macfe/gui/CBrowserWindow.cp +++ b/cmd/macfe/gui/CBrowserWindow.cp @@ -153,7 +153,7 @@ void CBrowserWindow::FinishCreateSelf(void) mHTMLView = dynamic_cast(FindPaneByID(CHTMLView::pane_ID)); ThrowIfNil_(mHTMLView); - mNavCenterParent = dynamic_cast(FindPaneByID(CRDFCoordinator::pane_ID)); + mNavCenterParent = dynamic_cast(FindPaneByID(CDockedRDFCoordinator::pane_ID)); if (HasAttribute(windAttr_Regular) && HasAttribute(windAttr_Resizable)) FinishCreateWindow(); @@ -173,23 +173,12 @@ void CBrowserWindow::FinishCreateSelf(void) ShowOneDragBar(PersonalToolbar_PaneID, value); mToolbarShown[eStatusBar] = TRUE; // no pref for status bar - // Handle NavCenter pane. There are two separate prefs here: one to control showing/hiding the - // selector widget, the other for the shelf itself. Recall that Composer doesn't have a nav center... + // Handle NavCenter pane. + // + //¥¥¥For now, always hide it at startup, but this will proabably change, hopefully + //¥¥¥with an XP callback so this code can stay the same... if ( mNavCenterParent ) { - if ( PREF_GetBoolPref(CRDFCoordinator::Pref_ShowNavCenterSelector, &value) == PREF_ERROR ) - value = true; - mNavCenterParent->NavCenterSelector().SetShelfState ( value ); - - // don't worry about showing the shelf if the selector is not visible. Otherwise do - // what the pref says. - if ( value ) { - // if the pref is missing, close it by default. If the pref exists, use whatever is - // stored there. There is no need to set the current view because HT handles that. - if ( PREF_GetBoolPref(CRDFCoordinator::Pref_ShowNavCenterShelf, &value) == PREF_ERROR ) - value = false; - mNavCenterParent->NavCenterShelf().SetShelfState ( value ); - } // if selector visible - + mNavCenterParent->NavCenterShelf().SetShelfState ( false ); } // if there is a navcenter // Delete the Admin Kit co-brand button if a @@ -461,14 +450,6 @@ void CBrowserWindow::FindCommandStatus( ::GetIndString(outName, BROWSER_MENU_TOGGLE_STRINGS_ID, (mToolbarShown[ePersonalToolbar] ? HIDE_PERSONAL_TOOLBAR_STRING : SHOW_PERSONAL_TOOLBAR_STRING)); break; - case cmd_NCToggle: - outEnabled = (mContext && mNavCenterParent) ? !(mIsRootDocInfo || mIsViewSource || mIsHTMLHelp || PREF_PrefIsLocked(CRDFCoordinator::Pref_ShowNavCenterSelector)) : true; - Uint32 strID = SHOW_NAVCENTER_STRING; - if ( mNavCenterParent && mNavCenterParent->NavCenterSelector().IsShelfOpen() ) - strID = HIDE_NAVCENTER_STRING; - ::GetIndString(outName, BROWSER_MENU_TOGGLE_STRINGS_ID, strID); - break; - case cmd_NetSearch: outEnabled = (mContext) ? !(mIsRootDocInfo || mIsViewSource || mIsHTMLHelp) : true; break; @@ -637,16 +618,6 @@ Boolean CBrowserWindow::ObeyCommand( cmdHandled = true; break; - case cmd_NCToggle: - // Note that this allows the user to hide the selector while the shelf is - // still open. This isn't the end of the world, at least, because the closebox - // is there so the user can still figure out how to get rid of it and - // close it if they want. - if ( mNavCenterParent ) - mNavCenterParent->NavCenterSelector().ToggleShelf(); - cmdHandled = true; - break; - case cmd_Reload: { if (CApplicationEventAttachment::CurrentEventHasModifiers(optionKey) || @@ -1272,12 +1243,8 @@ void CBrowserWindow::SetChromeInfo(Chrome* inChrome, Boolean inNotifyMenuBarMode // we probably don't want the NavCenter showing up. Don't let this temporary setting of // the shelf states affect the global preference, however. if ( mNavCenterParent ) { - if ( !inChrome->show_directory_buttons ) { + if ( !inChrome->show_directory_buttons ) mNavCenterParent->NavCenterShelf().SetShelfState(CShelf::kClosed, false); - mNavCenterParent->NavCenterSelector().SetShelfState(CShelf::kClosed, false); - } - else - mNavCenterParent->NavCenterSelector().SetShelfState(CShelf::kOpen, false); } ShowStatus(inChrome); diff --git a/cmd/macfe/gui/CBrowserWindow.h b/cmd/macfe/gui/CBrowserWindow.h index 98fe9140a12..3a0d813b6b5 100644 --- a/cmd/macfe/gui/CBrowserWindow.h +++ b/cmd/macfe/gui/CBrowserWindow.h @@ -204,7 +204,7 @@ class CBrowserWindow : public CNetscapeWindow, public CSaveWindowStatus, public virtual void NoteAllConnectionsComplete(void); virtual ResIDT GetStatusResID(void) const { return res_ID; } - virtual UInt16 GetValidStatusVersion(void) const { return 0x0113; } + virtual UInt16 GetValidStatusVersion(void) const { return 0x0114; } virtual void ShowStatus(Chrome* inChromeInfo); // 97-05-12 pkc -- pass in Chrome struct @@ -237,7 +237,7 @@ class CBrowserWindow : public CNetscapeWindow, public CSaveWindowStatus, public Boolean mIsHTMLHelp; private: - CRDFCoordinator* mNavCenterParent; // top level of navcenter hierarchy + CDockedRDFCoordinator* mNavCenterParent; // top level of navcenter hierarchy CHTMLView* mHTMLView; LStr255 mCurrentKeyword; // holds current internet keyword string