61 |
61 |
62 def initActions(self): |
62 def initActions(self): |
63 """ |
63 """ |
64 Public method to generate the action objects. |
64 Public method to generate the action objects. |
65 """ |
65 """ |
66 self.vcsNewAct = E5Action(self.trUtf8('New from repository'), |
66 self.vcsNewAct = E5Action( |
67 self.trUtf8('&New from repository...'), 0, 0, self, 'vcs_new') |
67 self.trUtf8('New from repository'), |
|
68 self.trUtf8('&New from repository...'), |
|
69 0, 0, self, 'vcs_new') |
68 self.vcsNewAct.setStatusTip(self.trUtf8( |
70 self.vcsNewAct.setStatusTip(self.trUtf8( |
69 'Create a new project from the VCS repository' |
71 'Create a new project from the VCS repository' |
70 )) |
72 )) |
71 self.vcsNewAct.setWhatsThis(self.trUtf8( |
73 self.vcsNewAct.setWhatsThis(self.trUtf8( |
72 """<b>New from repository</b>""" |
74 """<b>New from repository</b>""" |
88 """<p>This exports a project from the repository.</p>""" |
90 """<p>This exports a project from the repository.</p>""" |
89 )) |
91 )) |
90 self.vcsExportAct.triggered[()].connect(self._vcsExport) |
92 self.vcsExportAct.triggered[()].connect(self._vcsExport) |
91 self.actions.append(self.vcsExportAct) |
93 self.actions.append(self.vcsExportAct) |
92 |
94 |
93 self.vcsAddAct = E5Action(self.trUtf8('Add to repository'), |
95 self.vcsAddAct = E5Action( |
94 self.trUtf8('&Add to repository...'), 0, 0, self, 'vcs_add') |
96 self.trUtf8('Add to repository'), |
|
97 self.trUtf8('&Add to repository...'), |
|
98 0, 0, self, 'vcs_add') |
95 self.vcsAddAct.setStatusTip(self.trUtf8( |
99 self.vcsAddAct.setStatusTip(self.trUtf8( |
96 'Add the local project to the VCS repository' |
100 'Add the local project to the VCS repository' |
97 )) |
101 )) |
98 self.vcsAddAct.setWhatsThis(self.trUtf8( |
102 self.vcsAddAct.setWhatsThis(self.trUtf8( |
99 """<b>Add to repository</b>""" |
103 """<b>Add to repository</b>""" |
172 self.parent(), |
176 self.parent(), |
173 self.trUtf8("New Project"), |
177 self.trUtf8("New Project"), |
174 self.trUtf8( |
178 self.trUtf8( |
175 """Would you like to edit the VCS command options?""")) |
179 """Would you like to edit the VCS command options?""")) |
176 if vcores: |
180 if vcores: |
177 from .CommandOptionsDialog import vcsCommandOptionsDialog |
181 from .CommandOptionsDialog import VcsCommandOptionsDialog |
178 codlg = vcsCommandOptionsDialog(self.project.vcs) |
182 codlg = VcsCommandOptionsDialog(self.project.vcs) |
179 if codlg.exec_() == QDialog.Accepted: |
183 if codlg.exec_() == QDialog.Accepted: |
180 self.project.vcs.vcsSetOptions(codlg.getOptions()) |
184 self.project.vcs.vcsSetOptions(codlg.getOptions()) |
181 |
185 |
182 # create the project directory if it doesn't exist already |
186 # create the project directory if it doesn't exist already |
183 if not os.path.isdir(projectdir): |
187 if not os.path.isdir(projectdir): |
351 self.parent(), |
355 self.parent(), |
352 self.trUtf8("Import Project"), |
356 self.trUtf8("Import Project"), |
353 self.trUtf8( |
357 self.trUtf8( |
354 """Would you like to edit the VCS command options?""")) |
358 """Would you like to edit the VCS command options?""")) |
355 if vcores: |
359 if vcores: |
356 from .CommandOptionsDialog import vcsCommandOptionsDialog |
360 from .CommandOptionsDialog import VcsCommandOptionsDialog |
357 codlg = vcsCommandOptionsDialog(self.project.vcs) |
361 codlg = VcsCommandOptionsDialog(self.project.vcs) |
358 if codlg.exec_() == QDialog.Accepted: |
362 if codlg.exec_() == QDialog.Accepted: |
359 self.project.vcs.vcsSetOptions(codlg.getOptions()) |
363 self.project.vcs.vcsSetOptions(codlg.getOptions()) |
360 self.project.setDirty(True) |
364 self.project.setDirty(True) |
361 self.project.vcs.vcsSetDataFromDict(vcsDataDict) |
365 self.project.vcs.vcsSetDataFromDict(vcsDataDict) |
362 self.project.saveProject() |
366 self.project.saveProject() |
406 may be removed from the local disk as well. |
410 may be removed from the local disk as well. |
407 """ |
411 """ |
408 res = E5MessageBox.yesNo( |
412 res = E5MessageBox.yesNo( |
409 self.parent(), |
413 self.parent(), |
410 self.trUtf8("Remove project from repository"), |
414 self.trUtf8("Remove project from repository"), |
411 self.trUtf8("Dou you really want to remove this project from" |
415 self.trUtf8( |
|
416 "Dou you really want to remove this project from" |
412 " the repository (and disk)?")) |
417 " the repository (and disk)?")) |
413 if res: |
418 if res: |
414 self.vcs.vcsRemove(self.project.ppath, True) |
419 self.vcs.vcsRemove(self.project.ppath, True) |
415 self._vcsCommit() |
420 self._vcsCommit() |
416 if not os.path.exists(self.project.pfile): |
421 if not os.path.exists(self.project.pfile): |
421 |
426 |
422 def _vcsCommandOptions(self): |
427 def _vcsCommandOptions(self): |
423 """ |
428 """ |
424 Protected slot to edit the VCS command options. |
429 Protected slot to edit the VCS command options. |
425 """ |
430 """ |
426 from .CommandOptionsDialog import vcsCommandOptionsDialog |
431 from .CommandOptionsDialog import VcsCommandOptionsDialog |
427 codlg = vcsCommandOptionsDialog(self.vcs) |
432 codlg = VcsCommandOptionsDialog(self.vcs) |
428 if codlg.exec_() == QDialog.Accepted: |
433 if codlg.exec_() == QDialog.Accepted: |
429 self.vcs.vcsSetOptions(codlg.getOptions()) |
434 self.vcs.vcsSetOptions(codlg.getOptions()) |
430 self.project.setDirty(True) |
435 self.project.setDirty(True) |
431 |
436 |
432 def _vcsLog(self): |
437 def _vcsLog(self): |