diff --git a/3rdparty/themes/Jamfile b/3rdparty/themes/Jamfile index e622d14dd3..2d203631a8 100644 --- a/3rdparty/themes/Jamfile +++ b/3rdparty/themes/Jamfile @@ -26,11 +26,11 @@ Application <3rdparty>Themes : FileUtils.cpp MakeScreenshot.cpp ParseMessage.cpp + TextInputAlert.cpp ThemeAddonItem.cpp ThemeInterfaceView.cpp ThemeItem.cpp ThemeManager.cpp - ThemePopupTextWindow.cpp ThemesAddon.cpp ViewItem.cpp $(addonSources) diff --git a/3rdparty/themes/TextInputAlert.cpp b/3rdparty/themes/TextInputAlert.cpp new file mode 100644 index 0000000000..b336364884 --- /dev/null +++ b/3rdparty/themes/TextInputAlert.cpp @@ -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() +{ +} + + diff --git a/3rdparty/themes/TextInputAlert.h b/3rdparty/themes/TextInputAlert.h new file mode 100644 index 0000000000..5df69c9f73 --- /dev/null +++ b/3rdparty/themes/TextInputAlert.h @@ -0,0 +1,21 @@ +#ifndef TEXT_INPUT_ALERT_H +#define TEXT_INPUT_ALERT_H + +#include + +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 */ + diff --git a/3rdparty/themes/ThemeInterfaceView.cpp b/3rdparty/themes/ThemeInterfaceView.cpp index b9ae602153..489dd4b5ef 100644 --- a/3rdparty/themes/ThemeInterfaceView.cpp +++ b/3rdparty/themes/ThemeInterfaceView.cpp @@ -22,6 +22,7 @@ #include #include "UITheme.h" +#include "TextInputAlert.h" extern status_t ScaleBitmap(const BBitmap& inBitmap, BBitmap& outBitmap); @@ -193,11 +194,13 @@ ThemeInterfaceView::AllAttached() ((fBox->Frame().Height() - fScreenshotNone->Frame().Height()) / 2.0)); // Theme hyperlink + /* BStringView* hlink = new BStringView(BRect(), "theme_hyperlink", _T("More themes online"), new BMessage(skOnlineThemes), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM); AddChild(hlink); hlink->SetClickText(hlink->GetText(), *this); hlink->ResizeToPreferred(); hlink->MoveTo(frame.right - hlink->Bounds().Width(), fNewBtn->Frame().top + 5); + */ // the addons list view preview_frame = fBox->Frame(); @@ -247,12 +250,8 @@ ThemeInterfaceView::MessageReceived(BMessage *_msg) case kCreateThemeBtn: { - ThemePopupTextWindow *tw; - tw = new ThemePopupTextWindow(_T("New Theme Name"), _T("Name"), _T("Accept"), _T("Cancel"), - new BMessage(kReallyCreateTheme), - new BMessage(kReallyCreateTheme+1)); - tw->SetTarget(this); - tw->Show(); + TextInputAlert *alert = new TextInputAlert("New name", "New Theme Name", "", "Ok", "Cancel"); + alert->Go(fPopupInvoker); break; }