20 ProjectBrowserFileItem, ProjectBrowserDirectoryItem |
20 ProjectBrowserFileItem, ProjectBrowserDirectoryItem |
21 |
21 |
22 from .RepositoryInfoDialog import VcsRepositoryInfoDialog |
22 from .RepositoryInfoDialog import VcsRepositoryInfoDialog |
23 |
23 |
24 import Preferences |
24 import Preferences |
|
25 |
25 |
26 |
26 class VcsProjectBrowserHelper(QObject): |
27 class VcsProjectBrowserHelper(QObject): |
27 """ |
28 """ |
28 Class implementing the base class of the VCS project browser helper. |
29 Class implementing the base class of the VCS project browser helper. |
29 """ |
30 """ |
30 def __init__(self, vcsObject, browserObject, projectObject, isTranslationsBrowser, |
31 def __init__(self, vcsObject, browserObject, projectObject, isTranslationsBrowser, |
31 parent = None, name = None): |
32 parent=None, name=None): |
32 """ |
33 """ |
33 Constructor |
34 Constructor |
34 |
35 |
35 @param vcsObject reference to the vcs object |
36 @param vcsObject reference to the vcs object |
36 @param browserObject reference to the project browser object |
37 @param browserObject reference to the project browser object |
66 self._addVCSMenuDir(dirMenu) |
67 self._addVCSMenuDir(dirMenu) |
67 self._addVCSMenuDirMulti(dirMultiMenu) |
68 self._addVCSMenuDirMulti(dirMultiMenu) |
68 |
69 |
69 def showContextMenu(self, menu, standardItems): |
70 def showContextMenu(self, menu, standardItems): |
70 """ |
71 """ |
71 Slot called before the context menu is shown. |
72 Slot called before the context menu is shown. |
72 |
73 |
73 It enables/disables the VCS menu entries depending on the overall |
74 It enables/disables the VCS menu entries depending on the overall |
74 VCS status and the file status. |
75 VCS status and the file status. |
75 |
76 |
76 @param menu reference to the menu to be shown |
77 @param menu reference to the menu to be shown |
77 @param standardItems array of standard items that need activation/deactivation |
78 @param standardItems array of standard items that need activation/deactivation |
78 depending on the overall VCS status |
79 depending on the overall VCS status |
79 """ |
80 """ |
80 raise RuntimeError('Not implemented') |
81 raise RuntimeError('Not implemented') |
81 |
82 |
82 def showContextMenuMulti(self, menu, standardItems): |
83 def showContextMenuMulti(self, menu, standardItems): |
83 """ |
84 """ |
84 Slot called before the context menu (multiple selections) is shown. |
85 Slot called before the context menu (multiple selections) is shown. |
85 |
86 |
86 It enables/disables the VCS menu entries depending on the overall |
87 It enables/disables the VCS menu entries depending on the overall |
87 VCS status and the files status. |
88 VCS status and the files status. |
88 |
89 |
89 @param menu reference to the menu to be shown |
90 @param menu reference to the menu to be shown |
90 @param standardItems array of standard items that need activation/deactivation |
91 @param standardItems array of standard items that need activation/deactivation |
91 depending on the overall VCS status |
92 depending on the overall VCS status |
92 """ |
93 """ |
93 raise RuntimeError('Not implemented') |
94 raise RuntimeError('Not implemented') |
94 |
95 |
95 def showContextMenuDir(self, menu, standardItems): |
96 def showContextMenuDir(self, menu, standardItems): |
96 """ |
97 """ |
97 Slot called before the context menu is shown. |
98 Slot called before the context menu is shown. |
98 |
99 |
99 It enables/disables the VCS menu entries depending on the overall |
100 It enables/disables the VCS menu entries depending on the overall |
100 VCS status and the directory status. |
101 VCS status and the directory status. |
101 |
102 |
102 @param menu reference to the menu to be shown |
103 @param menu reference to the menu to be shown |
103 @param standardItems array of standard items that need activation/deactivation |
104 @param standardItems array of standard items that need activation/deactivation |
104 depending on the overall VCS status |
105 depending on the overall VCS status |
105 """ |
106 """ |
106 raise RuntimeError('Not implemented') |
107 raise RuntimeError('Not implemented') |
107 |
108 |
108 def showContextMenuDirMulti(self, menu, standardItems): |
109 def showContextMenuDirMulti(self, menu, standardItems): |
109 """ |
110 """ |
110 Slot called before the context menu is shown. |
111 Slot called before the context menu is shown. |
111 |
112 |
112 It enables/disables the VCS menu entries depending on the overall |
113 It enables/disables the VCS menu entries depending on the overall |
113 VCS status and the directory status. |
114 VCS status and the directory status. |
114 |
115 |
115 @param menu reference to the menu to be shown |
116 @param menu reference to the menu to be shown |
116 @param standardItems array of standard items that need activation/deactivation |
117 @param standardItems array of standard items that need activation/deactivation |
117 depending on the overall VCS status |
118 depending on the overall VCS status |