mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-21 03:32:35 +03:00
BeOS/Haiku: use Haiku native dialog box.
* Looks better than a standard alert.
This commit is contained in:
parent
15777ee750
commit
af66ed3194
@ -32,7 +32,7 @@ extern "C" {
|
||||
#include "beos/scaffolding.h"
|
||||
#include "beos/window.h"
|
||||
|
||||
#include <Alert.h>
|
||||
#include <private/interface/AboutWindow.h>
|
||||
#include <Application.h>
|
||||
#include <Invoker.h>
|
||||
#include <String.h>
|
||||
@ -50,30 +50,8 @@ void nsbeos_about(struct gui_window *gui)
|
||||
text << "Date : " << WT_COMPILEDATE << "\n";
|
||||
text << "cURL : " << LIBCURL_VERSION << "\n";
|
||||
|
||||
BAlert *alert = new BAlert("about", text.String(), "Credits", "Licence", "Ok");
|
||||
|
||||
BHandler *target = be_app;
|
||||
BMessage *message = new BMessage(ABOUT_BUTTON);
|
||||
BInvoker *invoker = NULL;
|
||||
if (gui) {
|
||||
nsbeos_scaffolding *s = nsbeos_get_scaffold(gui);
|
||||
if (s) {
|
||||
NSBrowserWindow *w = nsbeos_get_bwindow_for_scaffolding(s);
|
||||
if (w) {
|
||||
alert->SetFeel(B_MODAL_SUBSET_WINDOW_FEEL);
|
||||
alert->AddToSubset(w);
|
||||
}
|
||||
NSBaseView *v = nsbeos_get_baseview_for_scaffolding(s);
|
||||
if (v) {
|
||||
if (w)
|
||||
message->AddPointer("Window", w);
|
||||
target = v;
|
||||
}
|
||||
}
|
||||
}
|
||||
invoker = new BInvoker(message, target);
|
||||
|
||||
BAboutWindow *alert = new BAboutWindow("About NetSurf", "application/x-vnd.NetSurf");
|
||||
alert->AddExtraInfo(text);
|
||||
alert->Show();
|
||||
//TODO: i18n-ize
|
||||
|
||||
alert->Go(invoker);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user