diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-11 21:01:51 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-11 21:01:51 +0200 |
| commit | 30a547b8f4f9f01b8270d653c7ac3784a8ce981c (patch) | |
| tree | b8b9523386f5563bac771101b1ee3b112fb60f9c /UPreferences.pas | |
| parent | 540cad830d639a57d9effe9b18283b3bb8cd7a07 (diff) | |
| download | tuxcmd-30a547b8f4f9f01b8270d653c7ac3784a8ce981c.tar.xz | |
Allow optional sorting directories like files
Diffstat (limited to 'UPreferences.pas')
| -rw-r--r-- | UPreferences.pas | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/UPreferences.pas b/UPreferences.pas index 73b709f..a9e02e7 100644 --- a/UPreferences.pas +++ b/UPreferences.pas @@ -76,6 +76,7 @@ type DateTimeFormatOptionMenu: TGTKOptionMenu; QuickSearchLabel: TGTKLabel; QuickSearchOptionMenu: TGTKOptionMenu; + SortDirectoriesLikeFilesCheckBox: TGTKCheckButton; procedure FormCreate(Sender: TObject); override; procedure FormDestroy(Sender: TObject); @@ -252,7 +253,7 @@ begin FormatTime := Libc.__time(nil); DateFormatLabel := TGTKLabel.Create(Self); - DateFormatLabel.Caption := '_Date format:'; + DateFormatLabel.Caption := 'Date _format:'; DateFormatLabel.XAlign := 0; DateFormatLabel.UseUnderline := True; DateFormatOptionMenu := TGTKOptionMenu.Create(Self); @@ -332,7 +333,7 @@ begin PanelsPage.AddControlEx(PanelsLabel2, False, False, 5); Table5 := TGTKTable.Create(Self); - Table5.SetRowColCount(16, 2); + Table5.SetRowColCount(17, 2); PanelsPage.AddControlEx(Table5, False, False, 0); DisableMouseRename := TGTKCheckButton.CreateWithLabel(Self, LANGPreferences_DisableMouseRenaming); @@ -341,42 +342,45 @@ begin 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, TGTKVBox.Create(Self), 0, 7); + 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); 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, 3, 2, 1, PanelsLabel3, 10, 2); + Table5.AddControl(0, 4, 2, 1, PanelsLabel3, 10, 2); ShowFiletypeIcons := TGTKCheckButton.CreateWithLabel(Self, LANGPreferences_ShowFiletypeIconsInList); - Table5.AddControl(0, 4, 2, 1, ShowFiletypeIcons, 30, 2); + Table5.AddControl(0, 5, 2, 1, ShowFiletypeIcons, 30, 2); DirsInBoldCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGPreferencesDirsInBoldCheckBox_Caption); - Table5.AddControl(0, 5, 2, 1, DirsInBoldCheckBox, 30, 2); + Table5.AddControl(0, 6, 2, 1, DirsInBoldCheckBox, 30, 2); DisableDirectoryBracketsCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGPreferencesDisableDirectoryBracketsCheckBox_Caption); - Table5.AddControl(0, 6, 2, 1, DisableDirectoryBracketsCheckBox, 30, 2); + Table5.AddControl(0, 7, 2, 1, DisableDirectoryBracketsCheckBox, 30, 2); OctalPermissionsCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGPreferencesOctalPermissionsCheckBox_Caption); OctalPermissionsCheckBox.Tooltip := LANGPreferencesOctalPermissionsCheckBox_Tooltip; - Table5.AddControl(0, 7, 2, 1, OctalPermissionsCheckBox, 30, 2); + Table5.AddControl(0, 8, 2, 1, OctalPermissionsCheckBox, 30, 2); ShowTextUIDsCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGShowTextUIDsCheckBox_Caption); ShowTextUIDsCheckBox.Tooltip := LANGShowTextUIDsCheckBox_Tooltip; - Table5.AddControl(0, 8, 2, 1, ShowTextUIDsCheckBox, 30, 2); - Table5.AddControl(0, 9, 2, 1, TGTKVBox.Create(Self), 0, 7); + Table5.AddControl(0, 9, 2, 1, ShowTextUIDsCheckBox, 30, 2); + Table5.AddControl(0, 10, 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, 10, 2, 1, PanelsLabel4, 10, 2); + Table5.AddControl(0, 11, 2, 1, PanelsLabel4, 10, 2); LynxLikeMotionCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGPreferencesLynxLikeMotionCheckBox_Caption); - Table5.AddControl(0, 11, 2, 1, LynxLikeMotionCheckBox, 30, 2); + Table5.AddControl(0, 12, 2, 1, LynxLikeMotionCheckBox, 30, 2); InsertMovesDownCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGPreferencesInsertMovesDownCheckBox_Caption); - Table5.AddControl(0, 12, 2, 1, InsertMovesDownCheckBox, 30, 2); + Table5.AddControl(0, 13, 2, 1, InsertMovesDownCheckBox, 30, 2); SpaceMovesDownCheckBox := TGTKCheckButton.CreateWithLabel(Self, LANGPreferencesSpaceMovesDownCheckBox_Caption); - Table5.AddControl(0, 13, 2, 1, SpaceMovesDownCheckBox, 30, 2); + Table5.AddControl(0, 14, 2, 1, SpaceMovesDownCheckBox, 30, 2); QuickSearchLabel := TGTKLabel.Create(Self); QuickSearchLabel.Caption := 'Quick search _keystroke:'; @@ -397,9 +401,9 @@ begin Item := TGTKMenuItem.CreateTyped(Self, itLabel); Item.Caption := 'letters directly'; QuickSearchOptionMenu.Items.Add(Item); - Table5.AddControl(0, 14, 2, 1, TGTKVBox.Create(Self), 0, 2); - Table5.AddControlEx(0, 15, 1, 1, QuickSearchLabel, [taoShrink], [taoShrink], 35, 2); - Table5.AddControlEx(1, 15, 1, 1, QuickSearchOptionMenu, [taoExpand, taoFill], [taoShrink, taoExpand, taoFill], 20, 2); + 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); // ********* PAGE Applications @@ -886,6 +890,7 @@ begin TimeFormatOptionMenu.ItemIndex := ConfTimeFormat; DateTimeFormatOptionMenu.ItemIndex := ConfDateTimeFormat; QuickSearchOptionMenu.ItemIndex := ConfQuickSearchActivationKey; + SortDirectoriesLikeFilesCheckBox.Checked := ConfSortDirectoriesLikeFiles; DefaultFontCheckBoxToggled(Self); ColorButtonDefaultsToggled(Self); @@ -956,6 +961,7 @@ begin ConfTimeFormat := TimeFormatOptionMenu.ItemIndex; ConfDateTimeFormat := DateTimeFormatOptionMenu.ItemIndex; ConfQuickSearchActivationKey := QuickSearchOptionMenu.ItemIndex; + ConfSortDirectoriesLikeFiles := SortDirectoriesLikeFilesCheckBox.Checked; end; (********************************************************************************************************************************) |
