summaryrefslogtreecommitdiff
path: root/beos/beos_window.cpp
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-10-09 01:22:14 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-10-09 01:22:14 +0000
commit8710d3a8144f33501d73d589f2babedbaf1b53b0 (patch)
tree8637e503d2ec8acf66f283b48d7ac1b91df76cb9 /beos/beos_window.cpp
parentea205ecf23c1d2b4eb1c2bec6f9f14751106b5be (diff)
downloadnetsurf-8710d3a8144f33501d73d589f2babedbaf1b53b0.tar.gz
netsurf-8710d3a8144f33501d73d589f2babedbaf1b53b0.tar.bz2
- fix for copying selection to clipboard
- fix some leaks - prepare for about box (use about html from rsrc: but it's broken yet) - if more than 1 refs received at the same time, open the extra ones in a new window. svn path=/trunk/netsurf/; revision=5511
Diffstat (limited to 'beos/beos_window.cpp')
-rw-r--r--beos/beos_window.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/beos/beos_window.cpp b/beos/beos_window.cpp
index 30611edb7..f51b5253b 100644
--- a/beos/beos_window.cpp
+++ b/beos/beos_window.cpp
@@ -140,6 +140,7 @@ NSBrowserFrameView::MessageReceived(BMessage *message)
{
switch (message->what) {
case B_SIMPLE_DATA:
+ case B_ARGV_RECEIVED:
case B_REFS_RECEIVED:
case B_COPY:
case B_CUT:
@@ -650,10 +651,12 @@ void nsbeos_dispatch_event(BMessage *message)
if (gui && gui != z) {
LOG(("discarding event for destroyed gui_window"));
+ delete message;
return;
}
if (scaffold && (!y || scaffold != y->scaffold)) {
LOG(("discarding event for destroyed scaffolding"));
+ delete message;
return;
}
@@ -671,6 +674,16 @@ void nsbeos_dispatch_event(BMessage *message)
// from the BApplication
netsurf_quit = true;
break;
+ case B_ABOUT_REQUESTED:
+ {
+ //BAlert *alert;
+ //XXX: i18n-ize
+ /* XXX: doesn't work yet! bug in rsrc:/
+ BString url("rsrc:/about.en.html,text/html");
+ browser_window_create(url.String(), NULL, NULL, true, false);
+ */
+ break;
+ }
case _UPDATE_:
if (gui && view)
nsbeos_window_expose_event(view, gui, message);
@@ -1765,7 +1778,9 @@ bool gui_empty_clipboard(void)
bool gui_add_to_clipboard(const char *text, size_t length, bool space)
{
- current_selection << text;
+ BString s;
+ s.SetTo(text, length);
+ current_selection << s;
if (space)
current_selection << " ";
return true;