Making use of B_TRANSLATE_APP_NAME, BAboutMenuItem, BAboutWindow. Clean-up. Removal of some ellipsis. ('About Haiku' in Deskbar.)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40968 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jonas Sundström
2011-03-16 00:42:18 +00:00
parent d7f342e8a3
commit b97c51490a
44 changed files with 191 additions and 196 deletions
+2 -3
View File
@@ -8,6 +8,7 @@
#include <stdio.h>
#include <AboutMenuItem.h>
#include <Application.h>
#include <Catalog.h>
#include <File.h>
@@ -124,9 +125,7 @@ ActivityWindow::ActivityWindow()
new BMessage(kMsgAddView)));
menu->AddSeparatorItem();
menu->AddItem(item = new BMenuItem(
B_TRANSLATE("About ActivityMonitor" B_UTF8_ELLIPSIS),
new BMessage(B_ABOUT_REQUESTED)));
menu->AddItem(item = new BAboutMenuItem());
menu->AddSeparatorItem();
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
+9 -24
View File
@@ -10,6 +10,7 @@
#include "BootManagerWindow.h"
#include <AboutWindow.h>
#include <Alert.h>
#include <Application.h>
#include <Catalog.h>
@@ -51,30 +52,14 @@ BootManager::ReadyToRun()
void
BootManager::AboutRequested()
{
BString aboutText;
const char* title = B_TRANSLATE_COMMENT("BootManager", "Application name");
aboutText << title << "\n\n"
<< B_TRANSLATE("written by")
<< "\n"
"\tDavid Dengg\n"
"\tMichael Pfeiffer\n"
"\n"
<< B_TRANSLATE_COMMENT("Copyright %year, Haiku Inc.\n",
"Leave %year untranslated");
aboutText.ReplaceLast("%year", "2008-2010");
BAlert *alert = new BAlert("about",
aboutText.String(), 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(title), &font);
alert->Go();
const char* authors[] = {
"David Dengg",
"Michael Pfeiffer",
NULL
};
BAboutWindow about(B_TRANSLATE_APP_NAME("BootManager"), 2008, authors);
about.Show();
}
+1 -1
View File
@@ -22,7 +22,7 @@ Application BootManager :
WizardController.cpp
WizardPageView.cpp
: be textencoding tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
: be libshared.a textencoding tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
: BootManager.rdef
;
+8 -15
View File
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <AboutWindow.h>
#include <Alert.h>
#include <Application.h>
#include <Catalog.h>
@@ -57,21 +58,13 @@ CharacterMap::MessageReceived(BMessage* message)
void
CharacterMap::AboutRequested()
{
BAlert *alert = new BAlert("about", B_TRANSLATE(
"CharacterMap\n"
"\twritten by Axel Dörfler\n"
"\tCopyright 2009, 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, 12, &font);
alert->Go();
const char* authors[] = {
"Axel Dörfler",
NULL
};
BAboutWindow about(B_TRANSLATE_APP_NAME("CharacterMap"), 2009, authors);
about.Show();
}
+2 -2
View File
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <string.h>
#include <AboutMenuItem.h>
#include <Application.h>
#include <Button.h>
#include <Catalog.h>
@@ -227,8 +228,7 @@ CharacterWindow::CharacterWindow()
BMenu* menu = new BMenu(B_TRANSLATE("File"));
BMenuItem* item;
menu->AddItem(item = new BMenuItem(B_TRANSLATE("About CharacterMap"
B_UTF8_ELLIPSIS), new BMessage(B_ABOUT_REQUESTED)));
menu->AddItem(item = new BAboutMenuItem());
menu->AddSeparatorItem();
+1 -1
View File
@@ -11,7 +11,7 @@ Application CharacterMap :
UnicodeBlocks.cpp
UnicodeBlockView.cpp
: be locale $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
: be libshared.a locale $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
: CharacterMap.rdef
;
+18 -7
View File
@@ -4,6 +4,8 @@
#include <string.h>
#include <unistd.h>
#include <AboutMenuItem.h>
#include <AboutWindow.h>
#include <Alert.h>
#include <Button.h>
#include <LayoutBuilder.h>
@@ -255,11 +257,6 @@ CodyCam::MessageReceived(BMessage *message)
break;
}
case msg_about:
(new BAlert(B_TRANSLATE("About CodyCam"), B_TRANSLATE("CodyCam\n\n"
"The Original BeOS webcam"), B_TRANSLATE("Close")))->Go();
break;
case msg_control_win:
// our control window is being asked to go away
// set our pointer to NULL
@@ -273,6 +270,21 @@ CodyCam::MessageReceived(BMessage *message)
}
void
CodyCam::AboutRequested()
{
const char* authors[] = {
"Be, Incorporated",
NULL
};
BAboutWindow about(B_TRANSLATE_APP_NAME("CodyCam"), 2003, authors,
"The Original BeOS webcam.\n"
B_UTF8_COPYRIGHT " 1998-1999 Be, Incorporated.");
about.Show();
}
status_t
CodyCam::_SetUpNodes()
{
@@ -510,8 +522,7 @@ VideoWindow::VideoWindow(BRect frame, const char* title, window_type type,
menu->AddSeparatorItem();
menuItem = new BMenuItem(B_TRANSLATE("About Codycam" B_UTF8_ELLIPSIS),
new BMessage(msg_about), 'B');
menuItem = new BAboutMenuItem();
menuItem->SetTarget(be_app);
menu->AddItem(menuItem);
+1 -1
View File
@@ -40,7 +40,6 @@ enum {
msg_start = 'strt',
msg_stop = 'stop',
msg_about = 'abut',
msg_setup = 'setp',
msg_video = 'vdeo',
@@ -94,6 +93,7 @@ public:
void ReadyToRun();
virtual bool QuitRequested();
virtual void MessageReceived(BMessage* message);
virtual void AboutRequested();
private:
status_t _SetUpNodes();
+3 -1
View File
@@ -2,6 +2,8 @@ SubDir HAIKU_TOP src apps codycam ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders shared ;
Application CodyCam :
CodyCam.cpp
FileUploadClient.cpp
@@ -11,7 +13,7 @@ Application CodyCam :
Settings.cpp
SettingsHandler.cpp
VideoConsumer.cpp
: be $(HAIKU_LOCALE_LIBS) media translation $(TARGET_NETAPI_LIB)
: be $(HAIKU_LOCALE_LIBS) libshared.a media translation $(TARGET_NETAPI_LIB)
$(TARGET_LIBSTDC++)
: CodyCam.rdef
;
+2 -2
View File
@@ -246,10 +246,10 @@ TBeMenu::AddStandardBeMenuItems()
#ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL
static const char* kAboutHaikuMenuItemStr = B_TRANSLATE_MARK(
"About Haiku" B_UTF8_ELLIPSIS);
"About Haiku");
#else
static const char* kAboutThisSystemMenuItemStr = B_TRANSLATE_MARK(
"About this system" B_UTF8_ELLIPSIS);
"About this system");
#endif
item = new BMenuItem(
+12 -9
View File
@@ -17,6 +17,8 @@
#include <ctype.h>
#include <assert.h>
#include <AboutMenuItem.h>
#include <AboutWindow.h>
#include <Alert.h>
#include <Application.h>
#include <AppFileInfo.h>
@@ -686,13 +688,15 @@ CalcView::FrameResized(float width, float height)
void
CalcView::AboutRequested()
{
BAlert* alert = new BAlert(B_TRANSLATE("about"),B_TRANSLATE(
"DeskCalc v2.1.0\n\n"
"written by Timothy Wayper,\nStephan Aßmus and Ingo Weinhold\n\n"
B_UTF8_COPYRIGHT "1997, 1998 R3 Software Ltd.\n"
B_UTF8_COPYRIGHT "2006-2009 Haiku, Inc.\n\n"
"All Rights Reserved."), "OK");
alert->Go(NULL);
const char* authors[] = {
"Timothy Wayper",
"nStephan Aßmus",
"Ingo Weinhold",
NULL
};
BAboutWindow about(B_TRANSLATE_APP_NAME("DeskCalc"), 2006, authors,
B_UTF8_COPYRIGHT "1997, 1998 R3 Software Ltd.");
about.Show();
}
@@ -1108,8 +1112,7 @@ CalcView::_CreatePopUpMenu()
new BMessage(MSG_OPTIONS_AUDIO_FEEDBACK));
fShowKeypadItem = new BMenuItem(B_TRANSLATE("Show keypad"),
new BMessage(MSG_OPTIONS_SHOW_KEYPAD));
fAboutItem = new BMenuItem(B_TRANSLATE("About DeskCalc" B_UTF8_ELLIPSIS),
new BMessage(B_ABOUT_REQUESTED));
fAboutItem = new BAboutMenuItem();
// apply current settings
fAutoNumlockItem->SetMarked(fOptions->auto_num_lock);
+1 -1
View File
@@ -13,7 +13,7 @@ Application DeskCalc :
ExpressionTextView.cpp
InputTextView.cpp
: be $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS) media libexpression_parser.a
libmapm.a
libmapm.a libshared.a
: DeskCalc.rdef
;
+9 -18
View File
@@ -6,6 +6,7 @@
* Pieter Panman
*/
#include <AboutWindow.h>
#include <Alert.h>
#include <Application.h>
#include <Catalog.h>
@@ -53,24 +54,14 @@ DevicesApplication::AboutRequested()
void
DevicesApplication::ShowAbout()
{
BAlert* alert = new BAlert(B_TRANSLATE("About"), B_TRANSLATE("Devices\n"
"\twritten by Pieter Panman\n"
"\n"
"\tBased on listdev by Jérôme Duval\n"
"\tand the previous Devices preference\n"
"\tby Jérôme Duval and Sikosis\n"
"\tCopyright 2009, 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, 7, &font);
alert->Go();
const char* authors[] = {
"Pieter Panman",
NULL
};
BAboutWindow about(B_TRANSLATE_APP_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();
}
+2 -2
View File
@@ -7,6 +7,7 @@
*/
#include <AboutMenuItem.h>
#include <Application.h>
#include <Catalog.h>
#include <MenuBar.h>
@@ -44,8 +45,7 @@ DevicesView::CreateLayout()
"Generate system information"), new BMessage(kMsgGenerateSysInfo)));
item->SetEnabled(false);
menu->AddSeparatorItem();
menu->AddItem(item = new BMenuItem(B_TRANSLATE("About Devices"
B_UTF8_ELLIPSIS), new BMessage(B_ABOUT_REQUESTED)));
menu->AddItem(item = new BAboutMenuItem());
menu->AddSeparatorItem();
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"),
new BMessage(B_QUIT_REQUESTED), 'Q'));
+2 -1
View File
@@ -72,7 +72,8 @@ Application Devices :
Device.cpp
PropertyList.cpp
PropertyListPlain.cpp
: be libcolumnlistview.a tracker $(TARGET_LIBSUPC++) $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
: be libcolumnlistview.a libshared.a tracker $(TARGET_LIBSUPC++)
$(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
: Devices.rdef
;
+13 -20
View File
@@ -5,15 +5,19 @@
#include "ExpanderApp.h"
#include "ExpanderWindow.h"
#include <AboutWindow.h>
#include <Alert.h>
#include <Catalog.h>
#include <Locale.h>
#include <TextView.h>
#include "ExpanderWindow.h"
ExpanderApp::ExpanderApp()
: BApplication("application/x-vnd.Haiku-Expander")
:
BApplication("application/x-vnd.Haiku-Expander")
{
BPoint windowPosition = fSettings.Message().FindPoint("window_position");
BRect windowFrame(0, 0, 450, 120);
@@ -29,24 +33,13 @@ ExpanderApp::ExpanderApp()
void
ExpanderApp::AboutRequested()
{
BString appName = B_TRANSLATE_APP_NAME("Expander");
int nameLength = appName.CountChars();
BAlert* alert = new BAlert("about",
appName.Append(B_TRANSLATE("\n\twritten by Jérôme Duval\n"
"\tCopyright 2004-2006, Haiku Inc.\n\noriginal Be version by \n"
"Dominic, Hiroshi, Peter, Pavel and Robert\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, nameLength, &font);
alert->Go();
const char* authors[] = {
"Jérôme Duval",
NULL
};
BAboutWindow about(B_TRANSLATE_APP_NAME("Expander"), 2004, authors,
"Original Be version by Dominic, Hiroshi, Peter, Pavel and Robert.");
about.Show();
}
+3 -1
View File
@@ -1,5 +1,7 @@
SubDir HAIKU_TOP src apps expander ;
UsePrivateHeaders shared ;
Application Expander :
ExpanderApp.cpp
ExpanderWindow.cpp
@@ -10,7 +12,7 @@ Application Expander :
DirectoryFilePanel.cpp
ExpanderRules.cpp
PasswordAlert.cpp
: be tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
: be libshared.a tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
: Expander.rdef
;
@@ -20,9 +20,9 @@
UninstallWindow::UninstallWindow()
:
BWindow(BRect(100, 100, 600, 300), B_TRANSLATE("Installed packages"),
B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_QUIT_ON_WINDOW_CLOSE
| B_AUTO_UPDATE_SIZE_LIMITS)
BWindow(BRect(100, 100, 600, 300),
B_TRANSLATE_APP_NAME("InstalledPackages"), B_TITLED_WINDOW,
B_NOT_ZOOMABLE | B_QUIT_ON_WINDOW_CLOSE | B_AUTO_UPDATE_SIZE_LIMITS)
{
SetLayout(new BGroupLayout(B_HORIZONTAL));
AddChild(new UninstallView());
+1 -1
View File
@@ -110,7 +110,7 @@ App::AboutRequested()
const char* authors[2];
authors[0] = B_TRANSLATE("Stephan Aßmus (aka stippi)");
authors[1] = NULL;
BString appName = B_TRANSLATE("LaunchBox");
BString appName = B_TRANSLATE_APP_NAME("LaunchBox");
BAboutWindow(appName, 2004, authors).Show();
}
+1 -1
View File
@@ -423,7 +423,7 @@ PadView::DisplayMenu(BPoint where, LaunchButton* button) const
padM->AddItem(item);
menu->AddItem(padM);
// app commands
BMenu* appM = new BMenu(B_TRANSLATE("LaunchBox"));
BMenu* appM = new BMenu(B_TRANSLATE_APP_NAME("LaunchBox"));
appM->SetFont(be_plain_font);
// about
item = new BMenuItem(B_TRANSLATE("About"), new BMessage(B_ABOUT_REQUESTED));
+4 -2
View File
@@ -4,14 +4,16 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
UsePrivateHeaders shared ;
Application Magnify :
Magnify.cpp
: be tracker game $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS)
: be game $(HAIKU_LOCALE_LIBS) libshared.a $(TARGET_LIBSUPC++) tracker
: Magnify.rdef
;
DoCatalogs Magnify :
x-vnd.Haiku-Magnify
x-vnd.Haiku-Magnify
:
Magnify.cpp
;
+4 -5
View File
@@ -10,6 +10,7 @@
#include "Magnify.h"
#include <AboutMenuItem.h>
#include <Alert.h>
#include <Bitmap.h>
#include <Catalog.h>
@@ -131,11 +132,9 @@ static void
BuildInfoMenu(BMenu *menu)
{
BMenuItem* menuItem;
menuItem = new BMenuItem(B_TRANSLATE("About Magnify" B_UTF8_ELLIPSIS),
new BMessage(B_ABOUT_REQUESTED));
menuItem = new BAboutMenuItem();
menu->AddItem(menuItem);
menuItem = new BMenuItem(B_TRANSLATE("Help" B_UTF8_ELLIPSIS),
menuItem = new BMenuItem(B_TRANSLATE("Help"),
new BMessage(msg_help));
menu->AddItem(menuItem);
menu->AddSeparatorItem();
@@ -239,7 +238,7 @@ TApp::AboutRequested()
TWindow::TWindow(int32 pixelCount)
:
BWindow(BRect(0, 0, 0, 0), B_TRANSLATE("Magnify"),
BWindow(BRect(0, 0, 0, 0), B_TRANSLATE_APP_NAME("Magnify"),
B_TITLED_WINDOW, B_OUTLINE_RESIZE)
{
GetPrefs(pixelCount);
+1 -1
View File
@@ -1123,7 +1123,7 @@ TMailApp::NewWindow(const entry_ref* ref, const char* to, bool resend,
}
}
if (title == "")
title = B_TRANSLATE("Mail");
title = B_TRANSLATE_APP_NAME("Mail");
TMailWindow* window = new TMailWindow(r, title.String(), this, ref, to,
&fContentFont, resend, trackerMessenger);
+2 -2
View File
@@ -976,7 +976,7 @@ TMailWindow::MessageReceived(BMessage *msg)
if (!fIncoming && fieldMask & FIELD_SUBJECT) {
// If no subject, set to "Mail"
if (!fHeaderView->fSubject->TextView()->TextLength())
SetTitle("Mail");
SetTitle(B_TRANSLATE_APP_NAME("Mail"));
else
SetTitle(fHeaderView->fSubject->Text());
}
@@ -2741,7 +2741,7 @@ TMailWindow::SetTitleForMessage()
//
// Figure out the title of this message and set the title bar
//
BString title = "Mail";
BString title = B_TRANSLATE_APP_NAME("Mail");
if (fIncoming) {
if (fMail->GetName(&title) == B_OK)
+3 -1
View File
@@ -2,6 +2,8 @@ SubDir HAIKU_TOP src apps mediaconverter ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders shared ;
Application MediaConverter :
MediaConverterApp.cpp
MediaConverterWindow.cpp
@@ -10,7 +12,7 @@ Application MediaConverter :
MediaFileInfoView.cpp
MediaFileListView.cpp
: be media tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSTDC++)
: be libshared.a media tracker $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSTDC++)
: MediaConverter.rdef
;
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <string.h>
#include <AboutMenuItem.h>
#include <Alert.h>
#include <Application.h>
#include <Box.h>
@@ -110,7 +111,7 @@ CodecMenuItem::~CodecMenuItem()
MediaConverterWindow::MediaConverterWindow(BRect frame)
:
BWindow(frame, B_TRANSLATE("MediaConverter"), B_TITLED_WINDOW_LOOK,
BWindow(frame, B_TRANSLATE_APP_NAME("MediaConverter"), B_TITLED_WINDOW_LOOK,
B_NORMAL_WINDOW_FEEL, B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS |
B_AUTO_UPDATE_SIZE_LIMITS),
fVideoQuality(75),
@@ -383,7 +384,7 @@ MediaConverterWindow::MessageReceived(BMessage* msg)
case B_CANCEL:
break;
case DISP_ABOUT_MESSAGE:
case B_ABOUT_REQUESTED:
{
BString title(B_TRANSLATE("About" B_UTF8_ELLIPSIS));
(new BAlert(title,
@@ -932,10 +933,7 @@ MediaConverterWindow::_CreateMenu()
new BMessage(OPEN_FILE_MESSAGE), 'O');
menu->AddItem(item);
menu->AddSeparatorItem();
item = new BMenuItem(B_TRANSLATE_WITH_CONTEXT(
"About MediaConverter" B_UTF8_ELLIPSIS, "Menu"),
new BMessage(DISP_ABOUT_MESSAGE));
item = new BAboutMenuItem(),
menu->AddItem(item);
menu->AddSeparatorItem();
item = new BMenuItem(B_TRANSLATE_WITH_CONTEXT("Quit", "Menu"),
@@ -17,7 +17,6 @@
#define OUTPUT_FOLDER_MESSAGE 'oUTF'
#define FOLDER_SELECT_MESSAGE 'sLFO'
#define OPEN_FILE_MESSAGE 'oFIL'
#define DISP_ABOUT_MESSAGE 'aBUT'
#define QUIT_MESSAGE 'qUIT'
#define PREVIEW_MESSAGE 'pVEW'
#define PRIORITY_CHANGED_MESSAGE 'cPRI'
+5 -3
View File
@@ -410,9 +410,11 @@ MainApp::MessageReceived(BMessage* message)
void
MainApp::AboutRequested()
{
BAlert* alert = new BAlert("about", B_TRANSLATE(
NAME"\n\nWritten by Marcus Overhagen, "
"Stephan Aßmus and Frederik Modéen"),
const char* appName = B_TRANSLATE_APP_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
+8 -6
View File
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <string.h>
#include <AboutMenuItem.h>
#include <Alert.h>
#include <Application.h>
#include <Autolock.h>
@@ -166,7 +167,7 @@ static const char* kRatingAttrName = "Media:Rating";
static const char* kDisabledSeekMessage = B_TRANSLATE("Drop files to play");
static const char* kApplicationName = B_TRANSLATE(NAME);
static const char* kApplicationName = B_TRANSLATE_APP_NAME(NAME);
//#define printf(a...)
@@ -1084,9 +1085,11 @@ MainWin::OpenPlaylistItem(const PlaylistItemRef& item)
if (ret != B_OK) {
fprintf(stderr, "MainWin::OpenPlaylistItem() - Failed to send message "
"to Controller.\n");
(new BAlert(B_TRANSLATE("error"),
B_TRANSLATE(NAME" encountered an internal error. "
"The file could not be opened."), B_TRANSLATE("OK")))->Go();
BString message = B_TRANSLATE("%app% encountered an internal error. "
"The file could not be opened.");
message.ReplaceFirst("%app%", kApplicationName);
(new BAlert(kApplicationName, message.String(),
B_TRANSLATE("OK")))->Go();
_PlaylistItemOpened(item, ret);
} else {
BString string;
@@ -1473,8 +1476,7 @@ MainWin::_CreateMenu()
fFileMenu->AddSeparatorItem();
item = new BMenuItem(B_TRANSLATE("About " NAME B_UTF8_ELLIPSIS),
new BMessage(B_ABOUT_REQUESTED));
item = new BAboutMenuItem();
fFileMenu->AddItem(item);
item->SetTarget(be_app);
+4 -2
View File
@@ -44,8 +44,10 @@
//------------------------------------------------------------------------------
MidiPlayerWindow::MidiPlayerWindow()
: BWindow(BRect(0, 0, 1, 1), B_TRANSLATE("MidiPlayer"), B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
:
BWindow(BRect(0, 0, 1, 1), B_TRANSLATE_APP_NAME("MidiPlayer"),
B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_NOT_RESIZABLE
| B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
{
playing = false;
scopeEnabled = true;
@@ -19,7 +19,8 @@
NetworkStatusWindow::NetworkStatusWindow()
: BWindow(BRect(150, 150, 249, 249), B_TRANSLATE("NetworkStatus"),
:
BWindow(BRect(150, 150, 249, 249), B_TRANSLATE_APP_NAME("NetworkStatus"),
B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS)
{
BView* topView = new BView(Bounds(), NULL, B_FOLLOW_ALL, B_WILL_DRAW);
+1
View File
@@ -13,4 +13,5 @@ DoCatalogs OverlayImage :
x-vnd.Haiku-OverlayImage
:
OverlayView.cpp
OverlayWindow.cpp
;
+1 -1
View File
@@ -25,7 +25,7 @@
OverlayWindow::OverlayWindow()
:
BWindow(BRect(50, 50, 500, 200), "OverlayImage",
BWindow(BRect(50, 50, 500, 200), B_TRANSLATE_APP_NAME("OverlayImage"),
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE)
{
OverlayView *replView = new OverlayView(Bounds());
+13
View File
@@ -20,3 +20,16 @@ Application PackageInstaller :
: PackageInstaller.rdef
;
DoCatalogs PackageInstaller :
x-vnd.Haiku-PackageInstaller
:
main.cpp
PackageImageViewer.cpp
PackageInfo.cpp
PackageInstall.cpp
PackageItem.cpp
PackageStatus.cpp
PackageTextViewer.cpp
PackageView.cpp
PackageWindow.cpp
;
+1 -1
View File
@@ -21,7 +21,7 @@
PackageWindow::PackageWindow(const entry_ref *ref)
:
BWindow(BRect(100, 100, 600, 300), B_TRANSLATE("PackageInstaller"),
BWindow(BRect(100, 100, 600, 300), B_TRANSLATE_APP_NAME("PackageInstaller"),
B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE)
{
//SetLayout(new BGroupLayout(B_HORIZONTAL));
@@ -11,6 +11,7 @@
#include <Alert.h>
#include <Button.h>
#include <Catalog.h>
#include <ControlLook.h>
#include <Entry.h>
#include <File.h>
@@ -99,7 +100,8 @@ protected:
ApplicationWindow::ApplicationWindow(BRect frame, bool visible)
: BWindow(frame, "Package Manager",
:
BWindow(frame, B_TRANSLATE_APP_NAME("PackageManager"),
B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
B_AUTO_UPDATE_SIZE_LIMITS | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE),
fMinimizeOnClose(false)
+8 -5
View File
@@ -1,15 +1,18 @@
SubDir HAIKU_TOP src apps packagemanager ;
# UsePrivateHeaders shared interface ;
# SubDirHdrs $(HAIKU_TOP) headers libs zlib ;
#SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits interface ] ;
UsePrivateHeaders shared ;
Application PackageManager :
ApplicationView.cpp
ApplicationWindow.cpp
PackageManager.cpp
: be $(HAIKU_LOCALE_LIBS) translation $(TARGET_LIBSUPC++)
: be $(HAIKU_LOCALE_LIBS) libshared.a $(TARGET_LIBSUPC++) translation
: PackageManager.rdef
;
DoCatalogs PackageManager :
x-vnd.Haiku-PackageManager
:
ApplicationWindow.cpp
PackageManager.cpp
;
+8 -15
View File
@@ -9,6 +9,7 @@
#include "ApplicationWindow.h"
#include <AboutWindow.h>
#include <Alert.h>
#include <Application.h>
#include <Catalog.h>
@@ -115,21 +116,13 @@ PackageManager::MessageReceived(BMessage *msg)
void
PackageManager::AboutRequested()
{
BAlert *about = new BAlert("about",
B_TRANSLATE("PackageManager\n"
"Written by Adrien Destugues\n"
"Copyright 2010 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();
const char* authors[] = {
"Adrien Destugues",
NULL
};
BAboutWindow about(B_TRANSLATE_APP_NAME("PackageManager"), 2010, authors);
about.Show();
}
+3 -3
View File
@@ -39,9 +39,9 @@ const uint32 MENU_QUIT = 'MGqu';
PairsWindow::PairsWindow()
:
BWindow(BRect(100, 100, 405, 423), B_TRANSLATE("Pairs"), B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE
| B_NOT_RESIZABLE | B_NOT_ZOOMABLE),
BWindow(BRect(100, 100, 405, 423), B_TRANSLATE_APP_NAME("Pairs"),
B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE
| B_NOT_RESIZABLE | B_NOT_ZOOMABLE),
fPairComparing(NULL),
fIsFirstClick(true),
fIsPairsActive(true),
+3 -1
View File
@@ -29,6 +29,8 @@ actions THTTPMakeHeader1
THTTPMakeHeader mime_encodings.h : mime_encodings.txt ;
THTTPMakeHeader mime_types.h : mime_types.txt ;
UsePrivateHeaders shared ;
AddResources PoorMan : PoorMan.rdef ;
Application PoorMan : PoorMan.cpp
@@ -49,7 +51,7 @@ Application PoorMan : PoorMan.cpp
match.c
tdate_parse.c
: be network tracker $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
: be libshared.a network tracker $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
;
+14 -4
View File
@@ -5,14 +5,19 @@
* Version: 0.1
*/
#include "PoorManApplication.h"
#include <AboutWindow.h>
#include <Application.h>
#include <Alert.h>
#include <Catalog.h>
#include <Directory.h>
#include "constants.h"
#include "PoorManApplication.h"
#include "PoorManWindow.h"
PoorManApplication::PoorManApplication()
: BApplication(STR_APP_SIG),
mainWindow(NULL)
@@ -40,9 +45,14 @@ PoorManApplication::PoorManApplication()
void
PoorManApplication::AboutRequested()
{
BAlert* aboutBox = new BAlert(STR_ABOUT_TITLE,
STR_ABOUT_DESC, STR_ABOUT_BUTTON);
aboutBox->Go();
const char* authors[] = {
"Philip Harrison",
"Ma Jie",
NULL
};
BAboutWindow about(STR_APP_NAME, 2004, authors,
"Poor Man's web server.");
about.Show();
}
+2 -3
View File
@@ -11,6 +11,7 @@
#include <time.h>
#include <arpa/inet.h>
#include <AboutMenuItem.h>
#include <Alert.h>
#include <Box.h>
#include <Catalog.h>
@@ -458,9 +459,7 @@ PoorManWindow::BuildFileMenu() const
ptrFileMenu->AddSeparatorItem();
// about box
BMenuItem * AboutItem = new BMenuItem(STR_MNU_FILE_ABOUT,
new BMessage(B_ABOUT_REQUESTED));
BAboutMenuItem * AboutItem = new BAboutMenuItem();
AboutItem->SetTarget(NULL, be_app);
ptrFileMenu->AddItem(AboutItem);
+2 -13
View File
@@ -13,8 +13,8 @@
// PoorMan Window
const char* STR_APP_SIG
= "application/x-vnd.Haiku.PoorMan";
char* STR_APP_NAME
= (char*)"PoorMan";
const char* STR_APP_NAME
= B_TRANSLATE_APP_NAME("PoorMan");
const char* STR_ERR_WEB_DIR
= B_TRANSLATE(
"Please choose the folder to publish on the web.\n\n"
@@ -129,17 +129,6 @@ const char CMD_EDIT_COPY
const char CMD_EDIT_SELECT_ALL
= 'A';
const char* STR_ABOUT_TITLE
= B_TRANSLATE("About PoorMan");
const char* STR_ABOUT_BUTTON
= B_TRANSLATE("OK");
const char* STR_ABOUT_DESC
= B_TRANSLATE(
"Poor Man's web server\n"
"Copyright " B_UTF8_COPYRIGHT " 2004-2009 Haiku\n"
"All rights reserved.\n\n"
"Written by: Philip Harrison, Ma Jie");
// --------------------------------
const rgb_color WHITE = { 255, 255, 255, 255 };
const rgb_color GRAY = { 184, 184, 184, 255 };
+1 -5
View File
@@ -43,7 +43,7 @@ const int32 MSG_LOG = 'logg';
// ------------------------------------------------------
// PoorMan Window
extern const char* STR_APP_SIG;
extern char* STR_APP_NAME;
extern const char* STR_APP_NAME;
extern const char* STR_ERR_WEB_DIR; // Alert Box
extern const char* STR_ERR_CANT_START;
extern const char* STR_DIR_CREATED;
@@ -102,10 +102,6 @@ extern const char CMD_FILE_QUIT;
extern const char CMD_EDIT_COPY;
extern const char CMD_EDIT_SELECT_ALL;
extern const char* STR_ABOUT_TITLE;
extern const char* STR_ABOUT_DESC;
extern const char* STR_ABOUT_BUTTON;
/* Colors */
extern const rgb_color WHITE;