Helpviewer/Feeds/FeedsDialog.py

changeset 3190
a9a94491c4fd
parent 3160
209a07d7e401
child 3345
071afe8be2a1
equal deleted inserted replaced
3189:9a21c547de5f 3190:a9a94491c4fd
39 39
40 self.__availableFeeds = availableFeeds[:] 40 self.__availableFeeds = availableFeeds[:]
41 for row in range(len(self.__availableFeeds)): 41 for row in range(len(self.__availableFeeds)):
42 feed = self.__availableFeeds[row] 42 feed = self.__availableFeeds[row]
43 button = QPushButton(self) 43 button = QPushButton(self)
44 button.setText(self.trUtf8("Add")) 44 button.setText(self.tr("Add"))
45 button.feed = feed 45 button.feed = feed
46 label = QLabel(self) 46 label = QLabel(self)
47 label.setText(feed[0]) 47 label.setText(feed[0])
48 self.feedsLayout.addWidget(label, row, 0) 48 self.feedsLayout.addWidget(label, row, 0)
49 self.feedsLayout.addWidget(button, row, 1) 49 self.feedsLayout.addWidget(button, row, 1)
78 feedsManager = Helpviewer.HelpWindow.HelpWindow.feedsManager() 78 feedsManager = Helpviewer.HelpWindow.HelpWindow.feedsManager()
79 if feedsManager.addFeed(urlString, title, self.__browser.icon()): 79 if feedsManager.addFeed(urlString, title, self.__browser.icon()):
80 if Helpviewer.HelpWindow.HelpWindow.notificationsEnabled(): 80 if Helpviewer.HelpWindow.HelpWindow.notificationsEnabled():
81 Helpviewer.HelpWindow.HelpWindow.showNotification( 81 Helpviewer.HelpWindow.HelpWindow.showNotification(
82 UI.PixmapCache.getPixmap("rss48.png"), 82 UI.PixmapCache.getPixmap("rss48.png"),
83 self.trUtf8("Add RSS Feed"), 83 self.tr("Add RSS Feed"),
84 self.trUtf8("""The feed was added successfully.""")) 84 self.tr("""The feed was added successfully."""))
85 else: 85 else:
86 E5MessageBox.information( 86 E5MessageBox.information(
87 self, 87 self,
88 self.trUtf8("Add RSS Feed"), 88 self.tr("Add RSS Feed"),
89 self.trUtf8("""The feed was added successfully.""")) 89 self.tr("""The feed was added successfully."""))
90 else: 90 else:
91 E5MessageBox.warning( 91 E5MessageBox.warning(
92 self, 92 self,
93 self.trUtf8("Add RSS Feed"), 93 self.tr("Add RSS Feed"),
94 self.trUtf8("""The feed was already added before.""")) 94 self.tr("""The feed was already added before."""))
95 95
96 self.close() 96 self.close()

eric ide

mercurial