Mercurial > hg > Feedworm
comparison MainWindow.py @ 49:6eba4168fd54
move the logic to add a feed into AddFeed
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Mon, 17 May 2010 03:52:13 +0200 |
parents | 6e5219e05625 |
children | 4b0d686493fb |
comparison
equal
deleted
inserted
replaced
48:6e5219e05625 | 49:6eba4168fd54 |
---|---|
7 from PreferencesDialog import PreferencesDialog | 7 from PreferencesDialog import PreferencesDialog |
8 from PyQt4 import QtGui | 8 from PyQt4 import QtGui |
9 from PyQt4.QtCore import QUrl | 9 from PyQt4.QtCore import QUrl |
10 from PyQt4.QtGui import QFont | 10 from PyQt4.QtGui import QFont |
11 from Ui_MainWindow import Ui_MainWindow | 11 from Ui_MainWindow import Ui_MainWindow |
12 import FeedUpdater | |
13 import subprocess | 12 import subprocess |
14 | 13 |
15 class MainWindow(QtGui.QMainWindow): | 14 class MainWindow(QtGui.QMainWindow): |
16 def __init__(self, session=None): | 15 def __init__(self, session=None): |
17 QtGui.QWidget.__init__(self, None) | 16 QtGui.QWidget.__init__(self, None) |
66 | 65 |
67 def addFeed(self): | 66 def addFeed(self): |
68 addFeed = AddFeed(self.session) | 67 addFeed = AddFeed(self.session) |
69 success = addFeed.exec_() | 68 success = addFeed.exec_() |
70 if success: | 69 if success: |
71 url = addFeed.getUrl() | |
72 FeedUpdater.createNewFeed(url, self.session) | |
73 # TODO get status from feedUpdater and display in status area of the main window | |
74 self.updateFeedList() | 70 self.updateFeedList() |
75 | 71 |
76 def openSelectedEntryInBrowser(self): | 72 def openSelectedEntryInBrowser(self): |
77 # TODO make browser configurable | 73 # TODO make browser configurable |
78 browser = "/usr/local/bin/opera" | 74 browser = "/usr/local/bin/opera" |