diff options
Diffstat (limited to 'UMain.pas')
| -rw-r--r-- | UMain.pas | 21 |
1 files changed, 8 insertions, 13 deletions
@@ -199,7 +199,7 @@ type procedure ConstructMenu; procedure ConstructColumns(ListView: TGTKListView); procedure AfterStart; - procedure ActivateItem(const ItemIndex: longint; const MouseActivate: boolean); + procedure ActivateItem(const ItemIndex: longint); procedure UpdatePanelInfo; procedure UpdatePanelInfoDown(LeftPanel: boolean); procedure UpdateCaption; @@ -1370,7 +1370,7 @@ begin CommandLineCombo.Entry.SelectRegion(Length(CommandLineCombo.Entry.Text), Length(CommandLineCombo.Entry.Text)); end else if Length(Trim(CommandLineCombo.Entry.Text)) > 0 then CommandLineComboKeyDown(Sender, Key, Shift, Accept) - else if Assigned(AListView.Selected) then ActivateItem(AListView.Selected.Index, False); + else if Assigned(AListView.Selected) then ActivateItem(AListView.Selected.Index); end; GDK_BACKSPACE : begin KeyHandled := True; @@ -1383,7 +1383,7 @@ begin GDK_Right : begin if [ssCtrl] = Shift then SwitchPanelCtrlLeftRight(LeftPanel, False) else if ConfLynxLikeMotion then begin - if Assigned(AListView.Selected) then ActivateItem(AListView.Selected.Index, False); + if Assigned(AListView.Selected) then ActivateItem(AListView.Selected.Index); end; Accept := False; KeyHandled := True; @@ -1656,7 +1656,7 @@ begin end; end; -procedure TFMain.ActivateItem(const ItemIndex: longint; const MouseActivate: boolean); +procedure TFMain.ActivateItem(const ItemIndex: longint); var Data: PDataItem; LeftPanel: boolean; DataList: TList; @@ -1682,13 +1682,8 @@ begin DebugMsg(['Selected:', Data^.FDisplayName]); if not Assigned(Data) then Exit; if Data^.UpDir then ChangingDir(LeftPanel, '..') else - if Data^.IsDir then begin - if MouseActivate then begin - if AListView.Items.Count > 0 then AListView.Items[0].Selected := True; - Application.ProcessMessages; - end; - ChangingDir(LeftPanel, Data^.FName); - end else begin + if Data^.IsDir then ChangingDir(LeftPanel, Data^.FName) + else begin Ext := WideUpperCase(Trim(Copy(String(Data^.FDisplayName), LastDelimiter('.', String(Data^.FDisplayName)) + 1, Length(String(Data^.FDisplayName)) - LastDelimiter('.', String(Data^.FDisplayName))))); // Test for known internal functions if ((Ext = 'SFV') or (Ext = 'MD5')) and (Engine is TLocalTreeEngine) then miVerifyChecksumsClick(Self) else @@ -2737,7 +2732,7 @@ begin DebugMsg(['DblClick OK']); if not (Sender as TGTKListView).Focused then (Sender as TGTKListView).SetFocus; if Assigned((Sender as TGTKListView).Selected) and Assigned((Sender as TGTKListView).Selected.Data) - then ActivateItem((Sender as TGTKListView).Selected.Index, True); + then ActivateItem((Sender as TGTKListView).Selected.Index); end; procedure TFMain.ListViewMouseDown(Sender: TObject; Button: TGDKMouseButton; Shift: TShiftState; X, Y: Integer; var Accept: boolean); @@ -4433,7 +4428,7 @@ begin then FileName := ExcludeTrailingPathDelimiter(Engine.GetPrefix) + FileName; case Integer((Sender as TGTKMenuItem).Data) of - 1: if DataItem^.IsDir then ActivateItem(AListView.Selected.Index, False) + 1: if DataItem^.IsDir then ActivateItem(AListView.Selected.Index) else begin b := True; if Engine is TVFSEngine then b := HandleRunFromArchive(FileName, Engine, '', '', False); // not a local engine, extract to local first |
