[meld/meld-3-20] meldapp: Mark clipboard targets to be kept after exit (#482)



commit 6a93a87f8b6c7b8fdb84b63e649e423e07a15411
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Jun 21 07:57:49 2020 +1000

    meldapp: Mark clipboard targets to be kept after exit (#482)
    
    Ideally we'd be more selective about what targets to keep, but there's
    no good docs on what targets are actually expected/required, and it
    appears to be common practice to simply store everything.

 meld/meldapp.py | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/meld/meldapp.py b/meld/meldapp.py
index aac8b550..c8d25b90 100644
--- a/meld/meldapp.py
+++ b/meld/meldapp.py
@@ -65,6 +65,10 @@ class MeldApp(Gtk.Application):
             action.connect('activate', callback)
             self.add_action(action)
 
+        # Keep clipboard contents after application exit
+        clip = Gtk.Clipboard.get_default(Gdk.Display.get_default())
+        clip.set_can_store(None)
+
         # TODO: Should not be necessary but Builder doesn't understand Menus
         builder = meld.ui.util.get_builder("application.ui")
         menu = builder.get_object("app-menu")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]