Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/5747465437ebc476dfa1385825e7844d8a253485
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/5747465437ebc476dfa1385825e7844d8a253485
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/5747465437ebc476dfa1385825e7844d8a253485

The branch, master has been updated
       via  5747465437ebc476dfa1385825e7844d8a253485 (commit)
      from  408dd00ed448caebf53999704ef03b6c45cdd8b7 (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/5747465437ebc476dfa1385825e7844d8a253485
commit 5747465437ebc476dfa1385825e7844d8a253485
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    Use selection_copy_to_clipboard instead of peering at core innards.

diff --git a/gtk/selection.c b/gtk/selection.c
index be2e44c..1493567 100644
--- a/gtk/selection.c
+++ b/gtk/selection.c
@@ -22,21 +22,13 @@
 #include "utils/log.h"
 
 #include "desktop/gui.h"
-#include "desktop/textinput.h"
 #include "desktop/selection.h"
 #include "desktop/browser.h"
 #include "gtk/selection.h"
 #include "gtk/window.h"
-#include "utils/utf8.h"
-
-#include "render/box.h"
  
 static GString *current_selection = NULL;
 static GtkClipboard *clipboard;
- 
-static bool copy_handler(const char *text, size_t length, struct box *box,
-               void *handle, const char *whitespace_text,
-               size_t whitespace_length);
 
 
 bool gui_add_to_clipboard(const char *text, size_t length, bool space)
@@ -48,31 +40,10 @@ bool gui_add_to_clipboard(const char *text, size_t length, 
bool space)
        return true;
 }
 
-bool copy_handler(const char *text, size_t length, struct box *box,
-               void *handle, const char *whitespace_text,
-               size_t whitespace_length)
-{
-       bool add_space = box != NULL ? box->space != 0 : false;
-
-       /* add any whitespace which precedes the text from this box */
-       if (whitespace_text != NULL && whitespace_length > 0) {
-               if (!gui_add_to_clipboard(whitespace_text,
-                               whitespace_length, false)) {
-                       return false;
-               }
-       }
-
-       /* add the text from this box */
-       if (!gui_add_to_clipboard(text, length, add_space))
-               return false;
-
-       return true;
-}
-
 bool gui_copy_to_clipboard(struct selection *s)
 {
        clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
-       if (s->defined && selection_traverse(s, copy_handler, NULL))
+       if (s->defined && selection_copy_to_clipboard(s))
                gui_commit_clipboard();
        return TRUE;
 }


-----------------------------------------------------------------------

Summary of changes:
 gtk/selection.c |   31 +------------------------------
 1 files changed, 1 insertions(+), 30 deletions(-)

diff --git a/gtk/selection.c b/gtk/selection.c
index be2e44c..1493567 100644
--- a/gtk/selection.c
+++ b/gtk/selection.c
@@ -22,21 +22,13 @@
 #include "utils/log.h"
 
 #include "desktop/gui.h"
-#include "desktop/textinput.h"
 #include "desktop/selection.h"
 #include "desktop/browser.h"
 #include "gtk/selection.h"
 #include "gtk/window.h"
-#include "utils/utf8.h"
-
-#include "render/box.h"
  
 static GString *current_selection = NULL;
 static GtkClipboard *clipboard;
- 
-static bool copy_handler(const char *text, size_t length, struct box *box,
-               void *handle, const char *whitespace_text,
-               size_t whitespace_length);
 
 
 bool gui_add_to_clipboard(const char *text, size_t length, bool space)
@@ -48,31 +40,10 @@ bool gui_add_to_clipboard(const char *text, size_t length, 
bool space)
        return true;
 }
 
-bool copy_handler(const char *text, size_t length, struct box *box,
-               void *handle, const char *whitespace_text,
-               size_t whitespace_length)
-{
-       bool add_space = box != NULL ? box->space != 0 : false;
-
-       /* add any whitespace which precedes the text from this box */
-       if (whitespace_text != NULL && whitespace_length > 0) {
-               if (!gui_add_to_clipboard(whitespace_text,
-                               whitespace_length, false)) {
-                       return false;
-               }
-       }
-
-       /* add the text from this box */
-       if (!gui_add_to_clipboard(text, length, add_space))
-               return false;
-
-       return true;
-}
-
 bool gui_copy_to_clipboard(struct selection *s)
 {
        clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
-       if (s->defined && selection_traverse(s, copy_handler, NULL))
+       if (s->defined && selection_copy_to_clipboard(s))
                gui_commit_clipboard();
        return TRUE;
 }


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to