eric7/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/ProjectHelper.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
equal deleted inserted replaced
8355:8a7677a63c8d 8356:68ec9c3d4de5
7 Module implementing the histedit extension project helper. 7 Module implementing the histedit extension project helper.
8 """ 8 """
9 9
10 from PyQt6.QtWidgets import QMenu 10 from PyQt6.QtWidgets import QMenu
11 11
12 from E5Gui.E5Action import E5Action 12 from E5Gui.EricAction import EricAction
13 from E5Gui import E5MessageBox 13 from E5Gui import EricMessageBox
14 14
15 from ..HgExtensionProjectHelper import HgExtensionProjectHelper 15 from ..HgExtensionProjectHelper import HgExtensionProjectHelper
16 16
17 import UI.PixmapCache 17 import UI.PixmapCache
18 18
29 29
30 def initActions(self): 30 def initActions(self):
31 """ 31 """
32 Public method to generate the action objects. 32 Public method to generate the action objects.
33 """ 33 """
34 self.hgHisteditStartAct = E5Action( 34 self.hgHisteditStartAct = EricAction(
35 self.tr('Start'), 35 self.tr('Start'),
36 UI.PixmapCache.getIcon("vcsEditHistory"), 36 UI.PixmapCache.getIcon("vcsEditHistory"),
37 self.tr('Start'), 37 self.tr('Start'),
38 0, 0, self, 'mercurial_histedit_start') 38 0, 0, self, 'mercurial_histedit_start')
39 self.hgHisteditStartAct.setStatusTip(self.tr( 39 self.hgHisteditStartAct.setStatusTip(self.tr(
45 """ will be presented to modify the edit plan.</p>""" 45 """ will be presented to modify the edit plan.</p>"""
46 )) 46 ))
47 self.hgHisteditStartAct.triggered.connect(self.__hgHisteditStart) 47 self.hgHisteditStartAct.triggered.connect(self.__hgHisteditStart)
48 self.actions.append(self.hgHisteditStartAct) 48 self.actions.append(self.hgHisteditStartAct)
49 49
50 self.hgHisteditContinueAct = E5Action( 50 self.hgHisteditContinueAct = EricAction(
51 self.tr('Continue'), 51 self.tr('Continue'),
52 self.tr('Continue'), 52 self.tr('Continue'),
53 0, 0, self, 'mercurial_histedit_continue') 53 0, 0, self, 'mercurial_histedit_continue')
54 self.hgHisteditContinueAct.setStatusTip(self.tr( 54 self.hgHisteditContinueAct.setStatusTip(self.tr(
55 'Continue an interrupted changeset history editing session' 55 'Continue an interrupted changeset history editing session'
59 """<p>This continues an interrupted history editing session.</p>""" 59 """<p>This continues an interrupted history editing session.</p>"""
60 )) 60 ))
61 self.hgHisteditContinueAct.triggered.connect(self.__hgHisteditContinue) 61 self.hgHisteditContinueAct.triggered.connect(self.__hgHisteditContinue)
62 self.actions.append(self.hgHisteditContinueAct) 62 self.actions.append(self.hgHisteditContinueAct)
63 63
64 self.hgHisteditAbortAct = E5Action( 64 self.hgHisteditAbortAct = EricAction(
65 self.tr('Abort'), 65 self.tr('Abort'),
66 self.tr('Abort'), 66 self.tr('Abort'),
67 0, 0, self, 'mercurial_histedit_abort') 67 0, 0, self, 'mercurial_histedit_abort')
68 self.hgHisteditAbortAct.setStatusTip(self.tr( 68 self.hgHisteditAbortAct.setStatusTip(self.tr(
69 'Abort an interrupted changeset history editing session' 69 'Abort an interrupted changeset history editing session'
73 """<p>This aborts an interrupted history editing session.</p>""" 73 """<p>This aborts an interrupted history editing session.</p>"""
74 )) 74 ))
75 self.hgHisteditAbortAct.triggered.connect(self.__hgHisteditAbort) 75 self.hgHisteditAbortAct.triggered.connect(self.__hgHisteditAbort)
76 self.actions.append(self.hgHisteditAbortAct) 76 self.actions.append(self.hgHisteditAbortAct)
77 77
78 self.hgHisteditEditPlanAct = E5Action( 78 self.hgHisteditEditPlanAct = EricAction(
79 self.tr('Edit Plan'), 79 self.tr('Edit Plan'),
80 self.tr('Edit Plan'), 80 self.tr('Edit Plan'),
81 0, 0, self, 'mercurial_histedit_edit_plan') 81 0, 0, self, 'mercurial_histedit_edit_plan')
82 self.hgHisteditEditPlanAct.setStatusTip(self.tr( 82 self.hgHisteditEditPlanAct.setStatusTip(self.tr(
83 'Edit the remaining actions list' 83 'Edit the remaining actions list'
126 """ 126 """
127 shouldReopen = ( 127 shouldReopen = (
128 self.vcs.getExtensionObject("histedit").hgHisteditStart() 128 self.vcs.getExtensionObject("histedit").hgHisteditStart()
129 ) 129 )
130 if shouldReopen: 130 if shouldReopen:
131 res = E5MessageBox.yesNo( 131 res = EricMessageBox.yesNo(
132 None, 132 None,
133 self.tr("Start History Editing"), 133 self.tr("Start History Editing"),
134 self.tr("""The project should be reread. Do this now?"""), 134 self.tr("""The project should be reread. Do this now?"""),
135 yesDefault=True) 135 yesDefault=True)
136 if res: 136 if res:
142 """ 142 """
143 shouldReopen = ( 143 shouldReopen = (
144 self.vcs.getExtensionObject("histedit").hgHisteditContinue() 144 self.vcs.getExtensionObject("histedit").hgHisteditContinue()
145 ) 145 )
146 if shouldReopen: 146 if shouldReopen:
147 res = E5MessageBox.yesNo( 147 res = EricMessageBox.yesNo(
148 None, 148 None,
149 self.tr("Continue History Editing"), 149 self.tr("Continue History Editing"),
150 self.tr("""The project should be reread. Do this now?"""), 150 self.tr("""The project should be reread. Do this now?"""),
151 yesDefault=True) 151 yesDefault=True)
152 if res: 152 if res:
158 """ 158 """
159 shouldReopen = ( 159 shouldReopen = (
160 self.vcs.getExtensionObject("histedit").hgHisteditAbort() 160 self.vcs.getExtensionObject("histedit").hgHisteditAbort()
161 ) 161 )
162 if shouldReopen: 162 if shouldReopen:
163 res = E5MessageBox.yesNo( 163 res = EricMessageBox.yesNo(
164 None, 164 None,
165 self.tr("Abort History Editing"), 165 self.tr("Abort History Editing"),
166 self.tr("""The project should be reread. Do this now?"""), 166 self.tr("""The project should be reread. Do this now?"""),
167 yesDefault=True) 167 yesDefault=True)
168 if res: 168 if res:
175 """ 175 """
176 shouldReopen = ( 176 shouldReopen = (
177 self.vcs.getExtensionObject("histedit").hgHisteditEditPlan() 177 self.vcs.getExtensionObject("histedit").hgHisteditEditPlan()
178 ) 178 )
179 if shouldReopen: 179 if shouldReopen:
180 res = E5MessageBox.yesNo( 180 res = EricMessageBox.yesNo(
181 None, 181 None,
182 self.tr("Edit Plan"), 182 self.tr("Edit Plan"),
183 self.tr("""The project should be reread. Do this now?"""), 183 self.tr("""The project should be reread. Do this now?"""),
184 yesDefault=True) 184 yesDefault=True)
185 if res: 185 if res:

eric ide

mercurial