Removed SetWindowTitle().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14853 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-11-11 13:19:34 +00:00
parent 9032e7128e
commit 71922d1950
2 changed files with 23 additions and 57 deletions
+13 -46
View File
@@ -52,38 +52,25 @@ extern PrefHandler *gTermPref;
extern int gNowCoding; /* defined TermParce.cpp */ extern int gNowCoding; /* defined TermParce.cpp */
char gWindowName[256] = "Terminal"; char gWindowName[256] = "Terminal";
void SetCoding (int); void SetCoding(int);
/*
*
* CONSTRUCTOR and DESTRUCTOR
*
*/
//////////////////////////////////////////////////////////////////////////// TermWindow::TermWindow(BRect frame, int32 windownumber)
// TermWindow Constructer : BWindow(frame, "Terminal", B_DOCUMENT_WINDOW, B_CURRENT_WORKSPACE)
//
////////////////////////////////////////////////////////////////////////////
TermWindow::TermWindow( BRect frame, int32 windownumber)
: BWindow (frame, NULL, B_DOCUMENT_WINDOW, B_CURRENT_WORKSPACE)
{ {
sprintf(gWindowName,"Terminal %ld",windownumber); sprintf(gWindowName, "Terminal %ld", windownumber);
InitWindow(); InitWindow();
SetWindowTitle(); SetTitle(gWindowName);
fPrintSettings = NULL; fPrintSettings = NULL;
fPrefWindow = NULL; fPrefWindow = NULL;
fFindPanel = NULL; fFindPanel = NULL;
} }
////////////////////////////////////////////////////////////////////////////
// Desctuctor
//
////////////////////////////////////////////////////////////////////////////
TermWindow::~TermWindow() TermWindow::~TermWindow()
{ {
if (fWindowUpdate != NULL) delete fWindowUpdate;
delete (fWindowUpdate);
} }
@@ -318,8 +305,7 @@ TermWindow::MessageReceived(BMessage *message)
case MENU_ENCODING: case MENU_ENCODING:
message->FindInt32 ("op", &coding_id); message->FindInt32 ("op", &coding_id);
gNowCoding = coding_id; gNowCoding = coding_id;
SetCoding (coding_id); SetCoding(coding_id);
this->SetWindowTitle ();
break; break;
/* /*
@@ -533,42 +519,23 @@ TermWindow::GetTimeZone ()
return -tm.tz_minuteswest / 60; return -tm.tz_minuteswest / 60;
} }
////////////////////////////////////////////////////////////////////////////
// void SetWindowTitle (void)
// set window title bar (pty device name, and coding)
////////////////////////////////////////////////////////////////////////////
#include "spawn.h" #include "spawn.h"
void
TermWindow::SetWindowTitle (void)
{
char windowname[256];
sprintf(windowname, gWindowName);
this->SetTitle (windowname);
}
////////////////////////////////////////////////////////////////////////////
// GetSupoprtedSuites (BMessage *)
//
////////////////////////////////////////////////////////////////////////////
void void
TermWindow::TermWinActivate (void) TermWindow::TermWinActivate()
{ {
Activate();
this->Activate();
if (focus_follows_mouse()) { if (focus_follows_mouse()) {
BPoint aMouseLoc = this->Frame().LeftTop(); BPoint aMouseLoc = Frame().LeftTop();
set_mouse_position(int32(aMouseLoc.x + 16), int32(aMouseLoc.y + 2)); set_mouse_position(int32(aMouseLoc.x + 16), int32(aMouseLoc.y + 2));
be_app->SetCursor(B_HAND_CURSOR); be_app->SetCursor(B_HAND_CURSOR);
} }
} }
////////////////////////////////////////////////////////////////////////////
// GetSupoprtedSuites (BMessage *)
//
////////////////////////////////////////////////////////////////////////////
status_t status_t
TermWindow::GetSupportedSuites(BMessage *msg) TermWindow::GetSupportedSuites(BMessage *msg)
{ {
-1
View File
@@ -66,7 +66,6 @@ private:
void MessageReceived (BMessage *message); void MessageReceived (BMessage *message);
void WindowActivated (bool); void WindowActivated (bool);
int GetTimeZone (void); int GetTimeZone (void);
void SetWindowTitle (void);
void MenusBeginning(void); void MenusBeginning(void);
// void doShowHelp (uint32 command); // void doShowHelp (uint32 command);
// Printing // Printing