Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/081976105ad13c74c340034de6229eb9bdafcb7b
...commit
http://git.netsurf-browser.org/netsurf.git/commit/081976105ad13c74c340034de6229eb9bdafcb7b
...tree
http://git.netsurf-browser.org/netsurf.git/tree/081976105ad13c74c340034de6229eb9bdafcb7b
The branch, master has been updated
via 081976105ad13c74c340034de6229eb9bdafcb7b (commit)
via 1c40d8a58c7ed07424f58b11392bc9ecadee7cbe (commit)
via 47db5546c5ea409703d9dfe885808647e89f917e (commit)
via d878ea4fb91143941ed84a9d300e4bb34731e41f (commit)
via 65e825c0c5d10820e66a7907ceb64afaae1e533d (commit)
via c4b284e43c1aad1d825152de89ab2894df1fac3f (commit)
via 5a2d4c6ddbb61c53cee48c721f9f21f111db219b (commit)
via 45755a9e0d991a116f2d53a0e178a4e3dc5d06e6 (commit)
via a2906b39943dc078654f2f1dc5d122221d826d9a (commit)
from 908d5655d23aad62947910993cb2fe6ab431b1d7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/081976105ad13c74c340034de6229eb9bdafcb7b
commit 081976105ad13c74c340034de6229eb9bdafcb7b
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Minor style tweaks.
diff --git a/render/html_interaction.c b/render/html_interaction.c
index f383611..15bf593 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -760,8 +760,8 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
done = true;
}
- }
- else if (mouse & BROWSER_MOUSE_PRESS_1)
+
+ } else if (mouse & BROWSER_MOUSE_PRESS_1)
selection_clear(&html->sel, true);
}
@@ -778,10 +778,10 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
CONTENT_MSG_DRAGSAVE,
msg_data);
} else {
- if (drag_candidate == NULL)
+ if (drag_candidate == NULL) {
browser_window_page_drag_start(
bw, x, y);
- else {
+ } else {
html_box_drag_start(
drag_candidate,
x, y);
@@ -798,10 +798,10 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
CONTENT_MSG_DRAGSAVE,
msg_data);
} else {
- if (drag_candidate == NULL)
+ if (drag_candidate == NULL) {
browser_window_page_drag_start(
bw, x, y);
- else {
+ } else {
html_box_drag_start(
drag_candidate,
x, y);
diff --git a/render/textplain.c b/render/textplain.c
index ec4d486..78539b4 100644
--- a/render/textplain.c
+++ b/render/textplain.c
@@ -521,8 +521,8 @@ void textplain_reformat(struct content *c, int width, int
height)
/* break at last space in line */
i = space;
line[line_count-1].length = (i + 1) -
line_start;
- }
- else
+
+ } else
line[line_count-1].length = i -
line_start;
}
line[line_count++].start = line_start = i + 1;
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/1c40d8a58c7ed07424f58b11392bc9ecadee7cbe
commit 1c40d8a58c7ed07424f58b11392bc9ecadee7cbe
Merge: 47db554 908d565
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Merge branch 'master' of git://git.netsurf-browser.org/netsurf
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/47db5546c5ea409703d9dfe885808647e89f917e
commit 47db5546c5ea409703d9dfe885808647e89f917e
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Use content msg system for status text, and don't pass internal status
message as an explict message.
diff --git a/render/textplain.c b/render/textplain.c
index a8fd8a0..ec4d486 100644
--- a/render/textplain.c
+++ b/render/textplain.c
@@ -691,24 +691,16 @@ void textplain_mouse_action(struct content *c, struct
browser_window *bw,
DRAGGING_SELECTION, NULL);
status = messages_get("Selecting");
}
- else
- status = content__get_status_message(c);
- }
- else {
- if (bw->loading_content)
- status = content_get_status_message(
- bw->loading_content);
- else
- status = content__get_status_message(c);
+ } else {
if (mouse & (BROWSER_MOUSE_DRAG_1 | BROWSER_MOUSE_DRAG_2)) {
browser_window_page_drag_start(bw, x, y);
pointer = BROWSER_POINTER_MOVE;
}
}
- if (status != NULL)
- browser_window_set_status(bw, status);
+ msg_data.explicit_status_text = status;
+ content_broadcast(c, CONTENT_MSG_STATUS, msg_data);
msg_data.pointer = pointer;
content_broadcast(c, CONTENT_MSG_POINTER, msg_data);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/d878ea4fb91143941ed84a9d300e4bb34731e41f
commit d878ea4fb91143941ed84a9d300e4bb34731e41f
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Don't pass internal content status text as an explicit message.
diff --git a/render/html_interaction.c b/render/html_interaction.c
index b6f2dc6..f383611 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -584,8 +584,7 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
DRAGGING_SELECTION,
NULL);
status = messages_get("Selecting");
- } else
- status = content_get_status_message(h);
+ }
}
else if (mouse & BROWSER_MOUSE_PRESS_1)
selection_clear(&html->sel, true);
@@ -663,7 +662,6 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
}
/* \todo should have a drag-saving object msg */
- status = content_get_status_message(h);
} else if (iframe) {
int pos_x, pos_y;
@@ -756,10 +754,9 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
browser_window_set_drag_type(bw,
DRAGGING_SELECTION,
NULL);
- status =
-
messages_get("Selecting");
- } else
- status =
content_get_status_message(h);
+ status = messages_get(
+ "Selecting");
+ }
done = true;
}
@@ -771,11 +768,6 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
if (!done) {
if (title)
status = title;
- else if (bw->loading_content)
- status = content_get_status_message(
- bw->loading_content);
- else
- status = content_get_status_message(h);
if (mouse & BROWSER_MOUSE_DRAG_1) {
if (mouse & BROWSER_MOUSE_MOD_2) {
@@ -824,12 +816,10 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
}
}
- if (status != NULL) {
+ if (!iframe) {
msg_data.explicit_status_text = status;
content_broadcast(c, CONTENT_MSG_STATUS, msg_data);
- }
- if (!iframe) {
msg_data.pointer = pointer;
content_broadcast(c, CONTENT_MSG_POINTER, msg_data);
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/65e825c0c5d10820e66a7907ceb64afaae1e533d
commit 65e825c0c5d10820e66a7907ceb64afaae1e533d
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Handle choice of whether to show status for loading content or request
content.
diff --git a/desktop/browser.c b/desktop/browser.c
index 64b35bb..e7d39fd 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1328,8 +1328,17 @@ nserror browser_window_callback(hlcache_handle *c,
case CONTENT_MSG_STATUS:
if (event->data.explicit_status_text == NULL) {
/* Object content's status text updated */
- browser_window_set_status(bw,
- content_get_status_message(c));
+ const char *status = NULL;
+ if (bw->loading_content != NULL)
+ /* Give preference to any loading content */
+ status = content_get_status_message(
+ bw->loading_content);
+
+ if (status == NULL)
+ status = content_get_status_message(c);
+
+ if (status != NULL)
+ browser_window_set_status(bw, status);
} else {
/* Object content wants to set explicit message */
browser_window_set_status(bw,
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/c4b284e43c1aad1d825152de89ab2894df1fac3f
commit c4b284e43c1aad1d825152de89ab2894df1fac3f
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Use interface to set drag type. Longer term, it would be better to avoid
using bw altogether.
diff --git a/render/textplain.c b/render/textplain.c
index 71d5765..a8fd8a0 100644
--- a/render/textplain.c
+++ b/render/textplain.c
@@ -628,7 +628,7 @@ void textplain_mouse_track(struct content *c, struct
browser_window *bw,
{
textplain_content *text = (textplain_content *) c;
- if (bw->drag_type == DRAGGING_SELECTION && !mouse) {
+ if (browser_window_get_drag_type(bw) == DRAGGING_SELECTION && !mouse) {
int dir = -1;
size_t idx;
@@ -641,7 +641,7 @@ void textplain_mouse_track(struct content *c, struct
browser_window *bw,
browser_window_set_drag_type(bw, DRAGGING_NONE, NULL);
}
- switch (bw->drag_type) {
+ switch (browser_window_get_drag_type(bw)) {
case DRAGGING_SELECTION: {
int dir = -1;
@@ -687,7 +687,8 @@ void textplain_mouse_action(struct content *c, struct
browser_window *bw,
if (selection_click(&text->sel, mouse, idx)) {
if (selection_dragging(&text->sel)) {
- bw->drag_type = DRAGGING_SELECTION;
+ browser_window_set_drag_type(bw,
+ DRAGGING_SELECTION, NULL);
status = messages_get("Selecting");
}
else
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/5a2d4c6ddbb61c53cee48c721f9f21f111db219b
commit 5a2d4c6ddbb61c53cee48c721f9f21f111db219b
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Group content messages that are passed on.
diff --git a/render/html.c b/render/html.c
index 1b49b84..134852f 100644
--- a/render/html.c
+++ b/render/html.c
@@ -1230,7 +1230,7 @@ html_object_callback(hlcache_handle *object,
break;
case CONTENT_MSG_LINK:
- /* Don't care about favicons */
+ /* Don't care about favicons that aren't on top level content */
break;
case CONTENT_MSG_SCROLL:
@@ -1243,23 +1243,12 @@ html_object_callback(hlcache_handle *object,
break;
case CONTENT_MSG_DRAGSAVE:
- /* Pass it on */
- content_broadcast(&c->base, CONTENT_MSG_DRAGSAVE, event->data);
- break;
-
case CONTENT_MSG_SAVELINK:
- /* Pass it on */
- content_broadcast(&c->base, CONTENT_MSG_SAVELINK, event->data);
- break;
-
case CONTENT_MSG_POINTER:
- /* Pass it on */
- content_broadcast(&c->base, CONTENT_MSG_POINTER, event->data);
- break;
-
case CONTENT_MSG_PASTE:
- /* Pass it on */
- content_broadcast(&c->base, CONTENT_MSG_PASTE, event->data);
+ /* These messages are for browser window layer.
+ * we're not interested, so pass them on. */
+ content_broadcast(&c->base, event->type, event->data);
break;
default:
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/45755a9e0d991a116f2d53a0e178a4e3dc5d06e6
commit 45755a9e0d991a116f2d53a0e178a4e3dc5d06e6
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Use paste content msg.
diff --git a/render/textinput.c b/render/textinput.c
index 6c580a8..98746bc 100644
--- a/render/textinput.c
+++ b/render/textinput.c
@@ -1308,13 +1308,16 @@ bool textinput_textarea_callback(struct browser_window
*bw, uint32_t key,
break;
case KEY_PASTE:
- gui_paste_from_clipboard(bw->window,
- box_x + inline_container->x +
- text_box->x + pixel_offset,
- box_y + inline_container->y + text_box->y);
+ {
+ union content_msg_data msg_data;
+ msg_data.paste.x = box_x + inline_container->x +
+ text_box->x + pixel_offset;
+ msg_data.paste.y = box_y + inline_container->y + text_box->y;
+ content_broadcast(c, CONTENT_MSG_PASTE, msg_data);
/* screen updated and caret repositioned already */
return true;
+ }
case KEY_CUT_SELECTION:
{
@@ -1949,12 +1952,16 @@ bool textinput_input_callback(struct browser_window
*bw, uint32_t key,
break;
case KEY_PASTE:
- gui_paste_from_clipboard(bw->window,
- box_x + input->children->x + text_box->x + pixel_offset,
- box_y + input->children->y + text_box->y);
+ {
+ union content_msg_data msg_data;
+ msg_data.paste.x = box_x + input->children->x + text_box->x +
+ pixel_offset;
+ msg_data.paste.y = box_y + input->children->y + text_box->y;
+ content_broadcast(c, CONTENT_MSG_PASTE, msg_data);
/* screen updated and caret repositioned already */
return true;
+ }
case KEY_CUT_SELECTION:
{
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/a2906b39943dc078654f2f1dc5d122221d826d9a
commit a2906b39943dc078654f2f1dc5d122221d826d9a
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Add paste request content message.
diff --git a/content/content.h b/content/content.h
index d0b525c..19ec791 100644
--- a/content/content.h
+++ b/content/content.h
@@ -77,7 +77,8 @@ typedef enum {
CONTENT_MSG_SCROLL, /**< Request to scroll content */
CONTENT_MSG_DRAGSAVE, /**< Allow drag saving of content */
CONTENT_MSG_SAVELINK, /**< Allow URL to be saved */
- CONTENT_MSG_POINTER /**< Wants a specific mouse pointer set */
+ CONTENT_MSG_POINTER, /**< Wants a specific mouse pointer set */
+ CONTENT_MSG_PASTE /**< Inform that content wants clipboard paste */
} content_msg;
/** RFC5988 metadata link */
@@ -148,6 +149,14 @@ union content_msg_data {
} savelink;
/** CONTENT_MSG_POINTER - Mouse pointer to set */
browser_pointer_shape pointer;
+ /** CONTENT_MSG_PASTE - Content requests that clipboard is pasted */
+ struct {
+ /* TODO: Get rid of these coords.
+ * browser_window_paste_text doesn't take coords, but
+ * RISC OS front end is doing something different. */
+ int x;
+ int y;
+ } paste;
};
/** parameters to content redraw */
diff --git a/desktop/browser.c b/desktop/browser.c
index f9519b0..64b35bb 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1488,6 +1488,12 @@ nserror browser_window_callback(hlcache_handle *c,
browser_window_set_pointer(bw, event->data.pointer);
break;
+ case CONTENT_MSG_PASTE:
+ /* Content wants a clipboard paste */
+ gui_paste_from_clipboard(bw->window,
+ event->data.paste.x, event->data.paste.y);
+ break;
+
default:
assert(0);
}
diff --git a/render/html.c b/render/html.c
index ed7e7eb..1b49b84 100644
--- a/render/html.c
+++ b/render/html.c
@@ -1257,6 +1257,11 @@ html_object_callback(hlcache_handle *object,
content_broadcast(&c->base, CONTENT_MSG_POINTER, event->data);
break;
+ case CONTENT_MSG_PASTE:
+ /* Pass it on */
+ content_broadcast(&c->base, CONTENT_MSG_PASTE, event->data);
+ break;
+
default:
assert(0);
}
-----------------------------------------------------------------------
Summary of changes:
content/content.h | 11 ++++++++++-
desktop/browser.c | 19 +++++++++++++++++--
render/html.c | 16 +++++-----------
render/html_interaction.c | 32 +++++++++++---------------------
render/textinput.c | 21 ++++++++++++++-------
render/textplain.c | 25 +++++++++----------------
6 files changed, 66 insertions(+), 58 deletions(-)
diff --git a/content/content.h b/content/content.h
index d0b525c..19ec791 100644
--- a/content/content.h
+++ b/content/content.h
@@ -77,7 +77,8 @@ typedef enum {
CONTENT_MSG_SCROLL, /**< Request to scroll content */
CONTENT_MSG_DRAGSAVE, /**< Allow drag saving of content */
CONTENT_MSG_SAVELINK, /**< Allow URL to be saved */
- CONTENT_MSG_POINTER /**< Wants a specific mouse pointer set */
+ CONTENT_MSG_POINTER, /**< Wants a specific mouse pointer set */
+ CONTENT_MSG_PASTE /**< Inform that content wants clipboard paste */
} content_msg;
/** RFC5988 metadata link */
@@ -148,6 +149,14 @@ union content_msg_data {
} savelink;
/** CONTENT_MSG_POINTER - Mouse pointer to set */
browser_pointer_shape pointer;
+ /** CONTENT_MSG_PASTE - Content requests that clipboard is pasted */
+ struct {
+ /* TODO: Get rid of these coords.
+ * browser_window_paste_text doesn't take coords, but
+ * RISC OS front end is doing something different. */
+ int x;
+ int y;
+ } paste;
};
/** parameters to content redraw */
diff --git a/desktop/browser.c b/desktop/browser.c
index f9519b0..e7d39fd 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1328,8 +1328,17 @@ nserror browser_window_callback(hlcache_handle *c,
case CONTENT_MSG_STATUS:
if (event->data.explicit_status_text == NULL) {
/* Object content's status text updated */
- browser_window_set_status(bw,
- content_get_status_message(c));
+ const char *status = NULL;
+ if (bw->loading_content != NULL)
+ /* Give preference to any loading content */
+ status = content_get_status_message(
+ bw->loading_content);
+
+ if (status == NULL)
+ status = content_get_status_message(c);
+
+ if (status != NULL)
+ browser_window_set_status(bw, status);
} else {
/* Object content wants to set explicit message */
browser_window_set_status(bw,
@@ -1488,6 +1497,12 @@ nserror browser_window_callback(hlcache_handle *c,
browser_window_set_pointer(bw, event->data.pointer);
break;
+ case CONTENT_MSG_PASTE:
+ /* Content wants a clipboard paste */
+ gui_paste_from_clipboard(bw->window,
+ event->data.paste.x, event->data.paste.y);
+ break;
+
default:
assert(0);
}
diff --git a/render/html.c b/render/html.c
index ed7e7eb..134852f 100644
--- a/render/html.c
+++ b/render/html.c
@@ -1230,7 +1230,7 @@ html_object_callback(hlcache_handle *object,
break;
case CONTENT_MSG_LINK:
- /* Don't care about favicons */
+ /* Don't care about favicons that aren't on top level content */
break;
case CONTENT_MSG_SCROLL:
@@ -1243,18 +1243,12 @@ html_object_callback(hlcache_handle *object,
break;
case CONTENT_MSG_DRAGSAVE:
- /* Pass it on */
- content_broadcast(&c->base, CONTENT_MSG_DRAGSAVE, event->data);
- break;
-
case CONTENT_MSG_SAVELINK:
- /* Pass it on */
- content_broadcast(&c->base, CONTENT_MSG_SAVELINK, event->data);
- break;
-
case CONTENT_MSG_POINTER:
- /* Pass it on */
- content_broadcast(&c->base, CONTENT_MSG_POINTER, event->data);
+ case CONTENT_MSG_PASTE:
+ /* These messages are for browser window layer.
+ * we're not interested, so pass them on. */
+ content_broadcast(&c->base, event->type, event->data);
break;
default:
diff --git a/render/html_interaction.c b/render/html_interaction.c
index b6f2dc6..15bf593 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -584,8 +584,7 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
DRAGGING_SELECTION,
NULL);
status = messages_get("Selecting");
- } else
- status = content_get_status_message(h);
+ }
}
else if (mouse & BROWSER_MOUSE_PRESS_1)
selection_clear(&html->sel, true);
@@ -663,7 +662,6 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
}
/* \todo should have a drag-saving object msg */
- status = content_get_status_message(h);
} else if (iframe) {
int pos_x, pos_y;
@@ -756,26 +754,20 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
browser_window_set_drag_type(bw,
DRAGGING_SELECTION,
NULL);
- status =
-
messages_get("Selecting");
- } else
- status =
content_get_status_message(h);
+ status = messages_get(
+ "Selecting");
+ }
done = true;
}
- }
- else if (mouse & BROWSER_MOUSE_PRESS_1)
+
+ } else if (mouse & BROWSER_MOUSE_PRESS_1)
selection_clear(&html->sel, true);
}
if (!done) {
if (title)
status = title;
- else if (bw->loading_content)
- status = content_get_status_message(
- bw->loading_content);
- else
- status = content_get_status_message(h);
if (mouse & BROWSER_MOUSE_DRAG_1) {
if (mouse & BROWSER_MOUSE_MOD_2) {
@@ -786,10 +778,10 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
CONTENT_MSG_DRAGSAVE,
msg_data);
} else {
- if (drag_candidate == NULL)
+ if (drag_candidate == NULL) {
browser_window_page_drag_start(
bw, x, y);
- else {
+ } else {
html_box_drag_start(
drag_candidate,
x, y);
@@ -806,10 +798,10 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
CONTENT_MSG_DRAGSAVE,
msg_data);
} else {
- if (drag_candidate == NULL)
+ if (drag_candidate == NULL) {
browser_window_page_drag_start(
bw, x, y);
- else {
+ } else {
html_box_drag_start(
drag_candidate,
x, y);
@@ -824,12 +816,10 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
}
}
- if (status != NULL) {
+ if (!iframe) {
msg_data.explicit_status_text = status;
content_broadcast(c, CONTENT_MSG_STATUS, msg_data);
- }
- if (!iframe) {
msg_data.pointer = pointer;
content_broadcast(c, CONTENT_MSG_POINTER, msg_data);
}
diff --git a/render/textinput.c b/render/textinput.c
index 6c580a8..98746bc 100644
--- a/render/textinput.c
+++ b/render/textinput.c
@@ -1308,13 +1308,16 @@ bool textinput_textarea_callback(struct browser_window
*bw, uint32_t key,
break;
case KEY_PASTE:
- gui_paste_from_clipboard(bw->window,
- box_x + inline_container->x +
- text_box->x + pixel_offset,
- box_y + inline_container->y + text_box->y);
+ {
+ union content_msg_data msg_data;
+ msg_data.paste.x = box_x + inline_container->x +
+ text_box->x + pixel_offset;
+ msg_data.paste.y = box_y + inline_container->y + text_box->y;
+ content_broadcast(c, CONTENT_MSG_PASTE, msg_data);
/* screen updated and caret repositioned already */
return true;
+ }
case KEY_CUT_SELECTION:
{
@@ -1949,12 +1952,16 @@ bool textinput_input_callback(struct browser_window
*bw, uint32_t key,
break;
case KEY_PASTE:
- gui_paste_from_clipboard(bw->window,
- box_x + input->children->x + text_box->x + pixel_offset,
- box_y + input->children->y + text_box->y);
+ {
+ union content_msg_data msg_data;
+ msg_data.paste.x = box_x + input->children->x + text_box->x +
+ pixel_offset;
+ msg_data.paste.y = box_y + input->children->y + text_box->y;
+ content_broadcast(c, CONTENT_MSG_PASTE, msg_data);
/* screen updated and caret repositioned already */
return true;
+ }
case KEY_CUT_SELECTION:
{
diff --git a/render/textplain.c b/render/textplain.c
index 71d5765..78539b4 100644
--- a/render/textplain.c
+++ b/render/textplain.c
@@ -521,8 +521,8 @@ void textplain_reformat(struct content *c, int width, int
height)
/* break at last space in line */
i = space;
line[line_count-1].length = (i + 1) -
line_start;
- }
- else
+
+ } else
line[line_count-1].length = i -
line_start;
}
line[line_count++].start = line_start = i + 1;
@@ -628,7 +628,7 @@ void textplain_mouse_track(struct content *c, struct
browser_window *bw,
{
textplain_content *text = (textplain_content *) c;
- if (bw->drag_type == DRAGGING_SELECTION && !mouse) {
+ if (browser_window_get_drag_type(bw) == DRAGGING_SELECTION && !mouse) {
int dir = -1;
size_t idx;
@@ -641,7 +641,7 @@ void textplain_mouse_track(struct content *c, struct
browser_window *bw,
browser_window_set_drag_type(bw, DRAGGING_NONE, NULL);
}
- switch (bw->drag_type) {
+ switch (browser_window_get_drag_type(bw)) {
case DRAGGING_SELECTION: {
int dir = -1;
@@ -687,27 +687,20 @@ void textplain_mouse_action(struct content *c, struct
browser_window *bw,
if (selection_click(&text->sel, mouse, idx)) {
if (selection_dragging(&text->sel)) {
- bw->drag_type = DRAGGING_SELECTION;
+ browser_window_set_drag_type(bw,
+ DRAGGING_SELECTION, NULL);
status = messages_get("Selecting");
}
- else
- status = content__get_status_message(c);
- }
- else {
- if (bw->loading_content)
- status = content_get_status_message(
- bw->loading_content);
- else
- status = content__get_status_message(c);
+ } else {
if (mouse & (BROWSER_MOUSE_DRAG_1 | BROWSER_MOUSE_DRAG_2)) {
browser_window_page_drag_start(bw, x, y);
pointer = BROWSER_POINTER_MOVE;
}
}
- if (status != NULL)
- browser_window_set_status(bw, status);
+ msg_data.explicit_status_text = status;
+ content_broadcast(c, CONTENT_MSG_STATUS, msg_data);
msg_data.pointer = pointer;
content_broadcast(c, CONTENT_MSG_POINTER, msg_data);
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org