summaryrefslogtreecommitdiff
path: root/UMain.pas
diff options
context:
space:
mode:
Diffstat (limited to 'UMain.pas')
-rw-r--r--UMain.pas19
1 files changed, 13 insertions, 6 deletions
diff --git a/UMain.pas b/UMain.pas
index 0eabe42..fbcf334 100644
--- a/UMain.pas
+++ b/UMain.pas
@@ -244,6 +244,7 @@ type
function IsEditing(AListView: TGTKListView): boolean;
function PanelFindEditableWidget(AListView: TGTKListView): PGtkWidget;
function CheckForUnsavedConnection(Engine: TVFSEngine; AllowCancel: boolean): boolean; // Returns False to Cancel
+ procedure SaveCursorPositionTabbed(LeftPanel: boolean);
public
LeftPanelEngine, RightPanelEngine : TPanelEngine;
ColumnSortIDs: array[1..ConstNumPanelColumns] of integer;
@@ -2996,7 +2997,17 @@ begin
end;
end;
if QuickFind then DeactivateQuickFind(Sender = LeftListView);
- if Sender = LeftListView then begin
+ SaveCursorPositionTabbed(Sender = LeftListView);
+{ if Application.GTKVersion_2_6_0_Up then begin
+ AListView := Sender as TGTKListView;
+ if Assigned(AListView) and Assigned(AListView.Selected) and Assigned(AListView.Selected.Data) and Assigned(PDataItem(AListView.Selected.Data)^.ItemColor)
+ then gtk_widget_modify_text(AListView.FWidget, GTK_STATE_SELECTED, PDataItem(AListView.Selected.Data)^.ItemColor);
+ end; }
+end;
+
+procedure TFMain.SaveCursorPositionTabbed(LeftPanel: boolean);
+begin
+ if LeftPanel then begin
if LeftPanelNotebook.Visible and (LeftPathsHighlight.Count > LeftPanelNotebook.PageIndex) and (LeftPanelNotebook.PageIndex >= 0) and
Assigned(LeftListView.Selected) and Assigned(LeftListView.Selected.Data)
then LeftPathsHighlight[LeftPanelNotebook.PageIndex] := PDataItem(LeftListView.Selected.Data)^.FName;
@@ -3004,11 +3015,6 @@ begin
if RightPanelNotebook.Visible and (RightPathsHighlight.Count > RightPanelNotebook.PageIndex) and (RightPanelNotebook.PageIndex >= 0) and
Assigned(RightListView.Selected) and Assigned(RightListView.Selected.Data)
then RightPathsHighlight[RightPanelNotebook.PageIndex] := PDataItem(RightListView.Selected.Data)^.FName;
-{ if Application.GTKVersion_2_6_0_Up then begin
- AListView := Sender as TGTKListView;
- if Assigned(AListView) and Assigned(AListView.Selected) and Assigned(AListView.Selected.Data) and Assigned(PDataItem(AListView.Selected.Data)^.ItemColor)
- then gtk_widget_modify_text(AListView.FWidget, GTK_STATE_SELECTED, PDataItem(AListView.Selected.Data)^.ItemColor);
- end; }
end;
procedure TFMain.ActivateQuickFind(LeftPanel: boolean);
@@ -3134,6 +3140,7 @@ begin
AListView.OnSelectionChanged := nil;
AListView.Selected := AListView.Items[AListView.ConvertFromSorted(NewIndex)];
AListView.Items[AListView.ConvertFromSorted(NewIndex)].SetCursor(0, False, False, 0, 0);
+ SaveCursorPositionTabbed(LeftPanel);
AListView.OnSelectionChanged := OldSelectionChangedEvent;
Entry.Text := NewText;
end else Beep;