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