File: copy_paste_toolbar.py

package info (click to toggle)
gnat-gps 18-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 45,716 kB
  • sloc: ada: 362,679; python: 31,031; xml: 9,597; makefile: 1,030; ansic: 917; sh: 264; java: 17
file content (19 lines) | stat: -rw-r--r-- 653 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""This plugin provides Cut, Copy and Paste buttons in the toolbar
"""

#############################################################################
# No user customization below this line
#############################################################################

import GPS
import gps_utils


@gps_utils.hook('gps_started')
def __gps_started():
    GPS.Action('cut to clipboard').button(
        toolbar='main', section='editor', label='Cut')
    GPS.Action('copy to clipboard').button(
        toolbar='main', section='editor', label='Copy')
    GPS.Action('paste from clipboard').button(
        toolbar='main', section='editor', label='Paste')