Fixed problems that appear at first-time installations, added more information dialogs.
git-svn-id: svn://svn.berlios.de/gpodder@55 b0d088ad-0a06-0410-aad2-9ed5178a7e87
This commit is contained in:
parent
56aae0d167
commit
1521ebcf3b
|
@ -1,6 +1,8 @@
|
|||
Wed, 29 Mar 2006 16:19:07 +0200 <thp@perli.net>
|
||||
* Locking of tree_model access in libwget - should be more stable
|
||||
* Ask for confirmation when cancelling a ongoing download
|
||||
* Fixed problems that appeared when starting with a fresh install
|
||||
* Added even more information dialogs to error situations
|
||||
|
||||
Wed, 29 Mar 2006 15:21:32 +0200 <thp@perli.net>
|
||||
* Re-designed gPodder properties dialog
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
# Python module src/gpodder/gpodder.py
|
||||
# Autogenerated from gpodder.glade
|
||||
# Generated on Wed Mar 29 16:17:51 2006
|
||||
# Generated on Wed Mar 29 16:22:49 2006
|
||||
|
||||
# Warning: Do not modify any context comment such as #--
|
||||
# They are required to keep user's code
|
||||
|
@ -205,13 +205,12 @@ class Gpodder(SimpleGladeApp):
|
|||
|
||||
def updateTreeView( self):
|
||||
try:
|
||||
self.items_model = self.channels[self.active_channel].getItemsModel()
|
||||
self.treeAvailable.set_model( self.items_model)
|
||||
self.items_model = self.channels[self.active_channel].getItemsModel()
|
||||
self.treeAvailable.set_model( self.items_model)
|
||||
except:
|
||||
dlg = gtk.MessageDialog( self.gPodder, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK)
|
||||
dlg.set_markup( "<big>No Channels found</big>\n\nClick on \"Channels\"->\"Add channel..\" to add a new channel.")
|
||||
dlg.run()
|
||||
dlg.destroy()
|
||||
if self.items_model != None:
|
||||
self.items_model.clear()
|
||||
self.showMessage( "<b>No channels found</b>\n\nClick on <b><i>Channels</i></b> > <b><i>Add channel..</i></b> to add a new channel.")
|
||||
print "probably no feeds or channels found"
|
||||
|
||||
def showMessage( self, message = "some unknown function", title = "gPodder message"):
|
||||
|
@ -375,10 +374,14 @@ class Gpodder(SimpleGladeApp):
|
|||
if libgpodder.isDebugging():
|
||||
print "on_itemEditChannel_activate called with self.%s" % widget.get_name()
|
||||
active = self.active_channel
|
||||
url_old = self.channels[active].url
|
||||
title_old = self.channels[active].title
|
||||
desc_old = self.channels[active].description
|
||||
downloaddir_old = self.channels[active].save_dir # FIXME: should be download dir, but save_dir is more descriptive for now
|
||||
try:
|
||||
url_old = self.channels[active].url
|
||||
title_old = self.channels[active].title
|
||||
desc_old = self.channels[active].description
|
||||
downloaddir_old = self.channels[active].save_dir # FIXME: should be download dir, but save_dir is more descriptive for now
|
||||
except:
|
||||
self.showMessage( "Cannot edit this channel.\n\nNo channel found.")
|
||||
return
|
||||
|
||||
result = Gpodderchannel().requestURL( preset = url_old, title = title_old, description = desc_old, downloaddir = downloaddir_old)
|
||||
if result != None and result != "" and (result[:4] == "http" or result[:3] == "ftp"):
|
||||
|
@ -429,6 +432,9 @@ class Gpodder(SimpleGladeApp):
|
|||
def on_itemExportChannels_activate(self, widget, *args):
|
||||
if libgpodder.isDebugging():
|
||||
print "on_itemExportChannels_activate called with self.%s" % widget.get_name()
|
||||
if len( self.channels) == 0:
|
||||
self.showMessage( "Your channel list is empty. Nothing to export.\n\nGo add some fancy channels! :)")
|
||||
return
|
||||
dlg = gtk.FileChooserDialog( title="Export to OPML...", parent = None, action = gtk.FILE_CHOOSER_ACTION_SAVE)
|
||||
dlg.add_button( gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
|
||||
dlg.add_button( gtk.STOCK_SAVE, gtk.RESPONSE_OK)
|
||||
|
@ -492,9 +498,13 @@ class Gpodder(SimpleGladeApp):
|
|||
def on_treeAvailable_row_activated(self, widget, *args):
|
||||
if libgpodder.isDebugging():
|
||||
print "on_treeAvailable_row_activated called with self.%s" % widget.get_name()
|
||||
selection_tuple = self.treeAvailable.get_selection().get_selected()
|
||||
selection_iter = selection_tuple[1]
|
||||
url = self.items_model.get_value( selection_iter, 0)
|
||||
try:
|
||||
selection_tuple = self.treeAvailable.get_selection().get_selected()
|
||||
selection_iter = selection_tuple[1]
|
||||
url = self.items_model.get_value( selection_iter, 0)
|
||||
except:
|
||||
self.showMessage( "You have not selected an episode to download.\n\nPlease select one, and I'll download it for you.")
|
||||
return
|
||||
|
||||
self.active_item = self.channels[self.active_channel].getActiveByUrl( url)
|
||||
|
||||
|
@ -545,12 +555,16 @@ class Gpodder(SimpleGladeApp):
|
|||
if libgpodder.isDebugging():
|
||||
print "on_comboDownloaded_changed called with self.%s" % widget.get_name()
|
||||
self.active_downloaded_channels = self.comboDownloaded.get_active()
|
||||
selection_iter = self.comboDownloaded.get_active_iter()
|
||||
selected_value = self.comboDownloaded.get_model().get_value( selection_iter, 0)
|
||||
if libgpodder.isDebugging():
|
||||
print "comboDownloaded_changed with: " + selected_value
|
||||
new_model = self.ldb.getDownloadedEpisodesModelByFilename( selected_value)
|
||||
self.treeDownloaded.set_model( new_model)
|
||||
try:
|
||||
selection_iter = self.comboDownloaded.get_active_iter()
|
||||
selected_value = self.comboDownloaded.get_model().get_value( selection_iter, 0)
|
||||
if libgpodder.isDebugging():
|
||||
print "comboDownloaded_changed with: " + selected_value
|
||||
new_model = self.ldb.getDownloadedEpisodesModelByFilename( selected_value)
|
||||
self.treeDownloaded.set_model( new_model)
|
||||
except:
|
||||
# silently ignore the fact that we do not have any downloads
|
||||
pass
|
||||
#-- Gpodder.on_comboDownloaded_changed }
|
||||
|
||||
#-- Gpodder.on_treeDownloaded_row_activated {
|
||||
|
@ -558,14 +572,17 @@ class Gpodder(SimpleGladeApp):
|
|||
if libgpodder.isDebugging():
|
||||
print "on_treeDownloaded_row_activated called with self.%s" % widget.get_name()
|
||||
# TODO: refactor with above "on_comboDownloaded_changed" into one method (next three lines)
|
||||
selection_iter = self.comboDownloaded.get_active_iter()
|
||||
channel_filename = self.comboDownloaded.get_model().get_value( selection_iter, 0)
|
||||
|
||||
selection_tuple = self.treeDownloaded.get_selection().get_selected()
|
||||
selection_iter = selection_tuple[1]
|
||||
url = self.treeDownloaded.get_model().get_value( selection_iter, 0)
|
||||
filename_final = localDB().getLocalFilenameByPodcastURL( channel_filename, url)
|
||||
gPodderLib().openFilename( filename_final)
|
||||
try:
|
||||
selection_iter = self.comboDownloaded.get_active_iter()
|
||||
channel_filename = self.comboDownloaded.get_model().get_value( selection_iter, 0)
|
||||
|
||||
selection_tuple = self.treeDownloaded.get_selection().get_selected()
|
||||
selection_iter = selection_tuple[1]
|
||||
url = self.treeDownloaded.get_model().get_value( selection_iter, 0)
|
||||
filename_final = localDB().getLocalFilenameByPodcastURL( channel_filename, url)
|
||||
gPodderLib().openFilename( filename_final)
|
||||
except:
|
||||
self.showMessage( "Could not open this episode.\n\nHave you even selected one?")
|
||||
#-- Gpodder.on_treeDownloaded_row_activated }
|
||||
|
||||
#-- Gpodder.on_btnDownloadedExecute_clicked {
|
||||
|
@ -581,12 +598,13 @@ class Gpodder(SimpleGladeApp):
|
|||
print "on_btnDownloadedDelete_clicked called with self.%s" % widget.get_name()
|
||||
|
||||
# Note: same code as in on_treeDownloaded_row_activated()
|
||||
selection_iter = self.comboDownloaded.get_active_iter()
|
||||
channel_filename = self.comboDownloaded.get_model().get_value( selection_iter, 0)
|
||||
|
||||
selection_tuple = self.treeDownloaded.get_selection().get_selected()
|
||||
selection_iter = selection_tuple[1]
|
||||
try:
|
||||
selection_iter = self.comboDownloaded.get_active_iter()
|
||||
channel_filename = self.comboDownloaded.get_model().get_value( selection_iter, 0)
|
||||
|
||||
selection_tuple = self.treeDownloaded.get_selection().get_selected()
|
||||
selection_iter = selection_tuple[1]
|
||||
|
||||
url = self.treeDownloaded.get_model().get_value( selection_iter, 0)
|
||||
title = self.treeDownloaded.get_model().get_value( selection_iter, 1)
|
||||
filename_final = localDB().getLocalFilenameByPodcastURL( channel_filename, url)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
# Python module src/gpodder/gpodder.py
|
||||
# Autogenerated from gpodder.glade
|
||||
# Generated on Wed Mar 29 16:17:51 2006
|
||||
# Generated on Wed Mar 29 16:22:49 2006
|
||||
|
||||
# Warning: Do not modify any context comment such as #--
|
||||
# They are required to keep user's code
|
||||
|
|
Loading…
Reference in New Issue