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