SF.net SVN: fclient:[878] trunk/fclient/fclient/impl/ViewBrowser.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-08-09 08:20:56
|
Revision: 878
http://fclient.svn.sourceforge.net/fclient/?rev=878&view=rev
Author: jUrner
Date: 2008-08-09 08:21:06 +0000 (Sat, 09 Aug 2008)
Log Message:
-----------
dl key was broken. fixed
Modified Paths:
--------------
trunk/fclient/fclient/impl/ViewBrowser.py
Modified: trunk/fclient/fclient/impl/ViewBrowser.py
===================================================================
--- trunk/fclient/fclient/impl/ViewBrowser.py 2008-08-09 07:41:22 UTC (rev 877)
+++ trunk/fclient/fclient/impl/ViewBrowser.py 2008-08-09 08:21:06 UTC (rev 878)
@@ -68,7 +68,6 @@
from .lib.compactpath.qt4 import pathlabelwrap
from . import DlgPropsBrowserObject
-from . import DlgDownloadKeyToDisk
from . import SideBarLoadDetails
from .tpls.Ui_ViewBrowserWidgetTpl import Ui_ViewBrowserWidget
@@ -847,28 +846,19 @@
@return: (bool) False if the key in the url is invalid, True otherwise
"""
fcpKey = config.qStringToFcpKey(QtCore.QString(qUrl.encodedPath()))
- if fcpKey is not None:
- dlg = DlgDownloadKeyToDisk.DlgDownloadKeyToDisk(self, fcpKey=fcpKey)
- if dlg.exec_() == dlg.Accepted:
- fileName = dlg.fileName()
- downloadsWidget = config.ObjectRegistry.get(config.IdViewDownloadsWidget, None)
- if downloadsWidget is None:
- raise ValueError('no downloads widget found')
- downloadsWidget.downloadFile(
- fcpKey,
- fileName,
- persistence=fcp2.ConstPersistence.Forever,
- handleFilenameCollision=True,
- )
- return True
+ if fcpKey is None:
+ QtGui.QMessageBox.critical(
+ self,
+ config.FcAppName + self.trUtf8(' - Browser error'),
+ self.trUtf8('Can not download key (key is invalid)')
+ )
+ return False
+ downloadsWidget = config.ObjectRegistry.get(config.IdViewDownloadsWidget, None)
+ if downloadsWidget is None:
+ raise ValueError('no downloads widget found')
+ downloadsWidget.execDlgDownloadKey(fcpKey=fcpKey)
+ return True
- QtGui.QMessageBox.critical(
- self,
- config.FcAppName + self.trUtf8(' - Browser error'),
- self.trUtf8('Can not download key (key is invalid)')
- )
- return False
-
#########################################
## methods
#########################################
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|