SF.net SVN: fclient:[834] trunk/fclient/src/fclient/impl/ViewBrowser.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-31 16:44:01
|
Revision: 834
http://fclient.svn.sourceforge.net/fclient/?rev=834&view=rev
Author: jUrner
Date: 2008-07-31 16:44:10 +0000 (Thu, 31 Jul 2008)
Log Message:
-----------
bit better handling of dl and open link
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/ViewBrowser.py
Modified: trunk/fclient/src/fclient/impl/ViewBrowser.py
===================================================================
--- trunk/fclient/src/fclient/impl/ViewBrowser.py 2008-07-31 16:42:53 UTC (rev 833)
+++ trunk/fclient/src/fclient/impl/ViewBrowser.py 2008-07-31 16:44:10 UTC (rev 834)
@@ -25,9 +25,11 @@
# x. user staring gui for first time. maybe we should not connext untill the user connects explicitely
# x. looks like on error loading page reload does not work
# x. when loading a page, until fproxy reacts reload is enabled instead of stop. hitting reloading will trigger an error
+# page, but reloads the current page as expected. no idea how to handle error page poping up.
# x. icons on find bar push button text tio the side. no idea
# x. on find action, give feedback when no matching text was found on page
-# some shortcuts for actions are still missing
+# x. some shortcuts for actions are still missing
+# x. rework to support dynamic retranslation
#******************************************************************************************
"""
@@ -593,6 +595,12 @@
handleFilenameCollision=True,
)
return True
+
+ QtGui.QMessageBox.critical(
+ self,
+ config.FcAppName + self.trUtf8(' - Browser error'),
+ self.trUtf8('Can not download key (key is invalid)')
+ )
return False
#########################################
@@ -681,7 +689,7 @@
act.setText(self.trUtf8('Open image in new tab'))
act = browser.pageAction(page.OpenFrameInNewWindow)
act.setText(self.trUtf8('Open frame in new tab'))
-
+
# customize page
page.setLinkDelegationPolicy(page.DelegateAllLinks)
@@ -712,6 +720,14 @@
return menu
#########################################
+ ## overwritten methods
+ #########################################
+ #TODO: retranslate adjusted browser actions for all browsers
+ #TODO: retranslate all tab texts we inserted. mabe a flag tabHasCustomText
+ def retranslateUi(self, me):
+ Ui_ViewBrowserWidget.retranslateUi(self, me)
+
+ #########################################
## overwritten events
#########################################
def closeEvent(self):
@@ -762,6 +778,12 @@
menu.addAction(browser.pageAction(page.Copy))
menu.addAction(self.fcActions['ActionObjectProperties'])
+ #TODO: QwebView assumes we can download queries - we can't
+ if browser.pageAction(page.DownloadLinkToDisk).isEnabled():
+ result = config.qStringToFcpKey(hitTestResult.linkUrl().toString())
+ if result is None:
+ browser.pageAction(page.DownloadLinkToDisk).setEnabled(False)
+
action = menu.exec_(pt)
if action == browser.pageAction(page.OpenLinkInNewWindow):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|