Implemented B_ABOUT_REQUESTED in TermView, for the replicant version.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21752 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2007-07-30 15:22:37 +00:00
parent 67188b4ca2
commit cfc9ef8ac3
2 changed files with 29 additions and 5 deletions
+20 -2
View File
@@ -20,7 +20,7 @@
#include "VTkeymap.h"
#include <Application.h>
#include <Autolock.h>
#include <Alert.h>
#include <Beep.h>
#include <Clipboard.h>
#include <Debug.h>
@@ -1620,6 +1620,11 @@ TermView::MessageReceived(BMessage *msg)
char *ctrl_l = " ";
switch (msg->what){
case B_ABOUT_REQUESTED:
// (replicant) about box requested
_AboutRequested();
break;
case B_SIMPLE_DATA:
{
int32 i = 0;
@@ -2473,4 +2478,17 @@ TermView::_FixFontAttributes(BFont &font)
font.SetSpacing(B_FIXED_SPACING);
}
void
TermView::_AboutRequested()
{
BAlert *alert = new (std::nothrow) BAlert("about",
"Terminal\n"
"\twritten by Kazuho Okui and Takashi Murai\n"
"\tupdated by Kian Duffy and others\n\n"
"\tCopyright " B_UTF8_COPYRIGHT "2003-2007, Haiku.\n", "Ok");
if (alert != NULL)
alert->Go();
}
+9 -3
View File
@@ -23,6 +23,7 @@
#define CUROFF 0
#define CURON 1
class BMessageRunner;
class BPopUpMenu;
class BScrollBar;
@@ -133,11 +134,15 @@ protected:
private:
status_t _InitObject(const char *command);
status_t _InitMouseThread(void);
void _AboutRequested();
void _DrawLines(int , int, ushort, uchar *, int, int, int, BView *);
int _TermDraw(const CurPos &start, const CurPos &end);
int _TermDrawRegion(CurPos start, CurPos end);
int _TermDrawSelectedRegion(CurPos start, CurPos end);
inline void _Redraw(int, int, int, int);
void _DoPrint(BRect updateRect);
void _ResizeScrBarRange (void);
void _DoFileDrop(entry_ref &ref);
@@ -177,11 +182,12 @@ private:
BPoint _CurPosToBPoint(const CurPos &pos);
bool _CheckSelectedRegion(const CurPos &pos);
inline void _Redraw(int, int, int, int);
void _UpdateSIGWINCH();
static void _FixFontAttributes(BFont &font);
static void _FixFontAttributes(BFont &font);
static int32 _MouseTrackingEntryFunction(void *);
int32 _MouseTracking();