Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <forenjunkie@chello.at>2017-03-01 00:41:05 +0300
committerPhilipp Hörist <forenjunkie@chello.at>2017-03-01 00:41:05 +0300
commit547fda1b667312a2b3d8e201cd42efd30571ddf7 (patch)
tree96888046c42ff221df23157d4f8590cd3934a163 /omemo/ui.py
parent11fb760a4df23f63a78cb63de565b54ae9a75556 (diff)
[omemo] Fix 'Copy to clipboard'
Diffstat (limited to 'omemo/ui.py')
-rw-r--r--omemo/ui.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/omemo/ui.py b/omemo/ui.py
index 464913c..1da35f0 100644
--- a/omemo/ui.py
+++ b/omemo/ui.py
@@ -23,7 +23,7 @@ import logging
import os
import message_control
-from gi.repository import GObject, Gtk, GdkPixbuf
+from gi.repository import GObject, Gtk, GdkPixbuf, Gdk
# pylint: disable=import-error
import gtkgui_helpers
@@ -539,7 +539,7 @@ class OMEMOConfigDialog(GajimPluginConfigDialog):
keep_selection = tw.get_selection().path_is_selected(pthinfo[0])
pop = self.B.get_object('fprclipboard_menu')
- pop.popup(None, None, None, event.button, event.time)
+ pop.popup(None, None, None, None, event.button, event.time)
# keep_selection=True -> no further processing of click event
# keep_selection=False-> further processing -> GTK usually selects
@@ -553,9 +553,9 @@ class OMEMOConfigDialog(GajimPluginConfigDialog):
for path in paths:
it = mod.get_iter(path)
jid, fpr = mod.get(it, 1, 3)
- fprs.append('%s: %s' % (jid, fpr[4:-5]))
- Gtk.Clipboard().set_text('\n'.join(fprs))
- Gtk.Clipboard(selection='PRIMARY').set_text('\n'.join(fprs))
+ fprs.append('%s: %s' % (jid, fpr[31:-12]))
+ clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
+ clipboard.set_text('\n'.join(fprs), -1)
def update_context_list(self):
self.fpr_model.clear()
@@ -744,7 +744,7 @@ class FingerprintWindow(Gtk.Dialog):
keep_selection = tw.get_selection().path_is_selected(pthinfo[0])
pop = self.xml.get_object('fprclipboard_menu')
- pop.popup(None, None, None, event.button, event.time)
+ pop.popup(None, None, None, None, event.button, event.time)
# keep_selection=True -> no further processing of click event
# keep_selection=False-> further processing -> GTK usually selects
@@ -762,8 +762,8 @@ class FingerprintWindow(Gtk.Dialog):
it = mod.get_iter(path)
jid, fpr = mod.get(it, 1, 3)
fprs.append('%s: %s' % (jid, fpr[31:-12]))
- Gtk.Clipboard().set_text('\n'.join(fprs))
- Gtk.Clipboard(selection='PRIMARY').set_text('\n'.join(fprs))
+ clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
+ clipboard.set_text('\n'.join(fprs), -1)
def update_context_list(self, *args):
self.fpr_model.clear()