1 from PyQt4
.QtCore
import SIGNAL
3 _signals
= dict(add_signoff
= SIGNAL('add_signoff'),
4 amend
= SIGNAL('amend'),
5 amend_mode
= SIGNAL('amend_mode'),
6 apply_diff_selection
= SIGNAL('apply_diff_selection'),
7 branch_mode
= SIGNAL('branch_mode'),
8 commit
= SIGNAL('commit'),
10 checkout
= SIGNAL('checkout'),
11 checkout_branch
= SIGNAL('checkout_branch'),
12 cherry_pick
= SIGNAL('cherry_pick'),
13 clone
= SIGNAL('clone'),
14 delete
= SIGNAL('delete'),
15 delete_branch
= SIGNAL('delete_branch'),
16 diff
= SIGNAL('diff'),
17 diff_expr_mode
= SIGNAL('diff_expr_mode'),
18 diff_mode
= SIGNAL('diff_mode'),
19 diff_staged
= SIGNAL('diff_staged'),
20 diff_text
= SIGNAL('diff_text'),
21 diffstat
= SIGNAL('diffstat'),
22 difftool
= SIGNAL('difftool'),
23 editor_text
= SIGNAL('editor_text'),
24 format_patch
= SIGNAL('format_patch'),
25 grep
= SIGNAL('grep'),
26 information
= SIGNAL('information'),
27 inotify
= SIGNAL('inotify'),
28 log_cmd
= SIGNAL('log_cmd'),
29 load_commit_message
= SIGNAL('load_commit_message'),
30 mergetool
= SIGNAL('mergetool'),
31 mode
= SIGNAL('mode'),
32 modified_summary
= SIGNAL('modified_summary'),
33 open_repo
= SIGNAL('open_repo'),
34 redo
= SIGNAL('redo'),
35 rescan
= SIGNAL('rescan'),
36 reset_mode
= SIGNAL('reset_mode'),
37 review_branch_mode
= SIGNAL('review_branch_mode'),
38 show_untracked
= SIGNAL('show_untracked'),
39 stage
= SIGNAL('stage'),
40 stage_diffs
= SIGNAL('stage_diffs'),
41 stage_modified
= SIGNAL('stage_modified'),
42 stage_untracked
= SIGNAL('stage_untracked'),
43 staged_summary
= SIGNAL('staged_summary'),
45 unmerged_summary
= SIGNAL('unmerged_summary'),
46 undo
= SIGNAL('undo'),
47 undo_diffs
= SIGNAL('undo_diffs'),
48 unstage
= SIGNAL('unstage'),
49 unstage_diffs
= SIGNAL('unstage_diffs'),
50 unstage_all
= SIGNAL('unstage_all'),
51 unstage_selected
= SIGNAL('unstage_selected'),
52 untracked_summary
= SIGNAL('untracked_summary'),
53 visualize_all
= SIGNAL('visualize_all'),
54 visualize_current
= SIGNAL('visualize_current'),
55 visualize_paths
= SIGNAL('visualize_paths'))
58 for name
, signal
in _signals
.iteritems():
59 _signals_names
[signal
] = name
61 # Bring signals into the module namespace
62 globals().update(_signals
)
65 """Return the name for a signal."""
66 return _signals_names
.get(signal
, 'no-name')