eric7/Plugins/WizardPlugins/DotDesktopWizard/DotDesktopWizardDialog.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
equal deleted inserted replaced
8355:8a7677a63c8d 8356:68ec9c3d4de5
10 import os 10 import os
11 11
12 from PyQt6.QtCore import pyqtSlot 12 from PyQt6.QtCore import pyqtSlot
13 from PyQt6.QtWidgets import QDialog, QDialogButtonBox 13 from PyQt6.QtWidgets import QDialog, QDialogButtonBox
14 14
15 from E5Gui.E5Application import e5App 15 from E5Gui.EricApplication import ericApp
16 from E5Gui import E5MessageBox 16 from E5Gui import EricMessageBox
17 17
18 from .Ui_DotDesktopWizardDialog import Ui_DotDesktopWizardDialog 18 from .Ui_DotDesktopWizardDialog import Ui_DotDesktopWizardDialog
19 19
20 import Utilities 20 import Utilities
21 import UI.PixmapCache 21 import UI.PixmapCache
99 99
100 self.kdeEncodingComboBox.addItems(sorted(Utilities.supportedCodecs)) 100 self.kdeEncodingComboBox.addItems(sorted(Utilities.supportedCodecs))
101 self.kdeEncodingComboBox.setCurrentIndex( 101 self.kdeEncodingComboBox.setCurrentIndex(
102 self.kdeEncodingComboBox.findText("utf-8")) 102 self.kdeEncodingComboBox.findText("utf-8"))
103 103
104 projectOpen = e5App().getObject("Project").isOpen() 104 projectOpen = ericApp().getObject("Project").isOpen()
105 self.projectButton.setEnabled(projectOpen) 105 self.projectButton.setEnabled(projectOpen)
106 106
107 icon = UI.PixmapCache.getIcon("listSelection") 107 icon = UI.PixmapCache.getIcon("listSelection")
108 self.categoriesButton.setIcon(icon) 108 self.categoriesButton.setIcon(icon)
109 self.onlyShowButton.setIcon(icon) 109 self.onlyShowButton.setIcon(icon)
235 def on_projectButton_clicked(self): 235 def on_projectButton_clicked(self):
236 """ 236 """
237 Private slot to populate some fields with data retrieved from the 237 Private slot to populate some fields with data retrieved from the
238 current project. 238 current project.
239 """ 239 """
240 project = e5App().getObject("Project") 240 project = ericApp().getObject("Project")
241 241
242 self.nameEdit.setText(project.getProjectName()) 242 self.nameEdit.setText(project.getProjectName())
243 self.genericNameEdit.setText(project.getProjectName()) 243 self.genericNameEdit.setText(project.getProjectName())
244 self.kdeNameEdit.setText(project.getProjectName()) 244 self.kdeNameEdit.setText(project.getProjectName())
245 try: 245 try:
283 283
284 @param txt text of the entry field (string) 284 @param txt text of the entry field (string)
285 """ 285 """
286 self.__checkOK() 286 self.__checkOK()
287 if bool(self.onlyShowEdit.text()) and bool(self.notShowEdit.text()): 287 if bool(self.onlyShowEdit.text()) and bool(self.notShowEdit.text()):
288 E5MessageBox.critical( 288 EricMessageBox.critical(
289 self, 289 self,
290 self.tr(".desktop Wizard"), 290 self.tr(".desktop Wizard"),
291 self.tr("""Only one of 'Only Show In' or """ 291 self.tr("""Only one of 'Only Show In' or """
292 """ 'Not Show In' allowed.""")) 292 """ 'Not Show In' allowed."""))
293 293
313 313
314 @param txt text of the entry field (string) 314 @param txt text of the entry field (string)
315 """ 315 """
316 self.__checkOK() 316 self.__checkOK()
317 if bool(self.onlyShowEdit.text()) and bool(self.notShowEdit.text()): 317 if bool(self.onlyShowEdit.text()) and bool(self.notShowEdit.text()):
318 E5MessageBox.critical( 318 EricMessageBox.critical(
319 self, 319 self,
320 self.tr(".desktop Wizard"), 320 self.tr(".desktop Wizard"),
321 self.tr("""Only one of 'Only Show In' or """ 321 self.tr("""Only one of 'Only Show In' or """
322 """ 'Not Show In' allowed.""")) 322 """ 'Not Show In' allowed."""))
323 323

eric ide

mercurial