Skip to content

Commit

Permalink
Fix PureGitFile editor/contents confusion and reimplement AbstractFil…
Browse files Browse the repository at this point in the history
…eReference>>#gtEditorView reuse
  • Loading branch information
svenvc committed Nov 6, 2024
1 parent 1c11d58 commit ab57026
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions src/GToolkit4Git/PureGitFile.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,6 @@ PureGitFile >> gtBlameFor: composite [
weight: 2.0
]

{ #category : #'*GToolkit4Git' }
PureGitFile >> gtContentsFor: composite [
<gtView>
| text |
[ text := self contents ]
on: ZnCharacterEncodingError
do: [ ^ composite empty ].
^ composite textEditor
title: 'Contents';
priority: 30;
tooltip: 'Current contents in work tree on file system';
glamorousCodeFontAndSize;
text: [ text ]
]

{ #category : #'*GToolkit4Git' }
PureGitFile >> gtDetails [
^ super gtDetails , {
Expand All @@ -107,12 +92,17 @@ PureGitFile >> gtEditorFor: composite [
[ text := self contents ]
on: ZnCharacterEncodingError
do: [ ^ composite empty ].
^ composite forward
title: 'Editor';
priority: 35;
tooltip: 'Edit current contents in work tree on file system';
object: [ self fileReference ];
view: #gtContentsFor:
^ composite explicit
title: 'Contents';
priority: 30;
tooltip: 'Current contents in work tree on file system';
stencil: [ | pane |
pane := self fileReference gtEditorView.
pane
childNamed: #editor
ifFound: [ :editor |
editor aptitude: BrGlamorousCodeEditorAptitude ].
pane ]
]

{ #category : #'*GToolkit4Git' }
Expand Down

0 comments on commit ab57026

Please sign in to comment.