gpdf2swf fixes
[swftools.git] / wx / gui / options / viewer.py
index 18c70af..16758f8 100644 (file)
@@ -26,7 +26,7 @@ import os
 import wx
 import operator
 import imp
-from wx.lib.wordwrap import wordwrap
+from lib.wordwrap import wordwrap
 from gui.boldstatictext import BoldStaticText
 import viewers
 import gui.fields
@@ -47,15 +47,18 @@ class Viewers:
 
     def import_viewers(self):
         for file in self.viewers:
-            _temp = imp.load_source("viewers.%s" % file, os.path.join(os.getcwdu(), "viewers/%s.py" % file))
-            self.modules.append(_temp)
+            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
 
 
 
 class ViewerBook(wx.Listbook):
     def __init__(self, parent):
         wx.Listbook.__init__(self, parent, wx.ID_ANY, style=
-                            wx.BK_DEFAULT
+                            wx.LB_DEFAULT
                             )
 
         self.__mod = []
@@ -77,10 +80,6 @@ class ViewerBook(wx.Listbook):
             win = self.makePanel(mod)
             self.AddPage(win, mod, imageId=idx)
 
-        # A hack to avoid having the scrollbar be on bottom
-        # the first time the control is created
-        self.ListView.Select(self.ListView.GetItemCount()-1)
-        self.ListView.Select(0)
 
     def makePanel(self, mod):
         p = wx.Panel(self)