Index: oup/current/Tools/BinEdit.dfm
===================================================================
--- oup/current/Tools/BinEdit.dfm	(revision 217)
+++ oup/current/Tools/BinEdit.dfm	(revision 218)
@@ -1,232 +1,286 @@
 inherited Form_BinEdit: TForm_BinEdit
-  Caption = 'BinEdit'
-  KeyPreview = True
+  Caption = 'Form_BinEdit'
   OnCloseQuery = FormCloseQuery
   OnCreate = FormCreate
   OnKeyUp = FormKeyUp
-  ExplicitWidth = 500
-  ExplicitHeight = 450
   PixelsPerInch = 96
   TextHeight = 13
-  inherited panel_files: TPanel
-    inherited filelist: TListBox
-      Height = 210
-      ExplicitHeight = 210
-    end
-    object panel_imexport: TPanel
-      Left = 0
-      Top = 363
-      Width = 200
-      Height = 60
-      Align = alBottom
-      BevelOuter = bvNone
-      TabOrder = 2
-      DesignSize = (
-        200
-        60)
-      object btn_export: TButton
-        Left = 4
-        Top = 4
-        Width = 190
-        Height = 25
-        Anchors = [akLeft, akTop, akRight]
-        Caption = 'Export to file...'
+  inherited panel_basecontent: TPanel
+    inherited panel_files: TPanel
+      ExplicitHeight = 532
+      inherited filelist: TListBox
+        Height = 347
+        OnClick = nil
+        OnMouseDown = nil
+        ExplicitTop = 125
+        ExplicitHeight = 407
+      end
+      inherited panel_extension: TPanel
+        inherited btn_sort_id_asc: TSpeedButton
+          OnClick = nil
+        end
+        inherited btn_sort_id_desc: TSpeedButton
+          OnClick = nil
+        end
+        inherited btn_sort_name_asc: TSpeedButton
+          OnClick = nil
+        end
+        inherited btn_sort_name_desc: TSpeedButton
+          OnClick = nil
+        end
+        inherited btn_sort_ext_asc: TSpeedButton
+          OnClick = nil
+        end
+        inherited btn_sort_ext_desc: TSpeedButton
+          OnClick = nil
+        end
+        inherited combo_extension: TComboBox
+          OnClick = nil
+        end
+        inherited check_zerobyte: TCheckBox
+          OnClick = nil
+        end
+        inherited check_filtername: TCheckBox
+          OnClick = nil
+        end
+      end
+      object panel_imexport: TPanel
+        Left = 0
+        Top = 472
+        Width = 200
+        Height = 60
+        Align = alBottom
+        BevelOuter = bvNone
+        TabOrder = 2
+        ExplicitTop = 363
+        DesignSize = (
+          200
+          60)
+        object btn_export: TButton
+          Left = 4
+          Top = 4
+          Width = 190
+          Height = 25
+          Anchors = [akLeft, akTop, akRight]
+          Caption = 'Export to file...'
+          TabOrder = 0
+        end
+        object btn_import: TButton
+          Left = 4
+          Top = 32
+          Width = 190
+          Height = 25
+          Anchors = [akLeft, akTop, akRight]
+          Caption = 'Import from file...'
+          TabOrder = 1
+        end
+      end
+    end
+    inherited panel_content: TPanel
+      ExplicitTop = 0
+      ExplicitWidth = 390
+      ExplicitHeight = 532
+      object Splitter2: TSplitter
+        Left = 0
+        Top = 209
+        Width = 390
+        Height = 8
+        Cursor = crVSplit
+        Align = alTop
+        AutoSnap = False
+        Beveled = True
+        MinSize = 40
+      end
+      object Splitter3: TSplitter
+        Left = 0
+        Top = 435
+        Width = 390
+        Height = 0
+        Cursor = crVSplit
+        Align = alBottom
+        AutoSnap = False
+        Beveled = True
+        MinSize = 40
+        ExplicitLeft = 32
+        ExplicitTop = 447
+      end
+      object hex: TMPHexEditor
+        Left = 0
+        Top = 0
+        Width = 390
+        Height = 209
+        Cursor = crIBeam
+        Align = alTop
+        Font.Charset = DEFAULT_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -16
+        Font.Name = 'Courier'
+        Font.Style = []
+        OnKeyUp = hexKeyUp
+        ParentFont = False
         TabOrder = 0
-        OnClick = popup_exportClick
-      end
-      object btn_import: TButton
-        Left = 4
-        Top = 32
-        Width = 190
-        Height = 25
-        Anchors = [akLeft, akTop, akRight]
-        Caption = 'Import from file...'
+        BytesPerRow = 16
+        Translation = tkASCII
+        OffsetFormat = '6!10:0x|'
+        Colors.Background = clWindow
+        Colors.ChangedBackground = clWindow
+        Colors.ChangedText = clRed
+        Colors.CursorFrame = clNavy
+        Colors.Offset = clBlack
+        Colors.OddColumn = clBlue
+        Colors.EvenColumn = clNavy
+        Colors.CurrentOffsetBackground = clBtnShadow
+        Colors.OffsetBackGround = clBtnFace
+        Colors.CurrentOffset = clBtnHighlight
+        Colors.Grid = clBtnFace
+        Colors.NonFocusCursorFrame = clAqua
+        Colors.ActiveFieldBackground = clWindow
+        FocusFrame = True
+        NoSizeChange = True
+        AllowInsertMode = False
+        DrawGridLines = False
+        Version = 'May 23, 2005; '#169' markus stephany, vcl[at]mirkes[dot]de'
+        OnChange = hexChange
+        ShowPositionIfNotFocused = True
+        OnSelectionChanged = hexSelectionChanged
+        ExplicitLeft = 32
+        ExplicitTop = 12
+      end
+      object value_viewer: TWrapGrid
+        Left = 0
+        Top = 217
+        Width = 390
+        Height = 218
+        Align = alClient
+        ColCount = 1
+        DefaultColWidth = 80
+        DefaultRowHeight = 18
+        FixedCols = 0
+        RowCount = 8
+        FixedRows = 0
+        Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goColSizing]
+        ScrollBars = ssVertical
         TabOrder = 1
-        OnClick = popup_importClick
+        OnDblClick = value_viewerDblClick
+        OnMouseDown = value_viewerMouseDown
+        ExplicitLeft = 32
+        ExplicitTop = 544
+        ExplicitHeight = 0
+      end
+      object VST: TVirtualStringTree
+        Left = 0
+        Top = 435
+        Width = 390
+        Height = 97
+        Align = alBottom
+        AnimationDuration = 0
+        AutoExpandDelay = 300
+        BiDiMode = bdLeftToRight
+        Colors.UnfocusedSelectionColor = clGradientActiveCaption
+        Colors.UnfocusedSelectionBorderColor = clGradientActiveCaption
+        Ctl3D = True
+        DragOperations = []
+        DrawSelectionMode = smBlendedRectangle
+        EditDelay = 200
+        Font.Charset = DEFAULT_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -11
+        Font.Name = 'Tahoma'
+        Font.Style = []
+        Header.AutoSizeIndex = 0
+        Header.Font.Charset = DEFAULT_CHARSET
+        Header.Font.Color = clWindowText
+        Header.Font.Height = -11
+        Header.Font.Name = 'Tahoma'
+        Header.Font.Style = []
+        Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoVisible]
+        Header.Style = hsFlatButtons
+        HintAnimation = hatNone
+        HintMode = hmTooltip
+        Indent = 14
+        ParentBiDiMode = False
+        ParentCtl3D = False
+        ParentFont = False
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 2
+        TreeOptions.MiscOptions = [toAcceptOLEDrop, toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
+        TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowHorzGridLines, toShowRoot, toShowTreeLines, toShowVertGridLines, toUseBlendedImages]
+        TreeOptions.SelectionOptions = [toExtendedFocus, toFullRowSelect, toRightClickSelect]
+        OnDblClick = VSTDblClick
+        OnFocusChanged = VSTFocusChanged
+        OnGetText = VSTGetText
+        OnHeaderDragged = VSTHeaderDragged
+        ExplicitLeft = 32
+        ExplicitTop = 447
+        Columns = <
+          item
+            MaxWidth = 300
+            MinWidth = 100
+            Options = [coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible]
+            Position = 0
+            Spacing = 20
+            Width = 150
+            WideText = 'Name'
+            WideHint = 'Name of the item.'
+          end
+          item
+            MaxWidth = 110
+            MinWidth = 80
+            Options = [coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible]
+            Position = 1
+            Spacing = 20
+            Width = 85
+            WideText = 'Offset'
+            WideHint = 'Offset of the data-item.'
+          end
+          item
+            MaxWidth = 110
+            MinWidth = 75
+            Options = [coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible]
+            Position = 2
+            Width = 75
+            WideText = 'Type'
+            WideHint = 'Data type of the item.'
+          end
+          item
+            MaxWidth = 250
+            MinWidth = 80
+            Options = [coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible]
+            Position = 3
+            Width = 100
+            WideText = 'Value'
+            WideHint = 'Value of the item.'
+          end
+          item
+            MaxWidth = 400
+            MinWidth = 80
+            Options = [coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible]
+            Position = 4
+            Width = 400
+            WideText = 'Description'
+          end>
+        WideDefaultText = ''
       end
     end
   end
-  inherited content: TPanel
-    object Splitter2: TSplitter
-      Left = 0
-      Top = 209
-      Width = 283
-      Height = 9
-      Cursor = crVSplit
-      Align = alTop
-      AutoSnap = False
-      Beveled = True
-      MinSize = 40
-      ExplicitWidth = 425
-    end
-    object Splitter3: TSplitter
-      Left = 0
-      Top = 318
-      Width = 283
-      Height = 8
-      Cursor = crVSplit
-      Align = alBottom
-      AutoSnap = False
-      Beveled = True
-      MinSize = 40
-      ExplicitLeft = -9
-      ExplicitTop = 430
-      ExplicitWidth = 425
-    end
-    object hex: TMPHexEditor
-      Left = 0
-      Top = 0
-      Width = 283
-      Height = 209
-      Cursor = crIBeam
-      Align = alTop
-      Font.Charset = DEFAULT_CHARSET
-      Font.Color = clWindowText
-      Font.Height = -16
-      Font.Name = 'Courier'
-      Font.Style = []
-      OnKeyUp = hexKeyUp
-      ParentFont = False
-      TabOrder = 0
-      BytesPerRow = 16
-      Translation = tkASCII
-      OffsetFormat = '6!10:0x|'
-      Colors.Background = clWindow
-      Colors.ChangedBackground = clWindow
-      Colors.ChangedText = clRed
-      Colors.CursorFrame = clNavy
-      Colors.Offset = clBlack
-      Colors.OddColumn = clBlue
-      Colors.EvenColumn = clNavy
-      Colors.CurrentOffsetBackground = clBtnShadow
-      Colors.OffsetBackGround = clBtnFace
-      Colors.CurrentOffset = clBtnHighlight
-      Colors.Grid = clBtnFace
-      Colors.NonFocusCursorFrame = clAqua
-      Colors.ActiveFieldBackground = clWindow
-      FocusFrame = True
-      NoSizeChange = True
-      AllowInsertMode = False
-      DrawGridLines = False
-      Version = 'May 23, 2005; '#169' markus stephany, vcl[at]mirkes[dot]de'
-      OnChange = hexChange
-      ShowPositionIfNotFocused = True
-      OnSelectionChanged = hexSelectionChanged
-    end
-    object value_viewer: TWrapGrid
-      Left = 0
-      Top = 218
-      Width = 283
-      Height = 100
-      Align = alClient
-      ColCount = 1
-      DefaultColWidth = 80
-      DefaultRowHeight = 18
-      FixedCols = 0
-      RowCount = 8
-      FixedRows = 0
-      Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goColSizing]
-      PopupMenu = value_viewer_context
-      ScrollBars = ssVertical
-      TabOrder = 1
-      OnDblClick = value_viewerDblClick
-      OnMouseDown = value_viewerMouseDown
-    end
-    object VST: TVirtualStringTree
-      Left = 0
-      Top = 326
-      Width = 283
-      Height = 97
-      Align = alBottom
-      AnimationDuration = 0
-      AutoExpandDelay = 300
-      BiDiMode = bdLeftToRight
-      Colors.UnfocusedSelectionColor = clGradientActiveCaption
-      Colors.UnfocusedSelectionBorderColor = clGradientActiveCaption
-      Ctl3D = True
-      DragOperations = []
-      DrawSelectionMode = smBlendedRectangle
-      EditDelay = 200
-      Font.Charset = DEFAULT_CHARSET
-      Font.Color = clWindowText
-      Font.Height = -11
-      Font.Name = 'Tahoma'
-      Font.Style = []
-      Header.AutoSizeIndex = 0
-      Header.Font.Charset = DEFAULT_CHARSET
-      Header.Font.Color = clWindowText
-      Header.Font.Height = -11
-      Header.Font.Name = 'Tahoma'
-      Header.Font.Style = []
-      Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoVisible]
-      Header.PopupMenu = VTHPopup
-      Header.Style = hsFlatButtons
-      HintAnimation = hatNone
-      HintMode = hmTooltip
-      Indent = 14
-      ParentBiDiMode = False
-      ParentCtl3D = False
-      ParentFont = False
-      ParentShowHint = False
-      ShowHint = True
-      TabOrder = 2
-      TreeOptions.MiscOptions = [toAcceptOLEDrop, toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
-      TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowHorzGridLines, toShowRoot, toShowTreeLines, toShowVertGridLines, toUseBlendedImages]
-      TreeOptions.SelectionOptions = [toExtendedFocus, toFullRowSelect, toRightClickSelect]
-      OnDblClick = VSTDblClick
-      OnFocusChanged = VSTFocusChanged
-      OnGetText = VSTGetText
-      OnHeaderDragged = VSTHeaderDragged
-      Columns = <
-        item
-          MaxWidth = 300
-          MinWidth = 100
-          Options = [coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible]
-          Position = 0
-          Spacing = 20
-          Width = 150
-          WideText = 'Name'
-          WideHint = 'Name of the item.'
-        end
-        item
-          MaxWidth = 110
-          MinWidth = 80
-          Options = [coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible]
-          Position = 1
-          Spacing = 20
-          Width = 85
-          WideText = 'Offset'
-          WideHint = 'Offset of the data-item.'
-        end
-        item
-          MaxWidth = 110
-          MinWidth = 75
-          Options = [coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible]
-          Position = 2
-          Width = 75
-          WideText = 'Type'
-          WideHint = 'Data type of the item.'
-        end
-        item
-          MaxWidth = 250
-          MinWidth = 80
-          Options = [coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible]
-          Position = 3
-          Width = 100
-          WideText = 'Value'
-          WideHint = 'Value of the item.'
-        end
-        item
-          MaxWidth = 400
-          MinWidth = 80
-          Options = [coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible]
-          Position = 4
-          Width = 400
-          WideText = 'Description'
-        end>
-      WideDefaultText = ''
+  inherited filepopup: TPopupMenu
+    OnPopup = nil
+    inherited popup_linkshere: TMenuItem
+      OnClick = nil
+    end
+    inherited popup_import: TMenuItem
+      OnClick = nil
+    end
+    inherited popup_export: TMenuItem
+      OnClick = nil
     end
   end
-  object value_viewer_context: TPopupMenu [3]
+  object VTHPopup: TVTHeaderPopupMenu
+    OnColumnChange = VTHPopupColumnChange
+    Left = 272
+    Top = 376
+  end
+  object value_viewer_context: TPopupMenu
     AutoHotkeys = maManual
     AutoLineReduction = maManual
@@ -240,27 +294,17 @@
     object value_viewer_context_copyasdec: TMenuItem
       Caption = 'Copy to clipboard (as &dec)'
-      OnClick = value_viewer_context_copyClick
     end
     object value_viewer_context_copyasfloat: TMenuItem
       Caption = 'Copy to clipboard (as &float)'
-      OnClick = value_viewer_context_copyClick
     end
     object value_viewer_context_copyasbitset: TMenuItem
       Caption = 'Copy to clipboard (as &bitset)'
-      OnClick = value_viewer_context_copyClick
     end
     object value_viewer_context_copyasstring: TMenuItem
       Caption = 'Copy to clipboard (as &string)'
-      OnClick = value_viewer_context_copyClick
     end
     object value_viewer_context_copyashex: TMenuItem
       Caption = 'Copy to clipboard (as &hex)'
-      OnClick = value_viewer_context_copyClick
-    end
-  end
-  object VTHPopup: TVTHeaderPopupMenu [4]
-    OnColumnChange = VTHPopupColumnChange
-    Left = 272
-    Top = 376
+    end
   end
 end
Index: oup/current/Tools/BinEdit.pas
===================================================================
--- oup/current/Tools/BinEdit.pas	(revision 217)
+++ oup/current/Tools/BinEdit.pas	(revision 218)
@@ -1,18 +1,24 @@
 unit BinEdit;
+
 interface
+
 uses
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
-  Dialogs, VirtualTrees, Grids, Wrapgrid, MPHexEditor, StdCtrls,
-  Menus, VTHeaderPopup, ExtCtrls, Buttons, StrUtils, Clipbrd,
+  Dialogs, VirtualTrees, Grids, Wrapgrid, MPHexEditor,
+  StdCtrls, Menus, ExtCtrls, Buttons,
   Data, TypeDefs, ConnectionManager, Template,
-  _BaseTemplate, _TemplateFile, _TemplateFileList;
+  _TemplateFileList, VTHeaderPopup;
 
 type
-  TForm_BinEdit = class(TForm_ToolTemplate)
+  TForm_BinEdit = class(TForm_TemplateFileList)
+    panel_imexport: TPanel;
+    btn_export: TButton;
+    btn_import: TButton;
     hex: TMPHexEditor;
     Splitter2: TSplitter;
     value_viewer: TWrapGrid;
+    Splitter3: TSplitter;
     VST: TVirtualStringTree;
-    Splitter3: TSplitter;
+    VTHPopup: TVTHeaderPopupMenu;
     value_viewer_context: TPopupMenu;
     value_viewer_context_copy: TMenuItem;
@@ -22,17 +28,5 @@
     value_viewer_context_copyasstring: TMenuItem;
     value_viewer_context_copyashex: TMenuItem;
-    VTHPopup: TVTHeaderPopupMenu;
-    panel_imexport: TPanel;
-    btn_export: TButton;
-    btn_import: TButton;
-    procedure FormCreate(Sender: TObject);
     procedure NewFile(fileinfo: TFileInfo);
-
-    procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
-    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
-
-    procedure hexKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
-    procedure hexSelectionChanged(Sender: TObject);
-    procedure hexChange(Sender: TObject);
 
     procedure LoadDat(_fileid: Integer);
@@ -43,21 +37,28 @@
     procedure WriteStructureInfos;
     procedure ClearStructViewer;
+
+    procedure ClearValues;
+    procedure WriteValues;
+
+    procedure FormCreate(Sender: TObject);
+    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
+    procedure hexChange(Sender: TObject);
+    procedure hexKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
+    procedure hexSelectionChanged(Sender: TObject);
+    procedure value_viewerDblClick(Sender: TObject);
+    procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
+    procedure value_viewer_contextPopup(Sender: TObject);
+    procedure value_viewerMouseDown(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    procedure value_viewer_context_copyClick(Sender: TObject);
     procedure VSTDblClick(Sender: TObject);
     procedure VSTFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode;
       Column: TColumnIndex);
+    procedure VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
+      Column: TColumnIndex; TextType: TVSTTextType; var CellText: WideString);
+    procedure VSTHeaderDragged(Sender: TVTHeader; Column: TColumnIndex;
+      OldPosition: Integer);
     procedure VTHPopupColumnChange(const Sender: TBaseVirtualTree;
       const Column: TColumnIndex; Visible: Boolean);
-    procedure VSTHeaderDragged(Sender: TVTHeader; Column: TColumnIndex;
-      OldPosition: Integer);
-    procedure VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
-      Column: TColumnIndex; TextType: TVSTTextType; var CellText: WideString);
-
-    procedure ClearValues;
-    procedure WriteValues;
-    procedure value_viewerDblClick(Sender: TObject);
-    procedure value_viewer_context_copyClick(Sender: TObject);
-    procedure value_viewerMouseDown(Sender: TObject; Button: TMouseButton;
-      Shift: TShiftState; X, Y: Integer);
-    procedure value_viewer_contextPopup(Sender: TObject);
   private
     fileid: Integer;
@@ -67,11 +68,9 @@
   end;
 
-var
-  Form_BinEdit: TForm_BinEdit;
-
 implementation
-
-uses ValueEdit, Main, Functions, DatStructureLoader, RawEdit;
 {$R *.dfm}
+uses ValueEdit, Main, Functions, DatStructureLoader, RawEdit, RawList, 
+  StrUtils, Clipbrd;
+
 
 type
@@ -119,4 +118,5 @@
   //
 end;
+
 
 procedure TForm_BinEdit.NewFile(fileinfo: TFileInfo);
@@ -991,5 +991,4 @@
 
 
-
 procedure TForm_BinEdit.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
 begin
Index: oup/current/Tools/MetaEditor.dfm
===================================================================
--- oup/current/Tools/MetaEditor.dfm	(revision 217)
+++ oup/current/Tools/MetaEditor.dfm	(revision 218)
@@ -48,8 +48,4 @@
       OnPaintText = VSTPaintText
       OnInitChildren = VSTInitChildren
-      ExplicitLeft = 8
-      ExplicitTop = 60
-      ExplicitWidth = 353
-      ExplicitHeight = 325
       Columns = <
         item
@@ -80,7 +76,4 @@
       Caption = 'Panel2'
       TabOrder = 1
-      ExplicitLeft = 376
-      ExplicitTop = 92
-      ExplicitHeight = 285
     end
   end
Index: oup/current/Tools/MetaEditor.pas
===================================================================
--- oup/current/Tools/MetaEditor.pas	(revision 217)
+++ oup/current/Tools/MetaEditor.pas	(revision 218)
@@ -234,5 +234,4 @@
   inherited;
   OnNewConnection := NewCon;
-  FConnectionID := -1;
 
   VST.NodeDataSize := SizeOf(TNodeData);
Index: oup/current/Tools/_BaseTemplate.pas
===================================================================
--- oup/current/Tools/_BaseTemplate.pas	(revision 217)
+++ oup/current/Tools/_BaseTemplate.pas	(revision 218)
@@ -125,5 +125,4 @@
   FOnCheckCloseable := nil;
   FConnectionID := -1;
-  UpdateConList;
 end;
 
Index: oup/current/Tools/_TemplateFileList.dfm
===================================================================
--- oup/current/Tools/_TemplateFileList.dfm	(revision 217)
+++ oup/current/Tools/_TemplateFileList.dfm	(revision 218)
@@ -30,4 +30,6 @@
         ItemHeight = 13
         TabOrder = 0
+        OnClick = listClick
+        OnMouseDown = listMouseDown
         ExplicitTop = 153
         ExplicitHeight = 379
@@ -100,4 +102,5 @@
           ParentShowHint = False
           ShowHint = True
+          OnClick = btn_sortClick
         end
         object btn_sort_id_desc: TSpeedButton
@@ -119,4 +122,5 @@
           ParentShowHint = False
           ShowHint = True
+          OnClick = btn_sortClick
         end
         object btn_sort_name_asc: TSpeedButton
@@ -138,4 +142,5 @@
           ParentShowHint = False
           ShowHint = True
+          OnClick = btn_sortClick
         end
         object btn_sort_name_desc: TSpeedButton
@@ -157,4 +162,5 @@
           ParentShowHint = False
           ShowHint = True
+          OnClick = btn_sortClick
         end
         object btn_sort_ext_asc: TSpeedButton
@@ -176,4 +182,5 @@
           ParentShowHint = False
           ShowHint = True
+          OnClick = btn_sortClick
         end
         object btn_sort_ext_desc: TSpeedButton
@@ -195,4 +202,5 @@
           ParentShowHint = False
           ShowHint = True
+          OnClick = btn_sortClick
         end
         object bevel_filelist: TBevel
@@ -221,4 +229,5 @@
           Sorted = True
           TabOrder = 3
+          OnClick = combo_extensionClick
         end
         object check_zerobyte: TCheckBox
@@ -229,4 +238,5 @@
           Caption = 'Show &zero-byte files'
           TabOrder = 2
+          OnClick = check_zerobyteClick
         end
         object edit_filtername: TEdit
@@ -246,4 +256,5 @@
           Caption = 'Filter by file&name:'
           TabOrder = 0
+          OnClick = check_filternameClick
         end
       end
Index: oup/current/Tools/_TemplateFileList.pas
===================================================================
--- oup/current/Tools/_TemplateFileList.pas	(revision 217)
+++ oup/current/Tools/_TemplateFileList.pas	(revision 218)
@@ -37,10 +37,5 @@
     importd: TOpenDialog;
     exportd: TSaveDialog;
-  private
-    FSortBy: TSortType;
-    FAllowedExts: String;
-    FAllowMultiSelect: Boolean;
-    procedure SetAllowedExts(exts: String);
-    procedure SetMultiSelect(allow: Boolean);
+    procedure NewCon(ID: Integer);
 
     procedure check_filternameClick(Sender: TObject);
@@ -57,4 +52,10 @@
     procedure popup_linkshereClick(Sender: TObject);
     procedure filepopupPopup(Sender: TObject);
+  private
+    FSortBy: TSortType;
+    FAllowedExts: String;
+    FAllowMultiSelect: Boolean;
+    procedure SetAllowedExts(exts: String);
+    procedure SetMultiSelect(allow: Boolean);
   public
     constructor Create(AOwner: TComponent); override;
@@ -71,5 +72,6 @@
 implementation
 {$R *.dfm}
-uses ConnectionManager, Exporters, Functions, StrUtils, WhatLinksHere, Main;
+uses ConnectionManager, Exporters, Functions, StrUtils, WhatLinksHere, Main,
+  _BaseTemplate;
 
 
@@ -131,4 +133,9 @@
 end;
 
+
+procedure TForm_TemplateFileList.NewCon(ID: Integer);
+begin
+  RecreateExtList;
+end;
 
 procedure TForm_TemplateFileList.popup_exportClick(Sender: TObject);
@@ -333,4 +340,6 @@
   FAllowedExts := '';
   FAllowMultiSelect := False;
+  FOnNewConnection := NewCon;
+  UpdateConList;
   if Length(ToolList) > 0 then
   begin
