mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
removing IsMenuBarVisible -- it was a mistake, and unused
This commit is contained in:
parent
9571f8ad0c
commit
b4e60f5b6c
@ -129,24 +129,12 @@ MenubarPropImpl::~MenubarPropImpl() {
|
||||
|
||||
NS_IMETHODIMP
|
||||
MenubarPropImpl::GetVisible(PRBool *aVisible) {
|
||||
#if 1
|
||||
return BarPropImpl::GetVisibleByFlag(aVisible, NS_CHROME_MENU_BAR_ON);
|
||||
#else
|
||||
if (mBrowser)
|
||||
return mBrowser->IsMenuBarVisible(aVisible);
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
MenubarPropImpl::SetVisible(PRBool aVisible) {
|
||||
#if 1
|
||||
return BarPropImpl::SetVisibleByFlag(aVisible, NS_CHROME_MENU_BAR_ON);
|
||||
#else
|
||||
if (mBrowser)
|
||||
return mBrowser->ShowMenuBar(aVisible);
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -240,15 +240,6 @@ CWebShellContainer::ShowMenuBar(PRBool aShow)
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
CWebShellContainer::IsMenuBarVisible(PRBool *aVisible)
|
||||
{
|
||||
NG_TRACE_METHOD(CWebShellContainer::IsMenuBarVisible);
|
||||
*aVisible = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
CWebShellContainer::GetWebShell(nsIWebShell*& aResult)
|
||||
{
|
||||
|
@ -69,7 +69,6 @@ public:
|
||||
NS_IMETHOD GetStatus(const PRUnichar** aResult);
|
||||
NS_IMETHOD SetProgress(PRInt32 aProgress, PRInt32 aProgressMax);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
NS_IMETHOD GetWebShell(nsIWebShell*& aResult);
|
||||
NS_IMETHOD GetContentWebShell(nsIWebShell **aResult);
|
||||
|
||||
|
@ -98,7 +98,6 @@ public:
|
||||
NS_IMETHOD SetProgress(PRInt32 aProgress, PRInt32 aProgressMax) = 0;
|
||||
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow) = 0;
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible) = 0;
|
||||
|
||||
NS_IMETHOD GetWebShell(nsIWebShell*& aResult) = 0;
|
||||
NS_IMETHOD GetContentWebShell(nsIWebShell **aResult) = 0;
|
||||
|
@ -1688,13 +1688,6 @@ nsBrowserWindow::ShowMenuBar(PRBool aShow)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBrowserWindow::IsMenuBarVisible(PRBool *aVisible)
|
||||
{
|
||||
*aVisible = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBrowserWindow::WillLoadURL(nsIWebShell* aShell, const PRUnichar* aURL,
|
||||
nsLoadType aReason)
|
||||
|
@ -104,7 +104,6 @@ public:
|
||||
NS_IMETHOD GetStatus(const PRUnichar** aResult);
|
||||
NS_IMETHOD SetProgress(PRInt32 aProgress, PRInt32 aProgressMax);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
NS_IMETHOD GetWebShell(nsIWebShell*& aResult);
|
||||
NS_IMETHOD GetContentWebShell(nsIWebShell **aResult);
|
||||
|
||||
|
@ -551,14 +551,6 @@ class nsIWidget : public nsISupports {
|
||||
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow) = 0;
|
||||
|
||||
/**
|
||||
* Query whether the widget's MenuBar is visible
|
||||
*
|
||||
* @param aVisible PR_TRUE if currently visible, PR_FALSE if not
|
||||
*/
|
||||
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible) = 0;
|
||||
|
||||
/**
|
||||
* Set the collection of tooltip rectangles.
|
||||
* A NS_SHOW_TOOLTIP event is generated when the mouse hovers over one
|
||||
|
@ -2462,12 +2462,6 @@ printf("nsWindow::ShowMenuBar - FIXME: not implemented!\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD nsWindow::IsMenuBarVisible(PRBool *aVisible)
|
||||
{
|
||||
*aVisible = PR_TRUE;
|
||||
return NS_ERROR_FAILURE; // todo: (maybe. method isn't actually used yet.)
|
||||
}
|
||||
|
||||
NS_METHOD nsWindow::GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight)
|
||||
{
|
||||
aWidth = mPreferredWidth;
|
||||
|
@ -118,8 +118,7 @@ public:
|
||||
NS_IMETHOD Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect);
|
||||
NS_IMETHOD SetTitle(const nsString& aTitle);
|
||||
NS_IMETHOD SetMenuBar(nsIMenuBar * aMenuBar);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD SetTooltips(PRUint32 aNumberOfTips,nsRect* aTooltipAreas[]);
|
||||
NS_IMETHOD RemoveTooltips();
|
||||
NS_IMETHOD UpdateTooltips(nsRect* aNewTips[]);
|
||||
|
@ -767,13 +767,6 @@ NS_METHOD nsWidget::ShowMenuBar(PRBool aShow)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD nsWidget::IsMenuBarVisible(PRBool *aVisible)
|
||||
{
|
||||
g_print("bleh\n");
|
||||
NS_NOTYETIMPLEMENTED("nsWidget::IsMenuBarvisible");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsWidget::CreateWidget(nsIWidget *aParent,
|
||||
const nsRect &aRect,
|
||||
EVENT_CALLBACK aHandleEventFunction,
|
||||
|
@ -132,7 +132,6 @@ class nsWidget : public nsBaseWidget
|
||||
NS_IMETHOD Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect);
|
||||
NS_IMETHOD SetMenuBar(nsIMenuBar *aMenuBar);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
|
||||
NS_IMETHOD Invalidate(PRBool aIsSynchronous);
|
||||
NS_IMETHOD Invalidate(const nsRect &aRect, PRBool aIsSynchronous);
|
||||
|
@ -663,12 +663,6 @@ NS_METHOD nsWindow::ShowMenuBar(PRBool aShow)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD nsWindow::IsMenuBarVisible(PRBool *aVisible)
|
||||
{
|
||||
*aVisible = PR_TRUE;
|
||||
return NS_ERROR_FAILURE; // todo: (maybe. method isn't actually used yet.)
|
||||
}
|
||||
|
||||
NS_METHOD nsWindow::Move(PRUint32 aX, PRUint32 aY)
|
||||
{
|
||||
// not implimented for toplevel windows
|
||||
|
@ -63,7 +63,6 @@ public:
|
||||
NS_IMETHOD Show(PRBool aShow);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD Move(PRUint32 aX, PRUint32 aY);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
|
||||
NS_IMETHOD Resize(PRUint32 aWidth, PRUint32 aHeight, PRBool aRepaint);
|
||||
NS_IMETHOD Resize(PRUint32 aX, PRUint32 aY, PRUint32 aWidth,
|
||||
|
@ -430,12 +430,6 @@ NS_IMETHODIMP nsWindow::ShowMenuBar(PRBool aShow)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWindow::IsMenuBarVisible(PRBool *aVisible)
|
||||
{
|
||||
*aVisible = PR_TRUE; // likely to be true
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Get the widget's MenuBar.
|
||||
|
@ -122,7 +122,6 @@ public:
|
||||
|
||||
NS_IMETHOD SetMenuBar(nsIMenuBar * aMenuBar);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
virtual nsIMenuBar* GetMenuBar();
|
||||
NS_IMETHOD GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight);
|
||||
NS_IMETHOD SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight);
|
||||
|
@ -1624,12 +1624,6 @@ NS_METHOD nsWindow::ShowMenuBar(PRBool aShow)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_METHOD nsWindow::IsMenuBarVisible(PRBool *aVisible)
|
||||
{
|
||||
*aVisible = PR_TRUE;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_METHOD nsWindow::GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight)
|
||||
{
|
||||
aWidth = mPreferredWidth;
|
||||
|
@ -118,7 +118,6 @@ public:
|
||||
NS_IMETHOD EndResizingChildren(void);
|
||||
NS_IMETHOD SetMenuBar(nsIMenuBar * aMenuBar);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
NS_IMETHOD GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight);
|
||||
NS_IMETHOD SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight);
|
||||
NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus);
|
||||
|
@ -1124,23 +1124,6 @@ nsresult nsWindow::ShowMenuBar( PRBool bShow)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsWindow::IsMenuBarVisible( PRBool *aVisible)
|
||||
{
|
||||
if( !aVisible)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
*aVisible = PR_FALSE;
|
||||
|
||||
if( mMenuBar)
|
||||
{
|
||||
void *hwndMenu = 0;
|
||||
mMenuBar->GetNativeData( hwndMenu);
|
||||
*aVisible = WinIsWindowVisible( (HWND)hwndMenu);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsWindow::SetContextMenu( nsContextMenu *aMenu)
|
||||
{
|
||||
mActiveMenu = aMenu;
|
||||
|
@ -72,7 +72,6 @@ class nsWindow : public nsBaseWidget,
|
||||
// Strangely misplaced menubar methods
|
||||
NS_IMETHOD SetMenuBar( nsIMenuBar *aMenuBar);
|
||||
NS_IMETHOD ShowMenuBar( PRBool bShow);
|
||||
NS_IMETHOD IsMenuBarVisible( PRBool *aVisible);
|
||||
|
||||
// Physical properties
|
||||
NS_IMETHOD Show( PRBool bState);
|
||||
|
@ -967,12 +967,6 @@ NS_METHOD nsWidget::ShowMenuBar( PRBool aShow)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_METHOD nsWidget::IsMenuBarVisible( PRBool *aVisible )
|
||||
{
|
||||
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWidget::IsMenuBarVisible - Not Implemented \n"));
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult nsWidget::CreateWidget(nsIWidget *aParent,
|
||||
const nsRect &aRect,
|
||||
EVENT_CALLBACK aHandleEventFunction,
|
||||
|
@ -115,7 +115,6 @@ class nsWidget : public nsBaseWidget
|
||||
NS_IMETHOD Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect);
|
||||
NS_IMETHOD SetMenuBar(nsIMenuBar *aMenuBar);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
|
||||
NS_IMETHOD Invalidate(PRBool aIsSynchronous);
|
||||
NS_IMETHOD Invalidate(const nsRect &aRect, PRBool aIsSynchronous);
|
||||
|
@ -759,14 +759,6 @@ NS_METHOD nsWindow::ShowMenuBar( PRBool aShow)
|
||||
}
|
||||
|
||||
|
||||
NS_METHOD nsWindow::IsMenuBarVisible( PRBool *aVisible )
|
||||
{
|
||||
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWindow::IsMenuBarVisible - Not Implemented\n"));
|
||||
*aVisible = PR_TRUE;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Process all nsWindows messages
|
||||
|
@ -59,7 +59,6 @@ public:
|
||||
NS_IMETHOD SetTitle(const nsString& aTitle);
|
||||
NS_IMETHOD SetMenuBar(nsIMenuBar * aMenuBar);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
NS_IMETHOD GetBounds( nsRect &aRect );
|
||||
NS_IMETHOD GetClientBounds( nsRect &aRect );
|
||||
NS_IMETHOD SetTooltips(PRUint32 aNumberOfTips,nsRect* aTooltipAreas[]);
|
||||
|
@ -3478,13 +3478,6 @@ NS_METHOD nsWindow::ShowMenuBar(PRBool aShow)
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_METHOD nsWindow::IsMenuBarVisible(PRBool *aVisible)
|
||||
{
|
||||
HMENU menu = ::GetMenu(mWnd);
|
||||
*aVisible = menu ? PR_TRUE : PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD nsWindow::GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight)
|
||||
{
|
||||
aWidth = mPreferredWidth;
|
||||
|
@ -115,7 +115,6 @@ public:
|
||||
NS_IMETHOD SetTitle(const nsString& aTitle);
|
||||
NS_IMETHOD SetMenuBar(nsIMenuBar * aMenuBar);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
NS_IMETHOD SetTooltips(PRUint32 aNumberOfTips,nsRect* aTooltipAreas[]);
|
||||
NS_IMETHOD RemoveTooltips();
|
||||
NS_IMETHOD UpdateTooltips(nsRect* aNewTips[]);
|
||||
|
@ -312,11 +312,6 @@ NS_IMETHODIMP nsWidget::ShowMenuBar(PRBool aShow)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWidget::IsMenuBarVisible(PRBool *aVisible)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void * nsWidget::GetNativeData(PRUint32 aDataType)
|
||||
{
|
||||
switch (aDataType) {
|
||||
|
@ -90,7 +90,6 @@ public:
|
||||
NS_IMETHOD Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect);
|
||||
NS_IMETHOD SetMenuBar(nsIMenuBar * aMenuBar);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
NS_IMETHOD SetTooltips(PRUint32 aNumberOfTips,nsRect* aTooltipAreas[]);
|
||||
NS_IMETHOD RemoveTooltips();
|
||||
NS_IMETHOD UpdateTooltips(nsRect* aNewTips[]);
|
||||
|
@ -2735,13 +2735,6 @@ nsWebShellWindow::ShowMenuBar(PRBool aShow)
|
||||
return mWindow->ShowMenuBar(aShow);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShellWindow::IsMenuBarVisible(PRBool *aVisible)
|
||||
{
|
||||
return mWindow->IsMenuBarVisible(aVisible);
|
||||
}
|
||||
|
||||
|
||||
//nsIUrlDispatcher methods
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -244,7 +244,6 @@ public:
|
||||
NS_IMETHOD GetStatus(const PRUnichar** aResult);
|
||||
NS_IMETHOD SetProgress(PRInt32 aProgress, PRInt32 aProgressMax);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
|
||||
NS_DECL_IURLDISPATCHER
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user