eric7/Plugins/VcsPlugins/vcsMercurial/HgBookmarksListDialog.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
equal deleted inserted replaced
8355:8a7677a63c8d 8356:68ec9c3d4de5
11 from PyQt6.QtWidgets import ( 11 from PyQt6.QtWidgets import (
12 QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem, QLineEdit, QMenu, 12 QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem, QLineEdit, QMenu,
13 QInputDialog 13 QInputDialog
14 ) 14 )
15 15
16 from E5Gui.E5Application import e5App 16 from E5Gui.EricApplication import ericApp
17 from E5Gui import E5MessageBox 17 from E5Gui import EricMessageBox
18 18
19 from .Ui_HgBookmarksListDialog import Ui_HgBookmarksListDialog 19 from .Ui_HgBookmarksListDialog import Ui_HgBookmarksListDialog
20 20
21 import UI.PixmapCache 21 import UI.PixmapCache
22 22
294 itm = self.bookmarksList.currentItem() 294 itm = self.bookmarksList.currentItem()
295 bookmark = itm.text(3).strip() 295 bookmark = itm.text(3).strip()
296 if bookmark: 296 if bookmark:
297 shouldReopen = self.vcs.vcsUpdate(revision=bookmark) 297 shouldReopen = self.vcs.vcsUpdate(revision=bookmark)
298 if shouldReopen: 298 if shouldReopen:
299 res = E5MessageBox.yesNo( 299 res = EricMessageBox.yesNo(
300 None, 300 None,
301 self.tr("Switch"), 301 self.tr("Switch"),
302 self.tr( 302 self.tr(
303 """The project should be reread. Do this now?"""), 303 """The project should be reread. Do this now?"""),
304 yesDefault=True) 304 yesDefault=True)
305 if res: 305 if res:
306 e5App().getObject("Project").reopenProject() 306 ericApp().getObject("Project").reopenProject()
307 return 307 return
308 308
309 self.on_refreshButton_clicked() 309 self.on_refreshButton_clicked()
310 310
311 def __deleteBookmark(self): 311 def __deleteBookmark(self):
313 Private slot to delete the selected bookmark. 313 Private slot to delete the selected bookmark.
314 """ 314 """
315 itm = self.bookmarksList.currentItem() 315 itm = self.bookmarksList.currentItem()
316 bookmark = itm.text(3).strip() 316 bookmark = itm.text(3).strip()
317 if bookmark: 317 if bookmark:
318 yes = E5MessageBox.yesNo( 318 yes = EricMessageBox.yesNo(
319 self, 319 self,
320 self.tr("Delete Bookmark"), 320 self.tr("Delete Bookmark"),
321 self.tr("""<p>Shall the bookmark <b>{0}</b> really be""" 321 self.tr("""<p>Shall the bookmark <b>{0}</b> really be"""
322 """ deleted?</p>""").format(bookmark)) 322 """ deleted?</p>""").format(bookmark))
323 if yes: 323 if yes:

eric ide

mercurial