Helpviewer/Bookmarks/BookmarksImportDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3002
6ffc581f00f1
child 3058
0a02c433f52d
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
56 def __enableNextButton(self): 56 def __enableNextButton(self):
57 """ 57 """
58 Private slot to set the enabled state of the next button. 58 Private slot to set the enabled state of the next button.
59 """ 59 """
60 if self.__currentPage == 0: 60 if self.__currentPage == 0:
61 self.nextButton.setEnabled(len(self.sourcesList.selectedItems()) == 1) 61 self.nextButton.setEnabled(
62 len(self.sourcesList.selectedItems()) == 1)
62 elif self.__currentPage == 1: 63 elif self.__currentPage == 1:
63 self.nextButton.setEnabled(self.fileEdit.text() != "") 64 self.nextButton.setEnabled(self.fileEdit.text() != "")
64 65
65 @pyqtSlot() 66 @pyqtSlot()
66 def on_sourcesList_itemSelectionChanged(self): 67 def on_sourcesList_itemSelectionChanged(self):
112 return 113 return
113 114
114 if self.__currentPage == 0: 115 if self.__currentPage == 0:
115 self.__selectedSource = self.sourcesList.currentItem().data( 116 self.__selectedSource = self.sourcesList.currentItem().data(
116 self.SourcesListIdRole) 117 self.SourcesListIdRole)
117 pixmap, sourceName, self.__sourceFile, info, prompt, self.__sourceDir = \ 118 (pixmap, sourceName, self.__sourceFile, info, prompt,
118 BookmarksImporters.getImporterInfo(self.__selectedSource) 119 self.__sourceDir) = BookmarksImporters.getImporterInfo(
120 self.__selectedSource)
119 121
120 self.iconLabel.setPixmap(pixmap) 122 self.iconLabel.setPixmap(pixmap)
121 self.importingFromLabel.setText( 123 self.importingFromLabel.setText(
122 self.trUtf8("<b>Importing from {0}</b>").format(sourceName)) 124 self.trUtf8("<b>Importing from {0}</b>").format(sourceName))
123 self.fileLabel1.setText(info) 125 self.fileLabel1.setText(info)
124 self.fileLabel2.setText(prompt) 126 self.fileLabel2.setText(prompt)
125 self.standardDirLabel.setText("<i>{0}</i>".format(self.__sourceDir)) 127 self.standardDirLabel.setText(
128 "<i>{0}</i>".format(self.__sourceDir))
126 129
127 self.nextButton.setText(self.trUtf8("Finish")) 130 self.nextButton.setText(self.trUtf8("Finish"))
128 131
129 self.__currentPage += 1 132 self.__currentPage += 1
130 self.pagesWidget.setCurrentIndex(self.__currentPage) 133 self.pagesWidget.setCurrentIndex(self.__currentPage)

eric ide

mercurial