Thread: SF.net SVN: fclient:[861] trunk/fclient/fclient/impl/config.py
Status: Pre-Alpha
Brought to you by:
jurner
From: <jU...@us...> - 2008-08-02 11:36:14
|
Revision: 861 http://fclient.svn.sourceforge.net/fclient/?rev=861&view=rev Author: jUrner Date: 2008-08-02 11:36:24 +0000 (Sat, 02 Aug 2008) Log Message: ----------- title bar support Modified Paths: -------------- trunk/fclient/fclient/impl/config.py Modified: trunk/fclient/fclient/impl/config.py =================================================================== --- trunk/fclient/fclient/impl/config.py 2008-08-02 11:35:59 UTC (rev 860) +++ trunk/fclient/fclient/impl/config.py 2008-08-02 11:36:24 UTC (rev 861) @@ -137,6 +137,7 @@ self.id = idGlobalFeedback self.menuBar = None self.statusBar = None + self.titleBar = None feedbackParent = ObjectRegistry.get(idGlobalFeedback, None) if feedbackParent is not None: @@ -146,6 +147,9 @@ mthd = getattr(feedbackParent, 'statusBar', None) if mthd is not None: self.statusBar = mthd() + mthd = getattr(feedbackParent, 'titleBar', None) + if mthd is not None: + self.titleBar = mthd() def setVisible(self, flag): pass This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jU...@us...> - 2008-08-09 07:34:14
|
Revision: 875 http://fclient.svn.sourceforge.net/fclient/?rev=875&view=rev Author: jUrner Date: 2008-08-09 07:34:24 +0000 (Sat, 09 Aug 2008) Log Message: ----------- bit more work to guess a fileName from a key Modified Paths: -------------- trunk/fclient/fclient/impl/config.py Modified: trunk/fclient/fclient/impl/config.py =================================================================== --- trunk/fclient/fclient/impl/config.py 2008-08-09 07:33:38 UTC (rev 874) +++ trunk/fclient/fclient/impl/config.py 2008-08-09 07:34:24 UTC (rev 875) @@ -4,6 +4,7 @@ if __name__ == '__main__': # see --> http://bugs.python.org/issue1510172 . works only current dir and below import os; __path__ = [os.path.dirname(__file__)] +import posixpath import os import weakref from PyQt4 import QtCore @@ -189,15 +190,19 @@ @paran default: what to return when no filename could be guessed? @return: (QString) filename or or default if no filename was found """ - key = fcpKey.toString().rstrip('/') filename = '' if fcpKey.KeyType == fcp2.ConstKeyType.KSK: if fcpKey.docName is not None: - filename = os.path.basename(fcpKey.docName) + filename = posixpath.basename(fcpKey.docName) + elif fcpKey.KeyType == fcp2.ConstKeyType.CHK: #TODO: docName and tail allowed for CHKs? check fcp2.Key.CHK + if fcpKey.tail is not None: + filename = posixpath.basename(fcpKey.tail) + else: + if fcpKey.docName is not None: + filename = posixpath.basename(fcpKey.docName) else: - filename = os.path.basename(key) - if filename == key: - filename = '' + if fcpKey.tail is not None: + filename = posixpath.basename(fcpKey.tail) if filename: return QtCore.QString(filename) return default This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jU...@us...> - 2008-08-09 11:22:06
|
Revision: 880 http://fclient.svn.sourceforge.net/fclient/?rev=880&view=rev Author: jUrner Date: 2008-08-09 11:22:16 +0000 (Sat, 09 Aug 2008) Log Message: ----------- whitespace Modified Paths: -------------- trunk/fclient/fclient/impl/config.py Modified: trunk/fclient/fclient/impl/config.py =================================================================== --- trunk/fclient/fclient/impl/config.py 2008-08-09 08:21:58 UTC (rev 879) +++ trunk/fclient/fclient/impl/config.py 2008-08-09 11:22:16 UTC (rev 880) @@ -281,5 +281,3 @@ def mimeTypeIconName(mimeType): return KnownMimeTypes.get(mimeType, 'mimetype-unknown') - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jU...@us...> - 2008-08-10 08:01:45
|
Revision: 887 http://fclient.svn.sourceforge.net/fclient/?rev=887&view=rev Author: jUrner Date: 2008-08-10 08:01:53 +0000 (Sun, 10 Aug 2008) Log Message: ----------- update version Modified Paths: -------------- trunk/fclient/fclient/impl/config.py Modified: trunk/fclient/fclient/impl/config.py =================================================================== --- trunk/fclient/fclient/impl/config.py 2008-08-10 07:54:24 UTC (rev 886) +++ trunk/fclient/fclient/impl/config.py 2008-08-10 08:01:53 UTC (rev 887) @@ -16,7 +16,7 @@ #********************************************************************************** FcOrgName = 'fclient' FcAppName = 'fclient' -FcVersion = '0.1.0' +FcVersion = '0.0.1' FcAuthor = 'Juergen Urner' FcLicence = 'MIT' FcCopyright = '(c) 2008 Juergen Urner' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jU...@us...> - 2008-08-11 10:42:39
|
Revision: 898 http://fclient.svn.sourceforge.net/fclient/?rev=898&view=rev Author: jUrner Date: 2008-08-11 10:42:48 +0000 (Mon, 11 Aug 2008) Log Message: ----------- new versionno Modified Paths: -------------- trunk/fclient/fclient/impl/config.py Modified: trunk/fclient/fclient/impl/config.py =================================================================== --- trunk/fclient/fclient/impl/config.py 2008-08-11 10:42:29 UTC (rev 897) +++ trunk/fclient/fclient/impl/config.py 2008-08-11 10:42:48 UTC (rev 898) @@ -16,7 +16,7 @@ #********************************************************************************** FcOrgName = 'fclient' FcAppName = 'fclient' -FcVersion = '0.0.1' +FcVersion = '0.0.2' FcAuthor = 'Juergen Urner' FcLicence = 'MIT' FcCopyright = '(c) 2008 Juergen Urner' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jU...@us...> - 2008-08-17 12:59:27
|
Revision: 939 http://fclient.svn.sourceforge.net/fclient/?rev=939&view=rev Author: jUrner Date: 2008-08-17 12:59:35 +0000 (Sun, 17 Aug 2008) Log Message: ----------- need fixed order for object registry Modified Paths: -------------- trunk/fclient/fclient/impl/config.py Modified: trunk/fclient/fclient/impl/config.py =================================================================== --- trunk/fclient/fclient/impl/config.py 2008-08-17 12:58:43 UTC (rev 938) +++ trunk/fclient/fclient/impl/config.py 2008-08-17 12:59:35 UTC (rev 939) @@ -6,7 +6,6 @@ import posixpath import os -import weakref from PyQt4 import QtCore from .lib import fcp2 @@ -47,26 +46,45 @@ IdDlgPrefs = 'DlgPrefs' #TODO: turn into view object? -class ObjectRegistry(weakref.WeakValueDictionary): +class ObjectRegistry(object): """global object registry - use the registry to register and retrieve ui objects previously registerd by their object ids (Id*). - ObjectRegistry is actually a WeakValueDictionary. so use as a dict + use the registry to register and retrieve view objects. order of the view objects is guaranteed to + be stable in order of the objects registering """ + def __init__(self): + self._names = [] + self._viewObjects = [] + + def __iter__(self): + return iter(self._viewObjects) + + def __getitem__(self, viewObjectName): + return self._viewObjects[self._names.index(viewObjectName)] + + + def get(self, viewObjectName, default=None): + try: + return self[viewObjectName] + except ValueError: + return default + def register(self, viewObject): """regisdters an object in the registry @param viewObject: view object to register @note: QObject.objectName() is taken as id. ids have to be unique throughout the runtime of the gui """ - ido = viewObject.name() - if ido in self: - raise ValueError('view object already registered: %s' % ido) - self[ido] = viewObject - + viewObjectName = viewObject.name() + if viewObjectName in self._names: + raise ValueError('view object already registered: %s' % viewObjectName) + self._names.append(viewObjectName) + self._viewObjects.append(viewObject) + def unregister(self, viewObject): - del self[str(viewObject.name())] - + viewObjectName = viewObject.name() + self._names.remove(viewObjectName) + self._viewObjects.remove(viewObject) ObjectRegistry = ObjectRegistry() #********************************************************************************** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jU...@us...> - 2008-08-19 11:41:45
|
Revision: 945 http://fclient.svn.sourceforge.net/fclient/?rev=945&view=rev Author: jUrner Date: 2008-08-19 11:41:55 +0000 (Tue, 19 Aug 2008) Log Message: ----------- remove some superfluous code Modified Paths: -------------- trunk/fclient/fclient/impl/config.py Modified: trunk/fclient/fclient/impl/config.py =================================================================== --- trunk/fclient/fclient/impl/config.py 2008-08-19 09:21:44 UTC (rev 944) +++ trunk/fclient/fclient/impl/config.py 2008-08-19 11:41:55 UTC (rev 945) @@ -62,8 +62,7 @@ def __getitem__(self, viewObjectName): return self._viewObjects[self._names.index(viewObjectName)] - - + def get(self, viewObjectName, default=None): try: return self[viewObjectName] @@ -167,21 +166,6 @@ if mthd is not None: self.titleBar = mthd() - def setVisible(self, flag): - pass - - -class ViewObject(QtCore.QObject): - """base class for view objects""" - - def __init__(self, parent): - QtCore.QObject.__init__(self, parent) - - self.name = '' #unique name of the view - self.displayName = '' # name as shown t the user - self.icon = None # QIcon associated to the view - - #******************************************************************************** # #******************************************************************************** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jU...@us...> - 2008-08-22 13:00:57
|
Revision: 958 http://fclient.svn.sourceforge.net/fclient/?rev=958&view=rev Author: jUrner Date: 2008-08-22 13:01:07 +0000 (Fri, 22 Aug 2008) Log Message: ----------- add mssing GlobalFeedback base method Modified Paths: -------------- trunk/fclient/fclient/impl/config.py Modified: trunk/fclient/fclient/impl/config.py =================================================================== --- trunk/fclient/fclient/impl/config.py 2008-08-22 13:00:19 UTC (rev 957) +++ trunk/fclient/fclient/impl/config.py 2008-08-22 13:01:07 UTC (rev 958) @@ -165,6 +165,9 @@ mthd = getattr(feedbackWidget, 'titleBar', None) if mthd is not None: self.titleBar = mthd() + + def setVisible(self, flag): + pass #******************************************************************************** # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |