X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=wx%2Fgui%2Foptions%2Fviewer.py;h=0432cacdd62761021a43b27a601623e4b74055a3;hp=16758f8f23a9e018ffb63b92ecb8aabd87375349;hb=4372ebe4a0e2197cf8f9e5f7af1decadf7ef44f6;hpb=66df092f4ed9c62b8d9c1498c93cae2b1d50ec02 diff --git a/wx/gui/options/viewer.py b/wx/gui/options/viewer.py index 16758f8..0432cac 100644 --- a/wx/gui/options/viewer.py +++ b/wx/gui/options/viewer.py @@ -31,10 +31,35 @@ from gui.boldstatictext import BoldStaticText import viewers import gui.fields +# this two are only to satisfy some plugins requirements +import gui.plugin +import shutil + +#import viewers.raw +#import viewers.simple +#import viewers.rfx +#import viewers.flexpaper +#import viewers.technoargia + class Viewers: def __init__(self): + #self.viewers = [ + # 'raw', + # 'simple', + # 'rfx', + # 'flexpaper', + # 'technoargia', + #] self.viewers = [] + #self.modules = [ + # viewers.raw, + # viewers.simple, + # viewers.rfx, + # viewers.flexpaper, + # viewers.technoargia, + #] self.modules = [] + self.list_viewers() self.import_viewers() @@ -50,8 +75,8 @@ class Viewers: try: _temp = imp.load_source("viewers.%s" % file, os.path.join(os.getcwdu(), "viewers/%s.py" % file)) self.modules.append(_temp) - except: - print "Could not load %s" % file + except Exception, e: + print "Could not load %s (%s)" % (file, e) @@ -79,6 +104,8 @@ class ViewerBook(wx.Listbook): win = self.makePanel(mod) self.AddPage(win, mod, imageId=idx) + if hasattr(mod, "default"): + self.SetSelection(idx) def makePanel(self, mod):