commit 0fafa987e7f5f4f44fd67ae3c2f38a3a87226663
parent 96d1595dcdbb49a87780adab389c829506461940
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Fri, 1 Feb 2019 21:33:36 +0100
Make Litehtml's "Copy Link" menuitem actually do something
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/plugins/litehtml_viewer/lh_widget.cpp b/src/plugins/litehtml_viewer/lh_widget.cpp
@@ -542,7 +542,12 @@ static void open_link_cb(GtkMenuItem *item, gpointer user_data)
static void copy_link_cb(GtkMenuItem *item, gpointer user_data)
{
-// lh_widget_wrapped *w = (lh_widget_wrapped *)user_data;
+ lh_widget_wrapped *w = (lh_widget_wrapped *)user_data;
+
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY),
+ w->m_clicked_url.c_str(), -1);
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD),
+ w->m_clicked_url.c_str(), -1);
}
///////////////////////////////////////////////////////////