TermWindow didn't set the colors correctly on Terminals in a new tab.

Now TermWindow::_SetTermColors() accepts a pointer to a TermView to fix 
that.
Spotted by Andrea Bernardi. Thanks! 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21870 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2007-08-09 10:35:08 +00:00
parent fe914c98b4
commit db5b3a0249
2 changed files with 7 additions and 7 deletions

View File

@ -441,7 +441,7 @@ TermWindow::MessageReceived(BMessage *message)
break;
case MSG_COLOR_CHANGED:
_SetTermColors();
_SetTermColors(_ActiveTermView());
_ActiveTermView()->Invalidate();
break;
@ -487,15 +487,15 @@ TermWindow::QuitRequested()
void
TermWindow::_SetTermColors()
TermWindow::_SetTermColors(TermView *termView)
{
_ActiveTermView()->SetTextColor(PrefHandler::Default()->getRGB(PREF_TEXT_FORE_COLOR),
termView->SetTextColor(PrefHandler::Default()->getRGB(PREF_TEXT_FORE_COLOR),
PrefHandler::Default()->getRGB(PREF_TEXT_BACK_COLOR));
_ActiveTermView()->SetSelectColor(PrefHandler::Default()->getRGB(PREF_SELECT_FORE_COLOR),
termView->SetSelectColor(PrefHandler::Default()->getRGB(PREF_SELECT_FORE_COLOR),
PrefHandler::Default()->getRGB(PREF_SELECT_BACK_COLOR));
_ActiveTermView()->SetCursorColor(PrefHandler::Default()->getRGB(PREF_CURSOR_FORE_COLOR),
termView->SetCursorColor(PrefHandler::Default()->getRGB(PREF_CURSOR_FORE_COLOR),
PrefHandler::Default()->getRGB(PREF_CURSOR_BACK_COLOR));
}
@ -600,7 +600,7 @@ TermWindow::_AddTab(const char *command)
view->SetEncoding(longname2id(PrefHandler::Default()->getString(PREF_TEXT_ENCODING)));
view->SetTermFont(&halfFont, &fullFont);
_SetTermColors();
_SetTermColors(view);
// If it's the first time we're called, setup the window
if (fTabView->CountTabs() == 1) {

View File

@ -54,7 +54,7 @@ protected:
private:
void _SetTermColors();
void _SetTermColors(TermView *termView);
void _InitWindow(const char *command);
void _SetupMenu();
status_t _DoPageSetup();