author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 05 Feb 2012 01:49:41 +0000 | |
branch | jv |
changeset 12144 | 18c25ec50d96 |
parent 12128 | a7ff7d66ee85 |
child 12431 | 9f0c59c742d5 |
permissions | -rw-r--r-- |
" COPYRIGHT (c) 2002 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred. " "{ Package: 'stx:libtool' }" AbstractSettingsApplication subclass:#FileBrowserV2SettingsAppl instanceVariableNames:'sortDirectoriesBeforeFiles showDirectoryTree sortCaseless showHiddenFiles openMultipleApplicationsForType toolBarVisibleHolder viewDirectoryDescription openAlwaysInTextEditor viewFilesInDirectoryTree viewDescription viewPreview viewTime viewSize viewSizeInBytes viewType viewDetails viewPermissions viewGroup viewDirsInContentsBrowser viewOwner filenameEntryFieldVisibleHolder viewSizeInKiloBytes useCodeView2InTools' classVariableNames:'' poolDictionaries:'' category:'Interface-Tools-File' ! !FileBrowserV2SettingsAppl class methodsFor:'documentation'! copyright " COPYRIGHT (c) 2002 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred. " ! ! !FileBrowserV2SettingsAppl class methodsFor:'icon'! defaultIcon <resource: #programImage> ^ FileBrowserV2 applicationIcon ! ! !FileBrowserV2SettingsAppl class methodsFor:'interface specs'! windowSpec "This resource specification was automatically generated by the UIPainter of ST/X." "Do not manually edit this!! If it is corrupted, the UIPainter may not be able to read the specification." " UIPainter new openOnClass:FileBrowserV2SettingsAppl andSelector:#windowSpec FileBrowserV2SettingsAppl new openInterface:#windowSpec FileBrowserV2SettingsAppl open " <resource: #canvas> ^ #(FullSpec name: windowSpec window: (WindowSpec label: 'Settings' name: 'Settings' min: (Point 10 10) bounds: (Rectangle 0 0 469 622) ) component: (SpecCollection collection: ( (VerticalPanelViewSpec name: 'VerticalPanel2' layout: (LayoutFrame 0 0 0 0 0 1 591 0) horizontalLayout: fit verticalLayout: top horizontalSpace: 3 verticalSpace: 3 component: (SpecCollection collection: ( (FramedBoxSpec label: 'Show' name: 'FramedBox1' labelPosition: topLeft translateLabel: true component: (SpecCollection collection: ( (CheckBoxSpec label: 'Hidden Files' name: 'CheckBox1' layout: (LayoutFrame 0 0.0 7 0 0 1.0 27 0) model: showHiddenFiles translateLabel: true ) (CheckBoxSpec label: 'Directory Tree' name: 'CheckBox2' layout: (LayoutFrame 0 0.0 29 0 0 1.0 49 0) model: showDirectoryTree translateLabel: true ) (CheckBoxSpec label: 'Regular Files in TreeView (Left)' name: 'CheckBox3' layout: (LayoutFrame 20 0 51 0 0 1.0 71 0) model: viewFilesInDirectoryTree translateLabel: true ) (CheckBoxSpec label: 'Directories in ContentsView (Right)' name: 'CheckBox4' layout: (LayoutFrame 0 0.0 73 0 0 1.0 93 0) model: viewDirsInContentsBrowser translateLabel: true ) (CheckBoxSpec label: 'Toolbar' name: 'CheckBox11' layout: (LayoutFrame 0 0.0 95 0 0 1.0 115 0) model: toolBarVisibleHolder translateLabel: true ) (CheckBoxSpec label: 'Path Entry && Filter' name: 'CheckBox12' layout: (LayoutFrame 0 0.0 117 0 0 1.0 137 0) model: filenameEntryFieldVisibleHolder translateLabel: true ) ) ) extent: (Point 469 168) ) (FramedBoxSpec label: 'Sort' name: 'FramedBox2' labelPosition: topLeft translateLabel: true component: (SpecCollection collection: ( (CheckBoxSpec label: 'Ignore Case' name: 'CheckBox6' layout: (LayoutFrame 0 0.0 7 0 0 1.0 27 0) model: sortCaseless translateLabel: true ) (CheckBoxSpec label: 'Directories before Files' name: 'CheckBox7' layout: (LayoutFrame 0 0.0 29 0 0 1.0 49 0) model: sortDirectoriesBeforeFiles translateLabel: true ) ) ) extent: (Point 469 78) ) (FramedBoxSpec label: 'Columns in Filelist' name: 'FramedBox4' labelPosition: topLeft translateLabel: true component: (SpecCollection collection: ( (CheckBoxSpec label: 'Details' name: 'CheckBox22' layout: (LayoutFrame 0 0.0 7 0 0 1.0 27 0) model: viewDetails translateLabel: true ) (CheckBoxSpec label: 'Suffix' name: 'CheckBox13' layout: (LayoutFrame 20 0.0 29 0 170 0 49 0) enableChannel: viewDetails model: viewType translateLabel: true ) (CheckBoxSpec label: 'Permissions' name: 'CheckBox21' layout: (LayoutFrame 170 0.0 29 0 -5 1 49 0) enableChannel: viewDetails model: viewPermissions translateLabel: true ) (CheckBoxSpec label: 'Owner' name: 'CheckBox14' layout: (LayoutFrame 20 0.0 51 0 170 0 71 0) enableChannel: viewDetails model: viewOwner translateLabel: true ) (CheckBoxSpec label: 'Group' name: 'CheckBox18' layout: (LayoutFrame 170 0.0 51 0 -5 1 71 0) enableChannel: viewDetails model: viewGroup translateLabel: true ) (CheckBoxSpec label: 'Size' name: 'CheckBox15' layout: (LayoutFrame 20 0.0 73 0 170 0 93 0) enableChannel: viewDetails model: viewSize translateLabel: true ) (CheckBoxSpec label: 'Date && Time' name: 'CheckBox19' layout: (LayoutFrame 170 0.0 73 0 -5 1 93 0) enableChannel: viewDetails model: viewTime translateLabel: true ) (CheckBoxSpec label: 'Size (Byte)' name: 'CheckBox16' layout: (LayoutFrame 20 0.0 95 0 170 0 115 0) enableChannel: viewDetails model: viewSizeInBytes translateLabel: true ) (CheckBoxSpec label: 'Size (KByte)' name: 'CheckBox20' layout: (LayoutFrame 170 0.0 95 0 -5 1 115 0) enableChannel: viewDetails model: viewSizeInKiloBytes translateLabel: true ) (CheckBoxSpec label: 'File Info' name: 'CheckBox23' layout: (LayoutFrame 20 0.0 117 0 170 0 137 0) enableChannel: viewDetails model: viewDescription translateLabel: true ) (CheckBoxSpec label: 'Preview' name: 'CheckBox24' layout: (LayoutFrame 170 0.0 117 0 -5 1 137 0) enableChannel: viewDetails model: viewPreview translateLabel: true ) ) ) extent: (Point 469 168) ) (FramedBoxSpec label: 'Application Notebook' name: 'FramedBox3' labelPosition: topLeft translateLabel: true component: (SpecCollection collection: ( (CheckBoxSpec label: 'Use the New CodeView (Affects all New Opened Tools)' name: 'CheckBox8' layout: (LayoutFrame 0 0.0 7 0 0 1.0 27 0) model: useCodeView2InTools translateLabel: true ) (CheckBoxSpec label: 'Text Editor for all Types' name: 'CheckBox25' layout: (LayoutFrame 0 0.0 29 0 0 1.0 49 0) model: openAlwaysInTextEditor translateLabel: true ) (CheckBoxSpec label: 'Open Multiple Applications' name: 'CheckBox9' layout: (LayoutFrame 0 0.0 51 0 0 1.0 71 0) model: openMultipleApplicationsForType translateLabel: true ) (CheckBoxSpec label: 'Auto Open Directory Description (README)' name: 'CheckBox10' layout: (LayoutFrame 0 0.0 73 0 0 1.0 93 0) model: viewDirectoryDescription translateLabel: true ) ) ) extent: (Point 469 128) ) ) ) ) ) ) ) ! ! !FileBrowserV2SettingsAppl class methodsFor:'resources'! classResources ^ FileBrowserV2 classResources ! ! !FileBrowserV2SettingsAppl methodsFor:'accessing'! requestor "return the value of the instance variable 'requestor' (automatically generated)" | masterApplication | masterApplication := self masterApplication. masterApplication notNil ifTrue:[ ^ masterApplication requestor. ]. ^ nil ! ! !FileBrowserV2SettingsAppl methodsFor:'actions'! basicSaveSettings |aspectList writeToCurrentFileBrowser| aspectList := AbstractFileBrowser userPreferencesAspectList. writeToCurrentFileBrowser := (settingsDialog notNil and:[settingsDialog isKindOf:AbstractFileBrowser]). aspectList keysDo:[ :anAspect | |value| value := (self perform:anAspect) value. (currentUserPrefs perform:((anAspect asString, ':') asSymbol) with:value). writeToCurrentFileBrowser ifTrue:[ (settingsDialog perform:anAspect) value:value. ]. ]. "Modified: / 15-10-2010 / 10:29:28 / cg" ! helpFilename ^ 'FileBrowserV2/settings.html' ! readSettings |receiver aspectList| receiver := (settingsDialog notNil and:[settingsDialog isKindOf:AbstractFileBrowser]) ifTrue:[ settingsDialog ] ifFalse:[ currentUserPrefs ]. aspectList := AbstractFileBrowser userPreferencesAspectList. aspectList keysDo:[:anAspect | |value| value := (receiver perform:anAspect) value. (self perform:anAspect) value:value ]. self modifiedChannel value:false "Modified: / 03-04-2007 / 08:45:12 / cg" ! ! !FileBrowserV2SettingsAppl methodsFor:'aspects'! filenameEntryFieldVisibleHolder filenameEntryFieldVisibleHolder isNil ifTrue:[ filenameEntryFieldVisibleHolder := true asValue. filenameEntryFieldVisibleHolder onChangeSend:#updateModifiedChannel to:self ]. ^ filenameEntryFieldVisibleHolder ! openAlwaysInTextEditor openAlwaysInTextEditor isNil ifTrue:[ openAlwaysInTextEditor := true asValue. openAlwaysInTextEditor onChangeSend:#updateModifiedChannel to:self ]. ^ openAlwaysInTextEditor ! openMultipleApplicationsForType openMultipleApplicationsForType isNil ifTrue:[ openMultipleApplicationsForType := true asValue. openMultipleApplicationsForType onChangeSend:#updateModifiedChannel to:self ]. ^ openMultipleApplicationsForType ! showDirectoryTree showDirectoryTree isNil ifTrue:[ showDirectoryTree := true asValue. showDirectoryTree onChangeSend:#updateModifiedChannel to:self ]. ^ showDirectoryTree ! showHiddenFiles showHiddenFiles isNil ifTrue:[ showHiddenFiles := true asValue. showHiddenFiles onChangeSend:#updateModifiedChannel to:self ]. ^ showHiddenFiles "Modified: / 15-10-2010 / 10:28:07 / cg" ! sortCaseless sortCaseless isNil ifTrue:[ sortCaseless := true asValue. sortCaseless onChangeSend:#updateModifiedChannel to:self ]. ^ sortCaseless ! sortDirectoriesBeforeFiles sortDirectoriesBeforeFiles isNil ifTrue:[ sortDirectoriesBeforeFiles := true asValue. sortDirectoriesBeforeFiles onChangeSend:#updateModifiedChannel to:self ]. ^ sortDirectoriesBeforeFiles ! toolBarVisibleHolder toolBarVisibleHolder isNil ifTrue:[ toolBarVisibleHolder := true asValue. toolBarVisibleHolder onChangeSend:#updateModifiedChannel to:self ]. ^ toolBarVisibleHolder ! useCodeView2InTools useCodeView2InTools isNil ifTrue:[ useCodeView2InTools := true asValue. useCodeView2InTools onChangeSend:#updateModifiedChannel to:self ]. ^ useCodeView2InTools "Created: / 06-10-2011 / 11:30:42 / cg" ! viewDescription viewDescription isNil ifTrue:[ viewDescription := false asValue. viewDescription onChangeSend:#updateModifiedChannel to:self ]. ^ viewDescription ! viewDetails viewDetails isNil ifTrue:[ viewDetails := true asValue. viewDetails onChangeSend:#updateModifiedChannel to:self ]. ^ viewDetails ! viewDirectoryDescription viewDirectoryDescription isNil ifTrue:[ viewDirectoryDescription := true asValue. viewDirectoryDescription onChangeSend:#updateModifiedChannel to:self ]. ^ viewDirectoryDescription ! viewDirsInContentsBrowser viewDirsInContentsBrowser isNil ifTrue:[ viewDirsInContentsBrowser := true asValue. viewDirsInContentsBrowser onChangeSend:#updateModifiedChannel to:self ]. ^ viewDirsInContentsBrowser ! viewFilesInDirectoryTree viewFilesInDirectoryTree isNil ifTrue:[ viewFilesInDirectoryTree := true asValue. viewFilesInDirectoryTree onChangeSend:#updateModifiedChannel to:self ]. ^ viewFilesInDirectoryTree ! viewGroup viewGroup isNil ifTrue:[ viewGroup := true asValue. viewGroup onChangeSend:#updateModifiedChannel to:self ]. ^ viewGroup ! viewOwner viewOwner isNil ifTrue:[ viewOwner := true asValue. viewOwner onChangeSend:#updateModifiedChannel to:self ]. ^ viewOwner ! viewPermissions viewPermissions isNil ifTrue:[ viewPermissions := true asValue. viewPermissions onChangeSend:#updateModifiedChannel to:self ]. ^ viewPermissions ! viewPreview viewPreview isNil ifTrue:[ viewPreview := true asValue. viewPreview onChangeSend:#updateModifiedChannel to:self ]. ^ viewPreview ! viewSize viewSize isNil ifTrue:[ viewSize := true asValue. viewSize onChangeSend:#updateModifiedChannel to:self ]. ^ viewSize ! viewSizeInBytes viewSizeInBytes isNil ifTrue:[ viewSizeInBytes := false asValue. viewSizeInBytes onChangeSend:#updateModifiedChannel to:self ]. ^ viewSizeInBytes ! viewSizeInKiloBytes viewSizeInKiloBytes isNil ifTrue:[ viewSizeInKiloBytes := false asValue. viewSizeInKiloBytes onChangeSend:#updateModifiedChannel to:self ]. ^ viewSizeInKiloBytes ! viewTime viewTime isNil ifTrue:[ viewTime := true asValue. viewTime onChangeSend:#updateModifiedChannel to:self ]. ^ viewTime ! viewType viewType isNil ifTrue:[ viewType := true asValue. viewType onChangeSend:#updateModifiedChannel to:self ]. ^ viewType ! ! !FileBrowserV2SettingsAppl methodsFor:'queries'! hasUnsavedChanges |aspectList receiver| receiver := (settingsDialog notNil and:[settingsDialog isKindOf:AbstractFileBrowser]) ifTrue:[ settingsDialog ] ifFalse:[ currentUserPrefs ]. aspectList := AbstractFileBrowser userPreferencesAspectList. aspectList keysDo:[:anAspect | (self perform:anAspect) value ~= (receiver perform:anAspect) value ifTrue:[ ^ true ] ]. ^ false "Modified: / 03-04-2007 / 08:45:27 / cg" "Modified (format): / 25-11-2011 / 15:24:25 / cg" ! ! !FileBrowserV2SettingsAppl class methodsFor:'documentation'! version ^ '$Id: FileBrowserV2SettingsAppl.st 7854 2012-01-30 17:49:41Z vranyj1 $' ! version_CVS ^ '§Header: /cvs/stx/stx/libtool/FileBrowserV2SettingsAppl.st,v 1.28 2011/11/25 14:25:40 cg Exp §' ! version_SVN ^ '$Id: FileBrowserV2SettingsAppl.st 7854 2012-01-30 17:49:41Z vranyj1 $' ! !