Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /newedit/src/modules/

newedit
Discussion topic

Back to topic list

CVS update: /newedit/src/modules/

Reply

Author limodou
Full name limodou
Date 2005-02-07 05:15:26 PST
Message User: limodou
Date: 05/02/07 05:15:26

Modified:
 /newedit/src/modules/
  Mixin.py

Log:
 bug fix

File Changes:

Directory: /newedit/src/modules/
====================​============

File [changed]: Mixin.py
Url: http://newedit.tigri​s.org/source/browse/​newedit/src/modules/​Mixin.py?r1=1.14​&r2=1.15
Delta lines: +3 -36
--------------------
--- Mixin.py 7 Feb 2005 13:13:05 -0000 1.14
+++ Mixin.py 7 Feb 2005 13:15:26 -0000 1.15
@@ -19,30 +19,12 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 #
-# $Id: Mixin.py,v 1.14 2005/02/07 13:13:05 limodou Exp $
+# $Id: Mixin.py,v 1.15 2005/02/07 13:15:26 limodou Exp $
 
 import types
-from Debug import debug, error
-import __builtin__
-import pickle
-import os.path
-
-#receive vars from __builtin__ module tranfered by NewEdit
-reinitpickle = __builtin__.__dict__​.get('newedit_reinit​pickle', False)
-userpath = __builtin__.__dict__​.get('newedit_userpa​th', '')
-initpicklefile = os.path.join(userpath, '.mixinpickle')
+from Debug import debug
 
 __mixinset__ = {} #used to collect all mixins and plugins
-if not reinitpickle:
- if os.path.exists(initpicklefile):
- try:
- __mixinset__ = pickle.load(file(ini​tpicklefile, 'rb'))
- except:
- __mixinset__ = {}
- reinitpickle = True
- else:
- reinitpickle = True
-
 HIGH = 1 #plugin high
 MIDDLE = 2
 LOW = 3
@@ -113,7 +95,6 @@
 # __import__(packagename+'.'+i)
 
 def setMixin(mixinname, name, value):
- if not reinitpickle: return
     if __mixinset__.has_key​(mixinname):
         mixins = __mixinset__[mixinname][0]
     else:
@@ -135,7 +116,6 @@
         mixins[name] = value
 
 def setPlugin(mixinname, name, value, kind=MIDDLE, nice=-1):
- if not reinitpickle: return
     if __mixinset__.has_key​(mixinname):
         plugins = __mixinset__[mixinname][1]
     else:
@@ -154,19 +134,6 @@
         plugins[name].sort()
     else:
         plugins[name] = [(nice, value)]
-
-def save_mixin_pickle():
- if reinitpickle:
- try:
- f = file(initpicklefile, 'wb')
- pickle.dump(__mixinset__, f)
- f.close()
- except:
- error.traceback()
- if f:
- f.close()
- os.remove(initpicklefile)
- raise
 
 def setProperty(obj, name, value):
     t = type(value)




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@newe​dit.tigris.org
For additional commands, e-mail: cvs-help at newedit dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /newedit/src/modules/ limodou limodou 2005-02-07 05:15:26 PST
Messages per page: