eric6/Plugins/VcsPlugins/vcsGit/ProjectBrowserHelper.py

changeset 7533
88261c96484b
parent 7518
6dea4abd3097
child 7759
51aa6c6b66f7
equal deleted inserted replaced
7532:1358e9d67a1c 7533:88261c96484b
178 font.setBold(True) 178 font.setBold(True)
179 act.setFont(font) 179 act.setFont(font)
180 menu.addSeparator() 180 menu.addSeparator()
181 181
182 act = menu.addAction( 182 act = menu.addAction(
183 UI.PixmapCache.getIcon("vcsCommit.png"), 183 UI.PixmapCache.getIcon("vcsCommit"),
184 self.tr('Commit changes to repository...'), 184 self.tr('Commit changes to repository...'),
185 self._VCSCommit) 185 self._VCSCommit)
186 self.vcsMenuActions.append(act) 186 self.vcsMenuActions.append(act)
187 menu.addSeparator() 187 menu.addSeparator()
188 act = menu.addAction( 188 act = menu.addAction(
189 UI.PixmapCache.getIcon("vcsAdd.png"), 189 UI.PixmapCache.getIcon("vcsAdd"),
190 self.tr('Add/Stage to repository'), 190 self.tr('Add/Stage to repository'),
191 self._VCSAdd) 191 self._VCSAdd)
192 act = menu.addAction( 192 act = menu.addAction(
193 UI.PixmapCache.getIcon("vcsRevert.png"), 193 UI.PixmapCache.getIcon("vcsRevert"),
194 self.tr('Unstage changes'), 194 self.tr('Unstage changes'),
195 self.__GitUnstage) 195 self.__GitUnstage)
196 self.vcsMenuActions.append(act) 196 self.vcsMenuActions.append(act)
197 menu.addSeparator() 197 menu.addSeparator()
198 act = menu.addAction( 198 act = menu.addAction(
199 UI.PixmapCache.getIcon("vcsRemove.png"), 199 UI.PixmapCache.getIcon("vcsRemove"),
200 self.tr('Remove from repository (and disk)'), 200 self.tr('Remove from repository (and disk)'),
201 self._VCSRemove) 201 self._VCSRemove)
202 self.vcsMenuActions.append(act) 202 self.vcsMenuActions.append(act)
203 act = menu.addAction( 203 act = menu.addAction(
204 UI.PixmapCache.getIcon("vcsRemove.png"), 204 UI.PixmapCache.getIcon("vcsRemove"),
205 self.tr('Remove from repository only'), 205 self.tr('Remove from repository only'),
206 self.__GitForget) 206 self.__GitForget)
207 self.vcsMenuActions.append(act) 207 self.vcsMenuActions.append(act)
208 menu.addSeparator() 208 menu.addSeparator()
209 act = menu.addAction(self.tr('Copy'), self.__GitCopy) 209 act = menu.addAction(self.tr('Copy'), self.__GitCopy)
210 self.vcsMenuActions.append(act) 210 self.vcsMenuActions.append(act)
211 act = menu.addAction(self.tr('Move'), self.__GitMove) 211 act = menu.addAction(self.tr('Move'), self.__GitMove)
212 self.vcsMenuActions.append(act) 212 self.vcsMenuActions.append(act)
213 menu.addSeparator() 213 menu.addSeparator()
214 act = menu.addAction( 214 act = menu.addAction(
215 UI.PixmapCache.getIcon("vcsLog.png"), 215 UI.PixmapCache.getIcon("vcsLog"),
216 self.tr('Show log browser'), self._VCSLogBrowser) 216 self.tr('Show log browser'), self._VCSLogBrowser)
217 self.vcsMenuActions.append(act) 217 self.vcsMenuActions.append(act)
218 menu.addSeparator() 218 menu.addSeparator()
219 act = menu.addAction( 219 act = menu.addAction(
220 UI.PixmapCache.getIcon("vcsStatus.png"), 220 UI.PixmapCache.getIcon("vcsStatus"),
221 self.tr('Show status'), self._VCSStatus) 221 self.tr('Show status'), self._VCSStatus)
222 self.vcsMenuActions.append(act) 222 self.vcsMenuActions.append(act)
223 menu.addSeparator() 223 menu.addSeparator()
224 act = menu.addAction( 224 act = menu.addAction(
225 UI.PixmapCache.getIcon("vcsDiff.png"), 225 UI.PixmapCache.getIcon("vcsDiff"),
226 self.tr('Show differences'), self._VCSDiff) 226 self.tr('Show differences'), self._VCSDiff)
227 self.vcsMenuActions.append(act) 227 self.vcsMenuActions.append(act)
228 act = menu.addAction( 228 act = menu.addAction(
229 UI.PixmapCache.getIcon("vcsSbsDiff.png"), 229 UI.PixmapCache.getIcon("vcsSbsDiff"),
230 self.tr('Show differences side-by-side'), self.__GitSbsDiff) 230 self.tr('Show differences side-by-side'), self.__GitSbsDiff)
231 self.vcsMenuActions.append(act) 231 self.vcsMenuActions.append(act)
232 act = menu.addAction( 232 act = menu.addAction(
233 UI.PixmapCache.getIcon("vcsDiff.png"), 233 UI.PixmapCache.getIcon("vcsDiff"),
234 self.tr('Show differences (extended)'), 234 self.tr('Show differences (extended)'),
235 self.__GitExtendedDiff) 235 self.__GitExtendedDiff)
236 self.vcsMenuActions.append(act) 236 self.vcsMenuActions.append(act)
237 act = menu.addAction( 237 act = menu.addAction(
238 UI.PixmapCache.getIcon("vcsSbsDiff.png"), 238 UI.PixmapCache.getIcon("vcsSbsDiff"),
239 self.tr('Show differences side-by-side (extended)'), 239 self.tr('Show differences side-by-side (extended)'),
240 self.__GitSbsExtendedDiff) 240 self.__GitSbsExtendedDiff)
241 self.vcsMenuActions.append(act) 241 self.vcsMenuActions.append(act)
242 menu.addSeparator() 242 menu.addSeparator()
243 self.annotateAct = menu.addAction( 243 self.annotateAct = menu.addAction(
244 self.tr('Show annotated file'), 244 self.tr('Show annotated file'),
245 self.__GitBlame) 245 self.__GitBlame)
246 self.vcsMenuActions.append(self.annotateAct) 246 self.vcsMenuActions.append(self.annotateAct)
247 menu.addSeparator() 247 menu.addSeparator()
248 act = menu.addAction( 248 act = menu.addAction(
249 UI.PixmapCache.getIcon("vcsRevert.png"), 249 UI.PixmapCache.getIcon("vcsRevert"),
250 self.tr('Revert changes'), self.__GitRevert) 250 self.tr('Revert changes'), self.__GitRevert)
251 self.vcsMenuActions.append(act) 251 self.vcsMenuActions.append(act)
252 menu.addSeparator() 252 menu.addSeparator()
253 253
254 menu.addSeparator() 254 menu.addSeparator()
286 font.setBold(True) 286 font.setBold(True)
287 act.setFont(font) 287 act.setFont(font)
288 menu.addSeparator() 288 menu.addSeparator()
289 289
290 act = menu.addAction( 290 act = menu.addAction(
291 UI.PixmapCache.getIcon("vcsCommit.png"), 291 UI.PixmapCache.getIcon("vcsCommit"),
292 self.tr('Commit changes to repository...'), 292 self.tr('Commit changes to repository...'),
293 self._VCSCommit) 293 self._VCSCommit)
294 self.vcsMultiMenuActions.append(act) 294 self.vcsMultiMenuActions.append(act)
295 menu.addSeparator() 295 menu.addSeparator()
296 act = menu.addAction( 296 act = menu.addAction(
297 UI.PixmapCache.getIcon("vcsAdd.png"), 297 UI.PixmapCache.getIcon("vcsAdd"),
298 self.tr('Add/Stage to repository'), self._VCSAdd) 298 self.tr('Add/Stage to repository'), self._VCSAdd)
299 act = menu.addAction( 299 act = menu.addAction(
300 UI.PixmapCache.getIcon("vcsRevert.png"), 300 UI.PixmapCache.getIcon("vcsRevert"),
301 self.tr('Unstage changes'), 301 self.tr('Unstage changes'),
302 self.__GitUnstage) 302 self.__GitUnstage)
303 self.vcsMultiMenuActions.append(act) 303 self.vcsMultiMenuActions.append(act)
304 menu.addSeparator() 304 menu.addSeparator()
305 act = menu.addAction( 305 act = menu.addAction(
306 UI.PixmapCache.getIcon("vcsRemove.png"), 306 UI.PixmapCache.getIcon("vcsRemove"),
307 self.tr('Remove from repository (and disk)'), 307 self.tr('Remove from repository (and disk)'),
308 self._VCSRemove) 308 self._VCSRemove)
309 self.vcsMultiMenuActions.append(act) 309 self.vcsMultiMenuActions.append(act)
310 act = menu.addAction( 310 act = menu.addAction(
311 UI.PixmapCache.getIcon("vcsRemove.png"), 311 UI.PixmapCache.getIcon("vcsRemove"),
312 self.tr('Remove from repository only'), 312 self.tr('Remove from repository only'),
313 self.__GitForget) 313 self.__GitForget)
314 self.vcsMultiMenuActions.append(act) 314 self.vcsMultiMenuActions.append(act)
315 menu.addSeparator() 315 menu.addSeparator()
316 act = menu.addAction( 316 act = menu.addAction(
317 UI.PixmapCache.getIcon("vcsStatus.png"), 317 UI.PixmapCache.getIcon("vcsStatus"),
318 self.tr('Show status'), self._VCSStatus) 318 self.tr('Show status'), self._VCSStatus)
319 self.vcsMultiMenuActions.append(act) 319 self.vcsMultiMenuActions.append(act)
320 menu.addSeparator() 320 menu.addSeparator()
321 act = menu.addAction( 321 act = menu.addAction(
322 UI.PixmapCache.getIcon("vcsDiff.png"), 322 UI.PixmapCache.getIcon("vcsDiff"),
323 self.tr('Show differences'), self._VCSDiff) 323 self.tr('Show differences'), self._VCSDiff)
324 self.vcsMultiMenuActions.append(act) 324 self.vcsMultiMenuActions.append(act)
325 act = menu.addAction( 325 act = menu.addAction(
326 UI.PixmapCache.getIcon("vcsDiff.png"), 326 UI.PixmapCache.getIcon("vcsDiff"),
327 self.tr('Show differences (extended)'), 327 self.tr('Show differences (extended)'),
328 self.__GitExtendedDiff) 328 self.__GitExtendedDiff)
329 self.vcsMultiMenuActions.append(act) 329 self.vcsMultiMenuActions.append(act)
330 menu.addSeparator() 330 menu.addSeparator()
331 act = menu.addAction( 331 act = menu.addAction(
332 UI.PixmapCache.getIcon("vcsRevert.png"), 332 UI.PixmapCache.getIcon("vcsRevert"),
333 self.tr('Revert changes'), self.__GitRevert) 333 self.tr('Revert changes'), self.__GitRevert)
334 self.vcsMultiMenuActions.append(act) 334 self.vcsMultiMenuActions.append(act)
335 menu.addSeparator() 335 menu.addSeparator()
336 336
337 menu.addSeparator() 337 menu.addSeparator()
404 font.setBold(True) 404 font.setBold(True)
405 act.setFont(font) 405 act.setFont(font)
406 menu.addSeparator() 406 menu.addSeparator()
407 407
408 act = menu.addAction( 408 act = menu.addAction(
409 UI.PixmapCache.getIcon("vcsCommit.png"), 409 UI.PixmapCache.getIcon("vcsCommit"),
410 self.tr('Commit changes to repository...'), 410 self.tr('Commit changes to repository...'),
411 self._VCSCommit) 411 self._VCSCommit)
412 self.vcsDirMenuActions.append(act) 412 self.vcsDirMenuActions.append(act)
413 menu.addSeparator() 413 menu.addSeparator()
414 act = menu.addAction( 414 act = menu.addAction(
415 UI.PixmapCache.getIcon("vcsAdd.png"), 415 UI.PixmapCache.getIcon("vcsAdd"),
416 self.tr('Add/Stage to repository'), self._VCSAdd) 416 self.tr('Add/Stage to repository'), self._VCSAdd)
417 act = menu.addAction( 417 act = menu.addAction(
418 UI.PixmapCache.getIcon("vcsRevert.png"), 418 UI.PixmapCache.getIcon("vcsRevert"),
419 self.tr('Unstage changes'), 419 self.tr('Unstage changes'),
420 self.__GitUnstage) 420 self.__GitUnstage)
421 self.vcsDirMenuActions.append(act) 421 self.vcsDirMenuActions.append(act)
422 menu.addSeparator() 422 menu.addSeparator()
423 act = menu.addAction( 423 act = menu.addAction(
424 UI.PixmapCache.getIcon("vcsRemove.png"), 424 UI.PixmapCache.getIcon("vcsRemove"),
425 self.tr('Remove from repository (and disk)'), 425 self.tr('Remove from repository (and disk)'),
426 self._VCSRemove) 426 self._VCSRemove)
427 self.vcsDirMenuActions.append(act) 427 self.vcsDirMenuActions.append(act)
428 menu.addSeparator() 428 menu.addSeparator()
429 act = menu.addAction(self.tr('Copy'), self.__GitCopy) 429 act = menu.addAction(self.tr('Copy'), self.__GitCopy)
430 self.vcsDirMenuActions.append(act) 430 self.vcsDirMenuActions.append(act)
431 act = menu.addAction(self.tr('Move'), self.__GitMove) 431 act = menu.addAction(self.tr('Move'), self.__GitMove)
432 self.vcsDirMenuActions.append(act) 432 self.vcsDirMenuActions.append(act)
433 menu.addSeparator() 433 menu.addSeparator()
434 act = menu.addAction( 434 act = menu.addAction(
435 UI.PixmapCache.getIcon("vcsLog.png"), 435 UI.PixmapCache.getIcon("vcsLog"),
436 self.tr('Show log browser'), self._VCSLogBrowser) 436 self.tr('Show log browser'), self._VCSLogBrowser)
437 self.vcsDirMenuActions.append(act) 437 self.vcsDirMenuActions.append(act)
438 menu.addSeparator() 438 menu.addSeparator()
439 act = menu.addAction( 439 act = menu.addAction(
440 UI.PixmapCache.getIcon("vcsStatus.png"), 440 UI.PixmapCache.getIcon("vcsStatus"),
441 self.tr('Show status'), self._VCSStatus) 441 self.tr('Show status'), self._VCSStatus)
442 self.vcsDirMenuActions.append(act) 442 self.vcsDirMenuActions.append(act)
443 menu.addSeparator() 443 menu.addSeparator()
444 act = menu.addAction( 444 act = menu.addAction(
445 UI.PixmapCache.getIcon("vcsDiff.png"), 445 UI.PixmapCache.getIcon("vcsDiff"),
446 self.tr('Show differences'), self._VCSDiff) 446 self.tr('Show differences'), self._VCSDiff)
447 self.vcsDirMenuActions.append(act) 447 self.vcsDirMenuActions.append(act)
448 act = menu.addAction( 448 act = menu.addAction(
449 UI.PixmapCache.getIcon("vcsDiff.png"), 449 UI.PixmapCache.getIcon("vcsDiff"),
450 self.tr('Show differences (extended)'), 450 self.tr('Show differences (extended)'),
451 self.__GitExtendedDiff) 451 self.__GitExtendedDiff)
452 self.vcsDirMenuActions.append(act) 452 self.vcsDirMenuActions.append(act)
453 menu.addSeparator() 453 menu.addSeparator()
454 act = menu.addAction( 454 act = menu.addAction(
455 UI.PixmapCache.getIcon("vcsRevert.png"), 455 UI.PixmapCache.getIcon("vcsRevert"),
456 self.tr('Revert changes'), self.__GitRevert) 456 self.tr('Revert changes'), self.__GitRevert)
457 self.vcsDirMenuActions.append(act) 457 self.vcsDirMenuActions.append(act)
458 menu.addSeparator() 458 menu.addSeparator()
459 459
460 menu.addSeparator() 460 menu.addSeparator()
494 font.setBold(True) 494 font.setBold(True)
495 act.setFont(font) 495 act.setFont(font)
496 menu.addSeparator() 496 menu.addSeparator()
497 497
498 act = menu.addAction( 498 act = menu.addAction(
499 UI.PixmapCache.getIcon("vcsCommit.png"), 499 UI.PixmapCache.getIcon("vcsCommit"),
500 self.tr('Commit changes to repository...'), 500 self.tr('Commit changes to repository...'),
501 self._VCSCommit) 501 self._VCSCommit)
502 self.vcsDirMultiMenuActions.append(act) 502 self.vcsDirMultiMenuActions.append(act)
503 menu.addSeparator() 503 menu.addSeparator()
504 act = menu.addAction( 504 act = menu.addAction(
505 UI.PixmapCache.getIcon("vcsAdd.png"), 505 UI.PixmapCache.getIcon("vcsAdd"),
506 self.tr('Add/Stage to repository'), self._VCSAdd) 506 self.tr('Add/Stage to repository'), self._VCSAdd)
507 act = menu.addAction( 507 act = menu.addAction(
508 UI.PixmapCache.getIcon("vcsRevert.png"), 508 UI.PixmapCache.getIcon("vcsRevert"),
509 self.tr('Unstage changes'), 509 self.tr('Unstage changes'),
510 self.__GitUnstage) 510 self.__GitUnstage)
511 self.vcsDirMultiMenuActions.append(act) 511 self.vcsDirMultiMenuActions.append(act)
512 menu.addSeparator() 512 menu.addSeparator()
513 act = menu.addAction( 513 act = menu.addAction(
514 UI.PixmapCache.getIcon("vcsRemove.png"), 514 UI.PixmapCache.getIcon("vcsRemove"),
515 self.tr('Remove from repository (and disk)'), 515 self.tr('Remove from repository (and disk)'),
516 self._VCSRemove) 516 self._VCSRemove)
517 self.vcsDirMultiMenuActions.append(act) 517 self.vcsDirMultiMenuActions.append(act)
518 menu.addSeparator() 518 menu.addSeparator()
519 act = menu.addAction( 519 act = menu.addAction(
520 UI.PixmapCache.getIcon("vcsStatus.png"), 520 UI.PixmapCache.getIcon("vcsStatus"),
521 self.tr('Show status'), self._VCSStatus) 521 self.tr('Show status'), self._VCSStatus)
522 self.vcsDirMultiMenuActions.append(act) 522 self.vcsDirMultiMenuActions.append(act)
523 menu.addSeparator() 523 menu.addSeparator()
524 act = menu.addAction( 524 act = menu.addAction(
525 UI.PixmapCache.getIcon("vcsDiff.png"), 525 UI.PixmapCache.getIcon("vcsDiff"),
526 self.tr('Show differences'), self._VCSDiff) 526 self.tr('Show differences'), self._VCSDiff)
527 self.vcsDirMultiMenuActions.append(act) 527 self.vcsDirMultiMenuActions.append(act)
528 act = menu.addAction( 528 act = menu.addAction(
529 UI.PixmapCache.getIcon("vcsDiff.png"), 529 UI.PixmapCache.getIcon("vcsDiff"),
530 self.tr('Show differences (extended)'), 530 self.tr('Show differences (extended)'),
531 self.__GitExtendedDiff) 531 self.__GitExtendedDiff)
532 self.vcsDirMultiMenuActions.append(act) 532 self.vcsDirMultiMenuActions.append(act)
533 menu.addSeparator() 533 menu.addSeparator()
534 act = menu.addAction( 534 act = menu.addAction(
535 UI.PixmapCache.getIcon("vcsRevert.png"), 535 UI.PixmapCache.getIcon("vcsRevert"),
536 self.tr('Revert changes'), self.__GitRevert) 536 self.tr('Revert changes'), self.__GitRevert)
537 self.vcsDirMultiMenuActions.append(act) 537 self.vcsDirMultiMenuActions.append(act)
538 menu.addSeparator() 538 menu.addSeparator()
539 539
540 menu.addSeparator() 540 menu.addSeparator()

eric ide

mercurial