Changeset 42855 in webkit


Ignore:
Timestamp:
Apr 24, 2009 5:05:21 PM (15 years ago)
Author:
jmalonzo@webkit.org
Message:

2009-04-24 Sergio García-Cuevas <sergio_gcg@telefonica.net>

Reviewed by Gustavo Noronha.

https://bugs.webkit.org/show_bug.cgi?id=17267
[GTK] Primary selection/clipboard support

Copy the link location to the primary selection as well as the
clipboard selection when using the "copy link selection" context
menu entry.

  • platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeURL):
  • platform/gtk/PasteboardHelper.h:

2009-04-24 Sergio García-Cuevas <sergio_gcg@telefonica.net>

Reviewed by Gustavo Noronha.

https://bugs.webkit.org/show_bug.cgi?id=17267
[GTK] Primary selection/clipboard support

Add a method for getting the primary selection.

  • WebCoreSupport/PasteboardHelperGtk.cpp: (WebKit::PasteboardHelperGtk::getPrimary):
  • WebCoreSupport/PasteboardHelperGtk.h:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r42854 r42855  
     12009-04-24  Sergio García-Cuevas  <sergio_gcg@telefonica.net>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=17267
     6        [GTK] Primary selection/clipboard support
     7
     8        Copy the link location to the primary selection as well as the
     9        clipboard selection when using the "copy link selection" context
     10        menu entry.
     11
     12        * platform/gtk/PasteboardGtk.cpp:
     13        (WebCore::Pasteboard::writeURL):
     14        * platform/gtk/PasteboardHelper.h:
     15
    1162009-04-24  Eric Seidel  <eric@webkit.org>
    217
  • trunk/WebCore/platform/gtk/PasteboardGtk.cpp

    r42199 r42855  
    121121
    122122    GtkClipboard* clipboard = m_helper->getClipboard(frame);
     123    GtkClipboard* primary = m_helper->getPrimary(frame);
    123124    gtk_clipboard_set_text(clipboard, url.string().utf8().data(), url.string().utf8().length());
     125    gtk_clipboard_set_text(primary, url.string().utf8().data(), url.string().utf8().length());
    124126}
    125127
  • trunk/WebCore/platform/gtk/PasteboardHelper.h

    r29961 r42855  
    3939
    4040    virtual GtkClipboard* getClipboard(Frame*) const = 0;
     41    virtual GtkClipboard* getPrimary(Frame*) const = 0;
    4142    virtual GtkTargetList* getCopyTargetList(Frame*) const = 0;
    4243    virtual GtkTargetList* getPasteTargetList(Frame*) const = 0;
  • trunk/WebKit/gtk/ChangeLog

    r42837 r42855  
     12009-04-24  Sergio García-Cuevas  <sergio_gcg@telefonica.net>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=17267
     6        [GTK] Primary selection/clipboard support
     7
     8        Add a method for getting the primary selection.
     9
     10        * WebCoreSupport/PasteboardHelperGtk.cpp:
     11        (WebKit::PasteboardHelperGtk::getPrimary):
     12        * WebCoreSupport/PasteboardHelperGtk.h:
     13
    1142009-04-24  Johan Bilien  <jobi@via.ecp.fr>
    215
  • trunk/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp

    r36079 r42855  
    3838}
    3939
     40GtkClipboard* PasteboardHelperGtk::getPrimary(Frame* frame) const
     41{
     42    WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame));
     43    return gtk_widget_get_clipboard(GTK_WIDGET (webView),
     44                                    GDK_SELECTION_PRIMARY);
     45}
     46
    4047GtkTargetList* PasteboardHelperGtk::getCopyTargetList(Frame* frame) const {
    4148    WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame));
  • trunk/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h

    r29961 r42855  
    4141    PasteboardHelperGtk() { }
    4242    virtual GtkClipboard* getClipboard(Frame*) const;
     43    virtual GtkClipboard* getPrimary(Frame*) const;
    4344    virtual GtkTargetList* getCopyTargetList(Frame*) const;
    4445    virtual GtkTargetList* getPasteTargetList(Frame*) const;
Note: See TracChangeset for help on using the changeset viewer.