Move the about box to a static so the replicant can use it as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23858 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c09b3a97dc
commit
570e1312b5
@ -4,6 +4,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "Sudoku.h"
|
||||
|
||||
#include "SudokuWindow.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -13,23 +15,6 @@
|
||||
#include <TextView.h>
|
||||
|
||||
|
||||
class Sudoku : public BApplication {
|
||||
public:
|
||||
Sudoku();
|
||||
virtual ~Sudoku();
|
||||
|
||||
virtual void ReadyToRun();
|
||||
|
||||
virtual void RefsReceived(BMessage *message);
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
|
||||
virtual void AboutRequested();
|
||||
|
||||
private:
|
||||
SudokuWindow* fWindow;
|
||||
};
|
||||
|
||||
|
||||
const char* kSignature = "application/x-vnd.Haiku-Sudoku";
|
||||
|
||||
|
||||
@ -68,6 +53,13 @@ Sudoku::MessageReceived(BMessage* message)
|
||||
|
||||
void
|
||||
Sudoku::AboutRequested()
|
||||
{
|
||||
Sudoku::DisplayAbout();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Sudoku::DisplayAbout()
|
||||
{
|
||||
BAlert *alert = new BAlert("about", "Sudoku\n"
|
||||
"\twritten by Axel Dörfler\n"
|
||||
|
@ -5,6 +5,28 @@
|
||||
#ifndef SUDOKU_H
|
||||
#define SUDOKU_H
|
||||
|
||||
#include <Application.h>
|
||||
|
||||
class BMessage;
|
||||
class SudokuWindow;
|
||||
|
||||
class Sudoku : public BApplication {
|
||||
public:
|
||||
Sudoku();
|
||||
virtual ~Sudoku();
|
||||
|
||||
virtual void ReadyToRun();
|
||||
|
||||
virtual void RefsReceived(BMessage *message);
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
|
||||
virtual void AboutRequested();
|
||||
static void DisplayAbout();
|
||||
|
||||
private:
|
||||
SudokuWindow* fWindow;
|
||||
};
|
||||
|
||||
extern const char* kSignature;
|
||||
|
||||
#endif // SUDOKU_H
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include "SudokuView.h"
|
||||
|
||||
#include "Sudoku.h"
|
||||
#include "SudokuField.h"
|
||||
#include "SudokuSolver.h"
|
||||
|
||||
@ -1022,6 +1023,10 @@ SudokuView::MessageReceived(BMessage* message)
|
||||
break;
|
||||
}
|
||||
|
||||
case B_ABOUT_REQUESTED:
|
||||
Sudoku::DisplayAbout();
|
||||
break;
|
||||
|
||||
default:
|
||||
BView::MessageReceived(message);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user