st-clipboard: Add the ability to choose the clipboard type

https://bugzilla.gnome.org/show_bug.cgi?id=645019
This commit is contained in:
Jasper St. Pierre
2011-11-09 11:19:47 -05:00
parent d2c45f428f
commit 0616261a94
4 changed files with 39 additions and 11 deletions

View File

@ -90,7 +90,7 @@ const EntryMenu = new Lang.Class({
},
_updatePasteItem: function() {
this._clipboard.get_text(Lang.bind(this,
this._clipboard.get_text(St.ClipboardType.CLIPBOARD, Lang.bind(this,
function(clipboard, text) {
this._pasteItem.setSensitive(text && text != '');
}));
@ -106,11 +106,11 @@ const EntryMenu = new Lang.Class({
_onCopyActivated: function() {
let selection = this._entry.clutter_text.get_selection();
this._clipboard.set_text(selection);
this._clipboard.set_text(St.ClipboardType.CLIPBOARD, selection);
},
_onPasteActivated: function() {
this._clipboard.get_text(Lang.bind(this,
this._clipboard.get_text(St.ClipboardType.CLIPBOARD, Lang.bind(this,
function(clipboard, text) {
if (!text)
return;