diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2017-07-23 09:25:53 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@igalia.com> | 2017-07-23 09:25:53 -0500 |
commit | d93cd8bf456dc6e3c793a64a14e628d7a459dfa7 (patch) | |
tree | ccfd6fe42ecaf5a9838980a46d624703284ec577 | |
parent | 77626e20a6e4c312761e7f75184e26ae17a65552 (diff) | |
download | epiphany-d93cd8bf456dc6e3c793a64a14e628d7a459dfa7.tar.gz |
Consistently use the default clipboard
It's good to be consistent in how our menu items work. Currently the
copy item in the history dialog sets only the cut/paste clipboard, while
the web view context menu sets the primary selection too. GTK+ now has a
concept of default clipboard, so let's just use that.
https://bugzilla.gnome.org/show_bug.cgi?id=785299
-rw-r--r-- | lib/widgets/ephy-location-entry.c | 2 | ||||
-rw-r--r-- | src/ephy-history-dialog.c | 3 | ||||
-rw-r--r-- | src/popup-commands.c | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c index 6835c3d8a..fe583c227 100644 --- a/lib/widgets/ephy-location-entry.c +++ b/lib/widgets/ephy-location-entry.c @@ -600,7 +600,7 @@ entry_paste_and_go_activate_cb (GtkMenuItem *item, { GtkClipboard *clipboard; - clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); + clipboard = gtk_clipboard_get_default (gdk_display_get_default ()); gtk_clipboard_request_text (clipboard, (GtkClipboardTextReceivedFunc)paste_received, entry); diff --git a/src/ephy-history-dialog.c b/src/ephy-history-dialog.c index 269fbc725..4a1bde89e 100644 --- a/src/ephy-history-dialog.c +++ b/src/ephy-history-dialog.c @@ -393,7 +393,8 @@ copy_url (GSimpleAction *action, if (g_list_length (selection) == 1) { EphyHistoryURL *url = selection->data; - gtk_clipboard_set_text (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD), url->url, -1); + gtk_clipboard_set_text (gtk_clipboard_get_default (gdk_display_get_default ()), + url->url, -1); } g_list_free_full (selection, (GDestroyNotify)ephy_history_url_free); diff --git a/src/popup-commands.c b/src/popup-commands.c index ad8304a7c..043254943 100644 --- a/src/popup-commands.c +++ b/src/popup-commands.c @@ -104,9 +104,7 @@ popup_cmd_media_in_new_window (GSimpleAction *action, static void popup_cmd_copy_to_clipboard (EphyWindow *window, const char *text) { - gtk_clipboard_set_text (gtk_clipboard_get (GDK_NONE), - text, -1); - gtk_clipboard_set_text (gtk_clipboard_get (GDK_SELECTION_PRIMARY), + gtk_clipboard_set_text (gtk_clipboard_get_default (gdk_display_get_default ()), text, -1); } |