From 4e79ee3d071df821f51f1a3f2d09bfedaa7af3b1 Mon Sep 17 00:00:00 2001 From: François Revel Date: Fri, 10 Oct 2008 21:43:25 +0000 Subject: - support BITMAP_CLEAR_MEMORY in create_bitmap() - copying to clipboard now constructs a text_run_array for StyledEdit, that is added to the clipboard. In applications supporting it it pastes the text with the correct fonts and sizes, and the text colors. - tried to find which line in source code the selection starts to open the editor there, but it's not finished so it's disabled. svn path=/trunk/netsurf/; revision=5533 --- beos/beos_gui.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'beos/beos_gui.cpp') diff --git a/beos/beos_gui.cpp b/beos/beos_gui.cpp index f762afe82..94d1f1066 100644 --- a/beos/beos_gui.cpp +++ b/beos/beos_gui.cpp @@ -807,7 +807,7 @@ void gui_window_save_as_link(struct gui_window *g, struct content *c) * Send the source of a content to a text editor. */ -void nsbeos_gui_view_source(struct content *content) +void nsbeos_gui_view_source(struct content *content, struct selection *selection) { char *temp_name; bool done = false; @@ -867,6 +867,22 @@ void nsbeos_gui_view_source(struct content *content) BMessage m(B_REFS_RECEIVED); m.AddRef("refs", &ref); +#if 0 + if (selection && selection->defined) { + int32 line = -1; + if (content->type == CONTENT_HTML) { + // XXX: use selection, find line in source code + } + if (content->type == CONTENT_TEXTPLAIN) { + line = MAKELINE_FROM_IDX(start_idx); + } + // not CSS! + + if (line > -1) + message.AddInt32("be:line", line); + } +#endif + // apps to try const char *editorSigs[] = { "application/x-vnd.beunited.pe", -- cgit v1.2.3