Browse Source

ADD: Search results PopupMenu items: Open in new tab, Open in Editor(need locale); UPD: Search results selection

meteu 9 years ago
parent
commit
9fceb69ef2
3 changed files with 173 additions and 89 deletions
  1. 74 66
      src/fFindDlg.lfm
  2. 2 0
      src/fFindDlg.lrt
  3. 97 23
      src/fFindDlg.pas

+ 74 - 66
src/fFindDlg.lfm

@@ -1,7 +1,7 @@
 object frmFindDlg: TfrmFindDlg
 object frmFindDlg: TfrmFindDlg
-  Left = 294
+  Left = 413
   Height = 397
   Height = 397
-  Top = 232
+  Top = 226
   Width = 839
   Width = 839
   Caption = 'Find files'
   Caption = 'Find files'
   ClientHeight = 397
   ClientHeight = 397
@@ -489,8 +489,8 @@ object frmFindDlg: TfrmFindDlg
         Caption = 'Advanced'
         Caption = 'Advanced'
         ChildSizing.LeftRightSpacing = 3
         ChildSizing.LeftRightSpacing = 3
         ChildSizing.TopBottomSpacing = 3
         ChildSizing.TopBottomSpacing = 3
-        ClientHeight = 352
-        ClientWidth = 717
+        ClientHeight = 363
+        ClientWidth = 716
         ImageIndex = 1
         ImageIndex = 1
         object cbDateFrom: TCheckBox
         object cbDateFrom: TCheckBox
           AnchorSideLeft.Control = tsAdvanced
           AnchorSideLeft.Control = tsAdvanced
@@ -531,7 +531,7 @@ object frmFindDlg: TfrmFindDlg
           Left = 3
           Left = 3
           Height = 23
           Height = 23
           Top = 37
           Top = 37
-          Width = 79
+          Width = 83
           Anchors = [akTop, akLeft, akRight, akBottom]
           Anchors = [akTop, akLeft, akRight, akBottom]
           MaxValue = 999999999
           MaxValue = 999999999
           OnChange = seNotOlderThanChange
           OnChange = seNotOlderThanChange
@@ -543,10 +543,10 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideTop.Side = asrBottom
           AnchorSideTop.Side = asrBottom
           AnchorSideRight.Control = ZVDateTo
           AnchorSideRight.Control = ZVDateTo
           AnchorSideRight.Side = asrBottom
           AnchorSideRight.Side = asrBottom
-          Left = 112
+          Left = 116
           Height = 23
           Height = 23
           Top = 37
           Top = 37
-          Width = 79
+          Width = 83
           Anchors = [akTop, akLeft, akRight]
           Anchors = [akTop, akLeft, akRight]
           Enabled = False
           Enabled = False
           ItemHeight = 15
           ItemHeight = 15
@@ -570,7 +570,7 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideLeft.Control = ZVDateTo
           AnchorSideLeft.Control = ZVDateTo
           AnchorSideTop.Control = cbDateFrom
           AnchorSideTop.Control = cbDateFrom
           AnchorSideTop.Side = asrCenter
           AnchorSideTop.Side = asrCenter
-          Left = 112
+          Left = 116
           Height = 19
           Height = 19
           Top = 127
           Top = 127
           Width = 61
           Width = 61
@@ -582,7 +582,7 @@ object frmFindDlg: TfrmFindDlg
         object cbFileSizeTo: TCheckBox
         object cbFileSizeTo: TCheckBox
           AnchorSideLeft.Control = ZVDateTo
           AnchorSideLeft.Control = ZVDateTo
           AnchorSideTop.Control = cbFileSizeFrom
           AnchorSideTop.Control = cbFileSizeFrom
-          Left = 112
+          Left = 116
           Height = 19
           Height = 19
           Top = 72
           Top = 72
           Width = 57
           Width = 57
@@ -601,7 +601,7 @@ object frmFindDlg: TfrmFindDlg
           Left = 3
           Left = 3
           Height = 23
           Height = 23
           Top = 91
           Top = 91
-          Width = 79
+          Width = 83
           Anchors = [akTop, akLeft, akRight, akBottom]
           Anchors = [akTop, akLeft, akRight, akBottom]
           MaxValue = 2147483647
           MaxValue = 2147483647
           OnChange = seFileSizeFromChange
           OnChange = seFileSizeFromChange
@@ -615,10 +615,10 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideRight.Side = asrBottom
           AnchorSideRight.Side = asrBottom
           AnchorSideBottom.Control = cmbFileSizeUnit
           AnchorSideBottom.Control = cmbFileSizeUnit
           AnchorSideBottom.Side = asrBottom
           AnchorSideBottom.Side = asrBottom
-          Left = 112
+          Left = 116
           Height = 23
           Height = 23
           Top = 91
           Top = 91
-          Width = 79
+          Width = 83
           Anchors = [akTop, akLeft, akRight, akBottom]
           Anchors = [akTop, akLeft, akRight, akBottom]
           MaxValue = 2147483647
           MaxValue = 2147483647
           OnChange = seFileSizeToChange
           OnChange = seFileSizeToChange
@@ -630,7 +630,7 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideTop.Side = asrBottom
           AnchorSideTop.Side = asrBottom
           AnchorSideRight.Control = ZVTimeTo
           AnchorSideRight.Control = ZVTimeTo
           AnchorSideRight.Side = asrBottom
           AnchorSideRight.Side = asrBottom
-          Left = 221
+          Left = 229
           Height = 23
           Height = 23
           Top = 91
           Top = 91
           Width = 160
           Width = 160
@@ -644,7 +644,7 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideLeft.Control = ZVTimeFrom
           AnchorSideLeft.Control = ZVTimeFrom
           AnchorSideTop.Control = cbDateFrom
           AnchorSideTop.Control = cbDateFrom
           AnchorSideTop.Side = asrCenter
           AnchorSideTop.Side = asrCenter
-          Left = 221
+          Left = 229
           Height = 19
           Height = 19
           Top = 127
           Top = 127
           Width = 79
           Width = 79
@@ -657,7 +657,7 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideLeft.Control = ZVTimeTo
           AnchorSideLeft.Control = ZVTimeTo
           AnchorSideTop.Control = cbDateFrom
           AnchorSideTop.Control = cbDateFrom
           AnchorSideTop.Side = asrCenter
           AnchorSideTop.Side = asrCenter
-          Left = 316
+          Left = 324
           Height = 19
           Height = 19
           Top = 127
           Top = 127
           Width = 64
           Width = 64
@@ -689,7 +689,7 @@ object frmFindDlg: TfrmFindDlg
           Left = 3
           Left = 3
           Height = 23
           Height = 23
           Top = 146
           Top = 146
-          Width = 79
+          Width = 83
           CenturyFrom = 1941
           CenturyFrom = 1941
           MaxDate = 2958465
           MaxDate = 2958465
           MinDate = -53780
           MinDate = -53780
@@ -712,10 +712,10 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideLeft.Side = asrBottom
           AnchorSideLeft.Side = asrBottom
           AnchorSideTop.Control = ZVDateFrom
           AnchorSideTop.Control = ZVDateFrom
           AnchorSideTop.Side = asrCenter
           AnchorSideTop.Side = asrCenter
-          Left = 112
+          Left = 116
           Height = 23
           Height = 23
           Top = 146
           Top = 146
-          Width = 79
+          Width = 83
           CenturyFrom = 1941
           CenturyFrom = 1941
           MaxDate = 2958465
           MaxDate = 2958465
           MinDate = -53780
           MinDate = -53780
@@ -739,7 +739,7 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideTop.Control = ZVDateFrom
           AnchorSideTop.Control = ZVDateFrom
           AnchorSideBottom.Control = ZVDateFrom
           AnchorSideBottom.Control = ZVDateFrom
           AnchorSideBottom.Side = asrBottom
           AnchorSideBottom.Side = asrBottom
-          Left = 221
+          Left = 229
           Height = 23
           Height = 23
           Top = 146
           Top = 146
           Width = 65
           Width = 65
@@ -767,7 +767,7 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideTop.Control = ZVDateFrom
           AnchorSideTop.Control = ZVDateFrom
           AnchorSideBottom.Control = ZVDateFrom
           AnchorSideBottom.Control = ZVDateFrom
           AnchorSideBottom.Side = asrBottom
           AnchorSideBottom.Side = asrBottom
-          Left = 316
+          Left = 324
           Height = 23
           Height = 23
           Top = 146
           Top = 146
           Width = 65
           Width = 65
@@ -794,9 +794,9 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideTop.Control = Bevel2
           AnchorSideTop.Control = Bevel2
           AnchorSideTop.Side = asrBottom
           AnchorSideTop.Side = asrBottom
           Left = 3
           Left = 3
-          Height = 16
+          Height = 15
           Top = 193
           Top = 193
-          Width = 53
+          Width = 52
           BorderSpacing.Left = 3
           BorderSpacing.Left = 3
           BorderSpacing.Top = 8
           BorderSpacing.Top = 8
           Caption = 'Attri&butes'
           Caption = 'Attri&butes'
@@ -810,7 +810,7 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideRight.Control = btnAddAttribute
           AnchorSideRight.Control = btnAddAttribute
           Left = 3
           Left = 3
           Height = 23
           Height = 23
-          Top = 213
+          Top = 212
           Width = 600
           Width = 600
           HelpType = htKeyword
           HelpType = htKeyword
           HelpKeyword = '/findfiles.html#attributes'
           HelpKeyword = '/findfiles.html#attributes'
@@ -830,7 +830,7 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideRight.Control = btnAttrsHelp
           AnchorSideRight.Control = btnAttrsHelp
           Left = 606
           Left = 606
           Height = 26
           Height = 26
-          Top = 211
+          Top = 210
           Width = 48
           Width = 48
           Anchors = [akTop, akRight]
           Anchors = [akTop, akRight]
           AutoSize = True
           AutoSize = True
@@ -849,7 +849,7 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideBottom.Side = asrBottom
           AnchorSideBottom.Side = asrBottom
           Left = 657
           Left = 657
           Height = 27
           Height = 27
-          Top = 211
+          Top = 210
           Width = 53
           Width = 53
           Anchors = [akTop, akRight]
           Anchors = [akTop, akRight]
           AutoSize = True
           AutoSize = True
@@ -865,16 +865,16 @@ object frmFindDlg: TfrmFindDlg
         Caption = 'Plugins'
         Caption = 'Plugins'
         ChildSizing.LeftRightSpacing = 3
         ChildSizing.LeftRightSpacing = 3
         ChildSizing.TopBottomSpacing = 3
         ChildSizing.TopBottomSpacing = 3
-        ClientHeight = 352
-        ClientWidth = 717
+        ClientHeight = 363
+        ClientWidth = 716
         object cbUsePlugin: TCheckBox
         object cbUsePlugin: TCheckBox
           AnchorSideLeft.Control = tsPlugins
           AnchorSideLeft.Control = tsPlugins
           AnchorSideTop.Control = cmbPlugin
           AnchorSideTop.Control = cmbPlugin
           AnchorSideTop.Side = asrCenter
           AnchorSideTop.Side = asrCenter
           Left = 3
           Left = 3
-          Height = 21
-          Top = 13
-          Width = 131
+          Height = 19
+          Top = 12
+          Width = 116
           Caption = '&Use search plugin:'
           Caption = '&Use search plugin:'
           OnChange = cbUsePluginChange
           OnChange = cbUsePluginChange
           TabOrder = 0
           TabOrder = 0
@@ -885,10 +885,10 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideTop.Control = tsPlugins
           AnchorSideTop.Control = tsPlugins
           AnchorSideRight.Control = tsPlugins
           AnchorSideRight.Control = tsPlugins
           AnchorSideRight.Side = asrBottom
           AnchorSideRight.Side = asrBottom
-          Left = 137
+          Left = 122
           Height = 23
           Height = 23
           Top = 10
           Top = 10
-          Width = 577
+          Width = 591
           Anchors = [akTop, akLeft, akRight]
           Anchors = [akTop, akLeft, akRight]
           BorderSpacing.Left = 3
           BorderSpacing.Left = 3
           BorderSpacing.Top = 10
           BorderSpacing.Top = 10
@@ -905,42 +905,42 @@ object frmFindDlg: TfrmFindDlg
           AnchorSideBottom.Control = tsPlugins
           AnchorSideBottom.Control = tsPlugins
           AnchorSideBottom.Side = asrBottom
           AnchorSideBottom.Side = asrBottom
           Left = 6
           Left = 6
-          Height = 303
-          Top = 43
-          Width = 705
+          Height = 318
+          Top = 39
+          Width = 704
           Anchors = [akTop, akLeft, akRight, akBottom]
           Anchors = [akTop, akLeft, akRight, akBottom]
           BorderSpacing.Left = 6
           BorderSpacing.Left = 6
           BorderSpacing.Top = 6
           BorderSpacing.Top = 6
           BorderSpacing.Right = 6
           BorderSpacing.Right = 6
           BorderSpacing.Bottom = 6
           BorderSpacing.Bottom = 6
-          ClientHeight = 303
-          ClientWidth = 705
+          ClientHeight = 318
+          ClientWidth = 704
           TabOrder = 2
           TabOrder = 2
           inherited pnlTable: TScrollBox
           inherited pnlTable: TScrollBox
-            Height = 186
-            Width = 705
+            Height = 203
+            Width = 704
           end
           end
           inherited pnlButtons: TPanel
           inherited pnlButtons: TPanel
-            Top = 253
-            Width = 705
-            ClientWidth = 705
+            Top = 268
+            Width = 704
+            ClientWidth = 704
           end
           end
           inherited HeaderControl: THeaderControl
           inherited HeaderControl: THeaderControl
-            Width = 705
+            Width = 704
           end
           end
           inherited pnlHeader: TPanel
           inherited pnlHeader: TPanel
-            Width = 705
-            ClientWidth = 705
+            Width = 704
+            ClientWidth = 704
             inherited chkUsePlugins: TCheckBox
             inherited chkUsePlugins: TCheckBox
-              Width = 297
+              Width = 300
             end
             end
             inherited rbAnd: TRadioButton
             inherited rbAnd: TRadioButton
-              Left = 303
+              Left = 306
               Width = 198
               Width = 198
             end
             end
             inherited rbOr: TRadioButton
             inherited rbOr: TRadioButton
-              Left = 507
-              Width = 198
+              Left = 510
+              Width = 194
             end
             end
           end
           end
         end
         end
@@ -949,14 +949,14 @@ object frmFindDlg: TfrmFindDlg
         Caption = 'Load/Save'
         Caption = 'Load/Save'
         ChildSizing.LeftRightSpacing = 3
         ChildSizing.LeftRightSpacing = 3
         ChildSizing.TopBottomSpacing = 3
         ChildSizing.TopBottomSpacing = 3
-        ClientHeight = 352
-        ClientWidth = 717
+        ClientHeight = 363
+        ClientWidth = 716
         OnShow = tsLoadSaveShow
         OnShow = tsLoadSaveShow
         object lblTemplateHeader: TLabel
         object lblTemplateHeader: TLabel
           Left = 3
           Left = 3
-          Height = 13
+          Height = 15
           Top = 3
           Top = 3
-          Width = 715
+          Width = 710
           Align = alTop
           Align = alTop
           BorderSpacing.Left = 3
           BorderSpacing.Left = 3
           BorderSpacing.Top = 3
           BorderSpacing.Top = 3
@@ -967,9 +967,9 @@ object frmFindDlg: TfrmFindDlg
         end
         end
         object lbSearchTemplates: TListBox
         object lbSearchTemplates: TListBox
           Left = 3
           Left = 3
-          Height = 275
-          Top = 16
-          Width = 715
+          Height = 279
+          Top = 18
+          Width = 710
           Align = alClient
           Align = alClient
           BorderSpacing.Left = 3
           BorderSpacing.Left = 3
           BorderSpacing.Right = 3
           BorderSpacing.Right = 3
@@ -983,8 +983,8 @@ object frmFindDlg: TfrmFindDlg
         object lblSearchContents: TPanel
         object lblSearchContents: TPanel
           Left = 3
           Left = 3
           Height = 21
           Height = 21
-          Top = 297
-          Width = 715
+          Top = 303
+          Width = 710
           Align = alBottom
           Align = alBottom
           Alignment = taLeftJustify
           Alignment = taLeftJustify
           AutoSize = True
           AutoSize = True
@@ -998,26 +998,26 @@ object frmFindDlg: TfrmFindDlg
         object pnlLoadSaveBottom: TPanel
         object pnlLoadSaveBottom: TPanel
           Left = 3
           Left = 3
           Height = 30
           Height = 30
-          Top = 324
-          Width = 715
+          Top = 330
+          Width = 710
           Align = alBottom
           Align = alBottom
           AutoSize = True
           AutoSize = True
           BorderSpacing.Around = 3
           BorderSpacing.Around = 3
           BevelOuter = bvNone
           BevelOuter = bvNone
           ClientHeight = 30
           ClientHeight = 30
-          ClientWidth = 715
+          ClientWidth = 710
           TabOrder = 2
           TabOrder = 2
           object pnlLoadSaveBottomButtons: TPanel
           object pnlLoadSaveBottomButtons: TPanel
-            Left = 332
+            Left = 300
             Height = 30
             Height = 30
             Top = 0
             Top = 0
-            Width = 383
+            Width = 410
             Align = alRight
             Align = alRight
             AutoSize = True
             AutoSize = True
             BevelOuter = bvNone
             BevelOuter = bvNone
             ChildSizing.Layout = cclTopToBottomThenLeftToRight
             ChildSizing.Layout = cclTopToBottomThenLeftToRight
             ClientHeight = 30
             ClientHeight = 30
-            ClientWidth = 383
+            ClientWidth = 410
             TabOrder = 0
             TabOrder = 0
             object btnSearchLoad: TButton
             object btnSearchLoad: TButton
               Left = 0
               Left = 0
@@ -1049,7 +1049,7 @@ object frmFindDlg: TfrmFindDlg
               Height = 30
               Height = 30
               Hint = 'If saved then "Start in directory" will be restored when loading template. Use it if you want to fix searching to a certain directory'
               Hint = 'If saved then "Start in directory" will be restored when loading template. Use it if you want to fix searching to a certain directory'
               Top = 0
               Top = 0
-              Width = 149
+              Width = 176
               AutoSize = True
               AutoSize = True
               BorderSpacing.Left = 3
               BorderSpacing.Left = 3
               BorderSpacing.Right = 3
               BorderSpacing.Right = 3
@@ -1061,7 +1061,7 @@ object frmFindDlg: TfrmFindDlg
               TabOrder = 2
               TabOrder = 2
             end
             end
             object btnSearchDelete: TButton
             object btnSearchDelete: TButton
-              Left = 308
+              Left = 335
               Height = 30
               Height = 30
               Top = 0
               Top = 0
               Width = 75
               Width = 75
@@ -1356,10 +1356,18 @@ object frmFindDlg: TfrmFindDlg
   end
   end
   object PopupMenuFind: TPopupMenu
   object PopupMenuFind: TPopupMenu
     left = 336
     left = 336
+    object miOpenInNewTab: TMenuItem
+      Caption = 'Open In New Tab(s)'
+      OnClick = miOpenInNewTabClick
+    end
     object miShowInViewer: TMenuItem
     object miShowInViewer: TMenuItem
       Caption = 'Show In Viewer'
       Caption = 'Show In Viewer'
       OnClick = miShowInViewerClick
       OnClick = miShowInViewerClick
     end
     end
+    object miShowInEditor: TMenuItem
+      Caption = 'Show In Editor'
+      OnClick = miShowInEditorClick
+    end
     object miRemoveFromLlist: TMenuItem
     object miRemoveFromLlist: TMenuItem
       Caption = 'Remove from list'
       Caption = 'Remove from list'
       OnClick = miRemoveFromLlistClick
       OnClick = miRemoveFromLlistClick

+ 2 - 0
src/fFindDlg.lrt

@@ -55,6 +55,8 @@ TFRMFINDDLG.BTNSTOP.CAPTION=C&ancel
 TFRMFINDDLG.BTNCLOSE.CAPTION=&Close
 TFRMFINDDLG.BTNCLOSE.CAPTION=&Close
 TFRMFINDDLG.BTNNEWSEARCH.CAPTION=&New search
 TFRMFINDDLG.BTNNEWSEARCH.CAPTION=&New search
 TFRMFINDDLG.BTNLASTSEARCH.CAPTION=&Last search
 TFRMFINDDLG.BTNLASTSEARCH.CAPTION=&Last search
+TFRMFINDDLG.MIOPENINNEWTAB.CAPTION=Open In New Tab(s)
 TFRMFINDDLG.MISHOWINVIEWER.CAPTION=Show In Viewer
 TFRMFINDDLG.MISHOWINVIEWER.CAPTION=Show In Viewer
+TFRMFINDDLG.MISHOWINEDITOR.CAPTION=Show In Editor
 TFRMFINDDLG.MIREMOVEFROMLLIST.CAPTION=Remove from list
 TFRMFINDDLG.MIREMOVEFROMLLIST.CAPTION=Remove from list
 TFRMFINDDLG.MISHOWALLFOUND.CAPTION=Show all found items
 TFRMFINDDLG.MISHOWALLFOUND.CAPTION=Show all found items

+ 97 - 23
src/fFindDlg.pas

@@ -33,7 +33,8 @@ uses
   Graphics, SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, ComCtrls,
   Graphics, SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, ComCtrls,
   ExtCtrls, Menus, EditBtn, Spin, Buttons, ZVDateTimePicker, KASComboBox,
   ExtCtrls, Menus, EditBtn, Spin, Buttons, ZVDateTimePicker, KASComboBox,
   fAttributesEdit, uDsxModule, DsxPlugin, uFindThread, uFindFiles,
   fAttributesEdit, uDsxModule, DsxPlugin, uFindThread, uFindFiles,
-  uSearchTemplate, fSearchPlugin, uFileView, types;
+  uSearchTemplate, fSearchPlugin, uFileView, types, DCStrUtils,ShellCtrls,
+  uOSForms,uShellContextMenu,uExceptions,uFileSystemFileSource;
 
 
 type
 type
 
 
@@ -102,6 +103,8 @@ type
     lblEncoding: TLabel;
     lblEncoding: TLabel;
     lsFoundedFiles: TListBox;
     lsFoundedFiles: TListBox;
     CheksPanel: TPanel;
     CheksPanel: TPanel;
+    miOpenInNewTab: TMenuItem;
+    miShowInEditor: TMenuItem;
     miShowAllFound: TMenuItem;
     miShowAllFound: TMenuItem;
     miRemoveFromLlist: TMenuItem;
     miRemoveFromLlist: TMenuItem;
     pnlDirectoriesDepth: TPanel;
     pnlDirectoriesDepth: TPanel;
@@ -188,8 +191,10 @@ type
       MousePos: TPoint; var Handled: Boolean);
       MousePos: TPoint; var Handled: Boolean);
     procedure lsFoundedFilesMouseWheelUp(Sender: TObject; Shift: TShiftState;
     procedure lsFoundedFilesMouseWheelUp(Sender: TObject; Shift: TShiftState;
       MousePos: TPoint; var Handled: Boolean);
       MousePos: TPoint; var Handled: Boolean);
+    procedure miOpenInNewTabClick(Sender: TObject);
     procedure miRemoveFromLlistClick(Sender: TObject);
     procedure miRemoveFromLlistClick(Sender: TObject);
     procedure miShowAllFoundClick(Sender: TObject);
     procedure miShowAllFoundClick(Sender: TObject);
+    procedure miShowInEditorClick(Sender: TObject);
     procedure miShowInViewerClick(Sender: TObject);
     procedure miShowInViewerClick(Sender: TObject);
     procedure pgcSearchChange(Sender: TObject);
     procedure pgcSearchChange(Sender: TObject);
     procedure seFileSizeFromChange(Sender: TObject);
     procedure seFileSizeFromChange(Sender: TObject);
@@ -229,6 +234,9 @@ type
   public
   public
     class function Instance: TfrmFindDlg;
     class function Instance: TfrmFindDlg;
   public
   public
+
+    LastClickResultsPath:string;
+
     constructor Create(TheOwner: TComponent); override;
     constructor Create(TheOwner: TComponent); override;
     destructor Destroy; override;
     destructor Destroy; override;
     procedure ClearFilter;
     procedure ClearFilter;
@@ -259,7 +267,7 @@ implementation
 uses
 uses
   LCLProc, LCLType, LConvEncoding, StrUtils, HelpIntfs, fViewer, fMain,
   LCLProc, LCLType, LConvEncoding, StrUtils, HelpIntfs, fViewer, fMain,
   uLng, uGlobs, uShowForm, uDCUtils, uFileSource, uFileSourceUtil,
   uLng, uGlobs, uShowForm, uDCUtils, uFileSource, uFileSourceUtil,
-  uSearchResultFileSource, uFile, uFileSystemFileSource,
+  uSearchResultFileSource, uFile,
   uFileViewNotebook, uKeyboard, uOSUtils, uArchiveFileSourceUtil,
   uFileViewNotebook, uKeyboard, uOSUtils, uArchiveFileSourceUtil,
   DCOSUtils, SynRegExpr;
   DCOSUtils, SynRegExpr;
 
 
@@ -1463,44 +1471,75 @@ var
 begin
 begin
   i:=lsFoundedFiles.ItemAtPos(Point(X,Y),False);
   i:=lsFoundedFiles.ItemAtPos(Point(X,Y),False);
 
 
-  if Button=mbRight then
+  if (i>=0) then
   begin
   begin
-    if Shift=[ssCtrl] then lsFoundedFiles.ClearSelection;
-    if i>=0 then lsFoundedFiles.Selected[i]:=True;
+    LastClickResultsPath:=GetDeepestExistingPath(lsFoundedFiles.Items[i]);
+
+    if (Button=mbRight)and(lsFoundedFiles.Selected[i]<>True) then
+    begin
+         lsFoundedFiles.ClearSelection;
+         lsFoundedFiles.Selected[i]:=True;
+    end;
   end;
   end;
 end;
 end;
 
 
 procedure TfrmFindDlg.lsFoundedFilesMouseUp(Sender: TObject;
 procedure TfrmFindDlg.lsFoundedFilesMouseUp(Sender: TObject;
   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+var
+  i:integer;
+  sPath:string;
+  AFile: TFile;
+  AFiles: TFiles;
+
+  Panel:TFileView;
+  FileList :TFileTree;
+
+  pt: TPoint;
 begin
 begin
   if Button=mbRight then
   if Button=mbRight then
   begin
   begin
 
 
-    if Shift=[ssCtrl] then
+    if Shift=[ssCtrl] then    // Show System context menu
     begin
     begin
+
       {$IF DEFINED(MSWINDOWS)}
       {$IF DEFINED(MSWINDOWS)}
-      {
-      try
-        AFile:= TFileSystemFileSource.CreateFileFromFile(ShellTreeView.Path);
         try
         try
-          AFiles:= TFiles.Create(AFile.Path);
-          AFiles.Add(AFile);
-          APoint := ShellTreeView.ClientToScreen(Classes.Point(X, Y));
-          ShowContextMenu(ShellTreeView, AFiles, APoint.X, APoint.Y, False, nil);
-        finally
-          FreeAndNil(AFiles);
+          AFiles:= TFiles.Create(LastClickResultsPath);
+          AFiles.Path:=LastClickResultsPath;
+
+          i:=0;
+          while i<lsFoundedFiles.Count do
+          begin
+           if lsFoundedFiles.Selected[i] then
+           begin
+             sPath:=lsFoundedFiles.Items[i];
+             AFile:= TFileSystemFileSource.CreateFile(sPath);
+             AFiles.Add(aFile);
+           end;
+          inc(i);
+          end;
+
+          try
+            pt.X := X;
+            pt.Y := Y;
+            pt := ClientToScreen(pt);
+            ShowContextMenu(lsFoundedFiles, AFiles, pt.X, pt.Y, True, nil);
+          finally
+            FreeAndNil(AFiles);
+          end;
+
+
+        except
+          on E: EContextMenuException do
+            ShowException(E)
+          else;
         end;
         end;
-      except
-        on E: EContextMenuException do
-          ShowException(E)
-        else;
-      end;
-      }
+
       {$ENDIF}
       {$ENDIF}
 
 
     end else
     end else
     begin
     begin
-      PopupMenuFind.PopUp;
+      PopupMenuFind.PopUp;  // Show DC menu
     end;
     end;
 
 
   end;
   end;
@@ -1524,7 +1563,7 @@ procedure TfrmFindDlg.lsFoundedFilesMouseWheelUp(Sender: TObject;
 begin
 begin
   if (Shift=[ssCtrl])and(gFonts[dcfEditor].Size<MAX_FONT_SIZE_EDITOR) then
   if (Shift=[ssCtrl])and(gFonts[dcfEditor].Size<MAX_FONT_SIZE_EDITOR) then
   begin
   begin
-    //gFonts[dcfEditor].Size:=gFonts[dcfEditor].Size+1;
+    //gFonts[dcfFileSearchResults].Size:=gFonts[dcfFileSearchResults].Size+1;
     //FontOptionsToFont(gFonts[dcfEditor], Editor.Font);
     //FontOptionsToFont(gFonts[dcfEditor], Editor.Font);
 
 
     lsFoundedFiles.Font.Size:=lsFoundedFiles.Font.Size+1;
     lsFoundedFiles.Font.Size:=lsFoundedFiles.Font.Size+1;
@@ -1532,6 +1571,35 @@ begin
   end;
   end;
 end;
 end;
 
 
+procedure TfrmFindDlg.miOpenInNewTabClick(Sender: TObject);
+var
+  i,ind:integer;
+  sPath:string;
+
+  Notebook: TFileViewNotebook;
+  NewPage: TFileViewPage;
+
+begin
+  ind:=lsFoundedFiles.ItemIndex;
+  Notebook := frmMain.ActiveNotebook;
+
+  i:=0;
+  while i<lsFoundedFiles.Count do
+  begin
+    if lsFoundedFiles.Selected[i] then
+    begin
+      sPath :=lsFoundedFiles.Items[i];
+      sPath := GetDeepestExistingPath(sPath);
+
+      NewPage := Notebook.NewPage(Notebook.ActiveView);
+      NewPage.FileView.CurrentPath:=sPath;
+      NewPage.FileView.SetActiveFile(ExtractFileName(lsFoundedFiles.Items[i]));
+    end;
+  inc(i);
+  end;
+
+end;
+
 procedure TfrmFindDlg.miRemoveFromLlistClick(Sender: TObject);
 procedure TfrmFindDlg.miRemoveFromLlistClick(Sender: TObject);
 var
 var
   i:Integer;
   i:Integer;
@@ -1554,6 +1622,12 @@ begin
   miShowAllFound.Enabled:=False;
   miShowAllFound.Enabled:=False;
 end;
 end;
 
 
+procedure TfrmFindDlg.miShowInEditorClick(Sender: TObject);
+begin
+  if lsFoundedFiles.ItemIndex>=0 then
+     ShowEditorByGlob(lsFoundedFiles.Items[lsFoundedFiles.ItemIndex]);
+end;
+
 procedure TfrmFindDlg.miShowInViewerClick(Sender: TObject);
 procedure TfrmFindDlg.miShowInViewerClick(Sender: TObject);
 var
 var
   sl:TStringList;
   sl:TStringList;