SF.net SVN: fclient:[740] trunk/fclient/src/fclient
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-25 08:06:47
|
Revision: 740
http://fclient.svn.sourceforge.net/fclient/?rev=740&view=rev
Author: jUrner
Date: 2008-07-25 08:06:56 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
add AutoLoadImages browser setting
Modified Paths:
--------------
trunk/fclient/src/fclient/Ui_PrefsBrowserWidget.py
trunk/fclient/src/fclient/Ui_ViewBrowser.py
trunk/fclient/src/fclient/tpls/PrefsBrowserWidgetTpl.ui
trunk/fclient/src/fclient/tpls/Ui_PrefsBrowserWidgetTpl.py
Modified: trunk/fclient/src/fclient/Ui_PrefsBrowserWidget.py
===================================================================
--- trunk/fclient/src/fclient/Ui_PrefsBrowserWidget.py 2008-07-25 08:06:22 UTC (rev 739)
+++ trunk/fclient/src/fclient/Ui_PrefsBrowserWidget.py 2008-07-25 08:06:56 UTC (rev 740)
@@ -21,6 +21,7 @@
IdCkOpenLinksInNewTab = 'ckOpenLinksInNewTab'
IdCkOpenHomePageOnNewTabCreated = 'ckOpenHomePageOnNewTabCreated'
IdCkBackIsClose = 'ckBackIsClose'
+ IdCkAutoLoadImages = 'ckAutoLoadImages'
def __init__(self, parent):
QtGui.QWidget.__init__(self, parent)
@@ -40,6 +41,8 @@
ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('OpenHomePageOnNewTabCreated') else QtCore.Qt.Unchecked)
ck = self.controlById(self.IdCkBackIsClose)
ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('BackIsClose') else QtCore.Qt.Unchecked)
+ ck = self.controlById(self.IdCkAutoLoadImages)
+ ck.setCheckState(QtCore.Qt.Checked if browser.fcSettings.value('AutoLoadImages') else QtCore.Qt.Unchecked)
def controlById(self, idControl):
return getattr(self, idControl)
@@ -56,6 +59,7 @@
OpenLinksInNewTab=self.controlById(self.IdCkOpenLinksInNewTab).checkState() == QtCore.Qt.Checked,
OpenHomePageOnNewTabCreated=self.controlById(self.IdCkOpenHomePageOnNewTabCreated).checkState() == QtCore.Qt.Checked,
BackIsClose=self.controlById(self.IdCkBackIsClose).checkState() == QtCore.Qt.Checked,
+ AutoLoadImages=self.controlById(self.IdCkAutoLoadImages).checkState() == QtCore.Qt.Checked,
)
@@ -88,9 +92,10 @@
def doApply(self):
self._widget.apply()
+ return True
def doOk(self):
- self._widget.apply()
+ return True
#***********************************************************************
Modified: trunk/fclient/src/fclient/Ui_ViewBrowser.py
===================================================================
--- trunk/fclient/src/fclient/Ui_ViewBrowser.py 2008-07-25 08:06:22 UTC (rev 739)
+++ trunk/fclient/src/fclient/Ui_ViewBrowser.py 2008-07-25 08:06:56 UTC (rev 740)
@@ -15,6 +15,7 @@
# x. zoom in/out
# x. page actions: CopyImageToClipboard,
# x. when mouse pointer is over an opend image a magnifier cursor appears. no idea how this is handled
+# x. open new tab on tab bar double click
#******************************************************************************************
"""
@@ -222,10 +223,24 @@
('BackIsClose', 'Bool', False, config.SettingScopeUser), #TODO: not implemented
('HomePage', 'String', QtCore.QString(), config.SettingScopeUser),
('IconSize', 'UInt', 32, config.SettingScopeUser),
- ('LoadImages', 'Bool', True, config.SettingScopeUser), #TODO: not yet implemented
+ ('AutoLoadImages', 'Bool', True, config.SettingScopeUser), #TODO: not yet implemented
('MaxTabText', 'UInt', 20, config.SettingScopeUser), #NOTE: make shure Max >= Min and Max and Min > 0
('MinTabText', 'UInt', 7, config.SettingScopeUser),
)
+
+ def setValues(self, **kws):
+ autoLoadImages = kws.get('AutoLoadImages', None)
+ if autoLoadImages is not None:
+ browserWidget = self.parent()
+ tabWidget = browserWidget.controlById(browserWidget.IdTabBrowsers)
+ for i in xrange(tabWidget.count()):
+ browser = tabWidget.widget(i)
+ settings = browser.settings()
+ settings.setAttribute(settings.AutoLoadImages, autoLoadImages)
+ config.SettingsBase.setValues(self, **kws)
+
+
+
class BrowserWidgetActions(config.ActionsBase):
@@ -322,10 +337,6 @@
self._initialConfigDataArrived = False
- #XXX ?
- #self.fproxyHost = None
- #self.fproxyPort = None
-
self.fcActions = BrowserWidgetActions(self)
self.fcSettings = BrowserWidgetSettings(self).restore()
self.fcViewObject = BrowserWidgetViewObject(self)
@@ -474,6 +485,7 @@
settings.setAttribute(settings.JavascriptCanOpenWindows, False)
settings.setAttribute(settings.JavascriptCanAccessClipboard, False)
settings.setAttribute(settings.PluginsEnabled, False)
+ settings.setAttribute(settings.AutoLoadImages, self.fcSettings.value('AutoLoadImages'))
# connect browser signals
self.connect(browser, QtCore.SIGNAL('loadStarted()'), self.onBrowserLoadStarted)
Modified: trunk/fclient/src/fclient/tpls/PrefsBrowserWidgetTpl.ui
===================================================================
--- trunk/fclient/src/fclient/tpls/PrefsBrowserWidgetTpl.ui 2008-07-25 08:06:22 UTC (rev 739)
+++ trunk/fclient/src/fclient/tpls/PrefsBrowserWidgetTpl.ui 2008-07-25 08:06:56 UTC (rev 740)
@@ -67,10 +67,6 @@
</widget>
</item>
</layout>
- <zorder>ckOpenLinksInNewTab</zorder>
- <zorder>ckOpenBookmarksInNewTab</zorder>
- <zorder>ckOpenAddressBarInNewTab</zorder>
- <zorder>groupBox_2</zorder>
</widget>
</item>
<item>
@@ -99,6 +95,13 @@
</property>
</widget>
</item>
+ <item row="2" column="0" >
+ <widget class="QCheckBox" name="ckAutoLoadImages" >
+ <property name="text" >
+ <string>Auto load images</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
Modified: trunk/fclient/src/fclient/tpls/Ui_PrefsBrowserWidgetTpl.py
===================================================================
--- trunk/fclient/src/fclient/tpls/Ui_PrefsBrowserWidgetTpl.py 2008-07-25 08:06:22 UTC (rev 739)
+++ trunk/fclient/src/fclient/tpls/Ui_PrefsBrowserWidgetTpl.py 2008-07-25 08:06:56 UTC (rev 740)
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file '/home/me/src/proj/fclient/trunk/fclient/src/fclient/tpls/PrefsBrowserWidgetTpl.ui'
#
-# Created: Thu Jul 24 12:03:27 2008
+# Created: Fri Jul 25 10:02:49 2008
# by: PyQt4 UI code generator 4.4.3-snapshot-20080705
#
# WARNING! All changes made in this file will be lost!
@@ -61,6 +61,9 @@
self.ckBackIsClose = QtGui.QCheckBox(self.groupBox_2)
self.ckBackIsClose.setObjectName("ckBackIsClose")
self.gridLayout_2.addWidget(self.ckBackIsClose, 1, 0, 1, 1)
+ self.ckAutoLoadImages = QtGui.QCheckBox(self.groupBox_2)
+ self.ckAutoLoadImages.setObjectName("ckAutoLoadImages")
+ self.gridLayout_2.addWidget(self.ckAutoLoadImages, 2, 0, 1, 1)
self.horizontalLayout.addWidget(self.groupBox_2)
self.gridLayout_3.addLayout(self.horizontalLayout, 1, 0, 1, 1)
spacerItem = QtGui.QSpacerItem(20, 297, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
@@ -79,6 +82,7 @@
self.groupBox_2.setTitle(QtGui.QApplication.translate("PrefsBrowserWidget", "Others", None, QtGui.QApplication.UnicodeUTF8))
self.ckOpenHomePageOnNewTabCreated.setText(QtGui.QApplication.translate("PrefsBrowserWidget", "Open home page when a new tab is created", None, QtGui.QApplication.UnicodeUTF8))
self.ckBackIsClose.setText(QtGui.QApplication.translate("PrefsBrowserWidget", "Back is close", None, QtGui.QApplication.UnicodeUTF8))
+ self.ckAutoLoadImages.setText(QtGui.QApplication.translate("PrefsBrowserWidget", "Auto load images", None, QtGui.QApplication.UnicodeUTF8))
if __name__ == "__main__":
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|