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:
@@ -4,6 +4,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "Sudoku.h"
|
||||||
|
|
||||||
#include "SudokuWindow.h"
|
#include "SudokuWindow.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -13,23 +15,6 @@
|
|||||||
#include <TextView.h>
|
#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";
|
const char* kSignature = "application/x-vnd.Haiku-Sudoku";
|
||||||
|
|
||||||
|
|
||||||
@@ -68,6 +53,13 @@ Sudoku::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
void
|
void
|
||||||
Sudoku::AboutRequested()
|
Sudoku::AboutRequested()
|
||||||
|
{
|
||||||
|
Sudoku::DisplayAbout();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
Sudoku::DisplayAbout()
|
||||||
{
|
{
|
||||||
BAlert *alert = new BAlert("about", "Sudoku\n"
|
BAlert *alert = new BAlert("about", "Sudoku\n"
|
||||||
"\twritten by Axel Dörfler\n"
|
"\twritten by Axel Dörfler\n"
|
||||||
|
|||||||
@@ -5,6 +5,28 @@
|
|||||||
#ifndef SUDOKU_H
|
#ifndef SUDOKU_H
|
||||||
#define 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;
|
extern const char* kSignature;
|
||||||
|
|
||||||
#endif // SUDOKU_H
|
#endif // SUDOKU_H
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "SudokuView.h"
|
#include "SudokuView.h"
|
||||||
|
|
||||||
|
#include "Sudoku.h"
|
||||||
#include "SudokuField.h"
|
#include "SudokuField.h"
|
||||||
#include "SudokuSolver.h"
|
#include "SudokuSolver.h"
|
||||||
|
|
||||||
@@ -1022,6 +1023,10 @@ SudokuView::MessageReceived(BMessage* message)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case B_ABOUT_REQUESTED:
|
||||||
|
Sudoku::DisplayAbout();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BView::MessageReceived(message);
|
BView::MessageReceived(message);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user