File: Shortcuts.pm

package info (click to toggle)
clamtk 6.07-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,468 kB
  • sloc: perl: 4,510; python: 44; makefile: 23
file content (68 lines) | stat: -rw-r--r-- 1,610 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# ClamTk, copyright (C) 2004-2021 Dave M
#
# This file is part of ClamTk
# (https://gitlab.com/dave_m/clamtk-gtk3/).
#
# ClamTk is free software; you can redistribute it and/or modify it
# under the terms of either:
#
# a) the GNU General Public License as published by the Free Software
# Foundation; either version 1, or (at your option) any later version, or
#
# b) the "Artistic License".
package ClamTk::Shortcuts;

use Glib 'FALSE';

# use strict;
# use warnings;
$| = 1;

use POSIX 'locale_h';
use Locale::gettext;

sub get_pseudo_keys {
    #<<<
    my @entries = (
        [
           'About', undef,
           _('About'), '<control>A',
            undef, sub { ClamTk::GUI::about() },
            FALSE
        ],
        [
            'Exit', undef,
            _('Exit'), '<control>X',
            undef, sub { Gtk3->main_quit },
            FALSE
        ],
        [
            'Select a file', undef,
            _('Select a file'), '<control>F',
            undef, sub { ClamTk::GUI::select_file() },
            FALSE
        ],
        [
            'Select a directory', undef,
            _('Select a directory'), '<control>D',
            undef, sub { ClamTk::GUI::select_directory() },
            FALSE
        ],
    );
    #>>>

    return @entries;
}

sub get_ui_info {
    return "<ui>
                <menubar name='MenuBar'>
                 <menuitem action='About'/>
                 <menuitem action='Exit'/>
                 <menuitem action='Select a file'/>
                 <menuitem action='Select a directory'/>
                </menubar>
                </ui>";
}

1;