SF.net SVN: fclient:[809] trunk/fclient/src/fclient/impl
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-28 20:00:40
|
Revision: 809
http://fclient.svn.sourceforge.net/fclient/?rev=809&view=rev
Author: jUrner
Date: 2008-07-28 20:00:43 +0000 (Mon, 28 Jul 2008)
Log Message:
-----------
naming
Modified Paths:
--------------
trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py
trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py
trunk/fclient/src/fclient/impl/MainWindow.py
trunk/fclient/src/fclient/impl/PrefsConnectionWidget.py
trunk/fclient/src/fclient/impl/PrefsGlobal.py
trunk/fclient/src/fclient/impl/ViewBrowser.py
trunk/fclient/src/fclient/impl/ViewConnection.py
trunk/fclient/src/fclient/impl/ViewDownloads.py
trunk/fclient/src/fclient/impl/config.py
Modified: trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py
===================================================================
--- trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/DlgDownloadKeyToDisk.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -41,7 +41,7 @@
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
- self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Download key..'))
+ self.setWindowTitle(config.FcAppName + self.trUtf8(' - Download key..'))
self.fcSettings = Settings(self).restore()
self._fileName = None
@@ -63,7 +63,7 @@
# setup directory editbox
ed = self.controlById(self.IdEdDirectory)
- ed.setText(unicode(config.settings.value('DownloadDir')))
+ ed.setText(unicode(config.fcSettings.value('DownloadDir')))
bt = self.controlById(self.IdBtChooseDirectory)
self.connect(bt, QtCore.SIGNAL('clicked()'), self.onChooseDirectory)
@@ -122,7 +122,7 @@
edDirectory = self.controlById(self.IdEdDirectory)
directory = QtGui.QFileDialog.getExistingDirectory(
self,
- config.FclientAppName + self.trUtf8(' - Download key to..'),
+ config.FcAppName + self.trUtf8(' - Download key to..'),
edDirectory.text(),
)
if directory:
Modified: trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py
===================================================================
--- trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/DlgPropsBrowserObject.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -35,7 +35,7 @@
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
- self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Properties'))
+ self.setWindowTitle(config.FcAppName + self.trUtf8(' - Properties'))
if hitTestResult is not None:
Modified: trunk/fclient/src/fclient/impl/MainWindow.py
===================================================================
--- trunk/fclient/src/fclient/impl/MainWindow.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/MainWindow.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -1,5 +1,5 @@
from __future__ import absolute_import
-if __name__ == '__main__': # see --> http://bugs.python.org/issue1510172 . works only current dir and below
+if __name__ == '__main__': # see --> http://bugs.Fc.org/issue1510172 . works only current dir and below
import os; __path__ = [os.path.dirname(__file__)]
import logging
@@ -62,13 +62,13 @@
self.menuApplication = QtGui.QMenu(self.trUtf8('&Application'), self)
self.addMenu(self.menuApplication)
- self.menuApplication.addAction(parent.fclientActions['ActionPreferences'])
- self.menuApplication.addAction(parent.fclientActions['ActionExit'])
+ self.menuApplication.addAction(parent.fcActions['ActionPreferences'])
+ self.menuApplication.addAction(parent.fcActions['ActionExit'])
self.menuHelp = QtGui.QMenu(self.trUtf8('&Help'), self)
self.addMenu(self.menuHelp)
- self.menuHelp.addAction(parent.fclientActions['ActionAbout'])
- self.menuHelp.addAction(parent.fclientActions['ActionHelp'])
+ self.menuHelp.addAction(parent.fcActions['ActionAbout'])
+ self.menuHelp.addAction(parent.fcActions['ActionHelp'])
def addViewMenu(self, menu):
@@ -97,18 +97,18 @@
self.setupUi(self)
config.ObjectRegistry.register(self)
- self.fclientSettings = Settings().restore()
- self.fclientActions = Actions(self)
+ self.fcSettings = Settings().restore()
+ self.fcActions = Actions(self)
self.setMenuBar(MenuBar(self))
self.setStatusBar(StatusBar(self))
- self.restoreGeometry(self.fclientSettings.value('Geometry'))
+ self.restoreGeometry(self.fcSettings.value('Geometry'))
##################################################
## events
##################################################
def closeEvent(self, event):
- self.fclientSettings.setValues(Geometry=self.saveGeometry())
+ self.fcSettings.setValues(Geometry=self.saveGeometry())
def showEvent(self, event):
@@ -134,14 +134,14 @@
dlg = dlgabout.DlgAbout(
self,
##state=self.guiSettings['DlgAboutState'],
- caption=config.FclientAppName + ' - ' + self.trUtf8('About'),
- appName=config.FclientAppName,
- description=self.trUtf8('a freenet client written in python and Qt4'),
- version=config.FclientVersion,
- author=config.FclientAuthor,
- licence=config.FclientLicence,
- copyright=config.FclientCopyright,
- homepage=config.FclientHomepage
+ caption=config.FcAppName + ' - ' + self.trUtf8('About'),
+ appName=config.FcAppName,
+ description=self.trUtf8('a freenet client written in Fc and Qt4'),
+ version=config.FcVersion,
+ author=config.FcAuthor,
+ licence=config.FcLicence,
+ copyright=config.FcCopyright,
+ homepage=config.FcHomepage
)
dlg.exec_()
#self.guiSettings['DlgAboutState'] = dlg.saveState()
Modified: trunk/fclient/src/fclient/impl/PrefsConnectionWidget.py
===================================================================
--- trunk/fclient/src/fclient/impl/PrefsConnectionWidget.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/PrefsConnectionWidget.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -9,7 +9,7 @@
#******************************************************************************
from __future__ import absolute_import
-if __name__ == '__main__': # see --> http://bugs.python.org/issue1510172 . works only current dir and below
+if __name__ == '__main__': # see --> http://bugs.Fc.org/issue1510172 . works only current dir and below
import os; __path__ = [os.path.dirname(__file__)]
@@ -35,7 +35,7 @@
QtGui.QWidget.__init__(self, parent)
self.setupUi(self)
- self.setWindowTitle(config.FclientAppName + self.trUtf8(' - Connection expert settings'))
+ self.setWindowTitle(config.FcAppName + self.trUtf8(' - Connection expert settings'))
self.fcSettingsControler = None
#
Modified: trunk/fclient/src/fclient/impl/PrefsGlobal.py
===================================================================
--- trunk/fclient/src/fclient/impl/PrefsGlobal.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/PrefsGlobal.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -1,6 +1,6 @@
from __future__ import absolute_import
-if __name__ == '__main__': # see --> http://bugs.python.org/issue1510172 . works only current dir and below
+if __name__ == '__main__': # see --> http://bugs.python.org/Fc1510172 . works only current dir and below
import os; __path__ = [os.path.dirname(__file__)]
@@ -73,7 +73,7 @@
ed = self.controlById(self.IdEdSettingsDir)
directory = QtGui.QFileDialog.getExistingDirectory(
self,
- config.FclientAppName + self.trUtf8(' - Select settings directory..'),
+ config.FcAppName + self.trUtf8(' - Select settings directory..'),
ed.text(),
)
if directory:
@@ -83,7 +83,7 @@
ed = self.controlById(self.IdEdDownloadDir)
directory = QtGui.QFileDialog.getExistingDirectory(
self,
- config.FclientAppName + self.trUtf8(' - Select download directory..'),
+ config.FcAppName + self.trUtf8(' - Select download directory..'),
ed.text(),
)
if directory:
Modified: trunk/fclient/src/fclient/impl/ViewBrowser.py
===================================================================
--- trunk/fclient/src/fclient/impl/ViewBrowser.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/ViewBrowser.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -33,6 +33,7 @@
if __name__ == '__main__': # see --> http://bugs.python.org/issue1510172 . works only current dir and below
import os; __path__ = [os.path.dirname(__file__)]
+import os
from PyQt4 import QtCore, QtGui, QtWebKit
from . import config
@@ -316,7 +317,7 @@
text=self.trUtf8('Back'),
trigger=None,
isEnabled=False,
- icon=config.resources.getIcon('back', iconSize, iconTheme=iconTheme),
+ icon=config.fcResources.getIcon('back', iconSize, iconTheme=iconTheme),
userData=(None, None),
)
self.action(
@@ -324,7 +325,7 @@
text=self.trUtf8('Forward'),
trigger=None,
isEnabled=False,
- icon=config.resources.getIcon('forward', iconSize, iconTheme=iconTheme),
+ icon=config.fcResources.getIcon('forward', iconSize, iconTheme=iconTheme),
userData=(None, None),
)
self.action(
@@ -332,7 +333,7 @@
text=self.trUtf8('Reload'),
trigger=None,
isEnabled=False,
- icon=config.resources.getIcon('reload_page', iconSize, iconTheme=iconTheme),
+ icon=config.fcResources.getIcon('reload_page', iconSize, iconTheme=iconTheme),
userData=(None, None),
)
self.action(
@@ -340,14 +341,14 @@
text=self.trUtf8('Stop'),
trigger=None,
isEnabled=False,
- icon=config.resources.getIcon('stop', iconSize, iconTheme=iconTheme),
+ icon=config.fcResources.getIcon('stop', iconSize, iconTheme=iconTheme),
userData=(None, None),
)
self.action(
name='ActionBackIsClose',
text=self.trUtf8('Back is close'),
- icon=config.resources.getIcon('button_cancel', iconSize, iconTheme=iconTheme),
+ icon=config.fcResources.getIcon('button_cancel', iconSize, iconTheme=iconTheme),
trigger=None,
)
@@ -513,8 +514,8 @@
# thow a dialog box at the user to select a filename
# ..qt seems to place the filename part as suggestion into the filename box. so try it
- caption = config.FclientAppName + self.trUtf8(' - Save Image To..')
- directory = unicode(config.settings.value('DownloadDir'))
+ caption = config.FcAppName + self.trUtf8(' - Save Image To..')
+ directory = unicode(config.fcSettings.value('DownloadDir'))
fileName = unicode(config.guessFileNameFromKey(key, default=QtCore.QString('')))
if directory and fileName:
Modified: trunk/fclient/src/fclient/impl/ViewConnection.py
===================================================================
--- trunk/fclient/src/fclient/impl/ViewConnection.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/ViewConnection.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -66,7 +66,7 @@
_key_ = config.IdViewConnectionWidget
_settings_ = (
('FcpAutoConnect', 'Bool', True, config.SettingScopeUser),
- ('FcpConnectionName', 'String', config.FclientConnectionName, config.SettingScopeExpert),
+ ('FcpConnectionName', 'String', config.FcConnectionName, config.SettingScopeExpert),
('FcpConnectionHost', 'String', fcp2.Client.DefaultFcpHost, config.SettingScopeUser),
('FcpConnectionPort', 'UInt', fcp2.Client.DefaultFcpPort, config.SettingScopeUser),
('FcpConnectionTimerTimeout', 'UInt', 500, config.SettingScopeExpert),
Modified: trunk/fclient/src/fclient/impl/ViewDownloads.py
===================================================================
--- trunk/fclient/src/fclient/impl/ViewDownloads.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/ViewDownloads.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -319,7 +319,7 @@
# for testing: dl some frost.zip
key = fcp2.Key('CHK@tJ0qyIr8dwvYKoSkmR1N-soABstL0RjgiYqQm3Gtv8g,Pqj7jpPUBzRgnVTaA3fEw6gE8QHcJsTwA4liL9FZ-Fg,AAIC--8/frost-04-Mar-2008.zip')
fileName = config.guessFileNameFromKey(key, default=self.trUtf8('Unknown.file'))
- directory = config.settings.value('DownloadDir')
+ directory = config.fcSettings.value('DownloadDir')
fpath = os.path.join(unicode(directory), unicode(fileName))
self.downloadFile(key, fpath)
Modified: trunk/fclient/src/fclient/impl/config.py
===================================================================
--- trunk/fclient/src/fclient/impl/config.py 2008-07-28 19:46:24 UTC (rev 808)
+++ trunk/fclient/src/fclient/impl/config.py 2008-07-28 20:00:43 UTC (rev 809)
@@ -13,23 +13,23 @@
#**********************************************************************************
#
#**********************************************************************************
-FclientOrgName = 'fclient'
-FclientAppName = 'fclient'
-FclientVersion = '0.1.0'
-FclientAuthor = 'Juergen Urner'
-FclientLicence = 'MIT'
-FclientCopyright = '(c) 2008 Juergen Urner'
-FclientHomepage = 'http://fclient.sourceforge.net/'
-FclientConnectionName = QtCore.QString(FclientAppName + '{08625b10-2b44-4689-b1bf-8baf208b9641}')
+FcOrgName = 'fclient'
+FcAppName = 'fclient'
+FcVersion = '0.1.0'
+FcAuthor = 'Juergen Urner'
+FcLicence = 'MIT'
+FcCopyright = '(c) 2008 Juergen Urner'
+FcHomepage = 'http://fclient.sourceforge.net/'
+FcConnectionName = QtCore.QString(FcAppName + '{08625b10-2b44-4689-b1bf-8baf208b9641}')
_implDir = os.path.dirname(os.path.abspath(__file__))
_fclientDir = os.path.dirname(_implDir)
-FclientImplDir = QtCore.QString(_implDir)
-FclientDir = QtCore.QString(_fclientDir)
-FclientDocDir = QtCore.QString(os.path.join(_fclientDir, 'doc'))
-FclientDownloadDir = QtCore.QString(os.path.join(_fclientDir, 'downloads'))
-FclientResDir = QtCore.QString(os.path.join(_implDir, 'res'))
-FclientSettingsDir = QtCore.QString(os.path.join(_fclientDir, 'settings'))
+FcImplDir = QtCore.QString(_implDir)
+FcDir = QtCore.QString(_fclientDir)
+FcDocDir = QtCore.QString(os.path.join(_fclientDir, 'doc'))
+FcDownloadDir = QtCore.QString(os.path.join(_fclientDir, 'downloads'))
+FcResDir = QtCore.QString(os.path.join(_implDir, 'res'))
+FcSettingsDir = QtCore.QString(os.path.join(_fclientDir, 'settings'))
del _implDir, _fclientDir
#**********************************************************************************
# looks like QObject.findChild() does not always work. docs mention troubles
@@ -93,7 +93,7 @@
scope = QtCore.QSettings.SystemScope
if self._config_settings_.value('SettingsAllUsers'):
scope = QtCore.QSettings.UserScope
- settings = QtCore.QSettings(format, scope, FclientOrgName, FclientAppName, self.parent())
+ settings = QtCore.QSettings(format, scope, FcOrgName, FcAppName, self.parent())
settings.setFallbacksEnabled(False)
return settings
@@ -101,10 +101,10 @@
class Settings(SettingsBase):
_key_ = 'ConfigSettings'
_settings_ = (
- ('SettingsDir', 'String', QtCore.QString(FclientSettingsDir), SettingScopeUser), # if not None, settings are stored locally in the app folder
+ ('SettingsDir', 'String', QtCore.QString(FcSettingsDir), SettingScopeUser), # if not None, settings are stored locally in the app folder
('SettingsAllUsers', 'Bool', False, SettingScopeUser), # store settings for all users?
- ('IconTheme', 'String', 'crystal', SettingScopeUser),
- ('DownloadDir', 'String', FclientDownloadDir, SettingScopeUser),
+ ('IconTheme', 'String', 'crystal', SettingScopeUser), #TODO: global icon theme?
+ ('DownloadDir', 'String', FcDownloadDir, SettingScopeUser),
)
SettingsBase._config_settings_ = Settings()
@@ -112,8 +112,8 @@
#
#**********************************************************************************
fcpClient = fcp2.Client() # global fcp client
-settings = Settings(None).restore() # global settings class
-resources = resources.Resources([FclientResDir, ], ) # access to global resources
+fcSettings = Settings(None).restore() # global settings class
+fcResources = resources.Resources([FcResDir, ], ) # access to global resources
#**********************************************************************************
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|