diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-14 13:16:51 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-14 13:16:51 +0200 |
| commit | b1dfa430702770c83c815bec24f1dc72175e1e5e (patch) | |
| tree | f32fff8cd27db1842d3e2dbefdb0af04f5f0b064 /UPreferences.pas | |
| parent | 0e9829d522373f39770b317dcff7095c02dbc4be (diff) | |
| download | tuxcmd-b1dfa430702770c83c815bec24f1dc72175e1e5e.tar.xz | |
Added option to exclude filename extension from selection on quick-rename
Resolves #1982347
Fixed some minor quickrename-related issues
Diffstat (limited to 'UPreferences.pas')
| -rw-r--r-- | UPreferences.pas | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/UPreferences.pas b/UPreferences.pas index 82ea5f3..9c73adc 100644 --- a/UPreferences.pas +++ b/UPreferences.pas @@ -79,6 +79,7 @@ type SortDirectoriesLikeFilesCheckBox: TGTKCheckButton; TempPathLabel, VFSTempPathLabel: TGTKLabel; VFSTempPathEntry: TGTKEntry; + QuickRenameSkipExtCheckBox: TGTKCheckButton; procedure FormCreate(Sender: TObject); override; procedure FormDestroy(Sender: TObject); @@ -111,7 +112,7 @@ procedure TFPreferences.FormCreate(Sender: TObject); var i: integer; Item: TGTKMenuItem; begin - SetDefaultSize(450, 570); + SetDefaultSize(450, 600); Caption := LANGPreferences_Caption; Buttons := [mbOK, mbCancel]; ShowSeparator := False; @@ -335,54 +336,57 @@ begin PanelsPage.AddControlEx(PanelsLabel2, False, False, 5); Table5 := TGTKTable.Create(Self); - Table5.SetRowColCount(17, 2); + Table5.SetRowColCount(18, 2); PanelsPage.AddControlEx(Table5, False, False, 0); DisableMouseRename := TGTKCheckButton.CreateWithLabel(Self, LANGPreferences_DisableMouseRenaming); DisableMouseRename.Tooltip := LANGPreferencesDisableMouseRename_Tooltip; Table5.AddControl(0, 0, 2, 1, DisableMouseRename, 30, 2); + QuickRenameSkipExtCheckBox := TGTKCheckButton.CreateWithLabel(Self, 'Select name part only on quick-rename'); + QuickRenameSkipExtCheckBox.Tooltip := 'Exclude filename extension from the selection when doing quick-rename'; + Table5.AddControl(0, 1, 2, 1, QuickRenameSkipExtCheckBox, 30, 2); DisableFileTipsCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGPreferencesDisableFileTipsCheckBox_Caption); DisableFileTipsCheckBox.Tooltip := LANGPreferencesDisableFileTipsCheckBox_Tooltip; - Table5.AddControl(0, 1, 2, 1, DisableFileTipsCheckBox, 30, 2); + Table5.AddControl(0, 2, 2, 1, DisableFileTipsCheckBox, 30, 2); SortDirectoriesLikeFilesCheckBox := TGTKCheckButton.CreateWithLabel(Self, 'Sort directories lik_e files'); SortDirectoriesLikeFilesCheckBox.Tooltip := 'Check this to allow sorting directories along with files. Directories are always first in the list.'#10'Unchecked: directories are always sorted by name.'; - Table5.AddControl(0, 2, 2, 1, SortDirectoriesLikeFilesCheckBox, 30, 2); - Table5.AddControl(0, 3, 2, 1, TGTKVBox.Create(Self), 0, 7); + Table5.AddControl(0, 3, 2, 1, SortDirectoriesLikeFilesCheckBox, 30, 2); + Table5.AddControl(0, 4, 2, 1, TGTKVBox.Create(Self), 0, 7); PanelsLabel3 := TGTKLabel.Create(Self); PanelsLabel3.XAlign := 0; PanelsLabel3.XPadding := 0; PanelsLabel3.Caption := Format('<span weight="ultrabold">%s</span>', [LANGPreferencesShow]); PanelsLabel3.UseMarkup := True; - Table5.AddControl(0, 4, 2, 1, PanelsLabel3, 10, 2); + Table5.AddControl(0, 5, 2, 1, PanelsLabel3, 10, 2); ShowFiletypeIcons := TGTKCheckButton.CreateWithLabel(Self, LANGPreferences_ShowFiletypeIconsInList); - Table5.AddControl(0, 5, 2, 1, ShowFiletypeIcons, 30, 2); + Table5.AddControl(0, 6, 2, 1, ShowFiletypeIcons, 30, 2); DirsInBoldCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGPreferencesDirsInBoldCheckBox_Caption); - Table5.AddControl(0, 6, 2, 1, DirsInBoldCheckBox, 30, 2); + Table5.AddControl(0, 7, 2, 1, DirsInBoldCheckBox, 30, 2); DisableDirectoryBracketsCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGPreferencesDisableDirectoryBracketsCheckBox_Caption); - Table5.AddControl(0, 7, 2, 1, DisableDirectoryBracketsCheckBox, 30, 2); + Table5.AddControl(0, 8, 2, 1, DisableDirectoryBracketsCheckBox, 30, 2); OctalPermissionsCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGPreferencesOctalPermissionsCheckBox_Caption); OctalPermissionsCheckBox.Tooltip := LANGPreferencesOctalPermissionsCheckBox_Tooltip; - Table5.AddControl(0, 8, 2, 1, OctalPermissionsCheckBox, 30, 2); + Table5.AddControl(0, 9, 2, 1, OctalPermissionsCheckBox, 30, 2); ShowTextUIDsCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGShowTextUIDsCheckBox_Caption); ShowTextUIDsCheckBox.Tooltip := LANGShowTextUIDsCheckBox_Tooltip; - Table5.AddControl(0, 9, 2, 1, ShowTextUIDsCheckBox, 30, 2); - Table5.AddControl(0, 10, 2, 1, TGTKVBox.Create(Self), 0, 7); + Table5.AddControl(0, 10, 2, 1, ShowTextUIDsCheckBox, 30, 2); + Table5.AddControl(0, 11, 2, 1, TGTKVBox.Create(Self), 0, 7); PanelsLabel4 := TGTKLabel.Create(Self); PanelsLabel4.XAlign := 0; PanelsLabel4.XPadding := 0; PanelsLabel4.Caption := Format('<span weight="ultrabold">%s</span>', [LANGPreferencesMovement]); PanelsLabel4.UseMarkup := True; - Table5.AddControl(0, 11, 2, 1, PanelsLabel4, 10, 2); + Table5.AddControl(0, 12, 2, 1, PanelsLabel4, 10, 2); LynxLikeMotionCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGPreferencesLynxLikeMotionCheckBox_Caption); - Table5.AddControl(0, 12, 2, 1, LynxLikeMotionCheckBox, 30, 2); + Table5.AddControl(0, 13, 2, 1, LynxLikeMotionCheckBox, 30, 2); InsertMovesDownCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGPreferencesInsertMovesDownCheckBox_Caption); - Table5.AddControl(0, 13, 2, 1, InsertMovesDownCheckBox, 30, 2); + Table5.AddControl(0, 14, 2, 1, InsertMovesDownCheckBox, 30, 2); SpaceMovesDownCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGPreferencesSpaceMovesDownCheckBox_Caption); - Table5.AddControl(0, 14, 2, 1, SpaceMovesDownCheckBox, 30, 2); + Table5.AddControl(0, 15, 2, 1, SpaceMovesDownCheckBox, 30, 2); QuickSearchLabel := TGTKLabel.Create(Self); QuickSearchLabel.Caption := 'Quick search _keystroke:'; @@ -403,9 +407,9 @@ begin Item := TGTKMenuItem.CreateTyped(Self, itLabel); Item.Caption := 'letters directly'; QuickSearchOptionMenu.Items.Add(Item); - Table5.AddControl(0, 15, 2, 1, TGTKVBox.Create(Self), 0, 2); - Table5.AddControlEx(0, 16, 1, 1, QuickSearchLabel, [taoShrink], [taoShrink], 35, 2); - Table5.AddControlEx(1, 16, 1, 1, QuickSearchOptionMenu, [taoExpand, taoFill], [taoShrink, taoExpand, taoFill], 20, 2); + Table5.AddControl(0, 16, 2, 1, TGTKVBox.Create(Self), 0, 2); + Table5.AddControlEx(0, 17, 1, 1, QuickSearchLabel, [taoShrink], [taoShrink], 35, 2); + Table5.AddControlEx(1, 17, 1, 1, QuickSearchOptionMenu, [taoExpand, taoFill], [taoShrink, taoExpand, taoFill], 20, 2); // ********* PAGE Applications @@ -914,6 +918,7 @@ begin QuickSearchOptionMenu.ItemIndex := ConfQuickSearchActivationKey; SortDirectoriesLikeFilesCheckBox.Checked := ConfSortDirectoriesLikeFiles; VFSTempPathEntry.Text := StrToUTF8(ConfTempPath); + QuickRenameSkipExtCheckBox.Checked := ConfQuickRenameSkipExt; DefaultFontCheckBoxToggled(Self); ColorButtonDefaultsToggled(Self); @@ -986,6 +991,7 @@ begin ConfQuickSearchActivationKey := QuickSearchOptionMenu.ItemIndex; ConfSortDirectoriesLikeFiles := SortDirectoriesLikeFilesCheckBox.Checked; ConfTempPath := UTF8ToStr(VFSTempPathEntry.Text); + ConfQuickRenameSkipExt := QuickRenameSkipExtCheckBox.Checked; end; (********************************************************************************************************************************) |
