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:
@@ -24,20 +24,12 @@
|
|||||||
static const float MENU_BAR_HEIGHT = 19;
|
static const float MENU_BAR_HEIGHT = 19;
|
||||||
|
|
||||||
static const unsigned int MSG_FILE_OPEN = 'fopn';
|
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_BOOK = 'spbk';
|
||||||
static const unsigned int MSG_SHAPE_CUBE = 'spcb';
|
static const unsigned int MSG_SHAPE_CUBE = 'spcb';
|
||||||
static const unsigned int MSG_SHAPE_SPHERE = 'spsp';
|
static const unsigned int MSG_SHAPE_SPHERE = 'spsp';
|
||||||
static const unsigned int MSG_OPTION_WIREFRAME = 'opwf';
|
static const unsigned int MSG_OPTION_WIREFRAME = 'opwf';
|
||||||
static const unsigned int MSG_FULLSCREEN = 'full';
|
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
|
// Local functions
|
||||||
static int32 animation_thread(void *cookie);
|
static int32 animation_thread(void *cookie);
|
||||||
@@ -111,7 +103,6 @@ void MainWindow :: SetupMenuBar(BRect frame)
|
|||||||
// File
|
// File
|
||||||
BMenu *menu_file = new BMenu("File");
|
BMenu *menu_file = new BMenu("File");
|
||||||
//menu_file->AddItem(new BMenuItem("Open", new BMessage(MSG_FILE_OPEN), 'N'));
|
//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)));
|
menu_file->AddItem(new BMenuItem("Exit", new BMessage(B_QUIT_REQUESTED)));
|
||||||
|
|
||||||
// Shape
|
// Shape
|
||||||
@@ -146,14 +137,6 @@ void MainWindow :: MessageReceived(BMessage *message)
|
|||||||
SetFullScreen(!IsFullScreen());
|
SetFullScreen(!IsFullScreen());
|
||||||
break;
|
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
|
/* 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).
|
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.
|
Under Zeta, there is no problem replacing the current view with a new view.
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <AboutMenuItem.h>
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
#include <File.h>
|
#include <File.h>
|
||||||
@@ -119,19 +118,13 @@ ActivityWindow::ActivityWindow()
|
|||||||
|
|
||||||
// "File" menu
|
// "File" menu
|
||||||
BMenu* menu = new BMenu(B_TRANSLATE("File"));
|
BMenu* menu = new BMenu(B_TRANSLATE("File"));
|
||||||
BMenuItem* item;
|
|
||||||
|
|
||||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Add graph"),
|
menu->AddItem(new BMenuItem(B_TRANSLATE("Add graph"),
|
||||||
new BMessage(kMsgAddView)));
|
new BMessage(kMsgAddView)));
|
||||||
menu->AddSeparatorItem();
|
menu->AddSeparatorItem();
|
||||||
|
|
||||||
menu->AddItem(item = new BAboutMenuItem());
|
|
||||||
menu->AddSeparatorItem();
|
|
||||||
|
|
||||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||||
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
||||||
menu->SetTargetForItems(this);
|
menu->SetTargetForItems(this);
|
||||||
item->SetTarget(be_app);
|
|
||||||
menuBar->AddItem(menu);
|
menuBar->AddItem(menu);
|
||||||
|
|
||||||
// "Settings" menu
|
// "Settings" menu
|
||||||
|
|||||||
@@ -10,12 +10,8 @@
|
|||||||
|
|
||||||
#include "BootManagerWindow.h"
|
#include "BootManagerWindow.h"
|
||||||
|
|
||||||
#include <AboutWindow.h>
|
|
||||||
#include <Alert.h>
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
#include <Locale.h>
|
|
||||||
#include <TextView.h>
|
|
||||||
|
|
||||||
|
|
||||||
#undef B_TRANSLATE_CONTEXT
|
#undef B_TRANSLATE_CONTEXT
|
||||||
@@ -30,7 +26,6 @@ public:
|
|||||||
BootManager();
|
BootManager();
|
||||||
|
|
||||||
virtual void ReadyToRun();
|
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 -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ BootManagerWindow::BootManagerWindow()
|
|||||||
|
|
||||||
fController.Initialize(fWizardView);
|
fController.Initialize(fWizardView);
|
||||||
|
|
||||||
AddShortcut('A', B_COMMAND_KEY, new BMessage(B_ABOUT_REQUESTED));
|
|
||||||
|
|
||||||
CenterOnScreen();
|
CenterOnScreen();
|
||||||
|
|
||||||
// Prevent minimizing this window if the user would have no way to
|
// Prevent minimizing this window if the user would have no way to
|
||||||
@@ -70,10 +68,6 @@ BootManagerWindow::MessageReceived(BMessage* msg)
|
|||||||
fController.Previous(fWizardView);
|
fController.Previous(fWizardView);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case B_ABOUT_REQUESTED:
|
|
||||||
be_app_messenger.SendMessage(B_ABOUT_REQUESTED);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BWindow::MessageReceived(msg);
|
BWindow::MessageReceived(msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Application BootManager :
|
|||||||
WizardController.cpp
|
WizardController.cpp
|
||||||
WizardPageView.cpp
|
WizardPageView.cpp
|
||||||
|
|
||||||
: be libshared.a textencoding tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
|
: be textencoding tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
|
||||||
: BootManager.rdef
|
: BootManager.rdef
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -8,11 +8,8 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <AboutWindow.h>
|
|
||||||
#include <Alert.h>
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
#include <TextView.h>
|
|
||||||
|
|
||||||
#include "CharacterWindow.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 -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ public:
|
|||||||
virtual void RefsReceived(BMessage* message);
|
virtual void RefsReceived(BMessage* message);
|
||||||
virtual void MessageReceived(BMessage* message);
|
virtual void MessageReceived(BMessage* message);
|
||||||
|
|
||||||
virtual void AboutRequested();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CharacterWindow* fWindow;
|
CharacterWindow* fWindow;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <AboutMenuItem.h>
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Button.h>
|
#include <Button.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
@@ -228,14 +227,9 @@ CharacterWindow::CharacterWindow()
|
|||||||
BMenu* menu = new BMenu(B_TRANSLATE("File"));
|
BMenu* menu = new BMenu(B_TRANSLATE("File"));
|
||||||
BMenuItem* item;
|
BMenuItem* item;
|
||||||
|
|
||||||
menu->AddItem(item = new BAboutMenuItem());
|
|
||||||
|
|
||||||
menu->AddSeparatorItem();
|
|
||||||
|
|
||||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||||
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
||||||
menu->SetTargetForItems(this);
|
menu->SetTargetForItems(this);
|
||||||
item->SetTarget(be_app);
|
|
||||||
menuBar->AddItem(menu);
|
menuBar->AddItem(menu);
|
||||||
|
|
||||||
menu = new BMenu(B_TRANSLATE("View"));
|
menu = new BMenu(B_TRANSLATE("View"));
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Application CharacterMap :
|
|||||||
UnicodeBlocks.cpp
|
UnicodeBlocks.cpp
|
||||||
UnicodeBlockView.cpp
|
UnicodeBlockView.cpp
|
||||||
|
|
||||||
: be libshared.a locale $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
|
: be locale $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
|
||||||
: CharacterMap.rdef
|
: CharacterMap.rdef
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <AboutMenuItem.h>
|
|
||||||
#include <AboutWindow.h>
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Button.h>
|
#include <Button.h>
|
||||||
#include <LayoutBuilder.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
|
status_t
|
||||||
CodyCam::_SetUpNodes()
|
CodyCam::_SetUpNodes()
|
||||||
{
|
{
|
||||||
@@ -522,12 +505,6 @@ VideoWindow::VideoWindow(BRect frame, const char* title, window_type type,
|
|||||||
|
|
||||||
menu->AddSeparatorItem();
|
menu->AddSeparatorItem();
|
||||||
|
|
||||||
menuItem = new BAboutMenuItem();
|
|
||||||
menuItem->SetTarget(be_app);
|
|
||||||
menu->AddItem(menuItem);
|
|
||||||
|
|
||||||
menu->AddSeparatorItem();
|
|
||||||
|
|
||||||
menuItem = new BMenuItem(B_TRANSLATE("Quit"),
|
menuItem = new BMenuItem(B_TRANSLATE("Quit"),
|
||||||
new BMessage(B_QUIT_REQUESTED), 'Q');
|
new BMessage(B_QUIT_REQUESTED), 'Q');
|
||||||
menuItem->SetTarget(be_app);
|
menuItem->SetTarget(be_app);
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ public:
|
|||||||
void ReadyToRun();
|
void ReadyToRun();
|
||||||
virtual bool QuitRequested();
|
virtual bool QuitRequested();
|
||||||
virtual void MessageReceived(BMessage* message);
|
virtual void MessageReceived(BMessage* message);
|
||||||
virtual void AboutRequested();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
status_t _SetUpNodes();
|
status_t _SetUpNodes();
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Application CodyCam :
|
|||||||
Settings.cpp
|
Settings.cpp
|
||||||
SettingsHandler.cpp
|
SettingsHandler.cpp
|
||||||
VideoConsumer.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++)
|
$(TARGET_LIBSTDC++)
|
||||||
: CodyCam.rdef
|
: CodyCam.rdef
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <AboutMenuItem.h>
|
|
||||||
#include <AboutWindow.h>
|
#include <AboutWindow.h>
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
@@ -121,8 +120,6 @@ CalcView::CalcView(BRect frame, rgb_color rgbBaseColor, BMessage* settings)
|
|||||||
fAutoNumlockItem(NULL),
|
fAutoNumlockItem(NULL),
|
||||||
fAudioFeedbackItem(NULL),
|
fAudioFeedbackItem(NULL),
|
||||||
fShowKeypadItem(NULL),
|
fShowKeypadItem(NULL),
|
||||||
fAboutItem(NULL),
|
|
||||||
|
|
||||||
fOptions(new CalcOptions()),
|
fOptions(new CalcOptions()),
|
||||||
fShowKeypad(true)
|
fShowKeypad(true)
|
||||||
{
|
{
|
||||||
@@ -173,8 +170,6 @@ CalcView::CalcView(BMessage* archive)
|
|||||||
fAutoNumlockItem(NULL),
|
fAutoNumlockItem(NULL),
|
||||||
fAudioFeedbackItem(NULL),
|
fAudioFeedbackItem(NULL),
|
||||||
fShowKeypadItem(NULL),
|
fShowKeypadItem(NULL),
|
||||||
fAboutItem(NULL),
|
|
||||||
|
|
||||||
fOptions(new CalcOptions()),
|
fOptions(new CalcOptions()),
|
||||||
fShowKeypad(true)
|
fShowKeypad(true)
|
||||||
{
|
{
|
||||||
@@ -1112,7 +1107,6 @@ CalcView::_CreatePopUpMenu()
|
|||||||
new BMessage(MSG_OPTIONS_AUDIO_FEEDBACK));
|
new BMessage(MSG_OPTIONS_AUDIO_FEEDBACK));
|
||||||
fShowKeypadItem = new BMenuItem(B_TRANSLATE("Show keypad"),
|
fShowKeypadItem = new BMenuItem(B_TRANSLATE("Show keypad"),
|
||||||
new BMessage(MSG_OPTIONS_SHOW_KEYPAD));
|
new BMessage(MSG_OPTIONS_SHOW_KEYPAD));
|
||||||
fAboutItem = new BAboutMenuItem();
|
|
||||||
|
|
||||||
// apply current settings
|
// apply current settings
|
||||||
fAutoNumlockItem->SetMarked(fOptions->auto_num_lock);
|
fAutoNumlockItem->SetMarked(fOptions->auto_num_lock);
|
||||||
@@ -1128,7 +1122,6 @@ CalcView::_CreatePopUpMenu()
|
|||||||
// fPopUpMenu->AddItem(fAudioFeedbackItem);
|
// fPopUpMenu->AddItem(fAudioFeedbackItem);
|
||||||
fPopUpMenu->AddItem(fShowKeypadItem);
|
fPopUpMenu->AddItem(fShowKeypadItem);
|
||||||
fPopUpMenu->AddSeparatorItem();
|
fPopUpMenu->AddSeparatorItem();
|
||||||
fPopUpMenu->AddItem(fAboutItem);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ class CalcView : public BView {
|
|||||||
BMenuItem* fAutoNumlockItem;
|
BMenuItem* fAutoNumlockItem;
|
||||||
BMenuItem* fAudioFeedbackItem;
|
BMenuItem* fAudioFeedbackItem;
|
||||||
BMenuItem* fShowKeypadItem;
|
BMenuItem* fShowKeypadItem;
|
||||||
BMenuItem* fAboutItem;
|
|
||||||
|
|
||||||
// calculator options.
|
// calculator options.
|
||||||
CalcOptions* fOptions;
|
CalcOptions* fOptions;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
* Pieter Panman
|
* Pieter Panman
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AboutWindow.h>
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
@@ -20,8 +19,6 @@
|
|||||||
class DevicesApplication : public BApplication {
|
class DevicesApplication : public BApplication {
|
||||||
public:
|
public:
|
||||||
DevicesApplication();
|
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()
|
DevicesWindow::DevicesWindow()
|
||||||
:
|
:
|
||||||
BWindow(BRect(50, 50, 750, 550), B_TRANSLATE_SYSTEM_NAME("Devices"),
|
BWindow(BRect(50, 50, 750, 550), B_TRANSLATE_SYSTEM_NAME("Devices"),
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <AboutMenuItem.h>
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
#include <MenuBar.h>
|
#include <MenuBar.h>
|
||||||
@@ -45,8 +44,6 @@ DevicesView::CreateLayout()
|
|||||||
"Generate system information"), new BMessage(kMsgGenerateSysInfo)));
|
"Generate system information"), new BMessage(kMsgGenerateSysInfo)));
|
||||||
item->SetEnabled(false);
|
item->SetEnabled(false);
|
||||||
menu->AddSeparatorItem();
|
menu->AddSeparatorItem();
|
||||||
menu->AddItem(item = new BAboutMenuItem());
|
|
||||||
menu->AddSeparatorItem();
|
|
||||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||||
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
||||||
menu->SetTargetForItems(this);
|
menu->SetTargetForItems(this);
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ Application Devices :
|
|||||||
Device.cpp
|
Device.cpp
|
||||||
PropertyList.cpp
|
PropertyList.cpp
|
||||||
PropertyListPlain.cpp
|
PropertyListPlain.cpp
|
||||||
: be libcolumnlistview.a libshared.a tracker $(TARGET_LIBSUPC++)
|
: be libcolumnlistview.a tracker $(TARGET_LIBSUPC++)
|
||||||
$(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
|
$(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
|
||||||
: Devices.rdef
|
: Devices.rdef
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ class DiskProbe : public BApplication {
|
|||||||
virtual void ArgvReceived(int32 argc, char **argv);
|
virtual void ArgvReceived(int32 argc, char **argv);
|
||||||
virtual void MessageReceived(BMessage *message);
|
virtual void MessageReceived(BMessage *message);
|
||||||
|
|
||||||
virtual void AboutRequested();
|
|
||||||
virtual bool QuitRequested();
|
virtual bool QuitRequested();
|
||||||
|
|
||||||
private:
|
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
|
bool
|
||||||
DiskProbe::QuitRequested()
|
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
|
// the ProbeView print menu items will be inserted here
|
||||||
menu->AddSeparatorItem();
|
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"),
|
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||||
new BMessage(B_QUIT_REQUESTED), 'Q', B_COMMAND_KEY));
|
new BMessage(B_QUIT_REQUESTED), 'Q', B_COMMAND_KEY));
|
||||||
menu->SetTargetForItems(be_app);
|
menu->SetTargetForItems(be_app);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Application DiskProbe :
|
|||||||
OpenWindow.cpp
|
OpenWindow.cpp
|
||||||
FindWindow.cpp
|
FindWindow.cpp
|
||||||
: be $(HAIKU_LOCALE_LIBS) tracker translation libexpression_parser.a
|
: be $(HAIKU_LOCALE_LIBS) tracker translation libexpression_parser.a
|
||||||
libmapm.a libshared.a $(TARGET_LIBSUPC++)
|
libmapm.a $(TARGET_LIBSUPC++)
|
||||||
: DiskProbe.rdef
|
: DiskProbe.rdef
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,6 @@
|
|||||||
|
|
||||||
#include "ExpanderApp.h"
|
#include "ExpanderApp.h"
|
||||||
|
|
||||||
#include <AboutWindow.h>
|
|
||||||
#include <Alert.h>
|
|
||||||
#include <Catalog.h>
|
|
||||||
#include <Locale.h>
|
|
||||||
#include <TextView.h>
|
|
||||||
|
|
||||||
#include "ExpanderWindow.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
|
void
|
||||||
ExpanderApp::ArgvReceived(int32 argc, char **argv)
|
ExpanderApp::ArgvReceived(int32 argc, char **argv)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,29 +25,29 @@
|
|||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#ifndef _ExpanderApp_h
|
#ifndef _ExpanderApp_h
|
||||||
#define _ExpanderApp_h
|
#define _ExpanderApp_h
|
||||||
|
|
||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Catalog.h>
|
|
||||||
#include "ExpanderSettings.h"
|
#include "ExpanderSettings.h"
|
||||||
#include "ExpanderWindow.h"
|
#include "ExpanderWindow.h"
|
||||||
|
|
||||||
|
|
||||||
class ExpanderApp : public BApplication {
|
class ExpanderApp : public BApplication {
|
||||||
public:
|
public:
|
||||||
ExpanderApp();
|
ExpanderApp();
|
||||||
|
|
||||||
public:
|
virtual void ArgvReceived(int32 argc, char** argv);
|
||||||
virtual void AboutRequested();
|
virtual void RefsReceived(BMessage* msg);
|
||||||
virtual void ArgvReceived(int32 argc, char **argv);
|
|
||||||
virtual void ReadyToRun();
|
|
||||||
virtual void RefsReceived(BMessage *msg);
|
|
||||||
|
|
||||||
ExpanderSettings fSettings;
|
void UpdateSettingsFrom(BMessage* message);
|
||||||
void UpdateSettingsFrom(BMessage *message);
|
|
||||||
private:
|
ExpanderSettings fSettings;
|
||||||
ExpanderWindow *fWindow;
|
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);
|
fBar = new BMenuBar("menu_bar", B_ITEMS_IN_ROW, B_INVALIDATE_AFTER_LAYOUT);
|
||||||
BMenu* menu = new BMenu(B_TRANSLATE("File"));
|
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…"),
|
menu->AddItem(fSourceItem = new BMenuItem(B_TRANSLATE("Set source…"),
|
||||||
new BMessage(MSG_SOURCE), 'O'));
|
new BMessage(MSG_SOURCE), 'O'));
|
||||||
menu->AddItem(fDestItem = new BMenuItem(B_TRANSLATE("Set destination…"),
|
menu->AddItem(fDestItem = new BMenuItem(B_TRANSLATE("Set destination…"),
|
||||||
|
|||||||
@@ -12,14 +12,13 @@ Application Expander :
|
|||||||
DirectoryFilePanel.cpp
|
DirectoryFilePanel.cpp
|
||||||
ExpanderRules.cpp
|
ExpanderRules.cpp
|
||||||
PasswordAlert.cpp
|
PasswordAlert.cpp
|
||||||
: be libshared.a tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
|
: be tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
|
||||||
: Expander.rdef
|
: Expander.rdef
|
||||||
;
|
;
|
||||||
|
|
||||||
DoCatalogs Expander :
|
DoCatalogs Expander :
|
||||||
x-vnd.Haiku-Expander
|
x-vnd.Haiku-Expander
|
||||||
:
|
:
|
||||||
ExpanderApp.cpp
|
|
||||||
ExpanderWindow.cpp
|
ExpanderWindow.cpp
|
||||||
ExpanderPreferences.cpp
|
ExpanderPreferences.cpp
|
||||||
ExpanderSettings.cpp
|
ExpanderSettings.cpp
|
||||||
|
|||||||
@@ -2,19 +2,22 @@
|
|||||||
Copyright 1999, Be Incorporated. All Rights Reserved.
|
Copyright 1999, Be Incorporated. All Rights Reserved.
|
||||||
This file may be used under the terms of the Be Sample Code License.
|
This file may be used under the terms of the Be Sample Code License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _TEAPOT_APP_
|
#ifndef _TEAPOT_APP_
|
||||||
#define _TEAPOT_APP_
|
#define _TEAPOT_APP_
|
||||||
|
|
||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
|
|
||||||
#include "TeapotWindow.h"
|
#include "TeapotWindow.h"
|
||||||
|
|
||||||
|
|
||||||
class TeapotApp : public BApplication {
|
class TeapotApp : public BApplication {
|
||||||
public:
|
public:
|
||||||
TeapotApp(const char* sign);
|
TeapotApp(const char* sign);
|
||||||
virtual void MessageReceived(BMessage* msg);
|
virtual void MessageReceived(BMessage* msg);
|
||||||
// void AboutRequested();
|
|
||||||
private:
|
private:
|
||||||
TeapotWindow* fTeapotWindow;
|
TeapotWindow* fTeapotWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
* Alexandre Deckner <alex@zappotek.com>
|
* Alexandre Deckner <alex@zappotek.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <Alert.h>
|
|
||||||
|
|
||||||
#include "App.h"
|
#include "App.h"
|
||||||
|
|
||||||
#include "MainWindow.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
|
bool
|
||||||
App::QuitRequested()
|
App::QuitRequested()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,23 +5,23 @@
|
|||||||
* Authors:
|
* Authors:
|
||||||
* Alexandre Deckner <alex@zappotek.com>
|
* Alexandre Deckner <alex@zappotek.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _APP_H
|
#ifndef _APP_H
|
||||||
#define _APP_H
|
#define _APP_H
|
||||||
|
|
||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
|
|
||||||
class App: public BApplication {
|
|
||||||
public:
|
|
||||||
App();
|
|
||||||
virtual ~App();
|
|
||||||
|
|
||||||
virtual void ReadyToRun();
|
class App : public BApplication {
|
||||||
virtual void AboutRequested();
|
public:
|
||||||
virtual bool QuitRequested();
|
App();
|
||||||
|
virtual ~App();
|
||||||
|
|
||||||
|
virtual void ReadyToRun();
|
||||||
|
virtual bool QuitRequested();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BWindow* fMainWindow;
|
BWindow* fMainWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _APP_H */
|
#endif /* _APP_H */
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ public:
|
|||||||
UninstallApplication();
|
UninstallApplication();
|
||||||
~UninstallApplication();
|
~UninstallApplication();
|
||||||
|
|
||||||
void AboutRequested();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UninstallWindow* fWindow;
|
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
|
int
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ UsePrivateHeaders shared ;
|
|||||||
|
|
||||||
Application Magnify :
|
Application Magnify :
|
||||||
Magnify.cpp
|
Magnify.cpp
|
||||||
: be game $(HAIKU_LOCALE_LIBS) libshared.a $(TARGET_LIBSUPC++) tracker
|
: be game $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) tracker
|
||||||
: Magnify.rdef
|
: Magnify.rdef
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#include "Magnify.h"
|
#include "Magnify.h"
|
||||||
|
|
||||||
#include <AboutMenuItem.h>
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Bitmap.h>
|
#include <Bitmap.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
@@ -132,8 +131,6 @@ static void
|
|||||||
BuildInfoMenu(BMenu *menu)
|
BuildInfoMenu(BMenu *menu)
|
||||||
{
|
{
|
||||||
BMenuItem* menuItem;
|
BMenuItem* menuItem;
|
||||||
menuItem = new BAboutMenuItem();
|
|
||||||
menu->AddItem(menuItem);
|
|
||||||
menuItem = new BMenuItem(B_TRANSLATE("Help"),
|
menuItem = new BMenuItem(B_TRANSLATE("Help"),
|
||||||
new BMessage(msg_help));
|
new BMessage(msg_help));
|
||||||
menu->AddItem(menuItem);
|
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 -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
@@ -263,7 +229,6 @@ TWindow::TWindow(int32 pixelCount)
|
|||||||
|
|
||||||
ResizeWindow(fHPixelCount, fVPixelCount);
|
ResizeWindow(fHPixelCount, fVPixelCount);
|
||||||
|
|
||||||
AddShortcut('I', B_COMMAND_KEY, new BMessage(B_ABOUT_REQUESTED));
|
|
||||||
AddShortcut('S', B_COMMAND_KEY, new BMessage(msg_save));
|
AddShortcut('S', B_COMMAND_KEY, new BMessage(msg_save));
|
||||||
AddShortcut('C', B_COMMAND_KEY, new BMessage(msg_copy_image));
|
AddShortcut('C', B_COMMAND_KEY, new BMessage(msg_copy_image));
|
||||||
AddShortcut('T', B_COMMAND_KEY, new BMessage(msg_show_info));
|
AddShortcut('T', B_COMMAND_KEY, new BMessage(msg_show_info));
|
||||||
@@ -291,10 +256,6 @@ TWindow::MessageReceived(BMessage* m)
|
|||||||
bool active = fFatBits->Active();
|
bool active = fFatBits->Active();
|
||||||
|
|
||||||
switch (m->what) {
|
switch (m->what) {
|
||||||
case B_ABOUT_REQUESTED:
|
|
||||||
be_app->MessageReceived(m);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case msg_help:
|
case msg_help:
|
||||||
ShowHelp();
|
ShowHelp();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -254,10 +254,6 @@ class TWindow : public BWindow {
|
|||||||
class TApp : public BApplication {
|
class TApp : public BApplication {
|
||||||
public:
|
public:
|
||||||
TApp(int32 pixelCount = -1);
|
TApp(int32 pixelCount = -1);
|
||||||
|
|
||||||
virtual void MessageReceived(BMessage* message);
|
|
||||||
virtual void ReadyToRun();
|
|
||||||
virtual void AboutRequested();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAGNIFY_H
|
#endif // MAGNIFY_H
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Application MediaConverter :
|
|||||||
MediaFileInfoView.cpp
|
MediaFileInfoView.cpp
|
||||||
MediaFileListView.cpp
|
MediaFileListView.cpp
|
||||||
|
|
||||||
: be libshared.a media tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSTDC++)
|
: be media tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSTDC++)
|
||||||
: MediaConverter.rdef
|
: MediaConverter.rdef
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <AboutMenuItem.h>
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Box.h>
|
#include <Box.h>
|
||||||
@@ -384,20 +383,6 @@ MediaConverterWindow::MessageReceived(BMessage* msg)
|
|||||||
case B_CANCEL:
|
case B_CANCEL:
|
||||||
break;
|
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:
|
case QUIT_MESSAGE:
|
||||||
MediaConverterWindow::QuitRequested();
|
MediaConverterWindow::QuitRequested();
|
||||||
break;
|
break;
|
||||||
@@ -933,9 +918,6 @@ MediaConverterWindow::_CreateMenu()
|
|||||||
new BMessage(OPEN_FILE_MESSAGE), 'O');
|
new BMessage(OPEN_FILE_MESSAGE), 'O');
|
||||||
menu->AddItem(item);
|
menu->AddItem(item);
|
||||||
menu->AddSeparatorItem();
|
menu->AddSeparatorItem();
|
||||||
item = new BAboutMenuItem(),
|
|
||||||
menu->AddItem(item);
|
|
||||||
menu->AddSeparatorItem();
|
|
||||||
item = new BMenuItem(B_TRANSLATE_WITH_CONTEXT("Quit", "Menu"),
|
item = new BMenuItem(B_TRANSLATE_WITH_CONTEXT("Quit", "Menu"),
|
||||||
new BMessage(QUIT_MESSAGE), 'Q');
|
new BMessage(QUIT_MESSAGE), 'Q');
|
||||||
menu->AddItem(item);
|
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 -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ private:
|
|||||||
virtual void RefsReceived(BMessage* message);
|
virtual void RefsReceived(BMessage* message);
|
||||||
virtual void ArgvReceived(int32 argc, char** argv);
|
virtual void ArgvReceived(int32 argc, char** argv);
|
||||||
virtual void MessageReceived(BMessage* message);
|
virtual void MessageReceived(BMessage* message);
|
||||||
virtual void AboutRequested();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void _ShowSettingsWindow();
|
void _ShowSettingsWindow();
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <AboutMenuItem.h>
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Autolock.h>
|
#include <Autolock.h>
|
||||||
@@ -1476,12 +1475,6 @@ MainWin::_CreateMenu()
|
|||||||
|
|
||||||
fFileMenu->AddSeparatorItem();
|
fFileMenu->AddSeparatorItem();
|
||||||
|
|
||||||
item = new BAboutMenuItem();
|
|
||||||
fFileMenu->AddItem(item);
|
|
||||||
item->SetTarget(be_app);
|
|
||||||
|
|
||||||
fFileMenu->AddSeparatorItem();
|
|
||||||
|
|
||||||
fFileMenu->AddItem(new BMenuItem(B_TRANSLATE("Close"),
|
fFileMenu->AddItem(new BMenuItem(B_TRANSLATE("Close"),
|
||||||
new BMessage(M_FILE_CLOSE), 'W'));
|
new BMessage(M_FILE_CLOSE), 'W'));
|
||||||
fFileMenu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
fFileMenu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ class PackageInstaller : public BApplication {
|
|||||||
|
|
||||||
void MessageReceived(BMessage *msg);
|
void MessageReceived(BMessage *msg);
|
||||||
|
|
||||||
void AboutRequested();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BFilePanel *fOpen;
|
BFilePanel *fOpen;
|
||||||
uint32 fWindowCount;
|
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
|
int
|
||||||
main(void)
|
main(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Application PackageManager :
|
|||||||
ApplicationView.cpp
|
ApplicationView.cpp
|
||||||
ApplicationWindow.cpp
|
ApplicationWindow.cpp
|
||||||
PackageManager.cpp
|
PackageManager.cpp
|
||||||
: be $(HAIKU_LOCALE_LIBS) libshared.a $(TARGET_LIBSUPC++) translation
|
: be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) translation
|
||||||
: PackageManager.rdef
|
: PackageManager.rdef
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,6 @@
|
|||||||
|
|
||||||
#include "ApplicationWindow.h"
|
#include "ApplicationWindow.h"
|
||||||
|
|
||||||
#include <AboutWindow.h>
|
|
||||||
#include <Alert.h>
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
@@ -33,8 +31,6 @@ class PackageManager : public BApplication {
|
|||||||
|
|
||||||
void MessageReceived(BMessage *msg);
|
void MessageReceived(BMessage *msg);
|
||||||
|
|
||||||
void AboutRequested();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ApplicationWindow* fMainWindow;
|
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
|
int
|
||||||
main(void)
|
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
|
void
|
||||||
TPeopleApp::ArgvReceived(int32 argc, char** argv)
|
TPeopleApp::ArgvReceived(int32 argc, char** argv)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ public:
|
|||||||
TPeopleApp();
|
TPeopleApp();
|
||||||
virtual ~TPeopleApp();
|
virtual ~TPeopleApp();
|
||||||
|
|
||||||
virtual void AboutRequested();
|
|
||||||
virtual void ArgvReceived(int32, char**);
|
virtual void ArgvReceived(int32, char**);
|
||||||
virtual void MessageReceived(BMessage*);
|
virtual void MessageReceived(BMessage*);
|
||||||
virtual void RefsReceived(BMessage*);
|
virtual void RefsReceived(BMessage*);
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ Application PoorMan : PoorMan.cpp
|
|||||||
match.c
|
match.c
|
||||||
tdate_parse.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 "PoorManApplication.h"
|
||||||
|
|
||||||
#include <AboutWindow.h>
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Catalog.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
|
void
|
||||||
PoorManApplication::MessageReceived(BMessage *message)
|
PoorManApplication::MessageReceived(BMessage *message)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ class PoorManApplication: public BApplication
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PoorManApplication();
|
PoorManApplication();
|
||||||
void AboutRequested();
|
|
||||||
virtual void MessageReceived(BMessage *message);
|
virtual void MessageReceived(BMessage *message);
|
||||||
PoorManWindow * GetPoorManWindow() { return mainWindow; }
|
PoorManWindow * GetPoorManWindow() { return mainWindow; }
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include <AboutMenuItem.h>
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Box.h>
|
#include <Box.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
@@ -458,13 +457,6 @@ PoorManWindow::BuildFileMenu() const
|
|||||||
new BMessage(MSG_MENU_FILE_SAVE_SELECTION)));
|
new BMessage(MSG_MENU_FILE_SAVE_SELECTION)));
|
||||||
|
|
||||||
ptrFileMenu->AddSeparatorItem();
|
ptrFileMenu->AddSeparatorItem();
|
||||||
|
|
||||||
BAboutMenuItem * AboutItem = new BAboutMenuItem();
|
|
||||||
AboutItem->SetTarget(NULL, be_app);
|
|
||||||
ptrFileMenu->AddItem(AboutItem);
|
|
||||||
|
|
||||||
ptrFileMenu->AddSeparatorItem();
|
|
||||||
|
|
||||||
|
|
||||||
ptrFileMenu->AddItem(new BMenuItem(STR_MNU_FILE_QUIT,
|
ptrFileMenu->AddItem(new BMenuItem(STR_MNU_FILE_QUIT,
|
||||||
new BMessage(B_QUIT_REQUESTED), CMD_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);
|
= B_TRANSLATE("Save console as" B_UTF8_ELLIPSIS);
|
||||||
const char* STR_MNU_FILE_SAVE_SELECTION
|
const char* STR_MNU_FILE_SAVE_SELECTION
|
||||||
= B_TRANSLATE("Save console selections as" B_UTF8_ELLIPSIS);
|
= 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
|
const char* STR_MNU_FILE_QUIT
|
||||||
= B_TRANSLATE("Quit");
|
= B_TRANSLATE("Quit");
|
||||||
const char* STR_MNU_EDIT
|
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;
|
||||||
extern const char* STR_MNU_FILE_SAVE_AS;
|
extern const char* STR_MNU_FILE_SAVE_AS;
|
||||||
extern const char* STR_MNU_FILE_SAVE_SELECTION;
|
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_FILE_QUIT;
|
||||||
extern const char* STR_MNU_EDIT;
|
extern const char* STR_MNU_EDIT;
|
||||||
extern const char* STR_MNU_EDIT_COPY;
|
extern const char* STR_MNU_EDIT_COPY;
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <AboutWindow.h>
|
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
#include <Locale.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
|
void
|
||||||
BootPromptApp::ReadyToRun()
|
BootPromptApp::ReadyToRun()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ public:
|
|||||||
BootPromptApp();
|
BootPromptApp();
|
||||||
|
|
||||||
virtual void MessageReceived(BMessage* message);
|
virtual void MessageReceived(BMessage* message);
|
||||||
virtual void AboutRequested();
|
|
||||||
virtual void ReadyToRun();
|
virtual void ReadyToRun();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ DoCatalogs ShowImage :
|
|||||||
:
|
:
|
||||||
PrintOptionsWindow.cpp
|
PrintOptionsWindow.cpp
|
||||||
ProgressWindow.cpp
|
ProgressWindow.cpp
|
||||||
ShowImageApp.cpp
|
|
||||||
ShowImageView.cpp
|
ShowImageView.cpp
|
||||||
ShowImageWindow.cpp
|
ShowImageWindow.cpp
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <AboutWindow.h>
|
|
||||||
#include <Alert.h>
|
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
#include <Clipboard.h>
|
#include <Clipboard.h>
|
||||||
#include <FilePanel.h>
|
#include <FilePanel.h>
|
||||||
@@ -29,10 +27,6 @@
|
|||||||
#include "ToolBarIcons.h"
|
#include "ToolBarIcons.h"
|
||||||
|
|
||||||
|
|
||||||
#undef B_TRANSLATE_CONTEXT
|
|
||||||
#define B_TRANSLATE_CONTEXT "AboutWindow"
|
|
||||||
|
|
||||||
|
|
||||||
const char* kApplicationSignature = "application/x-vnd.Haiku-ShowImage";
|
const char* kApplicationSignature = "application/x-vnd.Haiku-ShowImage";
|
||||||
const int32 kWindowsToIgnore = 1;
|
const int32 kWindowsToIgnore = 1;
|
||||||
// ignore the always open file panel
|
// ignore the always open file panel
|
||||||
@@ -45,6 +39,7 @@ ShowImageApp::ShowImageApp()
|
|||||||
fPulseStarted(false),
|
fPulseStarted(false),
|
||||||
fLastWindowFrame(BRect(30, 30, 430, 330))
|
fLastWindowFrame(BRect(30, 30, 430, 330))
|
||||||
{
|
{
|
||||||
|
B_TRANSLATE_MARK_SYSTEM_NAME("ShowImage");
|
||||||
_UpdateLastWindowFrame();
|
_UpdateLastWindowFrame();
|
||||||
// BBitmap can be created after there is a BApplication instance.
|
// BBitmap can be created after there is a BApplication instance.
|
||||||
init_tool_bar_icons();
|
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
|
void
|
||||||
ShowImageApp::Pulse()
|
ShowImageApp::Pulse()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
#include "ShowImageSettings.h"
|
#include "ShowImageSettings.h"
|
||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Catalog.h>
|
|
||||||
#include <FilePanel.h>
|
#include <FilePanel.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -31,7 +30,6 @@ public:
|
|||||||
virtual void ArgvReceived(int32 argc, char** argv);
|
virtual void ArgvReceived(int32 argc, char** argv);
|
||||||
virtual void ReadyToRun();
|
virtual void ReadyToRun();
|
||||||
virtual void MessageReceived(BMessage* message);
|
virtual void MessageReceived(BMessage* message);
|
||||||
virtual void AboutRequested();
|
|
||||||
virtual void Pulse();
|
virtual void Pulse();
|
||||||
virtual void RefsReceived(BMessage* message);
|
virtual void RefsReceived(BMessage* message);
|
||||||
virtual bool QuitRequested();
|
virtual bool QuitRequested();
|
||||||
|
|||||||
@@ -396,9 +396,6 @@ ShowImageWindow::_AddMenus(BMenuBar* bar)
|
|||||||
_AddItemMenu(menu, B_TRANSLATE("Print" B_UTF8_ELLIPSIS),
|
_AddItemMenu(menu, B_TRANSLATE("Print" B_UTF8_ELLIPSIS),
|
||||||
MSG_PREPARE_PRINT, 'P', 0, this);
|
MSG_PREPARE_PRINT, 'P', 0, this);
|
||||||
menu->AddSeparatorItem();
|
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);
|
_AddItemMenu(menu, B_TRANSLATE("Quit"), B_QUIT_REQUESTED, 'Q', 0, be_app);
|
||||||
bar->AddItem(menu);
|
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 -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,6 @@ public:
|
|||||||
virtual void RefsReceived(BMessage *message);
|
virtual void RefsReceived(BMessage *message);
|
||||||
virtual void MessageReceived(BMessage *message);
|
virtual void MessageReceived(BMessage *message);
|
||||||
|
|
||||||
virtual void AboutRequested();
|
|
||||||
static void DisplayAbout();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SudokuWindow* fWindow;
|
SudokuWindow* fWindow;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1076,10 +1076,6 @@ SudokuView::MessageReceived(BMessage* message)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case B_ABOUT_REQUESTED:
|
|
||||||
Sudoku::DisplayAbout();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BView::MessageReceived(message);
|
BView::MessageReceived(message);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -240,11 +240,6 @@ SudokuWindow::SudokuWindow()
|
|||||||
|
|
||||||
menu->AddSeparatorItem();
|
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"),
|
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||||
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
||||||
menu->SetTargetForItems(this);
|
menu->SetTargetForItems(this);
|
||||||
|
|||||||
@@ -92,7 +92,6 @@ GrepWindow::GrepWindow(BMessage* message)
|
|||||||
fNew(NULL),
|
fNew(NULL),
|
||||||
fOpen(NULL),
|
fOpen(NULL),
|
||||||
fClose(NULL),
|
fClose(NULL),
|
||||||
fAbout(NULL),
|
|
||||||
fQuit(NULL),
|
fQuit(NULL),
|
||||||
fActionMenu(NULL),
|
fActionMenu(NULL),
|
||||||
fSelectAll(NULL),
|
fSelectAll(NULL),
|
||||||
@@ -191,10 +190,6 @@ void GrepWindow::MenusEnded()
|
|||||||
void GrepWindow::MessageReceived(BMessage *message)
|
void GrepWindow::MessageReceived(BMessage *message)
|
||||||
{
|
{
|
||||||
switch (message->what) {
|
switch (message->what) {
|
||||||
case B_ABOUT_REQUESTED:
|
|
||||||
_OnAboutRequested();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MSG_NEW_WINDOW:
|
case MSG_NEW_WINDOW:
|
||||||
_OnNewWindow();
|
_OnNewWindow();
|
||||||
break;
|
break;
|
||||||
@@ -433,9 +428,6 @@ GrepWindow::_CreateMenus()
|
|||||||
fClose = new BMenuItem(
|
fClose = new BMenuItem(
|
||||||
B_TRANSLATE("Close"), new BMessage(B_QUIT_REQUESTED), 'W');
|
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(
|
fQuit = new BMenuItem(
|
||||||
B_TRANSLATE("Quit"), new BMessage(MSG_QUIT_NOW), 'Q');
|
B_TRANSLATE("Quit"), new BMessage(MSG_QUIT_NOW), 'Q');
|
||||||
|
|
||||||
@@ -492,8 +484,6 @@ GrepWindow::_CreateMenus()
|
|||||||
fFileMenu->AddItem(fOpen);
|
fFileMenu->AddItem(fOpen);
|
||||||
fFileMenu->AddItem(fClose);
|
fFileMenu->AddItem(fClose);
|
||||||
fFileMenu->AddSeparatorItem();
|
fFileMenu->AddSeparatorItem();
|
||||||
fFileMenu->AddItem(fAbout);
|
|
||||||
fFileMenu->AddSeparatorItem();
|
|
||||||
fFileMenu->AddItem(fQuit);
|
fFileMenu->AddItem(fQuit);
|
||||||
|
|
||||||
fActionMenu->AddItem(fSearch);
|
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
|
void
|
||||||
GrepWindow::_OnFileDrop(BMessage* message)
|
GrepWindow::_OnFileDrop(BMessage* message)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ private:
|
|||||||
void _OnCopyText();
|
void _OnCopyText();
|
||||||
void _OnSelectInTracker();
|
void _OnSelectInTracker();
|
||||||
void _OnQuitNow();
|
void _OnQuitNow();
|
||||||
void _OnAboutRequested();
|
|
||||||
void _OnFileDrop(BMessage* message);
|
void _OnFileDrop(BMessage* message);
|
||||||
void _OnRefsReceived(BMessage* message);
|
void _OnRefsReceived(BMessage* message);
|
||||||
void _OnOpenPanel();
|
void _OnOpenPanel();
|
||||||
@@ -109,7 +108,6 @@ private:
|
|||||||
BMenuItem* fNew;
|
BMenuItem* fNew;
|
||||||
BMenuItem* fOpen;
|
BMenuItem* fOpen;
|
||||||
BMenuItem* fClose;
|
BMenuItem* fClose;
|
||||||
BMenuItem* fAbout;
|
|
||||||
BMenuItem* fQuit;
|
BMenuItem* fQuit;
|
||||||
BMenu* fActionMenu;
|
BMenu* fActionMenu;
|
||||||
BMenuItem* fSelectAll;
|
BMenuItem* fSelectAll;
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ static const char* fLocalizedInfo1 = B_TRANSLATE_MARK("DVB - Digital Video Broad
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
M_DUMMY = 0x100,
|
M_DUMMY = 0x100,
|
||||||
M_FILE_ABOUT,
|
|
||||||
M_FILE_QUIT,
|
M_FILE_QUIT,
|
||||||
M_SCALE_TO_NATIVE_SIZE,
|
M_SCALE_TO_NATIVE_SIZE,
|
||||||
M_TOGGLE_FULLSCREEN,
|
M_TOGGLE_FULLSCREEN,
|
||||||
@@ -175,12 +174,6 @@ MainWin::CreateMenu()
|
|||||||
fMenuBar->AddItem(fSettingsMenu);
|
fMenuBar->AddItem(fSettingsMenu);
|
||||||
fMenuBar->AddItem(fDebugMenu);
|
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"),
|
fFileMenu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||||
new BMessage(M_FILE_QUIT), 'Q', B_COMMAND_KEY));
|
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));
|
new BMessage(M_TOGGLE_KEEP_ASPECT_RATIO), 'K', B_COMMAND_KEY));
|
||||||
item->SetMarked(fKeepAspectRatio);
|
item->SetMarked(fKeepAspectRatio);
|
||||||
menu->AddSeparatorItem();
|
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"),
|
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
|
||||||
new BMessage(M_FILE_QUIT), 'Q', B_COMMAND_KEY));
|
new BMessage(M_FILE_QUIT), 'Q', B_COMMAND_KEY));
|
||||||
|
|
||||||
@@ -1231,38 +1218,6 @@ MainWin::MessageReceived(BMessage *msg)
|
|||||||
// RefsReceived(msg);
|
// RefsReceived(msg);
|
||||||
break;
|
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:
|
case M_FILE_QUIT:
|
||||||
// be_app->PostMessage(B_QUIT_REQUESTED);
|
// be_app->PostMessage(B_QUIT_REQUESTED);
|
||||||
PostMessage(B_QUIT_REQUESTED);
|
PostMessage(B_QUIT_REQUESTED);
|
||||||
|
|||||||
Reference in New Issue
Block a user