<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -17,8 +17,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-import sys
-
 import wx
 import wx.gizmos
 import wx.stc</diff>
      <filename>rdiviewer/gui/controls.py</filename>
    </modified>
    <modified>
      <diff>@@ -16,17 +16,20 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+import sys
 
 import wx
-import wx.gizmos
-import wx.stc
-import wx.lib.mixins.listctrl
+import  wx.lib.filebrowsebutton as filebrowse
 
 import rdiviewer.common as common
 
+def _set_control_gap(sizer):
+    sizer.SetHGap(10)
+    sizer.SetVGap(2)
+
 class AboutDialog(wx.Dialog):
     def __init__(
-            self, parent, ID, title, size=wx.DefaultSize, pos=wx.DefaultPosition, 
+            self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize,  
             style=wx.DEFAULT_DIALOG_STYLE
             ):
 
@@ -36,7 +39,7 @@ class AboutDialog(wx.Dialog):
         # method.
         pre = wx.PreDialog()
         pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP)
-        pre.Create(parent, ID, title, pos, size, style)
+        pre.Create(parent, ID, u&quot;About&quot;, pos, size, style)
 
         # This next step is the most important, it turns this Python
         # object into the real wrapper of the dialog (instead of pre)
@@ -47,69 +50,122 @@ class AboutDialog(wx.Dialog):
         # contents
         sizer = wx.BoxSizer(wx.VERTICAL)
 
-
         box = wx.BoxSizer(wx.HORIZONTAL)
-
         label = wx.StaticText(self, -1, &quot;Author:&quot;)
         box.Add(label, 0, wx.ALIGN_RIGHT|wx.ALL, 5)
-
         label = wx.StaticText(self, -1, u&quot;Adi J&#246;rg Sieker&quot;)
         box.Add(label, 1, wx.ALIGN_LEFT|wx.ALL, 5)
-
         sizer.Add(box, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
 
 
-
         box = wx.BoxSizer(wx.HORIZONTAL)
-
         label = wx.StaticText(self, -1, u&quot;Version:&quot;)
         box.Add(label, 0, wx.ALIGN_RIGHT|wx.ALL, 5)
-
         label = wx.StaticText(self, -1, common.version)
         box.Add(label, 1, wx.ALIGN_LEFT|wx.ALL, 5)
-
         sizer.Add(box, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
 
 
         box = wx.BoxSizer(wx.HORIZONTAL)
-
         label = wx.StaticText(self, -1, u&quot;Homepage:&quot;)
         box.Add(label, 0, wx.ALIGN_RIGHT|wx.ALL, 5)
-
         label = wx.StaticText(self, -1, u&quot;http://www.sieker.info/&quot;)
         box.Add(label, 1, wx.ALIGN_LEFT|wx.ALL, 5)
-
         sizer.Add(box, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
 
         box = wx.BoxSizer(wx.HORIZONTAL)
-
         label = wx.StaticText(self, -1, u&quot;Environment:&quot;)
         box.Add(label, 0, wx.ALIGN_RIGHT|wx.ALL, 5)
-
         label = wx.StaticText(self, -1, wx.VERSION_STRING + &quot;,&quot; + sys.version.split(' ')[0])
         box.Add(label, 1, wx.ALIGN_LEFT|wx.ALL, 5)
-
         sizer.Add(box, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
 
         box = wx.BoxSizer(wx.HORIZONTAL)
-
         label = wx.StaticText(self, -1, u&quot;Copyright:&quot;)
         box.Add(label, 0, wx.ALIGN_RIGHT|wx.ALL, 5)
-
         label = wx.StaticText(self, -1, u&quot;Adi J&#246;rg Sieker 2004-2008&quot;)
         box.Add(label, 1, wx.ALIGN_LEFT|wx.ALL, 5)
-
         sizer.Add(box, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
 
 
         box = wx.BoxSizer(wx.HORIZONTAL)
-
         btn = wx.Button(self, wx.ID_OK, &quot; OK &quot;)
         btn.SetDefault()
         box.Add(btn, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
-
         sizer.Add(box, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
 
+
         self.SetSizer(sizer)
         self.SetAutoLayout(True)
         sizer.Fit(self)
+
+class PreferencesDialog(wx.Dialog):
+    def __init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, 
+            style=wx.DEFAULT_DIALOG_STYLE):
+        # Instead of calling wx.Dialog.__init__ we precreate the dialog
+        # so we can set an extra style that must be set before
+        # creation, and then we create the GUI dialog using the Create
+        # method.
+        pre = wx.PreDialog()
+        pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP)
+        pre.Create(parent, ID, u&quot;Preferences&quot;, pos, size, style)
+
+        # This next step is the most important, it turns this Python
+        # object into the real wrapper of the dialog (instead of pre)
+        # as far as the wxPython extension is concerned.
+        self.PostCreate(pre)
+
+        # Now continue with the normal construction of the dialog
+        # contents
+        self._DefineControlAndEvents()
+
+    def SetData(self, data):
+        self.data = data
+    
+    def _GetPanel(self):
+        panel = wx.Panel(self)
+        sizer = wx.BoxSizer(wx.VERTICAL)
+
+        #INI_SPOOL_DIR = &quot;/Spool/Directory&quot;
+        self.spool_dir_dbb = filebrowse.DirBrowseButton(
+            self, -1, size=(400, -1), labelText = u&quot;Spoolverzeichnis:&quot;, buttonText = u&quot;Ausw&#228;hlen&quot;, 
+            startDirectory = wx.ConfigBase_Get().Read(common.INI_SPOOL_DIR, &quot;&quot;),changeCallback = self.OnSpoolDirCallback
+            )
+        sizer.Add(self.spool_dir_dbb, 1, wx.GROW|wx.ALL, 5)
+
+        #INI_SPOOL_FILE_EXT = &quot;/Spool/FileExtension&quot;
+        box = wx.BoxSizer(wx.HORIZONTAL)
+        label = wx.StaticText(self, -1, u&quot;Erweiterung Spooldatei:&quot;)
+        box.Add(label, 0, wx.ALIGN_RIGHT|wx.ALL, 5)
+        self.spool_ext_ctrl = wx.TextCtrl(self, -1, size = (30, -1), value = wx.ConfigBase_Get().Read(common.INI_SPOOL_FILE_EXT, &quot;&quot;))
+        box.Add(self.spool_ext_ctrl, 0, wx.ALIGN_LEFT, 5)
+        sizer.Add(box, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
+
+        panel.SetSizer(sizer)
+        panel.SetAutoLayout(True)
+        panel.Layout()
+        return panel
+
+    def _DefineControlAndEvents(self):
+        self.panel = self._GetPanel()
+        vsizer = wx.BoxSizer(wx.VERTICAL)
+        buttonsizer = wx.BoxSizer(wx.HORIZONTAL)
+
+        self.okButton = wx.Button(self, wx.ID_OK, &quot;OK&quot;)
+        self.okButton.SetDefault()
+        self.cancelButton = wx.Button(self, wx.ID_CANCEL, &quot;Cancel&quot;)
+
+        buttonsizer.Add(self.okButton, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
+        buttonsizer.AddSpacer((10,10),0)
+        buttonsizer.Add(self.cancelButton, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
+        buttonsizer.AddSpacer((10,10),0)
+
+        vsizer.Add(self.panel,0, wx.EXPAND|wx.ALL, 5)
+        vsizer.Add(buttonsizer, 0, wx.ALIGN_RIGHT)
+
+        self.SetSizer(vsizer)
+        self.SetAutoLayout(True)
+        self.Layout()
+
+    def OnSpoolDirCallback(self, event):
+        wx.ConfigBase_Get().Write(common.INI_SPOOL_DIR, evt.GetString())
\ No newline at end of file</diff>
      <filename>rdiviewer/gui/dialogs.py</filename>
    </modified>
    <modified>
      <diff>@@ -380,9 +380,7 @@ class MainFrame(wx.Frame):
         event.Skip()
 
     def OnAboutDlg(self, event):
-        dlg = dialogs.AboutDialog(self, -1, &quot;About&quot;, size=(350, 200),
-                 #style = wxCAPTION | wxSYSTEM_MENU | wxTHICK_FRAME
-                 style = wx.DEFAULT_DIALOG_STYLE
+        dlg = dialogs.AboutDialog(self, -1, size=(350, 200)
                  )
 
         dlg.CenterOnScreen()
@@ -390,7 +388,11 @@ class MainFrame(wx.Frame):
         dlg.Destroy()
     
     def OnPreferencesDlg(self, event):
-        pass
+        dlg = dialogs.PreferencesDialog(self, -1)
+
+        dlg.CenterOnScreen()
+        val = dlg.ShowModal()
+        dlg.Destroy()
     
     def _MakeMenu(self):
         self.mainmenu = wx.MenuBar()</diff>
      <filename>rdiviewer/gui/frames.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8b45882d964c912442d50ba843031e4fe714a037</id>
    </parent>
  </parents>
  <author>
    <name>Adi Sieker</name>
    <email>adi@sieker.info</email>
  </author>
  <url>http://github.com/adsworth/rdiviewer/commit/93e72627cd2d6188bd7029884437c906a79386b0</url>
  <id>93e72627cd2d6188bd7029884437c906a79386b0</id>
  <committed-date>2008-12-11T11:00:36-08:00</committed-date>
  <authored-date>2008-12-11T11:00:36-08:00</authored-date>
  <message>added initial rough preferences dialog doesn't save values yet.</message>
  <tree>abcc051f46c0d38a8595005c9544bd6941904f18</tree>
  <committer>
    <name>Adi Sieker</name>
    <email>adi@sieker.info</email>
  </committer>
</commit>
