BAboutWindow: style fixes
* mostly whitespace fixes * reorder methods
This commit is contained in:
@@ -48,8 +48,10 @@ class BAboutWindow : public BWindow {
|
|||||||
|
|
||||||
const char* Version();
|
const char* Version();
|
||||||
void SetVersion(const char* version);
|
void SetVersion(const char* version);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AboutView* fAboutView;
|
AboutView* fAboutView;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // B_ABOUT_WINDOW_H
|
#endif // B_ABOUT_WINDOW_H
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ static const float kStripeWidth = 30.0;
|
|||||||
|
|
||||||
using BPrivate::gSystemCatalog;
|
using BPrivate::gSystemCatalog;
|
||||||
|
|
||||||
|
|
||||||
#undef B_TRANSLATION_CONTEXT
|
#undef B_TRANSLATION_CONTEXT
|
||||||
#define B_TRANSLATION_CONTEXT "AboutWindow"
|
#define B_TRANSLATION_CONTEXT "AboutWindow"
|
||||||
|
|
||||||
@@ -90,7 +91,7 @@ class AboutView : public BGroupView {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
// #pragma mark - StripeView
|
||||||
|
|
||||||
|
|
||||||
StripeView::StripeView(BBitmap* icon)
|
StripeView::StripeView(BBitmap* icon)
|
||||||
@@ -304,6 +305,28 @@ AboutView::_GetIconFromSignature(const char* signature)
|
|||||||
// #pragma mark - AboutView public methods
|
// #pragma mark - AboutView public methods
|
||||||
|
|
||||||
|
|
||||||
|
BBitmap*
|
||||||
|
AboutView::Icon()
|
||||||
|
{
|
||||||
|
if (fStripeView == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return fStripeView->Icon();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
AboutView::SetIcon(BBitmap* icon)
|
||||||
|
{
|
||||||
|
if (fStripeView == NULL)
|
||||||
|
return B_NO_INIT;
|
||||||
|
|
||||||
|
fStripeView->SetIcon(icon);
|
||||||
|
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
AboutView::Name()
|
AboutView::Name()
|
||||||
{
|
{
|
||||||
@@ -336,33 +359,12 @@ AboutView::SetVersion(const char* version)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BBitmap*
|
|
||||||
AboutView::Icon()
|
|
||||||
{
|
|
||||||
if (fStripeView == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return fStripeView->Icon();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
|
||||||
AboutView::SetIcon(BBitmap* icon)
|
|
||||||
{
|
|
||||||
if (fStripeView == NULL)
|
|
||||||
return B_NO_INIT;
|
|
||||||
|
|
||||||
fStripeView->SetIcon(icon);
|
|
||||||
|
|
||||||
return B_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark - BAboutWindow
|
// #pragma mark - BAboutWindow
|
||||||
|
|
||||||
|
|
||||||
BAboutWindow::BAboutWindow(const char* appName, const char* signature)
|
BAboutWindow::BAboutWindow(const char* appName, const char* signature)
|
||||||
: BWindow(BRect(0.0, 0.0, 200.0, 200.0), appName, B_MODAL_WINDOW,
|
:
|
||||||
|
BWindow(BRect(0.0, 0.0, 200.0, 200.0), appName, B_MODAL_WINDOW,
|
||||||
B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_NOT_RESIZABLE
|
B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_NOT_RESIZABLE
|
||||||
| B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE)
|
| B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE)
|
||||||
{
|
{
|
||||||
@@ -577,6 +579,20 @@ BAboutWindow::AddText(const char* header, const char** contents)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BBitmap*
|
||||||
|
BAboutWindow::Icon()
|
||||||
|
{
|
||||||
|
return fAboutView->Icon();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BAboutWindow::SetIcon(BBitmap* icon)
|
||||||
|
{
|
||||||
|
fAboutView->SetIcon(icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
BAboutWindow::Name()
|
BAboutWindow::Name()
|
||||||
{
|
{
|
||||||
@@ -603,18 +619,3 @@ BAboutWindow::SetVersion(const char* version)
|
|||||||
{
|
{
|
||||||
fAboutView->SetVersion(version);
|
fAboutView->SetVersion(version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BBitmap*
|
|
||||||
BAboutWindow::Icon()
|
|
||||||
{
|
|
||||||
return fAboutView->Icon();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
BAboutWindow::SetIcon(BBitmap* icon)
|
|
||||||
{
|
|
||||||
fAboutView->SetIcon(icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user