Removing most About windows and menu items as discussed here
http://www.freelists.org/post/haiku-commits/r40968-in-haikutrunksrcapps-activitymonitor-bootmanager-charactermap-codycam-deskbar,3 Leaving them for now in replicants, and in Terminal, according to (my interpretation of) the instructions here http://dev.haiku-os.org/browser/haiku/trunk/src/apps/terminal/README.GPL_to_OBOS#L70 Some sporadic cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41108 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b552b728d8
commit
11c7ff531a
@ -24,20 +24,12 @@
|
||||
static const float MENU_BAR_HEIGHT = 19;
|
||||
|
||||
static const unsigned int MSG_FILE_OPEN = 'fopn';
|
||||
static const unsigned int MSG_ABOUT = 'info';
|
||||
static const unsigned int MSG_SHAPE_BOOK = 'spbk';
|
||||
static const unsigned int MSG_SHAPE_CUBE = 'spcb';
|
||||
static const unsigned int MSG_SHAPE_SPHERE = 'spsp';
|
||||
static const unsigned int MSG_OPTION_WIREFRAME = 'opwf';
|
||||
static const unsigned int MSG_FULLSCREEN = 'full';
|
||||
|
||||
static const char *ABOUT_TEXT = "\
|
||||
Drag and drop media files (pictures and videos) onto the 3D shapes. \
|
||||
Use your mouse to interact with the 3D shape.\n\
|
||||
Pick up your jaw from the floor.\n\n\
|
||||
Inspired by the original BeInc 3dmov demo.\n\
|
||||
Written by Zenja Solaja, 2009";
|
||||
|
||||
|
||||
// Local functions
|
||||
static int32 animation_thread(void *cookie);
|
||||
@ -111,7 +103,6 @@ void MainWindow :: SetupMenuBar(BRect frame)
|
||||
// File
|
||||
BMenu *menu_file = new BMenu("File");
|
||||
//menu_file->AddItem(new BMenuItem("Open", new BMessage(MSG_FILE_OPEN), 'N'));
|
||||
menu_file->AddItem(new BMenuItem("About", new BMessage(MSG_ABOUT)));
|
||||
menu_file->AddItem(new BMenuItem("Exit", new BMessage(B_QUIT_REQUESTED)));
|
||||
|
||||
// Shape
|
||||
@ -146,14 +137,6 @@ void MainWindow :: MessageReceived(BMessage *message)
|
||||
SetFullScreen(!IsFullScreen());
|
||||
break;
|
||||
|
||||
case MSG_ABOUT:
|
||||
{
|
||||
BAlert *about = new BAlert("3Dmov", ABOUT_TEXT, "Wow");
|
||||
about->SetShortcut(0, B_ESCAPE);
|
||||
about->Go(NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
/* TODO - Due to a bug when creating a 2nd BGLView in Haiku, I've decided to spawn a new window
|
||||
instead of creating a new BGLView (and using AddChild(new_view) / RemoveChild(old_view).
|
||||
Under Zeta, there is no problem replacing the current view with a new view.
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <AboutMenuItem.h>
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
#include <File.h>
|
||||
@ -119,19 +118,13 @@ ActivityWindow::ActivityWindow()
|
||||
|
||||
// "File" menu
|
||||
BMenu* menu = new BMenu(B_TRANSLATE("File"));
|
||||
BMenuItem* item;
|
||||
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Add graph"),
|
||||
new BMessage(kMsgAddView)));
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
menu->AddItem(item = new BAboutMenuItem());
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
||||
menu->SetTargetForItems(this);
|
||||
item->SetTarget(be_app);
|
||||
menuBar->AddItem(menu);
|
||||
|
||||
// "Settings" menu
|
||||
|
@ -10,12 +10,8 @@
|
||||
|
||||
#include "BootManagerWindow.h"
|
||||
|
||||
#include <AboutWindow.h>
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
#include <Locale.h>
|
||||
#include <TextView.h>
|
||||
|
||||
|
||||
#undef B_TRANSLATE_CONTEXT
|
||||
@ -30,7 +26,6 @@ public:
|
||||
BootManager();
|
||||
|
||||
virtual void ReadyToRun();
|
||||
virtual void AboutRequested();
|
||||
};
|
||||
|
||||
|
||||
@ -49,20 +44,6 @@ BootManager::ReadyToRun()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BootManager::AboutRequested()
|
||||
{
|
||||
const char* authors[] = {
|
||||
"David Dengg",
|
||||
"Michael Pfeiffer",
|
||||
NULL
|
||||
};
|
||||
|
||||
BAboutWindow about(B_TRANSLATE_SYSTEM_NAME("BootManager"), 2008, authors);
|
||||
about.Show();
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
|
@ -42,8 +42,6 @@ BootManagerWindow::BootManagerWindow()
|
||||
|
||||
fController.Initialize(fWizardView);
|
||||
|
||||
AddShortcut('A', B_COMMAND_KEY, new BMessage(B_ABOUT_REQUESTED));
|
||||
|
||||
CenterOnScreen();
|
||||
|
||||
// Prevent minimizing this window if the user would have no way to
|
||||
@ -70,10 +68,6 @@ BootManagerWindow::MessageReceived(BMessage* msg)
|
||||
fController.Previous(fWizardView);
|
||||
break;
|
||||
|
||||
case B_ABOUT_REQUESTED:
|
||||
be_app_messenger.SendMessage(B_ABOUT_REQUESTED);
|
||||
break;
|
||||
|
||||
default:
|
||||
BWindow::MessageReceived(msg);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ Application BootManager :
|
||||
WizardController.cpp
|
||||
WizardPageView.cpp
|
||||
|
||||
: be libshared.a textencoding tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
|
||||
: be textencoding tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
|
||||
: BootManager.rdef
|
||||
;
|
||||
|
||||
|
@ -8,11 +8,8 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <AboutWindow.h>
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
#include <TextView.h>
|
||||
|
||||
#include "CharacterWindow.h"
|
||||
|
||||
@ -55,19 +52,6 @@ CharacterMap::MessageReceived(BMessage* message)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CharacterMap::AboutRequested()
|
||||
{
|
||||
const char* authors[] = {
|
||||
"Axel Dörfler",
|
||||
NULL
|
||||
};
|
||||
|
||||
BAboutWindow about(B_TRANSLATE_SYSTEM_NAME("CharacterMap"), 2009, authors);
|
||||
about.Show();
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
|
@ -22,8 +22,6 @@ public:
|
||||
virtual void RefsReceived(BMessage* message);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
virtual void AboutRequested();
|
||||
|
||||
private:
|
||||
CharacterWindow* fWindow;
|
||||
};
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <AboutMenuItem.h>
|
||||
#include <Application.h>
|
||||
#include <Button.h>
|
||||
#include <Catalog.h>
|
||||
@ -228,14 +227,9 @@ CharacterWindow::CharacterWindow()
|
||||
BMenu* menu = new BMenu(B_TRANSLATE("File"));
|
||||
BMenuItem* item;
|
||||
|
||||
menu->AddItem(item = new BAboutMenuItem());
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
||||
menu->SetTargetForItems(this);
|
||||
item->SetTarget(be_app);
|
||||
menuBar->AddItem(menu);
|
||||
|
||||
menu = new BMenu(B_TRANSLATE("View"));
|
||||
|
@ -11,7 +11,7 @@ Application CharacterMap :
|
||||
UnicodeBlocks.cpp
|
||||
UnicodeBlockView.cpp
|
||||
|
||||
: be libshared.a locale $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
|
||||
: be locale $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
|
||||
: CharacterMap.rdef
|
||||
;
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <AboutMenuItem.h>
|
||||
#include <AboutWindow.h>
|
||||
#include <Alert.h>
|
||||
#include <Button.h>
|
||||
#include <LayoutBuilder.h>
|
||||
@ -270,21 +268,6 @@ CodyCam::MessageReceived(BMessage *message)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CodyCam::AboutRequested()
|
||||
{
|
||||
const char* authors[] = {
|
||||
"Be, Incorporated",
|
||||
NULL
|
||||
};
|
||||
|
||||
BAboutWindow about(B_TRANSLATE_SYSTEM_NAME("CodyCam"), 2003, authors,
|
||||
"The Original BeOS webcam.\n"
|
||||
B_UTF8_COPYRIGHT " 1998-1999 Be, Incorporated.");
|
||||
about.Show();
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
CodyCam::_SetUpNodes()
|
||||
{
|
||||
@ -522,12 +505,6 @@ VideoWindow::VideoWindow(BRect frame, const char* title, window_type type,
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
menuItem = new BAboutMenuItem();
|
||||
menuItem->SetTarget(be_app);
|
||||
menu->AddItem(menuItem);
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
menuItem = new BMenuItem(B_TRANSLATE("Quit"),
|
||||
new BMessage(B_QUIT_REQUESTED), 'Q');
|
||||
menuItem->SetTarget(be_app);
|
||||
|
@ -93,7 +93,6 @@ public:
|
||||
void ReadyToRun();
|
||||
virtual bool QuitRequested();
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void AboutRequested();
|
||||
|
||||
private:
|
||||
status_t _SetUpNodes();
|
||||
|
@ -13,7 +13,7 @@ Application CodyCam :
|
||||
Settings.cpp
|
||||
SettingsHandler.cpp
|
||||
VideoConsumer.cpp
|
||||
: be $(HAIKU_LOCALE_LIBS) libshared.a media translation $(TARGET_NETAPI_LIB)
|
||||
: be $(HAIKU_LOCALE_LIBS) media translation $(TARGET_NETAPI_LIB)
|
||||
$(TARGET_LIBSTDC++)
|
||||
: CodyCam.rdef
|
||||
;
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <AboutMenuItem.h>
|
||||
#include <AboutWindow.h>
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
@ -121,8 +120,6 @@ CalcView::CalcView(BRect frame, rgb_color rgbBaseColor, BMessage* settings)
|
||||
fAutoNumlockItem(NULL),
|
||||
fAudioFeedbackItem(NULL),
|
||||
fShowKeypadItem(NULL),
|
||||
fAboutItem(NULL),
|
||||
|
||||
fOptions(new CalcOptions()),
|
||||
fShowKeypad(true)
|
||||
{
|
||||
@ -173,8 +170,6 @@ CalcView::CalcView(BMessage* archive)
|
||||
fAutoNumlockItem(NULL),
|
||||
fAudioFeedbackItem(NULL),
|
||||
fShowKeypadItem(NULL),
|
||||
fAboutItem(NULL),
|
||||
|
||||
fOptions(new CalcOptions()),
|
||||
fShowKeypad(true)
|
||||
{
|
||||
@ -1112,7 +1107,6 @@ CalcView::_CreatePopUpMenu()
|
||||
new BMessage(MSG_OPTIONS_AUDIO_FEEDBACK));
|
||||
fShowKeypadItem = new BMenuItem(B_TRANSLATE("Show keypad"),
|
||||
new BMessage(MSG_OPTIONS_SHOW_KEYPAD));
|
||||
fAboutItem = new BAboutMenuItem();
|
||||
|
||||
// apply current settings
|
||||
fAutoNumlockItem->SetMarked(fOptions->auto_num_lock);
|
||||
@ -1128,7 +1122,6 @@ CalcView::_CreatePopUpMenu()
|
||||
// fPopUpMenu->AddItem(fAudioFeedbackItem);
|
||||
fPopUpMenu->AddItem(fShowKeypadItem);
|
||||
fPopUpMenu->AddSeparatorItem();
|
||||
fPopUpMenu->AddItem(fAboutItem);
|
||||
}
|
||||
|
||||
|
||||
|
@ -120,7 +120,6 @@ class CalcView : public BView {
|
||||
BMenuItem* fAutoNumlockItem;
|
||||
BMenuItem* fAudioFeedbackItem;
|
||||
BMenuItem* fShowKeypadItem;
|
||||
BMenuItem* fAboutItem;
|
||||
|
||||
// calculator options.
|
||||
CalcOptions* fOptions;
|
||||
|
@ -6,7 +6,6 @@
|
||||
* Pieter Panman
|
||||
*/
|
||||
|
||||
#include <AboutWindow.h>
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
@ -20,8 +19,6 @@
|
||||
class DevicesApplication : public BApplication {
|
||||
public:
|
||||
DevicesApplication();
|
||||
virtual void AboutRequested();
|
||||
static void ShowAbout();
|
||||
};
|
||||
|
||||
|
||||
@ -44,27 +41,6 @@ DevicesApplication::DevicesApplication()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DevicesApplication::AboutRequested()
|
||||
{
|
||||
ShowAbout();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DevicesApplication::ShowAbout()
|
||||
{
|
||||
const char* authors[] = {
|
||||
"Pieter Panman",
|
||||
NULL
|
||||
};
|
||||
BAboutWindow about(B_TRANSLATE_SYSTEM_NAME("Devices"), 2009, authors,
|
||||
"Based on listdev by Jérôme Duval and the previous Devices "
|
||||
"preference by Jérôme Duval and Sikosis.");
|
||||
about.Show();
|
||||
}
|
||||
|
||||
|
||||
DevicesWindow::DevicesWindow()
|
||||
:
|
||||
BWindow(BRect(50, 50, 750, 550), B_TRANSLATE_SYSTEM_NAME("Devices"),
|
||||
|
@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <AboutMenuItem.h>
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
#include <MenuBar.h>
|
||||
@ -45,8 +44,6 @@ DevicesView::CreateLayout()
|
||||
"Generate system information"), new BMessage(kMsgGenerateSysInfo)));
|
||||
item->SetEnabled(false);
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(item = new BAboutMenuItem());
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
||||
menu->SetTargetForItems(this);
|
||||
|
@ -72,7 +72,7 @@ Application Devices :
|
||||
Device.cpp
|
||||
PropertyList.cpp
|
||||
PropertyListPlain.cpp
|
||||
: be libcolumnlistview.a libshared.a tracker $(TARGET_LIBSUPC++)
|
||||
: be libcolumnlistview.a tracker $(TARGET_LIBSUPC++)
|
||||
$(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
|
||||
: Devices.rdef
|
||||
;
|
||||
|
@ -77,7 +77,6 @@ class DiskProbe : public BApplication {
|
||||
virtual void ArgvReceived(int32 argc, char **argv);
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
|
||||
virtual void AboutRequested();
|
||||
virtual bool QuitRequested();
|
||||
|
||||
private:
|
||||
@ -483,20 +482,6 @@ DiskProbe::MessageReceived(BMessage *message)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiskProbe::AboutRequested()
|
||||
{
|
||||
const char* authors[] = {
|
||||
"Axel Dörfler",
|
||||
NULL
|
||||
};
|
||||
|
||||
BAboutWindow about(B_TRANSLATE_SYSTEM_NAME("DiskProbe"), 2004, authors,
|
||||
"Original Be version by Robert Polic.");
|
||||
about.Show();
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
DiskProbe::QuitRequested()
|
||||
{
|
||||
|
@ -81,10 +81,6 @@ FileWindow::FileWindow(BRect rect, entry_ref *ref, const BMessage *settings)
|
||||
// the ProbeView print menu items will be inserted here
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("About DiskProbe" B_UTF8_ELLIPSIS),
|
||||
new BMessage(B_ABOUT_REQUESTED)));
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||
new BMessage(B_QUIT_REQUESTED), 'Q', B_COMMAND_KEY));
|
||||
menu->SetTargetForItems(be_app);
|
||||
|
@ -16,7 +16,7 @@ Application DiskProbe :
|
||||
OpenWindow.cpp
|
||||
FindWindow.cpp
|
||||
: be $(HAIKU_LOCALE_LIBS) tracker translation libexpression_parser.a
|
||||
libmapm.a libshared.a $(TARGET_LIBSUPC++)
|
||||
libmapm.a $(TARGET_LIBSUPC++)
|
||||
: DiskProbe.rdef
|
||||
;
|
||||
|
||||
|
@ -6,12 +6,6 @@
|
||||
|
||||
#include "ExpanderApp.h"
|
||||
|
||||
#include <AboutWindow.h>
|
||||
#include <Alert.h>
|
||||
#include <Catalog.h>
|
||||
#include <Locale.h>
|
||||
#include <TextView.h>
|
||||
|
||||
#include "ExpanderWindow.h"
|
||||
|
||||
|
||||
@ -27,28 +21,6 @@ ExpanderApp::ExpanderApp()
|
||||
}
|
||||
|
||||
|
||||
#undef B_TRANSLATE_CONTEXT
|
||||
#define B_TRANSLATE_CONTEXT "About"
|
||||
|
||||
void
|
||||
ExpanderApp::AboutRequested()
|
||||
{
|
||||
const char* authors[] = {
|
||||
"Jérôme Duval",
|
||||
NULL
|
||||
};
|
||||
BAboutWindow about(B_TRANSLATE_SYSTEM_NAME("Expander"), 2004, authors,
|
||||
"Original Be version by Dominic, Hiroshi, Peter, Pavel and Robert.");
|
||||
about.Show();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExpanderApp::ReadyToRun()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExpanderApp::ArgvReceived(int32 argc, char **argv)
|
||||
{
|
||||
|
@ -25,29 +25,29 @@
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifndef _ExpanderApp_h
|
||||
#define _ExpanderApp_h
|
||||
|
||||
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
|
||||
#include "ExpanderSettings.h"
|
||||
#include "ExpanderWindow.h"
|
||||
|
||||
|
||||
class ExpanderApp : public BApplication {
|
||||
public:
|
||||
ExpanderApp();
|
||||
public:
|
||||
ExpanderApp();
|
||||
|
||||
public:
|
||||
virtual void AboutRequested();
|
||||
virtual void ArgvReceived(int32 argc, char **argv);
|
||||
virtual void ReadyToRun();
|
||||
virtual void RefsReceived(BMessage *msg);
|
||||
virtual void ArgvReceived(int32 argc, char** argv);
|
||||
virtual void RefsReceived(BMessage* msg);
|
||||
|
||||
ExpanderSettings fSettings;
|
||||
void UpdateSettingsFrom(BMessage *message);
|
||||
private:
|
||||
ExpanderWindow *fWindow;
|
||||
void UpdateSettingsFrom(BMessage* message);
|
||||
|
||||
ExpanderSettings fSettings;
|
||||
private:
|
||||
ExpanderWindow* fWindow;
|
||||
};
|
||||
|
||||
#endif /* _ExpanderApp_h */
|
||||
|
||||
#endif // _ExpanderApp_h
|
||||
|
@ -514,11 +514,6 @@ ExpanderWindow::_AddMenuBar(BLayout* layout)
|
||||
{
|
||||
fBar = new BMenuBar("menu_bar", B_ITEMS_IN_ROW, B_INVALIDATE_AFTER_LAYOUT);
|
||||
BMenu* menu = new BMenu(B_TRANSLATE("File"));
|
||||
BMenuItem* item;
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("About Expander…"),
|
||||
new BMessage(B_ABOUT_REQUESTED)));
|
||||
item->SetTarget(be_app_messenger);
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(fSourceItem = new BMenuItem(B_TRANSLATE("Set source…"),
|
||||
new BMessage(MSG_SOURCE), 'O'));
|
||||
menu->AddItem(fDestItem = new BMenuItem(B_TRANSLATE("Set destination…"),
|
||||
|
@ -12,14 +12,13 @@ Application Expander :
|
||||
DirectoryFilePanel.cpp
|
||||
ExpanderRules.cpp
|
||||
PasswordAlert.cpp
|
||||
: be libshared.a tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
|
||||
: be tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
|
||||
: Expander.rdef
|
||||
;
|
||||
|
||||
DoCatalogs Expander :
|
||||
x-vnd.Haiku-Expander
|
||||
:
|
||||
ExpanderApp.cpp
|
||||
ExpanderWindow.cpp
|
||||
ExpanderPreferences.cpp
|
||||
ExpanderSettings.cpp
|
||||
|
@ -2,19 +2,22 @@
|
||||
Copyright 1999, Be Incorporated. All Rights Reserved.
|
||||
This file may be used under the terms of the Be Sample Code License.
|
||||
*/
|
||||
|
||||
#ifndef _TEAPOT_APP_
|
||||
#define _TEAPOT_APP_
|
||||
|
||||
|
||||
#include <Application.h>
|
||||
|
||||
#include "TeapotWindow.h"
|
||||
|
||||
|
||||
class TeapotApp : public BApplication {
|
||||
public:
|
||||
TeapotApp(const char* sign);
|
||||
virtual void MessageReceived(BMessage* msg);
|
||||
// void AboutRequested();
|
||||
private:
|
||||
TeapotWindow* fTeapotWindow;
|
||||
public:
|
||||
TeapotApp(const char* sign);
|
||||
virtual void MessageReceived(BMessage* msg);
|
||||
|
||||
private:
|
||||
TeapotWindow* fTeapotWindow;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -6,9 +6,9 @@
|
||||
* Alexandre Deckner <alex@zappotek.com>
|
||||
*/
|
||||
|
||||
#include <Alert.h>
|
||||
|
||||
#include "App.h"
|
||||
|
||||
#include "MainWindow.h"
|
||||
|
||||
|
||||
@ -35,15 +35,6 @@ App::ReadyToRun()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
App::AboutRequested()
|
||||
{
|
||||
BAlert* alert;
|
||||
alert = new BAlert("About", "A little 3D demo", "OK");
|
||||
alert->Go(NULL);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
App::QuitRequested()
|
||||
{
|
||||
|
@ -5,23 +5,23 @@
|
||||
* Authors:
|
||||
* Alexandre Deckner <alex@zappotek.com>
|
||||
*/
|
||||
|
||||
#ifndef _APP_H
|
||||
#define _APP_H
|
||||
|
||||
|
||||
#include <Application.h>
|
||||
|
||||
class App: public BApplication {
|
||||
public:
|
||||
App();
|
||||
virtual ~App();
|
||||
|
||||
virtual void ReadyToRun();
|
||||
virtual void AboutRequested();
|
||||
virtual bool QuitRequested();
|
||||
class App : public BApplication {
|
||||
public:
|
||||
App();
|
||||
virtual ~App();
|
||||
|
||||
virtual void ReadyToRun();
|
||||
virtual bool QuitRequested();
|
||||
|
||||
protected:
|
||||
BWindow* fMainWindow;
|
||||
BWindow* fMainWindow;
|
||||
};
|
||||
|
||||
#endif /* _APP_H */
|
||||
|
@ -30,8 +30,6 @@ public:
|
||||
UninstallApplication();
|
||||
~UninstallApplication();
|
||||
|
||||
void AboutRequested();
|
||||
|
||||
private:
|
||||
UninstallWindow* fWindow;
|
||||
};
|
||||
@ -52,32 +50,6 @@ UninstallApplication::~UninstallApplication()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
UninstallApplication::AboutRequested()
|
||||
{
|
||||
BString aboutString = B_TRANSLATE("InstalledPackages");
|
||||
int appNameLength = aboutString.Length();
|
||||
aboutString << "\n";
|
||||
aboutString << B_TRANSLATE(
|
||||
"BeOS legacy .pkg package removing application "
|
||||
"for Haiku.\n\n"
|
||||
"Copyright 2007,\nŁukasz 'Sil2100' Zemczak\n\n"
|
||||
"Copyright (c) 2007 Haiku, Inc.\n");
|
||||
BAlert* about = new BAlert("about", aboutString.String(),
|
||||
B_TRANSLATE("Close"));
|
||||
|
||||
BTextView* view = about->TextView();
|
||||
BFont font;
|
||||
view->SetStylable(true);
|
||||
view->GetFont(&font);
|
||||
font.SetFace(B_BOLD_FACE);
|
||||
font.SetSize(font.Size() * 1.5);
|
||||
view->SetFontAndColor(0, appNameLength, &font);
|
||||
|
||||
about->Go();
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ UsePrivateHeaders shared ;
|
||||
|
||||
Application Magnify :
|
||||
Magnify.cpp
|
||||
: be game $(HAIKU_LOCALE_LIBS) libshared.a $(TARGET_LIBSUPC++) tracker
|
||||
: be game $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) tracker
|
||||
: Magnify.rdef
|
||||
;
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
#include "Magnify.h"
|
||||
|
||||
#include <AboutMenuItem.h>
|
||||
#include <Alert.h>
|
||||
#include <Bitmap.h>
|
||||
#include <Catalog.h>
|
||||
@ -132,8 +131,6 @@ static void
|
||||
BuildInfoMenu(BMenu *menu)
|
||||
{
|
||||
BMenuItem* menuItem;
|
||||
menuItem = new BAboutMenuItem();
|
||||
menu->AddItem(menuItem);
|
||||
menuItem = new BMenuItem(B_TRANSLATE("Help"),
|
||||
new BMessage(msg_help));
|
||||
menu->AddItem(menuItem);
|
||||
@ -202,37 +199,6 @@ TApp::TApp(int32 pixelCount)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TApp::MessageReceived(BMessage* msg)
|
||||
{
|
||||
switch (msg->what) {
|
||||
case B_ABOUT_REQUESTED:
|
||||
AboutRequested();
|
||||
break;
|
||||
default:
|
||||
BApplication::MessageReceived(msg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TApp::ReadyToRun()
|
||||
{
|
||||
BApplication::ReadyToRun();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TApp::AboutRequested()
|
||||
{
|
||||
(new BAlert("", B_TRANSLATE("Magnify!\n\n" B_UTF8_COPYRIGHT
|
||||
"2002-2006 Haiku\n(C)1999 Be Inc.\n\n"
|
||||
"Now with even more features and recompiled for Haiku."),
|
||||
B_TRANSLATE("OK")))->Go();
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
@ -263,7 +229,6 @@ TWindow::TWindow(int32 pixelCount)
|
||||
|
||||
ResizeWindow(fHPixelCount, fVPixelCount);
|
||||
|
||||
AddShortcut('I', B_COMMAND_KEY, new BMessage(B_ABOUT_REQUESTED));
|
||||
AddShortcut('S', B_COMMAND_KEY, new BMessage(msg_save));
|
||||
AddShortcut('C', B_COMMAND_KEY, new BMessage(msg_copy_image));
|
||||
AddShortcut('T', B_COMMAND_KEY, new BMessage(msg_show_info));
|
||||
@ -291,10 +256,6 @@ TWindow::MessageReceived(BMessage* m)
|
||||
bool active = fFatBits->Active();
|
||||
|
||||
switch (m->what) {
|
||||
case B_ABOUT_REQUESTED:
|
||||
be_app->MessageReceived(m);
|
||||
break;
|
||||
|
||||
case msg_help:
|
||||
ShowHelp();
|
||||
break;
|
||||
|
@ -254,10 +254,6 @@ class TWindow : public BWindow {
|
||||
class TApp : public BApplication {
|
||||
public:
|
||||
TApp(int32 pixelCount = -1);
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void ReadyToRun();
|
||||
virtual void AboutRequested();
|
||||
};
|
||||
|
||||
#endif // MAGNIFY_H
|
||||
|
@ -12,7 +12,7 @@ Application MediaConverter :
|
||||
MediaFileInfoView.cpp
|
||||
MediaFileListView.cpp
|
||||
|
||||
: be libshared.a media tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSTDC++)
|
||||
: be media tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSTDC++)
|
||||
: MediaConverter.rdef
|
||||
;
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <AboutMenuItem.h>
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
#include <Box.h>
|
||||
@ -384,20 +383,6 @@ MediaConverterWindow::MessageReceived(BMessage* msg)
|
||||
case B_CANCEL:
|
||||
break;
|
||||
|
||||
case B_ABOUT_REQUESTED:
|
||||
{
|
||||
BString title(B_TRANSLATE("About" B_UTF8_ELLIPSIS));
|
||||
(new BAlert(title,
|
||||
B_TRANSLATE("MediaConverter\n"
|
||||
VERSION"\n"
|
||||
B_UTF8_COPYRIGHT" 1999, Be Incorporated.\n"
|
||||
B_UTF8_COPYRIGHT" 2000-2004 Jun Suzuki\n"
|
||||
B_UTF8_COPYRIGHT" 2007 Stephan Aßmus\n"
|
||||
B_UTF8_COPYRIGHT" 2010 Haiku, Inc."),
|
||||
B_TRANSLATE("OK")))->Go();
|
||||
break;
|
||||
}
|
||||
|
||||
case QUIT_MESSAGE:
|
||||
MediaConverterWindow::QuitRequested();
|
||||
break;
|
||||
@ -933,9 +918,6 @@ MediaConverterWindow::_CreateMenu()
|
||||
new BMessage(OPEN_FILE_MESSAGE), 'O');
|
||||
menu->AddItem(item);
|
||||
menu->AddSeparatorItem();
|
||||
item = new BAboutMenuItem(),
|
||||
menu->AddItem(item);
|
||||
menu->AddSeparatorItem();
|
||||
item = new BMenuItem(B_TRANSLATE_WITH_CONTEXT("Quit", "Menu"),
|
||||
new BMessage(QUIT_MESSAGE), 'Q');
|
||||
menu->AddItem(item);
|
||||
|
@ -407,23 +407,6 @@ MainApp::MessageReceived(BMessage* message)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MainApp::AboutRequested()
|
||||
{
|
||||
const char* appName = B_TRANSLATE_SYSTEM_NAME("MediaPlayer");
|
||||
BString message = B_TRANSLATE("%app%\n\nWritten by Marcus Overhagen, "
|
||||
"Stephan Aßmus and Frederik Modéen");
|
||||
message.ReplaceFirst("%app%", appName);
|
||||
BAlert* alert = new BAlert(appName, message.String(),
|
||||
B_TRANSLATE("Thanks"));
|
||||
alert->SetFeel(B_FLOATING_ALL_WINDOW_FEEL);
|
||||
// Make sure it is on top of any player windows that may have the
|
||||
// floating all window feel.
|
||||
alert->Go(NULL);
|
||||
// asynchronous mode
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
|
@ -74,7 +74,6 @@ private:
|
||||
virtual void RefsReceived(BMessage* message);
|
||||
virtual void ArgvReceived(int32 argc, char** argv);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void AboutRequested();
|
||||
|
||||
private:
|
||||
void _ShowSettingsWindow();
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <AboutMenuItem.h>
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
#include <Autolock.h>
|
||||
@ -1476,12 +1475,6 @@ MainWin::_CreateMenu()
|
||||
|
||||
fFileMenu->AddSeparatorItem();
|
||||
|
||||
item = new BAboutMenuItem();
|
||||
fFileMenu->AddItem(item);
|
||||
item->SetTarget(be_app);
|
||||
|
||||
fFileMenu->AddSeparatorItem();
|
||||
|
||||
fFileMenu->AddItem(new BMenuItem(B_TRANSLATE("Close"),
|
||||
new BMessage(M_FILE_CLOSE), 'W'));
|
||||
fFileMenu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||
|
@ -35,8 +35,6 @@ class PackageInstaller : public BApplication {
|
||||
|
||||
void MessageReceived(BMessage *msg);
|
||||
|
||||
void AboutRequested();
|
||||
|
||||
private:
|
||||
BFilePanel *fOpen;
|
||||
uint32 fWindowCount;
|
||||
@ -140,28 +138,6 @@ PackageInstaller::MessageReceived(BMessage *msg)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PackageInstaller::AboutRequested()
|
||||
{
|
||||
BAlert *about = new BAlert("about",
|
||||
B_TRANSLATE("PackageInstaller\n"
|
||||
"BeOS legacy .pkg file installer for Haiku.\n\n"
|
||||
"Copyright 2007,\nŁukasz 'Sil2100' Zemczak\n\n"
|
||||
"Copyright (c) 2007 Haiku, Inc. \n"),
|
||||
B_TRANSLATE("OK"));
|
||||
|
||||
BTextView *view = about->TextView();
|
||||
BFont font;
|
||||
view->SetStylable(true);
|
||||
view->GetFont(&font);
|
||||
font.SetFace(B_BOLD_FACE);
|
||||
font.SetSize(font.Size() * 1.5);
|
||||
view->SetFontAndColor(0, 17, &font);
|
||||
|
||||
about->Go();
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ Application PackageManager :
|
||||
ApplicationView.cpp
|
||||
ApplicationWindow.cpp
|
||||
PackageManager.cpp
|
||||
: be $(HAIKU_LOCALE_LIBS) libshared.a $(TARGET_LIBSUPC++) translation
|
||||
: be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) translation
|
||||
: PackageManager.rdef
|
||||
;
|
||||
|
||||
|
@ -9,8 +9,6 @@
|
||||
|
||||
#include "ApplicationWindow.h"
|
||||
|
||||
#include <AboutWindow.h>
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
#include <Entry.h>
|
||||
@ -33,8 +31,6 @@ class PackageManager : public BApplication {
|
||||
|
||||
void MessageReceived(BMessage *msg);
|
||||
|
||||
void AboutRequested();
|
||||
|
||||
private:
|
||||
ApplicationWindow* fMainWindow;
|
||||
};
|
||||
@ -113,19 +109,6 @@ PackageManager::MessageReceived(BMessage *msg)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PackageManager::AboutRequested()
|
||||
{
|
||||
const char* authors[] = {
|
||||
"Adrien Destugues",
|
||||
NULL
|
||||
};
|
||||
|
||||
BAboutWindow about(B_TRANSLATE_SYSTEM_NAME("PackageManager"), 2010, authors);
|
||||
about.Show();
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
@ -198,14 +198,6 @@ TPeopleApp::~TPeopleApp()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TPeopleApp::AboutRequested()
|
||||
{
|
||||
(new BAlert(B_TRANSLATE("About"), B_UTF8_ELLIPSIS "by Robert Polic",
|
||||
B_TRANSLATE("OK")))->Go();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TPeopleApp::ArgvReceived(int32 argc, char** argv)
|
||||
{
|
||||
|
@ -38,7 +38,6 @@ public:
|
||||
TPeopleApp();
|
||||
virtual ~TPeopleApp();
|
||||
|
||||
virtual void AboutRequested();
|
||||
virtual void ArgvReceived(int32, char**);
|
||||
virtual void MessageReceived(BMessage*);
|
||||
virtual void RefsReceived(BMessage*);
|
||||
|
@ -51,7 +51,7 @@ Application PoorMan : PoorMan.cpp
|
||||
match.c
|
||||
tdate_parse.c
|
||||
|
||||
: be libshared.a network tracker $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
|
||||
: be network tracker $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
|
||||
;
|
||||
|
||||
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
#include "PoorManApplication.h"
|
||||
|
||||
#include <AboutWindow.h>
|
||||
#include <Application.h>
|
||||
#include <Alert.h>
|
||||
#include <Catalog.h>
|
||||
@ -42,20 +41,6 @@ PoorManApplication::PoorManApplication()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PoorManApplication::AboutRequested()
|
||||
{
|
||||
const char* authors[] = {
|
||||
"Philip Harrison",
|
||||
"Ma Jie",
|
||||
NULL
|
||||
};
|
||||
BAboutWindow about(STR_APP_NAME, 2004, authors,
|
||||
"Poor Man's web server.");
|
||||
about.Show();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PoorManApplication::MessageReceived(BMessage *message)
|
||||
{
|
||||
|
@ -19,7 +19,6 @@ class PoorManApplication: public BApplication
|
||||
{
|
||||
public:
|
||||
PoorManApplication();
|
||||
void AboutRequested();
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
PoorManWindow * GetPoorManWindow() { return mainWindow; }
|
||||
private:
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include <time.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <AboutMenuItem.h>
|
||||
#include <Alert.h>
|
||||
#include <Box.h>
|
||||
#include <Catalog.h>
|
||||
@ -458,13 +457,6 @@ PoorManWindow::BuildFileMenu() const
|
||||
new BMessage(MSG_MENU_FILE_SAVE_SELECTION)));
|
||||
|
||||
ptrFileMenu->AddSeparatorItem();
|
||||
|
||||
BAboutMenuItem * AboutItem = new BAboutMenuItem();
|
||||
AboutItem->SetTarget(NULL, be_app);
|
||||
ptrFileMenu->AddItem(AboutItem);
|
||||
|
||||
ptrFileMenu->AddSeparatorItem();
|
||||
|
||||
|
||||
ptrFileMenu->AddItem(new BMenuItem(STR_MNU_FILE_QUIT,
|
||||
new BMessage(B_QUIT_REQUESTED), CMD_FILE_QUIT));
|
||||
|
@ -36,8 +36,6 @@ const char* STR_MNU_FILE_SAVE_AS
|
||||
= B_TRANSLATE("Save console as" B_UTF8_ELLIPSIS);
|
||||
const char* STR_MNU_FILE_SAVE_SELECTION
|
||||
= B_TRANSLATE("Save console selections as" B_UTF8_ELLIPSIS);
|
||||
const char* STR_MNU_FILE_ABOUT
|
||||
= B_TRANSLATE("About PoorMan" B_UTF8_ELLIPSIS);
|
||||
const char* STR_MNU_FILE_QUIT
|
||||
= B_TRANSLATE("Quit");
|
||||
const char* STR_MNU_EDIT
|
||||
|
@ -51,7 +51,6 @@ extern const char* STR_DIR_CREATED;
|
||||
extern const char* STR_MNU_FILE;
|
||||
extern const char* STR_MNU_FILE_SAVE_AS;
|
||||
extern const char* STR_MNU_FILE_SAVE_SELECTION;
|
||||
extern const char* STR_MNU_FILE_ABOUT;
|
||||
extern const char* STR_MNU_FILE_QUIT;
|
||||
extern const char* STR_MNU_EDIT;
|
||||
extern const char* STR_MNU_EDIT_COPY;
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <AboutWindow.h>
|
||||
#include <Catalog.h>
|
||||
#include <Locale.h>
|
||||
|
||||
@ -58,22 +57,6 @@ BootPromptApp::MessageReceived(BMessage* message)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BootPromptApp::AboutRequested()
|
||||
{
|
||||
const char* kAuthors[] = {
|
||||
"Stephan Aßmus",
|
||||
NULL
|
||||
};
|
||||
|
||||
BAboutWindow* aboutWindow = new BAboutWindow(
|
||||
B_TRANSLATE_SYSTEM_NAME("ReadOnlyBootPrompt"), 2010, kAuthors);
|
||||
|
||||
aboutWindow->Show();
|
||||
delete aboutWindow;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BootPromptApp::ReadyToRun()
|
||||
{
|
||||
|
@ -21,7 +21,6 @@ public:
|
||||
BootPromptApp();
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void AboutRequested();
|
||||
virtual void ReadyToRun();
|
||||
};
|
||||
|
||||
|
@ -32,7 +32,6 @@ DoCatalogs ShowImage :
|
||||
:
|
||||
PrintOptionsWindow.cpp
|
||||
ProgressWindow.cpp
|
||||
ShowImageApp.cpp
|
||||
ShowImageView.cpp
|
||||
ShowImageWindow.cpp
|
||||
;
|
||||
|
@ -14,8 +14,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <AboutWindow.h>
|
||||
#include <Alert.h>
|
||||
#include <Catalog.h>
|
||||
#include <Clipboard.h>
|
||||
#include <FilePanel.h>
|
||||
@ -29,10 +27,6 @@
|
||||
#include "ToolBarIcons.h"
|
||||
|
||||
|
||||
#undef B_TRANSLATE_CONTEXT
|
||||
#define B_TRANSLATE_CONTEXT "AboutWindow"
|
||||
|
||||
|
||||
const char* kApplicationSignature = "application/x-vnd.Haiku-ShowImage";
|
||||
const int32 kWindowsToIgnore = 1;
|
||||
// ignore the always open file panel
|
||||
@ -45,6 +39,7 @@ ShowImageApp::ShowImageApp()
|
||||
fPulseStarted(false),
|
||||
fLastWindowFrame(BRect(30, 30, 430, 330))
|
||||
{
|
||||
B_TRANSLATE_MARK_SYSTEM_NAME("ShowImage");
|
||||
_UpdateLastWindowFrame();
|
||||
// BBitmap can be created after there is a BApplication instance.
|
||||
init_tool_bar_icons();
|
||||
@ -142,22 +137,6 @@ ShowImageApp::MessageReceived(BMessage* message)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ShowImageApp::AboutRequested()
|
||||
{
|
||||
const char* authors[] = {
|
||||
"Fernando F. Oliveira",
|
||||
"Michael Wilber",
|
||||
"Michael Pfeiffer",
|
||||
"Ryan Leavengood",
|
||||
"Axel Dörfler",
|
||||
NULL
|
||||
};
|
||||
BAboutWindow about(B_TRANSLATE_SYSTEM_NAME("ShowImage"), 2003, authors);
|
||||
about.Show();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ShowImageApp::Pulse()
|
||||
{
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "ShowImageSettings.h"
|
||||
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
#include <FilePanel.h>
|
||||
|
||||
|
||||
@ -31,7 +30,6 @@ public:
|
||||
virtual void ArgvReceived(int32 argc, char** argv);
|
||||
virtual void ReadyToRun();
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void AboutRequested();
|
||||
virtual void Pulse();
|
||||
virtual void RefsReceived(BMessage* message);
|
||||
virtual bool QuitRequested();
|
||||
|
@ -396,9 +396,6 @@ ShowImageWindow::_AddMenus(BMenuBar* bar)
|
||||
_AddItemMenu(menu, B_TRANSLATE("Print" B_UTF8_ELLIPSIS),
|
||||
MSG_PREPARE_PRINT, 'P', 0, this);
|
||||
menu->AddSeparatorItem();
|
||||
_AddItemMenu(menu, B_TRANSLATE("About ShowImage" B_UTF8_ELLIPSIS),
|
||||
B_ABOUT_REQUESTED, 0, 0, be_app);
|
||||
menu->AddSeparatorItem();
|
||||
_AddItemMenu(menu, B_TRANSLATE("Quit"), B_QUIT_REQUESTED, 'Q', 0, be_app);
|
||||
bar->AddItem(menu);
|
||||
|
||||
|
@ -57,34 +57,6 @@ Sudoku::MessageReceived(BMessage* message)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Sudoku::AboutRequested()
|
||||
{
|
||||
Sudoku::DisplayAbout();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Sudoku::DisplayAbout()
|
||||
{
|
||||
BAlert *alert = new BAlert(B_TRANSLATE("About"), B_TRANSLATE("Sudoku\n"
|
||||
"\twritten by Axel Dörfler\n"
|
||||
"\tCopyright 2007, Haiku Inc.\n"), B_TRANSLATE("OK"));
|
||||
BTextView *view = alert->TextView();
|
||||
BFont font;
|
||||
|
||||
view->SetStylable(true);
|
||||
|
||||
view->GetFont(&font);
|
||||
font.SetSize(18);
|
||||
font.SetFace(B_BOLD_FACE);
|
||||
view->SetFontAndColor(0, strlen(B_TRANSLATE("Sudoku")), &font);
|
||||
|
||||
alert->SetShortcut(0, B_ESCAPE);
|
||||
alert->Go();
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
|
@ -20,9 +20,6 @@ public:
|
||||
virtual void RefsReceived(BMessage *message);
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
|
||||
virtual void AboutRequested();
|
||||
static void DisplayAbout();
|
||||
|
||||
private:
|
||||
SudokuWindow* fWindow;
|
||||
};
|
||||
|
@ -1076,10 +1076,6 @@ SudokuView::MessageReceived(BMessage* message)
|
||||
break;
|
||||
}
|
||||
|
||||
case B_ABOUT_REQUESTED:
|
||||
Sudoku::DisplayAbout();
|
||||
break;
|
||||
|
||||
default:
|
||||
BView::MessageReceived(message);
|
||||
break;
|
||||
|
@ -240,11 +240,6 @@ SudokuWindow::SudokuWindow()
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
menu->AddItem(item = new BMenuItem(
|
||||
B_TRANSLATE("About Sudoku" B_UTF8_ELLIPSIS),
|
||||
new BMessage(B_ABOUT_REQUESTED)));
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
||||
menu->SetTargetForItems(this);
|
||||
|
@ -92,7 +92,6 @@ GrepWindow::GrepWindow(BMessage* message)
|
||||
fNew(NULL),
|
||||
fOpen(NULL),
|
||||
fClose(NULL),
|
||||
fAbout(NULL),
|
||||
fQuit(NULL),
|
||||
fActionMenu(NULL),
|
||||
fSelectAll(NULL),
|
||||
@ -191,10 +190,6 @@ void GrepWindow::MenusEnded()
|
||||
void GrepWindow::MessageReceived(BMessage *message)
|
||||
{
|
||||
switch (message->what) {
|
||||
case B_ABOUT_REQUESTED:
|
||||
_OnAboutRequested();
|
||||
break;
|
||||
|
||||
case MSG_NEW_WINDOW:
|
||||
_OnNewWindow();
|
||||
break;
|
||||
@ -433,9 +428,6 @@ GrepWindow::_CreateMenus()
|
||||
fClose = new BMenuItem(
|
||||
B_TRANSLATE("Close"), new BMessage(B_QUIT_REQUESTED), 'W');
|
||||
|
||||
fAbout = new BMenuItem(
|
||||
B_TRANSLATE("About TextSearch" B_UTF8_ELLIPSIS), new BMessage(B_ABOUT_REQUESTED));
|
||||
|
||||
fQuit = new BMenuItem(
|
||||
B_TRANSLATE("Quit"), new BMessage(MSG_QUIT_NOW), 'Q');
|
||||
|
||||
@ -492,8 +484,6 @@ GrepWindow::_CreateMenus()
|
||||
fFileMenu->AddItem(fOpen);
|
||||
fFileMenu->AddItem(fClose);
|
||||
fFileMenu->AddSeparatorItem();
|
||||
fFileMenu->AddItem(fAbout);
|
||||
fFileMenu->AddSeparatorItem();
|
||||
fFileMenu->AddItem(fQuit);
|
||||
|
||||
fActionMenu->AddItem(fSearch);
|
||||
@ -1480,33 +1470,6 @@ GrepWindow::_OnQuitNow()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GrepWindow::_OnAboutRequested()
|
||||
{
|
||||
BString text;
|
||||
text << B_TRANSLATE(APP_NAME) << " " << "\n\n";
|
||||
int32 titleLength = text.Length();
|
||||
text << B_TRANSLATE("Created by Matthijs Hollemans." "\n\n"
|
||||
"Contributed to by "
|
||||
"Peter Hinely, Serge Fantino, Hideki Naito, Oscar Lesta, "
|
||||
"Oliver Tappe, Jonas Sundström, Luc Schrijvers and"
|
||||
" momoziro.\n");
|
||||
|
||||
BAlert* alert = new BAlert("TextSearch", text.String(), B_TRANSLATE("OK"), NULL,
|
||||
NULL, B_WIDTH_AS_USUAL, B_INFO_ALERT);
|
||||
|
||||
BTextView* view = alert->TextView();
|
||||
BFont font;
|
||||
view->SetStylable(true);
|
||||
view->GetFont(&font);
|
||||
font.SetSize(font.Size() * 1.5);
|
||||
font.SetFace(B_BOLD_FACE);
|
||||
view->SetFontAndColor(0, titleLength, &font);
|
||||
|
||||
alert->Go(NULL);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GrepWindow::_OnFileDrop(BMessage* message)
|
||||
{
|
||||
|
@ -84,7 +84,6 @@ private:
|
||||
void _OnCopyText();
|
||||
void _OnSelectInTracker();
|
||||
void _OnQuitNow();
|
||||
void _OnAboutRequested();
|
||||
void _OnFileDrop(BMessage* message);
|
||||
void _OnRefsReceived(BMessage* message);
|
||||
void _OnOpenPanel();
|
||||
@ -109,7 +108,6 @@ private:
|
||||
BMenuItem* fNew;
|
||||
BMenuItem* fOpen;
|
||||
BMenuItem* fClose;
|
||||
BMenuItem* fAbout;
|
||||
BMenuItem* fQuit;
|
||||
BMenu* fActionMenu;
|
||||
BMenuItem* fSelectAll;
|
||||
|
@ -53,7 +53,6 @@ static const char* fLocalizedInfo1 = B_TRANSLATE_MARK("DVB - Digital Video Broad
|
||||
enum
|
||||
{
|
||||
M_DUMMY = 0x100,
|
||||
M_FILE_ABOUT,
|
||||
M_FILE_QUIT,
|
||||
M_SCALE_TO_NATIVE_SIZE,
|
||||
M_TOGGLE_FULLSCREEN,
|
||||
@ -175,12 +174,6 @@ MainWin::CreateMenu()
|
||||
fMenuBar->AddItem(fSettingsMenu);
|
||||
fMenuBar->AddItem(fDebugMenu);
|
||||
|
||||
BString aboutStr = B_TRANSLATE_COMMENT("About %1"B_UTF8_ELLIPSIS,
|
||||
"Parameter %1 is the name of the application.");
|
||||
aboutStr.ReplaceFirst("%1", fLocalizedName);
|
||||
fFileMenu->AddItem(new BMenuItem(aboutStr.String(),
|
||||
new BMessage(M_FILE_ABOUT)));
|
||||
fFileMenu->AddSeparatorItem();
|
||||
fFileMenu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||
new BMessage(M_FILE_QUIT), 'Q', B_COMMAND_KEY));
|
||||
|
||||
@ -568,12 +561,6 @@ MainWin::ShowContextMenu(const BPoint &screen_point)
|
||||
new BMessage(M_TOGGLE_KEEP_ASPECT_RATIO), 'K', B_COMMAND_KEY));
|
||||
item->SetMarked(fKeepAspectRatio);
|
||||
menu->AddSeparatorItem();
|
||||
BString aboutStr = B_TRANSLATE_COMMENT("About %1"B_UTF8_ELLIPSIS,
|
||||
"Parameter %1 is the name of the application.");
|
||||
aboutStr.ReplaceFirst("%1", fLocalizedName);
|
||||
menu->AddItem(new BMenuItem(aboutStr.String(),
|
||||
new BMessage(M_FILE_ABOUT)));
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||
new BMessage(M_FILE_QUIT), 'Q', B_COMMAND_KEY));
|
||||
|
||||
@ -1231,38 +1218,6 @@ MainWin::MessageReceived(BMessage *msg)
|
||||
// RefsReceived(msg);
|
||||
break;
|
||||
|
||||
case M_FILE_ABOUT:
|
||||
{
|
||||
BString alertStr = fLocalizedName;
|
||||
alertStr << "\n\n";
|
||||
alertStr << fLocalizedInfo1;
|
||||
#if TIME_BOMB_ACTIVE
|
||||
alertStr << "\n\n";
|
||||
alertStr << INFO2;
|
||||
#endif
|
||||
alertStr << "\n\nCopyright ";
|
||||
alertStr << COPYRIGHT;
|
||||
alertStr << B_TRANSLATE("\nVersion ");
|
||||
alertStr << VERSION;
|
||||
alertStr << B_TRANSLATE("\nRevision ");
|
||||
if (strcmp(REVISION, "unknown") == 0)
|
||||
alertStr << fLocalizedRevision;
|
||||
else
|
||||
alertStr << REVISION;
|
||||
alertStr << B_TRANSLATE("\nBuild ");
|
||||
alertStr << BUILD;
|
||||
|
||||
BAlert *alert;
|
||||
alert = new BAlert("about", alertStr.String(), B_TRANSLATE("OK"));
|
||||
if (fAlwaysOnTop) {
|
||||
ToggleAlwaysOnTop();
|
||||
alert->Go();
|
||||
ToggleAlwaysOnTop();
|
||||
} else
|
||||
alert->Go();
|
||||
}
|
||||
break;
|
||||
|
||||
case M_FILE_QUIT:
|
||||
// be_app->PostMessage(B_QUIT_REQUESTED);
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
|
Loading…
Reference in New Issue
Block a user