[meld] patchdialog: Fix copy-to-clipboard for pygobject port
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] patchdialog: Fix copy-to-clipboard for pygobject port
- Date: Sat, 3 Oct 2015 21:18:37 +0000 (UTC)
commit c37789976eb8f8c260396ae11dfff7e2f7e839f0
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Oct 4 06:43:03 2015 +1000
patchdialog: Fix copy-to-clipboard for pygobject port
meld/patchdialog.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/meld/patchdialog.py b/meld/patchdialog.py
index 6a1dbbd..171e99b 100644
--- a/meld/patchdialog.py
+++ b/meld/patchdialog.py
@@ -17,6 +17,7 @@
import difflib
import os
+from gi.repository import Gdk
from gi.repository import Gtk
from gi.repository import GtkSource
@@ -113,8 +114,8 @@ class PatchDialog(gnomeglade.Component):
# Copy patch to clipboard
if result == 1:
- clip = Gtk.clipboard_get()
- clip.set_text(txt)
+ clip = Gtk.Clipboard.get_default(Gdk.Display.get_default())
+ clip.set_text(txt, -1)
clip.store()
break
# Save patch as a file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]