Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@laptop.org>2012-12-21 09:49:23 (GMT)
committer Simon Schampijer <simon@laptop.org>2012-12-21 09:55:22 (GMT)
commitc62c8dab72eee975593765d8cabb799da92eb5c7 (patch)
tree293d5a34b6ea5806f1b60704ba4647b1092eed29
parentea4cb79fed67e41f695420d8a41dfdacc7bd3212 (diff)
Journal: fix copy to clipboard functionality, part of #4307
gtk_clipboard_set_with_data expects us to pass a data argument [1]. As the tempory file path we do copy to the clipboard is already part of the model we can set this to None as we can access that in the get_func and clear_func. The targets have to be of type GtkTargetEntry. [1] http://developer.gnome.org/gtk3/3.4/gtk3-Clipboards.html#gtk-clipboard-set-with-data [2] http://developer.gnome.org/gtk3/3.4/gtk3-Selections.html#GtkTargetEntry Signed-off-by: Simon Schampijer <simon@laptop.org> Reviewed-by: Daniel Drake <dsd@laptop.org>
-rw-r--r--src/jarabe/journal/palettes.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jarabe/journal/palettes.py b/src/jarabe/journal/palettes.py
index 1078d0a..200240f 100644
--- a/src/jarabe/journal/palettes.py
+++ b/src/jarabe/journal/palettes.py
@@ -311,9 +311,9 @@ class ClipboardMenu(MenuItem):
return
clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
- clipboard.set_with_data([('text/uri-list', 0, 0)],
+ clipboard.set_with_data([Gtk.TargetEntry.new('text/uri-list', 0, 0)],
self.__clipboard_get_func_cb,
- self.__clipboard_clear_func_cb)
+ self.__clipboard_clear_func_cb, None)
def __clipboard_get_func_cb(self, clipboard, selection_data, info, data):
# Get hold of a reference so the temp file doesn't get deleted