69 """ |
69 """ |
70 Public method to generate the action objects. |
70 Public method to generate the action objects. |
71 """ |
71 """ |
72 self.vcsNewAct = E5Action( |
72 self.vcsNewAct = E5Action( |
73 self.tr('New from repository'), |
73 self.tr('New from repository'), |
74 UI.PixmapCache.getIcon("vcsCheckout.png"), |
74 UI.PixmapCache.getIcon("vcsCheckout"), |
75 self.tr('&New from repository...'), 0, 0, |
75 self.tr('&New from repository...'), 0, 0, |
76 self, 'git_new') |
76 self, 'git_new') |
77 self.vcsNewAct.setStatusTip(self.tr( |
77 self.vcsNewAct.setStatusTip(self.tr( |
78 'Create (clone) a new project from a Git repository' |
78 'Create (clone) a new project from a Git repository' |
79 )) |
79 )) |
85 self.vcsNewAct.triggered.connect(self._vcsCheckout) |
85 self.vcsNewAct.triggered.connect(self._vcsCheckout) |
86 self.actions.append(self.vcsNewAct) |
86 self.actions.append(self.vcsNewAct) |
87 |
87 |
88 self.gitFetchAct = E5Action( |
88 self.gitFetchAct = E5Action( |
89 self.tr('Fetch changes'), |
89 self.tr('Fetch changes'), |
90 UI.PixmapCache.getIcon("vcsUpdate.png"), |
90 UI.PixmapCache.getIcon("vcsUpdate"), |
91 self.tr('Fetch changes'), |
91 self.tr('Fetch changes'), |
92 0, 0, self, 'git_fetch') |
92 0, 0, self, 'git_fetch') |
93 self.gitFetchAct.setStatusTip(self.tr( |
93 self.gitFetchAct.setStatusTip(self.tr( |
94 'Fetch changes from a remote repository' |
94 'Fetch changes from a remote repository' |
95 )) |
95 )) |
101 self.gitFetchAct.triggered.connect(self.__gitFetch) |
101 self.gitFetchAct.triggered.connect(self.__gitFetch) |
102 self.actions.append(self.gitFetchAct) |
102 self.actions.append(self.gitFetchAct) |
103 |
103 |
104 self.gitPullAct = E5Action( |
104 self.gitPullAct = E5Action( |
105 self.tr('Pull changes'), |
105 self.tr('Pull changes'), |
106 UI.PixmapCache.getIcon("vcsUpdate.png"), |
106 UI.PixmapCache.getIcon("vcsUpdate"), |
107 self.tr('Pull changes'), |
107 self.tr('Pull changes'), |
108 0, 0, self, 'git_pull') |
108 0, 0, self, 'git_pull') |
109 self.gitPullAct.setStatusTip(self.tr( |
109 self.gitPullAct.setStatusTip(self.tr( |
110 'Pull changes from a remote repository and update the work area' |
110 'Pull changes from a remote repository and update the work area' |
111 )) |
111 )) |
117 self.gitPullAct.triggered.connect(self.__gitPull) |
117 self.gitPullAct.triggered.connect(self.__gitPull) |
118 self.actions.append(self.gitPullAct) |
118 self.actions.append(self.gitPullAct) |
119 |
119 |
120 self.vcsCommitAct = E5Action( |
120 self.vcsCommitAct = E5Action( |
121 self.tr('Commit changes to repository'), |
121 self.tr('Commit changes to repository'), |
122 UI.PixmapCache.getIcon("vcsCommit.png"), |
122 UI.PixmapCache.getIcon("vcsCommit"), |
123 self.tr('Commit changes to repository...'), 0, 0, self, |
123 self.tr('Commit changes to repository...'), 0, 0, self, |
124 'git_commit') |
124 'git_commit') |
125 self.vcsCommitAct.setStatusTip(self.tr( |
125 self.vcsCommitAct.setStatusTip(self.tr( |
126 'Commit changes of the local project to the Git repository' |
126 'Commit changes of the local project to the Git repository' |
127 )) |
127 )) |
133 self.vcsCommitAct.triggered.connect(self._vcsCommit) |
133 self.vcsCommitAct.triggered.connect(self._vcsCommit) |
134 self.actions.append(self.vcsCommitAct) |
134 self.actions.append(self.vcsCommitAct) |
135 |
135 |
136 self.gitPushAct = E5Action( |
136 self.gitPushAct = E5Action( |
137 self.tr('Push changes'), |
137 self.tr('Push changes'), |
138 UI.PixmapCache.getIcon("vcsCommit.png"), |
138 UI.PixmapCache.getIcon("vcsCommit"), |
139 self.tr('Push changes'), |
139 self.tr('Push changes'), |
140 0, 0, self, 'git_push') |
140 0, 0, self, 'git_push') |
141 self.gitPushAct.setStatusTip(self.tr( |
141 self.gitPushAct.setStatusTip(self.tr( |
142 'Push changes to a remote repository' |
142 'Push changes to a remote repository' |
143 )) |
143 )) |
149 self.gitPushAct.triggered.connect(self.__gitPush) |
149 self.gitPushAct.triggered.connect(self.__gitPush) |
150 self.actions.append(self.gitPushAct) |
150 self.actions.append(self.gitPushAct) |
151 |
151 |
152 self.vcsExportAct = E5Action( |
152 self.vcsExportAct = E5Action( |
153 self.tr('Export from repository'), |
153 self.tr('Export from repository'), |
154 UI.PixmapCache.getIcon("vcsExport.png"), |
154 UI.PixmapCache.getIcon("vcsExport"), |
155 self.tr('&Export from repository...'), |
155 self.tr('&Export from repository...'), |
156 0, 0, self, 'git_export_repo') |
156 0, 0, self, 'git_export_repo') |
157 self.vcsExportAct.setStatusTip(self.tr( |
157 self.vcsExportAct.setStatusTip(self.tr( |
158 'Export a project from the repository' |
158 'Export a project from the repository' |
159 )) |
159 )) |
164 self.vcsExportAct.triggered.connect(self._vcsExport) |
164 self.vcsExportAct.triggered.connect(self._vcsExport) |
165 self.actions.append(self.vcsExportAct) |
165 self.actions.append(self.vcsExportAct) |
166 |
166 |
167 self.gitLogBrowserAct = E5Action( |
167 self.gitLogBrowserAct = E5Action( |
168 self.tr('Show log browser'), |
168 self.tr('Show log browser'), |
169 UI.PixmapCache.getIcon("vcsLog.png"), |
169 UI.PixmapCache.getIcon("vcsLog"), |
170 self.tr('Show log browser'), |
170 self.tr('Show log browser'), |
171 0, 0, self, 'git_log_browser') |
171 0, 0, self, 'git_log_browser') |
172 self.gitLogBrowserAct.setStatusTip(self.tr( |
172 self.gitLogBrowserAct.setStatusTip(self.tr( |
173 'Show a dialog to browse the log of the local project' |
173 'Show a dialog to browse the log of the local project' |
174 )) |
174 )) |
181 self.gitLogBrowserAct.triggered.connect(self._vcsLogBrowser) |
181 self.gitLogBrowserAct.triggered.connect(self._vcsLogBrowser) |
182 self.actions.append(self.gitLogBrowserAct) |
182 self.actions.append(self.gitLogBrowserAct) |
183 |
183 |
184 self.gitReflogBrowserAct = E5Action( |
184 self.gitReflogBrowserAct = E5Action( |
185 self.tr('Show reflog browser'), |
185 self.tr('Show reflog browser'), |
186 UI.PixmapCache.getIcon("vcsLog.png"), |
186 UI.PixmapCache.getIcon("vcsLog"), |
187 self.tr('Show reflog browser'), |
187 self.tr('Show reflog browser'), |
188 0, 0, self, 'git_reflog_browser') |
188 0, 0, self, 'git_reflog_browser') |
189 self.gitReflogBrowserAct.setStatusTip(self.tr( |
189 self.gitReflogBrowserAct.setStatusTip(self.tr( |
190 'Show a dialog to browse the reflog of the local project' |
190 'Show a dialog to browse the reflog of the local project' |
191 )) |
191 )) |
198 self.gitReflogBrowserAct.triggered.connect(self.__gitReflogBrowser) |
198 self.gitReflogBrowserAct.triggered.connect(self.__gitReflogBrowser) |
199 self.actions.append(self.gitReflogBrowserAct) |
199 self.actions.append(self.gitReflogBrowserAct) |
200 |
200 |
201 self.vcsDiffAct = E5Action( |
201 self.vcsDiffAct = E5Action( |
202 self.tr('Show differences'), |
202 self.tr('Show differences'), |
203 UI.PixmapCache.getIcon("vcsDiff.png"), |
203 UI.PixmapCache.getIcon("vcsDiff"), |
204 self.tr('Show &differences...'), |
204 self.tr('Show &differences...'), |
205 0, 0, self, 'git_diff') |
205 0, 0, self, 'git_diff') |
206 self.vcsDiffAct.setStatusTip(self.tr( |
206 self.vcsDiffAct.setStatusTip(self.tr( |
207 'Show the differences of the local project to the repository' |
207 'Show the differences of the local project to the repository' |
208 )) |
208 )) |
214 self.vcsDiffAct.triggered.connect(self._vcsDiff) |
214 self.vcsDiffAct.triggered.connect(self._vcsDiff) |
215 self.actions.append(self.vcsDiffAct) |
215 self.actions.append(self.vcsDiffAct) |
216 |
216 |
217 self.gitExtDiffAct = E5Action( |
217 self.gitExtDiffAct = E5Action( |
218 self.tr('Show differences (extended)'), |
218 self.tr('Show differences (extended)'), |
219 UI.PixmapCache.getIcon("vcsDiff.png"), |
219 UI.PixmapCache.getIcon("vcsDiff"), |
220 self.tr('Show differences (extended) ...'), |
220 self.tr('Show differences (extended) ...'), |
221 0, 0, self, 'git_extendeddiff') |
221 0, 0, self, 'git_extendeddiff') |
222 self.gitExtDiffAct.setStatusTip(self.tr( |
222 self.gitExtDiffAct.setStatusTip(self.tr( |
223 'Show the difference of revisions of the project to the repository' |
223 'Show the difference of revisions of the project to the repository' |
224 )) |
224 )) |
230 self.gitExtDiffAct.triggered.connect(self.__gitExtendedDiff) |
230 self.gitExtDiffAct.triggered.connect(self.__gitExtendedDiff) |
231 self.actions.append(self.gitExtDiffAct) |
231 self.actions.append(self.gitExtDiffAct) |
232 |
232 |
233 self.vcsStatusAct = E5Action( |
233 self.vcsStatusAct = E5Action( |
234 self.tr('Show status'), |
234 self.tr('Show status'), |
235 UI.PixmapCache.getIcon("vcsStatus.png"), |
235 UI.PixmapCache.getIcon("vcsStatus"), |
236 self.tr('Show &status...'), |
236 self.tr('Show &status...'), |
237 0, 0, self, 'git_status') |
237 0, 0, self, 'git_status') |
238 self.vcsStatusAct.setStatusTip(self.tr( |
238 self.vcsStatusAct.setStatusTip(self.tr( |
239 'Show the status of the local project' |
239 'Show the status of the local project' |
240 )) |
240 )) |
245 self.vcsStatusAct.triggered.connect(self._vcsStatus) |
245 self.vcsStatusAct.triggered.connect(self._vcsStatus) |
246 self.actions.append(self.vcsStatusAct) |
246 self.actions.append(self.vcsStatusAct) |
247 |
247 |
248 self.vcsSwitchAct = E5Action( |
248 self.vcsSwitchAct = E5Action( |
249 self.tr('Switch'), |
249 self.tr('Switch'), |
250 UI.PixmapCache.getIcon("vcsSwitch.png"), |
250 UI.PixmapCache.getIcon("vcsSwitch"), |
251 self.tr('S&witch...'), |
251 self.tr('S&witch...'), |
252 0, 0, self, 'git_switch') |
252 0, 0, self, 'git_switch') |
253 self.vcsSwitchAct.setStatusTip(self.tr( |
253 self.vcsSwitchAct.setStatusTip(self.tr( |
254 'Switch the working directory to another revision' |
254 'Switch the working directory to another revision' |
255 )) |
255 )) |
261 self.vcsSwitchAct.triggered.connect(self._vcsSwitch) |
261 self.vcsSwitchAct.triggered.connect(self._vcsSwitch) |
262 self.actions.append(self.vcsSwitchAct) |
262 self.actions.append(self.vcsSwitchAct) |
263 |
263 |
264 self.vcsTagAct = E5Action( |
264 self.vcsTagAct = E5Action( |
265 self.tr('Tag in repository'), |
265 self.tr('Tag in repository'), |
266 UI.PixmapCache.getIcon("vcsTag.png"), |
266 UI.PixmapCache.getIcon("vcsTag"), |
267 self.tr('&Tag in repository...'), |
267 self.tr('&Tag in repository...'), |
268 0, 0, self, 'git_tag') |
268 0, 0, self, 'git_tag') |
269 self.vcsTagAct.setStatusTip(self.tr( |
269 self.vcsTagAct.setStatusTip(self.tr( |
270 'Perform tag operations for the local project' |
270 'Perform tag operations for the local project' |
271 )) |
271 )) |
350 self.__gitNotMergedBranchList) |
350 self.__gitNotMergedBranchList) |
351 self.actions.append(self.gitNotMergedBranchListAct) |
351 self.actions.append(self.gitNotMergedBranchListAct) |
352 |
352 |
353 self.gitBranchAct = E5Action( |
353 self.gitBranchAct = E5Action( |
354 self.tr('Branch in repository'), |
354 self.tr('Branch in repository'), |
355 UI.PixmapCache.getIcon("vcsBranch.png"), |
355 UI.PixmapCache.getIcon("vcsBranch"), |
356 self.tr('&Branch in repository...'), |
356 self.tr('&Branch in repository...'), |
357 0, 0, self, 'git_branch') |
357 0, 0, self, 'git_branch') |
358 self.gitBranchAct.setStatusTip(self.tr( |
358 self.gitBranchAct.setStatusTip(self.tr( |
359 'Perform branch operations for the local project' |
359 'Perform branch operations for the local project' |
360 )) |
360 )) |
394 self.gitShowBranchAct.triggered.connect(self.__gitShowBranch) |
394 self.gitShowBranchAct.triggered.connect(self.__gitShowBranch) |
395 self.actions.append(self.gitShowBranchAct) |
395 self.actions.append(self.gitShowBranchAct) |
396 |
396 |
397 self.vcsRevertAct = E5Action( |
397 self.vcsRevertAct = E5Action( |
398 self.tr('Revert changes'), |
398 self.tr('Revert changes'), |
399 UI.PixmapCache.getIcon("vcsRevert.png"), |
399 UI.PixmapCache.getIcon("vcsRevert"), |
400 self.tr('Re&vert changes'), |
400 self.tr('Re&vert changes'), |
401 0, 0, self, 'git_revert') |
401 0, 0, self, 'git_revert') |
402 self.vcsRevertAct.setStatusTip(self.tr( |
402 self.vcsRevertAct.setStatusTip(self.tr( |
403 'Revert all changes made to the local project' |
403 'Revert all changes made to the local project' |
404 )) |
404 )) |
409 self.vcsRevertAct.triggered.connect(self.__gitRevert) |
409 self.vcsRevertAct.triggered.connect(self.__gitRevert) |
410 self.actions.append(self.vcsRevertAct) |
410 self.actions.append(self.vcsRevertAct) |
411 |
411 |
412 self.gitUnstageAct = E5Action( |
412 self.gitUnstageAct = E5Action( |
413 self.tr('Unstage changes'), |
413 self.tr('Unstage changes'), |
414 UI.PixmapCache.getIcon("vcsRevert.png"), |
414 UI.PixmapCache.getIcon("vcsRevert"), |
415 self.tr('&Unstage changes'), |
415 self.tr('&Unstage changes'), |
416 0, 0, self, 'git_revert') |
416 0, 0, self, 'git_revert') |
417 self.gitUnstageAct.setStatusTip(self.tr( |
417 self.gitUnstageAct.setStatusTip(self.tr( |
418 'Unstage all changes made to the local project' |
418 'Unstage all changes made to the local project' |
419 )) |
419 )) |
424 self.gitUnstageAct.triggered.connect(self.__gitUnstage) |
424 self.gitUnstageAct.triggered.connect(self.__gitUnstage) |
425 self.actions.append(self.gitUnstageAct) |
425 self.actions.append(self.gitUnstageAct) |
426 |
426 |
427 self.vcsMergeAct = E5Action( |
427 self.vcsMergeAct = E5Action( |
428 self.tr('Merge'), |
428 self.tr('Merge'), |
429 UI.PixmapCache.getIcon("vcsMerge.png"), |
429 UI.PixmapCache.getIcon("vcsMerge"), |
430 self.tr('Mer&ge changes...'), |
430 self.tr('Mer&ge changes...'), |
431 0, 0, self, 'git_merge') |
431 0, 0, self, 'git_merge') |
432 self.vcsMergeAct.setStatusTip(self.tr( |
432 self.vcsMergeAct.setStatusTip(self.tr( |
433 'Merge changes into the local project' |
433 'Merge changes into the local project' |
434 )) |
434 )) |
630 self.__gitRemoteCredentials) |
630 self.__gitRemoteCredentials) |
631 self.actions.append(self.gitRemoteCredentialsAct) |
631 self.actions.append(self.gitRemoteCredentialsAct) |
632 |
632 |
633 self.gitCherryPickAct = E5Action( |
633 self.gitCherryPickAct = E5Action( |
634 self.tr('Copy Commits'), |
634 self.tr('Copy Commits'), |
635 UI.PixmapCache.getIcon("vcsGraft.png"), |
635 UI.PixmapCache.getIcon("vcsGraft"), |
636 self.tr('Copy Commits'), |
636 self.tr('Copy Commits'), |
637 0, 0, self, 'git_cherrypick') |
637 0, 0, self, 'git_cherrypick') |
638 self.gitCherryPickAct.setStatusTip(self.tr( |
638 self.gitCherryPickAct.setStatusTip(self.tr( |
639 'Copies commits into the current branch' |
639 'Copies commits into the current branch' |
640 )) |
640 )) |
1081 self.gitBisectResetAct.triggered.connect(self.__gitBisectReset) |
1081 self.gitBisectResetAct.triggered.connect(self.__gitBisectReset) |
1082 self.actions.append(self.gitBisectResetAct) |
1082 self.actions.append(self.gitBisectResetAct) |
1083 |
1083 |
1084 self.gitBisectLogBrowserAct = E5Action( |
1084 self.gitBisectLogBrowserAct = E5Action( |
1085 self.tr('Show bisect log browser'), |
1085 self.tr('Show bisect log browser'), |
1086 UI.PixmapCache.getIcon("vcsLog.png"), |
1086 UI.PixmapCache.getIcon("vcsLog"), |
1087 self.tr('Show bisect log browser'), |
1087 self.tr('Show bisect log browser'), |
1088 0, 0, self, 'git_bisect_log_browser') |
1088 0, 0, self, 'git_bisect_log_browser') |
1089 self.gitBisectLogBrowserAct.setStatusTip(self.tr( |
1089 self.gitBisectLogBrowserAct.setStatusTip(self.tr( |
1090 'Show a dialog to browse the bisect log of the local project' |
1090 'Show a dialog to browse the bisect log of the local project' |
1091 )) |
1091 )) |
1422 bisectMenu.addAction(self.gitBisectEditReplayAct) |
1422 bisectMenu.addAction(self.gitBisectEditReplayAct) |
1423 bisectMenu.addAction(self.gitBisectReplayAct) |
1423 bisectMenu.addAction(self.gitBisectReplayAct) |
1424 self.subMenus.append(bisectMenu) |
1424 self.subMenus.append(bisectMenu) |
1425 |
1425 |
1426 tagsMenu = QMenu(self.tr("Tags"), menu) |
1426 tagsMenu = QMenu(self.tr("Tags"), menu) |
1427 tagsMenu.setIcon(UI.PixmapCache.getIcon("vcsTag.png")) |
1427 tagsMenu.setIcon(UI.PixmapCache.getIcon("vcsTag")) |
1428 tagsMenu.setTearOffEnabled(True) |
1428 tagsMenu.setTearOffEnabled(True) |
1429 tagsMenu.addAction(self.vcsTagAct) |
1429 tagsMenu.addAction(self.vcsTagAct) |
1430 tagsMenu.addAction(self.gitTagListAct) |
1430 tagsMenu.addAction(self.gitTagListAct) |
1431 tagsMenu.addAction(self.gitDescribeTagAct) |
1431 tagsMenu.addAction(self.gitDescribeTagAct) |
1432 self.subMenus.append(tagsMenu) |
1432 self.subMenus.append(tagsMenu) |
1433 |
1433 |
1434 branchesMenu = QMenu(self.tr("Branches"), menu) |
1434 branchesMenu = QMenu(self.tr("Branches"), menu) |
1435 branchesMenu.setIcon(UI.PixmapCache.getIcon("vcsBranch.png")) |
1435 branchesMenu.setIcon(UI.PixmapCache.getIcon("vcsBranch")) |
1436 branchesMenu.setTearOffEnabled(True) |
1436 branchesMenu.setTearOffEnabled(True) |
1437 branchesMenu.addAction(self.gitBranchAct) |
1437 branchesMenu.addAction(self.gitBranchAct) |
1438 branchesMenu.addSeparator() |
1438 branchesMenu.addSeparator() |
1439 branchesMenu.addAction(self.gitBranchListAct) |
1439 branchesMenu.addAction(self.gitBranchListAct) |
1440 branchesMenu.addAction(self.gitMergedBranchListAct) |
1440 branchesMenu.addAction(self.gitMergedBranchListAct) |
1463 remotesMenu.addAction(self.gitRemoteCredentialsAct) |
1463 remotesMenu.addAction(self.gitRemoteCredentialsAct) |
1464 remotesMenu.addAction(self.gitRemoteRemoveAct) |
1464 remotesMenu.addAction(self.gitRemoteRemoveAct) |
1465 remotesMenu.addAction(self.gitRemotePruneAct) |
1465 remotesMenu.addAction(self.gitRemotePruneAct) |
1466 |
1466 |
1467 cherrypickMenu = QMenu(self.tr("Cherry-pick"), menu) |
1467 cherrypickMenu = QMenu(self.tr("Cherry-pick"), menu) |
1468 cherrypickMenu.setIcon(UI.PixmapCache.getIcon("vcsGraft.png")) |
1468 cherrypickMenu.setIcon(UI.PixmapCache.getIcon("vcsGraft")) |
1469 cherrypickMenu.setTearOffEnabled(True) |
1469 cherrypickMenu.setTearOffEnabled(True) |
1470 cherrypickMenu.addAction(self.gitCherryPickAct) |
1470 cherrypickMenu.addAction(self.gitCherryPickAct) |
1471 cherrypickMenu.addAction(self.gitCherryPickContinueAct) |
1471 cherrypickMenu.addAction(self.gitCherryPickContinueAct) |
1472 cherrypickMenu.addAction(self.gitCherryPickQuitAct) |
1472 cherrypickMenu.addAction(self.gitCherryPickQuitAct) |
1473 cherrypickMenu.addAction(self.gitCherryPickAbortAct) |
1473 cherrypickMenu.addAction(self.gitCherryPickAbortAct) |