parent
0a5c8d03bd
commit
aa979f0fe4
2 changed files with 74 additions and 45 deletions
modules/ags/config/ts/clipboard
|
@ -60,16 +60,21 @@ export default () => {
|
|||
App.closeWindow('win-clipboard');
|
||||
},
|
||||
|
||||
init_rows: (list) => {
|
||||
Clipboard.getHistory();
|
||||
|
||||
setup_list: (list) => {
|
||||
const CONNECT_ID = Clipboard.connect('history-searched', () => {
|
||||
// Do every clip that existed before this widget
|
||||
list.get_children().forEach((row) => {
|
||||
row.destroy();
|
||||
});
|
||||
Clipboard.clips.forEach((clip, key) => {
|
||||
makeItem(list, key, clip.clip, clip.isImage);
|
||||
});
|
||||
|
||||
// Setup connection for new clips
|
||||
Clipboard.connect('clip-added', (_, [key, clip]) => {
|
||||
makeItem(list, key, clip.clip, clip.isImage);
|
||||
});
|
||||
|
||||
Clipboard.disconnect(CONNECT_ID);
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue