191 ########################################################################### |
202 ########################################################################### |
192 |
203 |
193 def _addVCSMenu(self, mainMenu): |
204 def _addVCSMenu(self, mainMenu): |
194 """ |
205 """ |
195 Protected method used to add the VCS menu to all project browsers. |
206 Protected method used to add the VCS menu to all project browsers. |
196 |
207 |
197 @param mainMenu reference to the menu to be amended |
208 @param mainMenu reference to the menu to be amended |
198 """ |
209 """ |
199 self.vcsMenuActions = [] |
210 self.vcsMenuActions = [] |
200 self.vcsAddMenuActions = [] |
211 self.vcsAddMenuActions = [] |
201 |
212 |
202 menu = QMenu(self.tr("Version Control")) |
213 menu = QMenu(self.tr("Version Control")) |
203 |
214 |
204 act = menu.addAction( |
215 act = menu.addAction( |
205 UI.PixmapCache.getIcon( |
216 UI.PixmapCache.getIcon( |
206 os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.svg")), |
217 os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.svg") |
207 self.vcs.vcsName(), self._VCSInfoDisplay) |
218 ), |
|
219 self.vcs.vcsName(), |
|
220 self._VCSInfoDisplay, |
|
221 ) |
208 font = act.font() |
222 font = act.font() |
209 font.setBold(True) |
223 font.setBold(True) |
210 act.setFont(font) |
224 act.setFont(font) |
211 menu.addSeparator() |
225 menu.addSeparator() |
212 |
226 |
213 act = menu.addAction( |
227 act = menu.addAction( |
214 UI.PixmapCache.getIcon("vcsUpdate"), |
228 UI.PixmapCache.getIcon("vcsUpdate"), |
215 self.tr('Update from repository'), self._VCSUpdate) |
229 self.tr("Update from repository"), |
|
230 self._VCSUpdate, |
|
231 ) |
216 self.vcsMenuActions.append(act) |
232 self.vcsMenuActions.append(act) |
217 act = menu.addAction( |
233 act = menu.addAction( |
218 UI.PixmapCache.getIcon("vcsCommit"), |
234 UI.PixmapCache.getIcon("vcsCommit"), |
219 self.tr('Commit changes to repository...'), |
235 self.tr("Commit changes to repository..."), |
220 self._VCSCommit) |
236 self._VCSCommit, |
221 self.vcsMenuActions.append(act) |
237 ) |
222 menu.addSeparator() |
238 self.vcsMenuActions.append(act) |
223 act = menu.addAction( |
239 menu.addSeparator() |
224 UI.PixmapCache.getIcon("vcsAdd"), |
240 act = menu.addAction( |
225 self.tr('Add to repository'), |
241 UI.PixmapCache.getIcon("vcsAdd"), self.tr("Add to repository"), self._VCSAdd |
226 self._VCSAdd) |
242 ) |
227 self.vcsAddMenuActions.append(act) |
243 self.vcsAddMenuActions.append(act) |
228 if 1 in self.browser.specialMenuEntries: |
244 if 1 in self.browser.specialMenuEntries: |
229 self.vcsMenuAddTree = menu.addAction( |
245 self.vcsMenuAddTree = menu.addAction( |
230 UI.PixmapCache.getIcon("vcsAdd"), |
246 UI.PixmapCache.getIcon("vcsAdd"), |
231 self.tr('Add tree to repository'), |
247 self.tr("Add tree to repository"), |
232 self._VCSAddTree) |
248 self._VCSAddTree, |
|
249 ) |
233 self.vcsAddMenuActions.append(self.vcsMenuAddTree) |
250 self.vcsAddMenuActions.append(self.vcsMenuAddTree) |
234 act = menu.addAction( |
251 act = menu.addAction( |
235 UI.PixmapCache.getIcon("vcsRemove"), |
252 UI.PixmapCache.getIcon("vcsRemove"), |
236 self.tr('Remove from repository (and disk)'), |
253 self.tr("Remove from repository (and disk)"), |
237 self._VCSRemove) |
254 self._VCSRemove, |
238 self.vcsMenuActions.append(act) |
255 ) |
239 menu.addSeparator() |
256 self.vcsMenuActions.append(act) |
240 act = menu.addAction( |
257 menu.addSeparator() |
241 self.tr('Copy'), self.__SVNCopy) |
258 act = menu.addAction(self.tr("Copy"), self.__SVNCopy) |
242 self.vcsMenuActions.append(act) |
259 self.vcsMenuActions.append(act) |
243 act = menu.addAction(self.tr('Move'), self.__SVNMove) |
260 act = menu.addAction(self.tr("Move"), self.__SVNMove) |
244 self.vcsMenuActions.append(act) |
261 self.vcsMenuActions.append(act) |
245 if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0): |
262 if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0): |
246 menu.addSeparator() |
263 menu.addSeparator() |
247 act = menu.addAction( |
264 act = menu.addAction( |
248 self.tr("Add to Changelist"), |
265 self.tr("Add to Changelist"), self.__SVNAddToChangelist |
249 self.__SVNAddToChangelist) |
266 ) |
250 self.vcsMenuActions.append(act) |
267 self.vcsMenuActions.append(act) |
251 act = menu.addAction( |
268 act = menu.addAction( |
252 self.tr("Remove from Changelist"), |
269 self.tr("Remove from Changelist"), self.__SVNRemoveFromChangelist |
253 self.__SVNRemoveFromChangelist) |
270 ) |
254 self.vcsMenuActions.append(act) |
271 self.vcsMenuActions.append(act) |
255 menu.addSeparator() |
272 menu.addSeparator() |
256 act = menu.addAction( |
273 act = menu.addAction( |
257 UI.PixmapCache.getIcon("vcsLog"), |
274 UI.PixmapCache.getIcon("vcsLog"), |
258 self.tr('Show log browser'), self._VCSLogBrowser) |
275 self.tr("Show log browser"), |
259 self.vcsMenuActions.append(act) |
276 self._VCSLogBrowser, |
260 menu.addSeparator() |
277 ) |
261 act = menu.addAction( |
278 self.vcsMenuActions.append(act) |
262 UI.PixmapCache.getIcon("vcsStatus"), |
279 menu.addSeparator() |
263 self.tr('Show status'), self._VCSStatus) |
280 act = menu.addAction( |
|
281 UI.PixmapCache.getIcon("vcsStatus"), self.tr("Show status"), self._VCSStatus |
|
282 ) |
264 self.vcsMenuActions.append(act) |
283 self.vcsMenuActions.append(act) |
265 act = menu.addAction( |
284 act = menu.addAction( |
266 UI.PixmapCache.getIcon("vcsRepo"), |
285 UI.PixmapCache.getIcon("vcsRepo"), |
267 self.tr('Show repository info'), self.__SVNInfo) |
286 self.tr("Show repository info"), |
268 self.vcsMenuActions.append(act) |
287 self.__SVNInfo, |
269 menu.addSeparator() |
288 ) |
270 act = menu.addAction( |
289 self.vcsMenuActions.append(act) |
271 UI.PixmapCache.getIcon("vcsDiff"), |
290 menu.addSeparator() |
272 self.tr('Show differences'), self._VCSDiff) |
291 act = menu.addAction( |
|
292 UI.PixmapCache.getIcon("vcsDiff"), |
|
293 self.tr("Show differences"), |
|
294 self._VCSDiff, |
|
295 ) |
273 self.vcsMenuActions.append(act) |
296 self.vcsMenuActions.append(act) |
274 act = menu.addAction( |
297 act = menu.addAction( |
275 UI.PixmapCache.getIcon("vcsSbsDiff"), |
298 UI.PixmapCache.getIcon("vcsSbsDiff"), |
276 self.tr('Show differences side-by-side'), self.__SVNSbsDiff) |
299 self.tr("Show differences side-by-side"), |
277 self.vcsMenuActions.append(act) |
300 self.__SVNSbsDiff, |
278 act = menu.addAction( |
301 ) |
279 UI.PixmapCache.getIcon("vcsDiff"), |
302 self.vcsMenuActions.append(act) |
280 self.tr('Show differences (extended)'), |
303 act = menu.addAction( |
281 self.__SVNExtendedDiff) |
304 UI.PixmapCache.getIcon("vcsDiff"), |
|
305 self.tr("Show differences (extended)"), |
|
306 self.__SVNExtendedDiff, |
|
307 ) |
282 self.vcsMenuActions.append(act) |
308 self.vcsMenuActions.append(act) |
283 act = menu.addAction( |
309 act = menu.addAction( |
284 UI.PixmapCache.getIcon("vcsSbsDiff"), |
310 UI.PixmapCache.getIcon("vcsSbsDiff"), |
285 self.tr('Show differences side-by-side (extended)'), |
311 self.tr("Show differences side-by-side (extended)"), |
286 self.__SVNSbsExtendedDiff) |
312 self.__SVNSbsExtendedDiff, |
287 self.vcsMenuActions.append(act) |
313 ) |
288 act = menu.addAction( |
314 self.vcsMenuActions.append(act) |
289 UI.PixmapCache.getIcon("vcsDiff"), |
315 act = menu.addAction( |
290 self.tr('Show differences (URLs)'), |
316 UI.PixmapCache.getIcon("vcsDiff"), |
291 self.__SVNUrlDiff) |
317 self.tr("Show differences (URLs)"), |
292 self.vcsMenuActions.append(act) |
318 self.__SVNUrlDiff, |
293 self.blameAct = menu.addAction( |
319 ) |
294 self.tr('Show annotated file'), |
320 self.vcsMenuActions.append(act) |
295 self.__SVNBlame) |
321 self.blameAct = menu.addAction(self.tr("Show annotated file"), self.__SVNBlame) |
296 self.vcsMenuActions.append(self.blameAct) |
322 self.vcsMenuActions.append(self.blameAct) |
297 menu.addSeparator() |
323 menu.addSeparator() |
298 act = menu.addAction( |
324 act = menu.addAction( |
299 UI.PixmapCache.getIcon("vcsRevert"), |
325 UI.PixmapCache.getIcon("vcsRevert"), |
300 self.tr('Revert changes'), self._VCSRevert) |
326 self.tr("Revert changes"), |
301 self.vcsMenuActions.append(act) |
327 self._VCSRevert, |
302 act = menu.addAction( |
328 ) |
303 UI.PixmapCache.getIcon("vcsMerge"), |
329 self.vcsMenuActions.append(act) |
304 self.tr('Merge changes'), self._VCSMerge) |
330 act = menu.addAction( |
305 self.vcsMenuActions.append(act) |
331 UI.PixmapCache.getIcon("vcsMerge"), self.tr("Merge changes"), self._VCSMerge |
306 act = menu.addAction( |
332 ) |
307 self.tr('Conflicts resolved'), self.__SVNResolve) |
333 self.vcsMenuActions.append(act) |
308 self.vcsMenuActions.append(act) |
334 act = menu.addAction(self.tr("Conflicts resolved"), self.__SVNResolve) |
309 menu.addSeparator() |
335 self.vcsMenuActions.append(act) |
310 act = menu.addAction( |
336 menu.addSeparator() |
311 UI.PixmapCache.getIcon("vcsLock"), |
337 act = menu.addAction( |
312 self.tr('Lock'), self.__SVNLock) |
338 UI.PixmapCache.getIcon("vcsLock"), self.tr("Lock"), self.__SVNLock |
|
339 ) |
|
340 self.vcsMenuActions.append(act) |
|
341 act = menu.addAction( |
|
342 UI.PixmapCache.getIcon("vcsUnlock"), self.tr("Unlock"), self.__SVNUnlock |
|
343 ) |
313 self.vcsMenuActions.append(act) |
344 self.vcsMenuActions.append(act) |
314 act = menu.addAction( |
345 act = menu.addAction( |
315 UI.PixmapCache.getIcon("vcsUnlock"), |
346 UI.PixmapCache.getIcon("vcsUnlock"), |
316 self.tr('Unlock'), self.__SVNUnlock) |
347 self.tr("Break Lock"), |
|
348 self.__SVNBreakLock, |
|
349 ) |
317 self.vcsMenuActions.append(act) |
350 self.vcsMenuActions.append(act) |
318 act = menu.addAction( |
351 act = menu.addAction( |
319 UI.PixmapCache.getIcon("vcsUnlock"), |
352 UI.PixmapCache.getIcon("vcsUnlock"), |
320 self.tr('Break Lock'), self.__SVNBreakLock) |
353 self.tr("Steal Lock"), |
321 self.vcsMenuActions.append(act) |
354 self.__SVNStealLock, |
322 act = menu.addAction( |
355 ) |
323 UI.PixmapCache.getIcon("vcsUnlock"), |
356 self.vcsMenuActions.append(act) |
324 self.tr('Steal Lock'), self.__SVNStealLock) |
357 menu.addSeparator() |
325 self.vcsMenuActions.append(act) |
358 act = menu.addAction(self.tr("Set Property"), self.__SVNSetProp) |
326 menu.addSeparator() |
359 self.vcsMenuActions.append(act) |
327 act = menu.addAction(self.tr('Set Property'), self.__SVNSetProp) |
360 act = menu.addAction(self.tr("List Properties"), self.__SVNListProps) |
328 self.vcsMenuActions.append(act) |
361 self.vcsMenuActions.append(act) |
329 act = menu.addAction( |
362 act = menu.addAction(self.tr("Delete Property"), self.__SVNDelProp) |
330 self.tr('List Properties'), self.__SVNListProps) |
363 self.vcsMenuActions.append(act) |
331 self.vcsMenuActions.append(act) |
364 menu.addSeparator() |
332 act = menu.addAction(self.tr('Delete Property'), self.__SVNDelProp) |
365 menu.addAction( |
333 self.vcsMenuActions.append(act) |
366 self.tr("Select all local file entries"), self.browser.selectLocalEntries |
334 menu.addSeparator() |
367 ) |
335 menu.addAction(self.tr('Select all local file entries'), |
368 menu.addAction( |
336 self.browser.selectLocalEntries) |
369 self.tr("Select all versioned file entries"), self.browser.selectVCSEntries |
337 menu.addAction(self.tr('Select all versioned file entries'), |
370 ) |
338 self.browser.selectVCSEntries) |
371 menu.addAction( |
339 menu.addAction(self.tr('Select all local directory entries'), |
372 self.tr("Select all local directory entries"), |
340 self.browser.selectLocalDirEntries) |
373 self.browser.selectLocalDirEntries, |
341 menu.addAction(self.tr('Select all versioned directory entries'), |
374 ) |
342 self.browser.selectVCSDirEntries) |
375 menu.addAction( |
|
376 self.tr("Select all versioned directory entries"), |
|
377 self.browser.selectVCSDirEntries, |
|
378 ) |
343 menu.addSeparator() |
379 menu.addSeparator() |
344 menu.addAction(self.tr("Configure..."), self.__SVNConfigure) |
380 menu.addAction(self.tr("Configure..."), self.__SVNConfigure) |
345 |
381 |
346 mainMenu.addSeparator() |
382 mainMenu.addSeparator() |
347 mainMenu.addMenu(menu) |
383 mainMenu.addMenu(menu) |
348 self.menu = menu |
384 self.menu = menu |
349 |
385 |
350 def _addVCSMenuMulti(self, mainMenu): |
386 def _addVCSMenuMulti(self, mainMenu): |
351 """ |
387 """ |
352 Protected method used to add the VCS menu for multi selection to all |
388 Protected method used to add the VCS menu for multi selection to all |
353 project browsers. |
389 project browsers. |
354 |
390 |
355 @param mainMenu reference to the menu to be amended |
391 @param mainMenu reference to the menu to be amended |
356 """ |
392 """ |
357 self.vcsMultiMenuActions = [] |
393 self.vcsMultiMenuActions = [] |
358 self.vcsAddMultiMenuActions = [] |
394 self.vcsAddMultiMenuActions = [] |
359 |
395 |
360 menu = QMenu(self.tr("Version Control")) |
396 menu = QMenu(self.tr("Version Control")) |
361 |
397 |
362 act = menu.addAction( |
398 act = menu.addAction( |
363 UI.PixmapCache.getIcon( |
399 UI.PixmapCache.getIcon( |
364 os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.svg")), |
400 os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.svg") |
365 self.vcs.vcsName(), self._VCSInfoDisplay) |
401 ), |
|
402 self.vcs.vcsName(), |
|
403 self._VCSInfoDisplay, |
|
404 ) |
366 font = act.font() |
405 font = act.font() |
367 font.setBold(True) |
406 font.setBold(True) |
368 act.setFont(font) |
407 act.setFont(font) |
369 menu.addSeparator() |
408 menu.addSeparator() |
370 |
409 |
371 act = menu.addAction( |
410 act = menu.addAction( |
372 UI.PixmapCache.getIcon("vcsUpdate"), |
411 UI.PixmapCache.getIcon("vcsUpdate"), |
373 self.tr('Update from repository'), self._VCSUpdate) |
412 self.tr("Update from repository"), |
|
413 self._VCSUpdate, |
|
414 ) |
374 self.vcsMultiMenuActions.append(act) |
415 self.vcsMultiMenuActions.append(act) |
375 act = menu.addAction( |
416 act = menu.addAction( |
376 UI.PixmapCache.getIcon("vcsCommit"), |
417 UI.PixmapCache.getIcon("vcsCommit"), |
377 self.tr('Commit changes to repository...'), |
418 self.tr("Commit changes to repository..."), |
378 self._VCSCommit) |
419 self._VCSCommit, |
379 self.vcsMultiMenuActions.append(act) |
420 ) |
380 menu.addSeparator() |
421 self.vcsMultiMenuActions.append(act) |
381 act = menu.addAction( |
422 menu.addSeparator() |
382 UI.PixmapCache.getIcon("vcsAdd"), |
423 act = menu.addAction( |
383 self.tr('Add to repository'), self._VCSAdd) |
424 UI.PixmapCache.getIcon("vcsAdd"), self.tr("Add to repository"), self._VCSAdd |
|
425 ) |
384 self.vcsAddMultiMenuActions.append(act) |
426 self.vcsAddMultiMenuActions.append(act) |
385 if 1 in self.browser.specialMenuEntries: |
427 if 1 in self.browser.specialMenuEntries: |
386 self.vcsMultiMenuAddTree = menu.addAction( |
428 self.vcsMultiMenuAddTree = menu.addAction( |
387 UI.PixmapCache.getIcon("vcsAdd"), |
429 UI.PixmapCache.getIcon("vcsAdd"), |
388 self.tr('Add tree to repository'), self._VCSAddTree) |
430 self.tr("Add tree to repository"), |
|
431 self._VCSAddTree, |
|
432 ) |
389 self.vcsAddMultiMenuActions.append(self.vcsMultiMenuAddTree) |
433 self.vcsAddMultiMenuActions.append(self.vcsMultiMenuAddTree) |
390 act = menu.addAction( |
434 act = menu.addAction( |
391 UI.PixmapCache.getIcon("vcsRemove"), |
435 UI.PixmapCache.getIcon("vcsRemove"), |
392 self.tr('Remove from repository (and disk)'), |
436 self.tr("Remove from repository (and disk)"), |
393 self._VCSRemove) |
437 self._VCSRemove, |
|
438 ) |
394 self.vcsMultiMenuActions.append(act) |
439 self.vcsMultiMenuActions.append(act) |
395 if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0): |
440 if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0): |
396 menu.addSeparator() |
441 menu.addSeparator() |
397 act = menu.addAction( |
442 act = menu.addAction( |
398 self.tr("Add to Changelist"), |
443 self.tr("Add to Changelist"), self.__SVNAddToChangelist |
399 self.__SVNAddToChangelist) |
444 ) |
400 self.vcsMenuActions.append(act) |
445 self.vcsMenuActions.append(act) |
401 act = menu.addAction( |
446 act = menu.addAction( |
402 self.tr("Remove from Changelist"), |
447 self.tr("Remove from Changelist"), self.__SVNRemoveFromChangelist |
403 self.__SVNRemoveFromChangelist) |
448 ) |
404 self.vcsMenuActions.append(act) |
449 self.vcsMenuActions.append(act) |
405 menu.addSeparator() |
450 menu.addSeparator() |
406 act = menu.addAction( |
451 act = menu.addAction( |
407 UI.PixmapCache.getIcon("vcsStatus"), |
452 UI.PixmapCache.getIcon("vcsStatus"), self.tr("Show status"), self._VCSStatus |
408 self.tr('Show status'), self._VCSStatus) |
453 ) |
409 self.vcsMultiMenuActions.append(act) |
454 self.vcsMultiMenuActions.append(act) |
410 menu.addSeparator() |
455 menu.addSeparator() |
411 act = menu.addAction( |
456 act = menu.addAction( |
412 UI.PixmapCache.getIcon("vcsDiff"), |
457 UI.PixmapCache.getIcon("vcsDiff"), |
413 self.tr('Show differences'), self._VCSDiff) |
458 self.tr("Show differences"), |
414 self.vcsMultiMenuActions.append(act) |
459 self._VCSDiff, |
415 act = menu.addAction( |
460 ) |
416 UI.PixmapCache.getIcon("vcsDiff"), |
461 self.vcsMultiMenuActions.append(act) |
417 self.tr('Show differences (extended)'), |
462 act = menu.addAction( |
418 self.__SVNExtendedDiff) |
463 UI.PixmapCache.getIcon("vcsDiff"), |
419 self.vcsMultiMenuActions.append(act) |
464 self.tr("Show differences (extended)"), |
420 act = menu.addAction( |
465 self.__SVNExtendedDiff, |
421 UI.PixmapCache.getIcon("vcsDiff"), |
466 ) |
422 self.tr('Show differences (URLs)'), |
467 self.vcsMultiMenuActions.append(act) |
423 self.__SVNUrlDiff) |
468 act = menu.addAction( |
|
469 UI.PixmapCache.getIcon("vcsDiff"), |
|
470 self.tr("Show differences (URLs)"), |
|
471 self.__SVNUrlDiff, |
|
472 ) |
424 self.vcsMultiMenuActions.append(act) |
473 self.vcsMultiMenuActions.append(act) |
425 menu.addSeparator() |
474 menu.addSeparator() |
426 act = menu.addAction( |
475 act = menu.addAction( |
427 UI.PixmapCache.getIcon("vcsRevert"), |
476 UI.PixmapCache.getIcon("vcsRevert"), |
428 self.tr('Revert changes'), self._VCSRevert) |
477 self.tr("Revert changes"), |
429 self.vcsMultiMenuActions.append(act) |
478 self._VCSRevert, |
430 act = menu.addAction( |
479 ) |
431 self.tr('Conflicts resolved'), self.__SVNResolve) |
480 self.vcsMultiMenuActions.append(act) |
432 self.vcsMultiMenuActions.append(act) |
481 act = menu.addAction(self.tr("Conflicts resolved"), self.__SVNResolve) |
433 menu.addSeparator() |
482 self.vcsMultiMenuActions.append(act) |
434 act = menu.addAction( |
483 menu.addSeparator() |
435 UI.PixmapCache.getIcon("vcsLock"), |
484 act = menu.addAction( |
436 self.tr('Lock'), self.__SVNLock) |
485 UI.PixmapCache.getIcon("vcsLock"), self.tr("Lock"), self.__SVNLock |
|
486 ) |
|
487 self.vcsMultiMenuActions.append(act) |
|
488 act = menu.addAction( |
|
489 UI.PixmapCache.getIcon("vcsUnlock"), self.tr("Unlock"), self.__SVNUnlock |
|
490 ) |
437 self.vcsMultiMenuActions.append(act) |
491 self.vcsMultiMenuActions.append(act) |
438 act = menu.addAction( |
492 act = menu.addAction( |
439 UI.PixmapCache.getIcon("vcsUnlock"), |
493 UI.PixmapCache.getIcon("vcsUnlock"), |
440 self.tr('Unlock'), self.__SVNUnlock) |
494 self.tr("Break Lock"), |
|
495 self.__SVNBreakLock, |
|
496 ) |
441 self.vcsMultiMenuActions.append(act) |
497 self.vcsMultiMenuActions.append(act) |
442 act = menu.addAction( |
498 act = menu.addAction( |
443 UI.PixmapCache.getIcon("vcsUnlock"), |
499 UI.PixmapCache.getIcon("vcsUnlock"), |
444 self.tr('Break Lock'), self.__SVNBreakLock) |
500 self.tr("Steal Lock"), |
445 self.vcsMultiMenuActions.append(act) |
501 self.__SVNStealLock, |
446 act = menu.addAction( |
502 ) |
447 UI.PixmapCache.getIcon("vcsUnlock"), |
503 self.vcsMultiMenuActions.append(act) |
448 self.tr('Steal Lock'), self.__SVNStealLock) |
504 menu.addSeparator() |
449 self.vcsMultiMenuActions.append(act) |
505 act = menu.addAction(self.tr("Set Property"), self.__SVNSetProp) |
450 menu.addSeparator() |
506 self.vcsMultiMenuActions.append(act) |
451 act = menu.addAction(self.tr('Set Property'), self.__SVNSetProp) |
507 act = menu.addAction(self.tr("List Properties"), self.__SVNListProps) |
452 self.vcsMultiMenuActions.append(act) |
508 self.vcsMultiMenuActions.append(act) |
453 act = menu.addAction( |
509 act = menu.addAction(self.tr("Delete Property"), self.__SVNDelProp) |
454 self.tr('List Properties'), self.__SVNListProps) |
510 self.vcsMultiMenuActions.append(act) |
455 self.vcsMultiMenuActions.append(act) |
511 menu.addSeparator() |
456 act = menu.addAction(self.tr('Delete Property'), self.__SVNDelProp) |
512 menu.addAction( |
457 self.vcsMultiMenuActions.append(act) |
513 self.tr("Select all local file entries"), self.browser.selectLocalEntries |
458 menu.addSeparator() |
514 ) |
459 menu.addAction(self.tr('Select all local file entries'), |
515 menu.addAction( |
460 self.browser.selectLocalEntries) |
516 self.tr("Select all versioned file entries"), self.browser.selectVCSEntries |
461 menu.addAction(self.tr('Select all versioned file entries'), |
517 ) |
462 self.browser.selectVCSEntries) |
518 menu.addAction( |
463 menu.addAction(self.tr('Select all local directory entries'), |
519 self.tr("Select all local directory entries"), |
464 self.browser.selectLocalDirEntries) |
520 self.browser.selectLocalDirEntries, |
465 menu.addAction(self.tr('Select all versioned directory entries'), |
521 ) |
466 self.browser.selectVCSDirEntries) |
522 menu.addAction( |
|
523 self.tr("Select all versioned directory entries"), |
|
524 self.browser.selectVCSDirEntries, |
|
525 ) |
467 menu.addSeparator() |
526 menu.addSeparator() |
468 menu.addAction(self.tr("Configure..."), self.__SVNConfigure) |
527 menu.addAction(self.tr("Configure..."), self.__SVNConfigure) |
469 |
528 |
470 mainMenu.addSeparator() |
529 mainMenu.addSeparator() |
471 mainMenu.addMenu(menu) |
530 mainMenu.addMenu(menu) |
472 self.menuMulti = menu |
531 self.menuMulti = menu |
473 |
532 |
474 def _addVCSMenuBack(self, mainMenu): |
533 def _addVCSMenuBack(self, mainMenu): |
475 """ |
534 """ |
476 Protected method used to add the VCS menu to all project browsers. |
535 Protected method used to add the VCS menu to all project browsers. |
477 |
536 |
478 @param mainMenu reference to the menu to be amended |
537 @param mainMenu reference to the menu to be amended |
479 """ |
538 """ |
480 menu = QMenu(self.tr("Version Control")) |
539 menu = QMenu(self.tr("Version Control")) |
481 |
540 |
482 act = menu.addAction( |
541 act = menu.addAction( |
483 UI.PixmapCache.getIcon( |
542 UI.PixmapCache.getIcon( |
484 os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.svg")), |
543 os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.svg") |
485 self.vcs.vcsName(), self._VCSInfoDisplay) |
544 ), |
|
545 self.vcs.vcsName(), |
|
546 self._VCSInfoDisplay, |
|
547 ) |
486 font = act.font() |
548 font = act.font() |
487 font.setBold(True) |
549 font.setBold(True) |
488 act.setFont(font) |
550 act.setFont(font) |
489 menu.addSeparator() |
551 menu.addSeparator() |
490 |
552 |
491 menu.addAction(self.tr('Select all local file entries'), |
553 menu.addAction( |
492 self.browser.selectLocalEntries) |
554 self.tr("Select all local file entries"), self.browser.selectLocalEntries |
493 menu.addAction(self.tr('Select all versioned file entries'), |
555 ) |
494 self.browser.selectVCSEntries) |
556 menu.addAction( |
495 menu.addAction(self.tr('Select all local directory entries'), |
557 self.tr("Select all versioned file entries"), self.browser.selectVCSEntries |
496 self.browser.selectLocalDirEntries) |
558 ) |
497 menu.addAction(self.tr('Select all versioned directory entries'), |
559 menu.addAction( |
498 self.browser.selectVCSDirEntries) |
560 self.tr("Select all local directory entries"), |
|
561 self.browser.selectLocalDirEntries, |
|
562 ) |
|
563 menu.addAction( |
|
564 self.tr("Select all versioned directory entries"), |
|
565 self.browser.selectVCSDirEntries, |
|
566 ) |
499 menu.addSeparator() |
567 menu.addSeparator() |
500 menu.addAction(self.tr("Configure..."), self.__SVNConfigure) |
568 menu.addAction(self.tr("Configure..."), self.__SVNConfigure) |
501 |
569 |
502 mainMenu.addSeparator() |
570 mainMenu.addSeparator() |
503 mainMenu.addMenu(menu) |
571 mainMenu.addMenu(menu) |
504 self.menuBack = menu |
572 self.menuBack = menu |
505 |
573 |
506 def _addVCSMenuDir(self, mainMenu): |
574 def _addVCSMenuDir(self, mainMenu): |
507 """ |
575 """ |
508 Protected method used to add the VCS menu to all project browsers. |
576 Protected method used to add the VCS menu to all project browsers. |
509 |
577 |
510 @param mainMenu reference to the menu to be amended |
578 @param mainMenu reference to the menu to be amended |
511 """ |
579 """ |
512 if mainMenu is None: |
580 if mainMenu is None: |
513 return |
581 return |
514 |
582 |
515 self.vcsDirMenuActions = [] |
583 self.vcsDirMenuActions = [] |
516 self.vcsAddDirMenuActions = [] |
584 self.vcsAddDirMenuActions = [] |
517 |
585 |
518 menu = QMenu(self.tr("Version Control")) |
586 menu = QMenu(self.tr("Version Control")) |
519 |
587 |
520 act = menu.addAction( |
588 act = menu.addAction( |
521 UI.PixmapCache.getIcon( |
589 UI.PixmapCache.getIcon( |
522 os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.svg")), |
590 os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.svg") |
523 self.vcs.vcsName(), self._VCSInfoDisplay) |
591 ), |
|
592 self.vcs.vcsName(), |
|
593 self._VCSInfoDisplay, |
|
594 ) |
524 font = act.font() |
595 font = act.font() |
525 font.setBold(True) |
596 font.setBold(True) |
526 act.setFont(font) |
597 act.setFont(font) |
527 menu.addSeparator() |
598 menu.addSeparator() |
528 |
599 |
529 act = menu.addAction( |
600 act = menu.addAction( |
530 UI.PixmapCache.getIcon("vcsUpdate"), |
601 UI.PixmapCache.getIcon("vcsUpdate"), |
531 self.tr('Update from repository'), self._VCSUpdate) |
602 self.tr("Update from repository"), |
|
603 self._VCSUpdate, |
|
604 ) |
532 self.vcsDirMenuActions.append(act) |
605 self.vcsDirMenuActions.append(act) |
533 act = menu.addAction( |
606 act = menu.addAction( |
534 UI.PixmapCache.getIcon("vcsCommit"), |
607 UI.PixmapCache.getIcon("vcsCommit"), |
535 self.tr('Commit changes to repository...'), |
608 self.tr("Commit changes to repository..."), |
536 self._VCSCommit) |
609 self._VCSCommit, |
537 self.vcsDirMenuActions.append(act) |
610 ) |
538 menu.addSeparator() |
611 self.vcsDirMenuActions.append(act) |
539 act = menu.addAction( |
612 menu.addSeparator() |
540 UI.PixmapCache.getIcon("vcsAdd"), |
613 act = menu.addAction( |
541 self.tr('Add to repository'), self._VCSAdd) |
614 UI.PixmapCache.getIcon("vcsAdd"), self.tr("Add to repository"), self._VCSAdd |
|
615 ) |
542 self.vcsAddDirMenuActions.append(act) |
616 self.vcsAddDirMenuActions.append(act) |
543 act = menu.addAction( |
617 act = menu.addAction( |
544 UI.PixmapCache.getIcon("vcsRemove"), |
618 UI.PixmapCache.getIcon("vcsRemove"), |
545 self.tr('Remove from repository (and disk)'), |
619 self.tr("Remove from repository (and disk)"), |
546 self._VCSRemove) |
620 self._VCSRemove, |
547 self.vcsDirMenuActions.append(act) |
621 ) |
548 menu.addSeparator() |
622 self.vcsDirMenuActions.append(act) |
549 act = menu.addAction(self.tr('Copy'), self.__SVNCopy) |
623 menu.addSeparator() |
550 self.vcsDirMenuActions.append(act) |
624 act = menu.addAction(self.tr("Copy"), self.__SVNCopy) |
551 act = menu.addAction(self.tr('Move'), self.__SVNMove) |
625 self.vcsDirMenuActions.append(act) |
|
626 act = menu.addAction(self.tr("Move"), self.__SVNMove) |
552 self.vcsDirMenuActions.append(act) |
627 self.vcsDirMenuActions.append(act) |
553 if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0): |
628 if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0): |
554 menu.addSeparator() |
629 menu.addSeparator() |
555 act = menu.addAction( |
630 act = menu.addAction( |
556 self.tr("Add to Changelist"), |
631 self.tr("Add to Changelist"), self.__SVNAddToChangelist |
557 self.__SVNAddToChangelist) |
632 ) |
558 self.vcsMenuActions.append(act) |
633 self.vcsMenuActions.append(act) |
559 act = menu.addAction( |
634 act = menu.addAction( |
560 self.tr("Remove from Changelist"), |
635 self.tr("Remove from Changelist"), self.__SVNRemoveFromChangelist |
561 self.__SVNRemoveFromChangelist) |
636 ) |
562 self.vcsMenuActions.append(act) |
637 self.vcsMenuActions.append(act) |
563 menu.addSeparator() |
638 menu.addSeparator() |
564 act = menu.addAction( |
639 act = menu.addAction( |
565 UI.PixmapCache.getIcon("vcsLog"), |
640 UI.PixmapCache.getIcon("vcsLog"), |
566 self.tr('Show log browser'), self._VCSLogBrowser) |
641 self.tr("Show log browser"), |
567 self.vcsDirMenuActions.append(act) |
642 self._VCSLogBrowser, |
568 menu.addSeparator() |
643 ) |
569 act = menu.addAction( |
644 self.vcsDirMenuActions.append(act) |
570 UI.PixmapCache.getIcon("vcsStatus"), |
645 menu.addSeparator() |
571 self.tr('Show status'), self._VCSStatus) |
646 act = menu.addAction( |
|
647 UI.PixmapCache.getIcon("vcsStatus"), self.tr("Show status"), self._VCSStatus |
|
648 ) |
572 self.vcsDirMenuActions.append(act) |
649 self.vcsDirMenuActions.append(act) |
573 act = menu.addAction( |
650 act = menu.addAction( |
574 UI.PixmapCache.getIcon("vcsRepo"), |
651 UI.PixmapCache.getIcon("vcsRepo"), |
575 self.tr('Show repository info'), self.__SVNInfo) |
652 self.tr("Show repository info"), |
576 self.vcsDirMenuActions.append(act) |
653 self.__SVNInfo, |
577 menu.addSeparator() |
654 ) |
578 act = menu.addAction( |
655 self.vcsDirMenuActions.append(act) |
579 UI.PixmapCache.getIcon("vcsDiff"), |
656 menu.addSeparator() |
580 self.tr('Show differences'), self._VCSDiff) |
657 act = menu.addAction( |
581 self.vcsDirMenuActions.append(act) |
658 UI.PixmapCache.getIcon("vcsDiff"), |
582 act = menu.addAction( |
659 self.tr("Show differences"), |
583 UI.PixmapCache.getIcon("vcsDiff"), |
660 self._VCSDiff, |
584 self.tr('Show differences (extended)'), |
661 ) |
585 self.__SVNExtendedDiff) |
662 self.vcsDirMenuActions.append(act) |
586 self.vcsDirMenuActions.append(act) |
663 act = menu.addAction( |
587 act = menu.addAction( |
664 UI.PixmapCache.getIcon("vcsDiff"), |
588 UI.PixmapCache.getIcon("vcsDiff"), |
665 self.tr("Show differences (extended)"), |
589 self.tr('Show differences (URLs)'), |
666 self.__SVNExtendedDiff, |
590 self.__SVNUrlDiff) |
667 ) |
|
668 self.vcsDirMenuActions.append(act) |
|
669 act = menu.addAction( |
|
670 UI.PixmapCache.getIcon("vcsDiff"), |
|
671 self.tr("Show differences (URLs)"), |
|
672 self.__SVNUrlDiff, |
|
673 ) |
591 self.vcsDirMenuActions.append(act) |
674 self.vcsDirMenuActions.append(act) |
592 menu.addSeparator() |
675 menu.addSeparator() |
593 act = menu.addAction( |
676 act = menu.addAction( |
594 UI.PixmapCache.getIcon("vcsRevert"), |
677 UI.PixmapCache.getIcon("vcsRevert"), |
595 self.tr('Revert changes'), self._VCSRevert) |
678 self.tr("Revert changes"), |
596 self.vcsDirMenuActions.append(act) |
679 self._VCSRevert, |
597 act = menu.addAction( |
680 ) |
598 UI.PixmapCache.getIcon("vcsMerge"), |
681 self.vcsDirMenuActions.append(act) |
599 self.tr('Merge changes'), self._VCSMerge) |
682 act = menu.addAction( |
600 self.vcsDirMenuActions.append(act) |
683 UI.PixmapCache.getIcon("vcsMerge"), self.tr("Merge changes"), self._VCSMerge |
601 act = menu.addAction( |
684 ) |
602 self.tr('Conflicts resolved'), self.__SVNResolve) |
685 self.vcsDirMenuActions.append(act) |
603 self.vcsDirMenuActions.append(act) |
686 act = menu.addAction(self.tr("Conflicts resolved"), self.__SVNResolve) |
604 menu.addSeparator() |
687 self.vcsDirMenuActions.append(act) |
605 act = menu.addAction(self.tr('Set Property'), self.__SVNSetProp) |
688 menu.addSeparator() |
606 self.vcsDirMenuActions.append(act) |
689 act = menu.addAction(self.tr("Set Property"), self.__SVNSetProp) |
607 act = menu.addAction( |
690 self.vcsDirMenuActions.append(act) |
608 self.tr('List Properties'), self.__SVNListProps) |
691 act = menu.addAction(self.tr("List Properties"), self.__SVNListProps) |
609 self.vcsDirMenuActions.append(act) |
692 self.vcsDirMenuActions.append(act) |
610 act = menu.addAction(self.tr('Delete Property'), self.__SVNDelProp) |
693 act = menu.addAction(self.tr("Delete Property"), self.__SVNDelProp) |
611 self.vcsDirMenuActions.append(act) |
694 self.vcsDirMenuActions.append(act) |
612 menu.addSeparator() |
695 menu.addSeparator() |
613 menu.addAction(self.tr('Select all local file entries'), |
696 menu.addAction( |
614 self.browser.selectLocalEntries) |
697 self.tr("Select all local file entries"), self.browser.selectLocalEntries |
615 menu.addAction(self.tr('Select all versioned file entries'), |
698 ) |
616 self.browser.selectVCSEntries) |
699 menu.addAction( |
617 menu.addAction(self.tr('Select all local directory entries'), |
700 self.tr("Select all versioned file entries"), self.browser.selectVCSEntries |
618 self.browser.selectLocalDirEntries) |
701 ) |
619 menu.addAction(self.tr('Select all versioned directory entries'), |
702 menu.addAction( |
620 self.browser.selectVCSDirEntries) |
703 self.tr("Select all local directory entries"), |
|
704 self.browser.selectLocalDirEntries, |
|
705 ) |
|
706 menu.addAction( |
|
707 self.tr("Select all versioned directory entries"), |
|
708 self.browser.selectVCSDirEntries, |
|
709 ) |
621 menu.addSeparator() |
710 menu.addSeparator() |
622 menu.addAction(self.tr("Configure..."), self.__SVNConfigure) |
711 menu.addAction(self.tr("Configure..."), self.__SVNConfigure) |
623 |
712 |
624 mainMenu.addSeparator() |
713 mainMenu.addSeparator() |
625 mainMenu.addMenu(menu) |
714 mainMenu.addMenu(menu) |
626 self.menuDir = menu |
715 self.menuDir = menu |
627 |
716 |
628 def _addVCSMenuDirMulti(self, mainMenu): |
717 def _addVCSMenuDirMulti(self, mainMenu): |
629 """ |
718 """ |
630 Protected method used to add the VCS menu to all project browsers. |
719 Protected method used to add the VCS menu to all project browsers. |
631 |
720 |
632 @param mainMenu reference to the menu to be amended |
721 @param mainMenu reference to the menu to be amended |
633 """ |
722 """ |
634 if mainMenu is None: |
723 if mainMenu is None: |
635 return |
724 return |
636 |
725 |
637 self.vcsDirMultiMenuActions = [] |
726 self.vcsDirMultiMenuActions = [] |
638 self.vcsAddDirMultiMenuActions = [] |
727 self.vcsAddDirMultiMenuActions = [] |
639 |
728 |
640 menu = QMenu(self.tr("Version Control")) |
729 menu = QMenu(self.tr("Version Control")) |
641 |
730 |
642 act = menu.addAction( |
731 act = menu.addAction( |
643 UI.PixmapCache.getIcon( |
732 UI.PixmapCache.getIcon( |
644 os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.svg")), |
733 os.path.join("VcsPlugins", "vcsPySvn", "icons", "pysvn.svg") |
645 self.vcs.vcsName(), self._VCSInfoDisplay) |
734 ), |
|
735 self.vcs.vcsName(), |
|
736 self._VCSInfoDisplay, |
|
737 ) |
646 font = act.font() |
738 font = act.font() |
647 font.setBold(True) |
739 font.setBold(True) |
648 act.setFont(font) |
740 act.setFont(font) |
649 menu.addSeparator() |
741 menu.addSeparator() |
650 |
742 |
651 act = menu.addAction( |
743 act = menu.addAction( |
652 UI.PixmapCache.getIcon("vcsUpdate"), |
744 UI.PixmapCache.getIcon("vcsUpdate"), |
653 self.tr('Update from repository'), self._VCSUpdate) |
745 self.tr("Update from repository"), |
|
746 self._VCSUpdate, |
|
747 ) |
654 self.vcsDirMultiMenuActions.append(act) |
748 self.vcsDirMultiMenuActions.append(act) |
655 act = menu.addAction( |
749 act = menu.addAction( |
656 UI.PixmapCache.getIcon("vcsCommit"), |
750 UI.PixmapCache.getIcon("vcsCommit"), |
657 self.tr('Commit changes to repository...'), |
751 self.tr("Commit changes to repository..."), |
658 self._VCSCommit) |
752 self._VCSCommit, |
659 self.vcsDirMultiMenuActions.append(act) |
753 ) |
660 menu.addSeparator() |
754 self.vcsDirMultiMenuActions.append(act) |
661 act = menu.addAction( |
755 menu.addSeparator() |
662 UI.PixmapCache.getIcon("vcsAdd"), |
756 act = menu.addAction( |
663 self.tr('Add to repository'), self._VCSAdd) |
757 UI.PixmapCache.getIcon("vcsAdd"), self.tr("Add to repository"), self._VCSAdd |
|
758 ) |
664 self.vcsAddDirMultiMenuActions.append(act) |
759 self.vcsAddDirMultiMenuActions.append(act) |
665 act = menu.addAction( |
760 act = menu.addAction( |
666 UI.PixmapCache.getIcon("vcsRemove"), |
761 UI.PixmapCache.getIcon("vcsRemove"), |
667 self.tr('Remove from repository (and disk)'), |
762 self.tr("Remove from repository (and disk)"), |
668 self._VCSRemove) |
763 self._VCSRemove, |
|
764 ) |
669 self.vcsDirMultiMenuActions.append(act) |
765 self.vcsDirMultiMenuActions.append(act) |
670 if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0): |
766 if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0): |
671 menu.addSeparator() |
767 menu.addSeparator() |
672 act = menu.addAction( |
768 act = menu.addAction( |
673 self.tr("Add to Changelist"), |
769 self.tr("Add to Changelist"), self.__SVNAddToChangelist |
674 self.__SVNAddToChangelist) |
770 ) |
675 self.vcsMenuActions.append(act) |
771 self.vcsMenuActions.append(act) |
676 act = menu.addAction( |
772 act = menu.addAction( |
677 self.tr("Remove from Changelist"), |
773 self.tr("Remove from Changelist"), self.__SVNRemoveFromChangelist |
678 self.__SVNRemoveFromChangelist) |
774 ) |
679 self.vcsMenuActions.append(act) |
775 self.vcsMenuActions.append(act) |
680 menu.addSeparator() |
776 menu.addSeparator() |
681 act = menu.addAction( |
777 act = menu.addAction( |
682 UI.PixmapCache.getIcon("vcsStatus"), |
778 UI.PixmapCache.getIcon("vcsStatus"), self.tr("Show status"), self._VCSStatus |
683 self.tr('Show status'), self._VCSStatus) |
779 ) |
684 self.vcsDirMultiMenuActions.append(act) |
780 self.vcsDirMultiMenuActions.append(act) |
685 menu.addSeparator() |
781 menu.addSeparator() |
686 act = menu.addAction( |
782 act = menu.addAction( |
687 UI.PixmapCache.getIcon("vcsDiff"), |
783 UI.PixmapCache.getIcon("vcsDiff"), |
688 self.tr('Show differences'), self._VCSDiff) |
784 self.tr("Show differences"), |
689 self.vcsDirMultiMenuActions.append(act) |
785 self._VCSDiff, |
690 act = menu.addAction( |
786 ) |
691 UI.PixmapCache.getIcon("vcsDiff"), |
787 self.vcsDirMultiMenuActions.append(act) |
692 self.tr('Show differences (extended)'), |
788 act = menu.addAction( |
693 self.__SVNExtendedDiff) |
789 UI.PixmapCache.getIcon("vcsDiff"), |
694 self.vcsDirMultiMenuActions.append(act) |
790 self.tr("Show differences (extended)"), |
695 act = menu.addAction( |
791 self.__SVNExtendedDiff, |
696 UI.PixmapCache.getIcon("vcsDiff"), |
792 ) |
697 self.tr('Show differences (URLs)'), |
793 self.vcsDirMultiMenuActions.append(act) |
698 self.__SVNUrlDiff) |
794 act = menu.addAction( |
|
795 UI.PixmapCache.getIcon("vcsDiff"), |
|
796 self.tr("Show differences (URLs)"), |
|
797 self.__SVNUrlDiff, |
|
798 ) |
699 self.vcsDirMultiMenuActions.append(act) |
799 self.vcsDirMultiMenuActions.append(act) |
700 menu.addSeparator() |
800 menu.addSeparator() |
701 act = menu.addAction( |
801 act = menu.addAction( |
702 UI.PixmapCache.getIcon("vcsRevert"), |
802 UI.PixmapCache.getIcon("vcsRevert"), |
703 self.tr('Revert changes'), self._VCSRevert) |
803 self.tr("Revert changes"), |
704 self.vcsDirMultiMenuActions.append(act) |
804 self._VCSRevert, |
705 act = menu.addAction( |
805 ) |
706 UI.PixmapCache.getIcon("vcsMerge"), |
806 self.vcsDirMultiMenuActions.append(act) |
707 self.tr('Merge changes'), self._VCSMerge) |
807 act = menu.addAction( |
708 self.vcsDirMultiMenuActions.append(act) |
808 UI.PixmapCache.getIcon("vcsMerge"), self.tr("Merge changes"), self._VCSMerge |
709 act = menu.addAction( |
809 ) |
710 self.tr('Conflicts resolved'), self.__SVNResolve) |
810 self.vcsDirMultiMenuActions.append(act) |
711 self.vcsDirMultiMenuActions.append(act) |
811 act = menu.addAction(self.tr("Conflicts resolved"), self.__SVNResolve) |
712 menu.addSeparator() |
812 self.vcsDirMultiMenuActions.append(act) |
713 act = menu.addAction(self.tr('Set Property'), self.__SVNSetProp) |
813 menu.addSeparator() |
714 self.vcsDirMultiMenuActions.append(act) |
814 act = menu.addAction(self.tr("Set Property"), self.__SVNSetProp) |
715 act = menu.addAction( |
815 self.vcsDirMultiMenuActions.append(act) |
716 self.tr('List Properties'), self.__SVNListProps) |
816 act = menu.addAction(self.tr("List Properties"), self.__SVNListProps) |
717 self.vcsDirMultiMenuActions.append(act) |
817 self.vcsDirMultiMenuActions.append(act) |
718 act = menu.addAction(self.tr('Delete Property'), self.__SVNDelProp) |
818 act = menu.addAction(self.tr("Delete Property"), self.__SVNDelProp) |
719 self.vcsDirMultiMenuActions.append(act) |
819 self.vcsDirMultiMenuActions.append(act) |
720 menu.addSeparator() |
820 menu.addSeparator() |
721 menu.addAction(self.tr('Select all local file entries'), |
821 menu.addAction( |
722 self.browser.selectLocalEntries) |
822 self.tr("Select all local file entries"), self.browser.selectLocalEntries |
723 menu.addAction(self.tr('Select all versioned file entries'), |
823 ) |
724 self.browser.selectVCSEntries) |
824 menu.addAction( |
725 menu.addAction(self.tr('Select all local directory entries'), |
825 self.tr("Select all versioned file entries"), self.browser.selectVCSEntries |
726 self.browser.selectLocalDirEntries) |
826 ) |
727 menu.addAction(self.tr('Select all versioned directory entries'), |
827 menu.addAction( |
728 self.browser.selectVCSDirEntries) |
828 self.tr("Select all local directory entries"), |
|
829 self.browser.selectLocalDirEntries, |
|
830 ) |
|
831 menu.addAction( |
|
832 self.tr("Select all versioned directory entries"), |
|
833 self.browser.selectVCSDirEntries, |
|
834 ) |
729 menu.addSeparator() |
835 menu.addSeparator() |
730 menu.addAction(self.tr("Configure..."), self.__SVNConfigure) |
836 menu.addAction(self.tr("Configure..."), self.__SVNConfigure) |
731 |
837 |
732 mainMenu.addSeparator() |
838 mainMenu.addSeparator() |
733 mainMenu.addMenu(menu) |
839 mainMenu.addMenu(menu) |
734 self.menuDirMulti = menu |
840 self.menuDirMulti = menu |
735 |
841 |
736 ########################################################################### |
842 ########################################################################### |
737 # Menu handling methods below |
843 # Menu handling methods below |
738 ########################################################################### |
844 ########################################################################### |
739 |
845 |
740 def __SVNCopy(self): |
846 def __SVNCopy(self): |
741 """ |
847 """ |
742 Private slot called by the context menu to copy the selected file. |
848 Private slot called by the context menu to copy the selected file. |
743 """ |
849 """ |
744 itm = self.browser.currentItem() |
850 itm = self.browser.currentItem() |
745 try: |
851 try: |
746 fn = itm.fileName() |
852 fn = itm.fileName() |
747 except AttributeError: |
853 except AttributeError: |
748 fn = itm.dirName() |
854 fn = itm.dirName() |
749 self.vcs.svnCopy(fn, self.project) |
855 self.vcs.svnCopy(fn, self.project) |
750 |
856 |
751 def __SVNMove(self): |
857 def __SVNMove(self): |
752 """ |
858 """ |
753 Private slot called by the context menu to move the selected file. |
859 Private slot called by the context menu to move the selected file. |
754 """ |
860 """ |
755 itm = self.browser.currentItem() |
861 itm = self.browser.currentItem() |