added select all and fixed the foreground colors for the URL and Status bars

This commit is contained in:
rods%netscape.com 1998-08-03 22:32:34 +00:00
parent fb7057c63f
commit d1b3125e2e
2 changed files with 22 additions and 2 deletions

View File

@ -291,6 +291,10 @@ nsBrowserWindow::DispatchMenuItem(PRInt32 aID)
DoCopy();
break;
case VIEWER_EDIT_SELECTALL:
DoSelectAll();
break;
case VIEWER_DEMO0:
case VIEWER_DEMO1:
case VIEWER_DEMO2:
@ -576,7 +580,7 @@ nsBrowserWindow::CreateToolBar(PRInt32 aWidth)
}
mLocation->Create(mWindow, r, HandleLocationEvent, NULL);
mLocation->SetText("");
mLocation->SetForegroundColor(NS_RGB(255, 0, 0));
mLocation->SetForegroundColor(NS_RGB(0, 0, 0));
mLocation->SetBackgroundColor(NS_RGB(255, 255, 255));
mLocation->Show(PR_TRUE);
mLocation->SetFont(font);
@ -615,7 +619,7 @@ nsBrowserWindow::CreateStatusBar(PRInt32 aWidth)
}
mStatus->Create(mWindow, r, HandleLocationEvent, NULL);
mStatus->SetText("");
mStatus->SetForegroundColor(NS_RGB(255, 0, 0));
mStatus->SetForegroundColor(NS_RGB(0, 0, 0));
mStatus->SetFont(font);
mStatus->Show(PR_TRUE);
@ -1453,6 +1457,21 @@ nsBrowserWindow::DoDebugSave()
}
}
void
nsBrowserWindow::DoSelectAll()
{
nsIPresShell* shell = GetPresShell();
if (nsnull != shell) {
nsIDocument* doc = shell->GetDocument();
if (nsnull != doc) {
doc->SelectAll();
NS_RELEASE(doc);
}
NS_RELEASE(shell);
}
}
void

View File

@ -135,6 +135,7 @@ public:
void DoSiteWalker();
void DoJSConsole();
void DoEditorMode();
void DoSelectAll();
nsEventStatus DispatchDebugMenu(PRInt32 aID);
#endif