Helpviewer/Bookmarks/BookmarksImportDialog.py

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

eric ide

mercurial