A stub replacement for that popup text input class.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23413 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Vendored
+1
-1
@@ -26,11 +26,11 @@ Application <3rdparty>Themes :
|
|||||||
FileUtils.cpp
|
FileUtils.cpp
|
||||||
MakeScreenshot.cpp
|
MakeScreenshot.cpp
|
||||||
ParseMessage.cpp
|
ParseMessage.cpp
|
||||||
|
TextInputAlert.cpp
|
||||||
ThemeAddonItem.cpp
|
ThemeAddonItem.cpp
|
||||||
ThemeInterfaceView.cpp
|
ThemeInterfaceView.cpp
|
||||||
ThemeItem.cpp
|
ThemeItem.cpp
|
||||||
ThemeManager.cpp
|
ThemeManager.cpp
|
||||||
ThemePopupTextWindow.cpp
|
|
||||||
ThemesAddon.cpp
|
ThemesAddon.cpp
|
||||||
ViewItem.cpp
|
ViewItem.cpp
|
||||||
$(addonSources)
|
$(addonSources)
|
||||||
|
|||||||
Vendored
+21
@@ -0,0 +1,21 @@
|
|||||||
|
#include "TextInputAlert.h"
|
||||||
|
|
||||||
|
|
||||||
|
TextInputAlert::TextInputAlert(const char *title,
|
||||||
|
const char *text,
|
||||||
|
const char *initial, /* initial input value */
|
||||||
|
const char *button0Label,
|
||||||
|
const char *button1Label,
|
||||||
|
const char *button2Label,
|
||||||
|
button_width widthStyle,
|
||||||
|
alert_type type)
|
||||||
|
: BAlert(title, text, button0Label, button1Label, button2Label, widthStyle, type)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TextInputAlert::~TextInputAlert()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Vendored
+21
@@ -0,0 +1,21 @@
|
|||||||
|
#ifndef TEXT_INPUT_ALERT_H
|
||||||
|
#define TEXT_INPUT_ALERT_H
|
||||||
|
|
||||||
|
#include <Alert.h>
|
||||||
|
|
||||||
|
class TextInputAlert : public BAlert {
|
||||||
|
public:
|
||||||
|
TextInputAlert(const char *title,
|
||||||
|
const char *text,
|
||||||
|
const char *initial, /* initial input value */
|
||||||
|
const char *button0Label,
|
||||||
|
const char *button1Label = NULL,
|
||||||
|
const char *button2Label = NULL,
|
||||||
|
button_width widthStyle = B_WIDTH_AS_USUAL,
|
||||||
|
alert_type type = B_INFO_ALERT);
|
||||||
|
virtual ~TextInputAlert();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* TEXT_INPUT_ALERT_H */
|
||||||
|
|
||||||
+5
-6
@@ -22,6 +22,7 @@
|
|||||||
#include <MessageFilter.h>
|
#include <MessageFilter.h>
|
||||||
|
|
||||||
#include "UITheme.h"
|
#include "UITheme.h"
|
||||||
|
#include "TextInputAlert.h"
|
||||||
|
|
||||||
extern status_t ScaleBitmap(const BBitmap& inBitmap, BBitmap& outBitmap);
|
extern status_t ScaleBitmap(const BBitmap& inBitmap, BBitmap& outBitmap);
|
||||||
|
|
||||||
@@ -193,11 +194,13 @@ ThemeInterfaceView::AllAttached()
|
|||||||
((fBox->Frame().Height() - fScreenshotNone->Frame().Height()) / 2.0));
|
((fBox->Frame().Height() - fScreenshotNone->Frame().Height()) / 2.0));
|
||||||
|
|
||||||
// Theme hyperlink
|
// Theme hyperlink
|
||||||
|
/*
|
||||||
BStringView* hlink = new BStringView(BRect(), "theme_hyperlink", _T("More themes online"), new BMessage(skOnlineThemes), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
|
BStringView* hlink = new BStringView(BRect(), "theme_hyperlink", _T("More themes online"), new BMessage(skOnlineThemes), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
|
||||||
AddChild(hlink);
|
AddChild(hlink);
|
||||||
hlink->SetClickText(hlink->GetText(), *this);
|
hlink->SetClickText(hlink->GetText(), *this);
|
||||||
hlink->ResizeToPreferred();
|
hlink->ResizeToPreferred();
|
||||||
hlink->MoveTo(frame.right - hlink->Bounds().Width(), fNewBtn->Frame().top + 5);
|
hlink->MoveTo(frame.right - hlink->Bounds().Width(), fNewBtn->Frame().top + 5);
|
||||||
|
*/
|
||||||
|
|
||||||
// the addons list view
|
// the addons list view
|
||||||
preview_frame = fBox->Frame();
|
preview_frame = fBox->Frame();
|
||||||
@@ -247,12 +250,8 @@ ThemeInterfaceView::MessageReceived(BMessage *_msg)
|
|||||||
|
|
||||||
case kCreateThemeBtn:
|
case kCreateThemeBtn:
|
||||||
{
|
{
|
||||||
ThemePopupTextWindow *tw;
|
TextInputAlert *alert = new TextInputAlert("New name", "New Theme Name", "", "Ok", "Cancel");
|
||||||
tw = new ThemePopupTextWindow(_T("New Theme Name"), _T("Name"), _T("Accept"), _T("Cancel"),
|
alert->Go(fPopupInvoker);
|
||||||
new BMessage(kReallyCreateTheme),
|
|
||||||
new BMessage(kReallyCreateTheme+1));
|
|
||||||
tw->SetTarget(this);
|
|
||||||
tw->Show();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user