widgets: persist the clipboard when shutting down
commitcc4b4662d0f2d87a39815140b1b80c71a14e87c9
authorDavid Aguilar <davvid@gmail.com>
Sun, 9 Aug 2015 03:56:34 +0000 (8 20:56 -0700)
committerDavid Aguilar <davvid@gmail.com>
Sun, 9 Aug 2015 04:14:51 +0000 (8 21:14 -0700)
tree5ec547983b124cd5a13aa64401e560596f02dec2
parent77b9efe59d4b067897691ab03f297cc3950df307
widgets: persist the clipboard when shutting down

The copy/paste clipboard does not persist after git-cola exits.

This happens because X11 does not store a copy of the clipboard
contents, it only stores a reference.  The reference is destroyed when
git-cola exits.

Send a clipboard event to trigger a copy of the cilpboard data out of
the application.

C.f. https://stackoverflow.com/questions/2007103/how-can-i-disable-clear-of-clipboard-on-exit-of-pyqt4-application

Closes #484
Reported-by: Josh Taylor <joshuataylorx@gmail.com>
Helped-by: V字龍(Vdragon) <Vdragon.Taiwan@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
cola/qtutils.py
cola/widgets/standard.py
share/doc/git-cola/relnotes/unreleased.rst