The Trunk: GetText-tpr.46.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: GetText-tpr.46.mcz

commits-2
tim Rowledge uploaded a new version of GetText to project The Trunk:
http://source.squeak.org/trunk/GetText-tpr.46.mcz

==================== Summary ====================

Name: GetText-tpr.46
Author: tpr
Time: 7 March 2018, 11:11:46.625662 am
UUID: 8f641159-afe3-4ccb-bfc5-cd080361d30a
Ancestors: GetText-mt.45

Convert usage of nasty old StandardFileMenu to gleaming new file dialogues

=============== Diff against GetText-mt.45 ===============

Item was changed:
  ----- Method: LanguageEditor>>getTextImportAFile (in category 'gui methods') -----
  getTextImportAFile
+ | fileName |
+ fileName := FileChooserDialog openOnSuffixList: { 'po' } label: 'Select a File:' translated.
+ fileName ifNil: [^self].
+
- | result |
- result := (StandardFileMenu new pattern: '*.po';
-
- oldFileFrom: (FileDirectory default directoryNamed: 'po')) startUpWithCaption: 'Select a File:' translated.
- result
- ifNil: [^ self].
  self
  withUnboundModelDo: [:trans | Cursor wait
  showWhile: [GetTextImporter new
  import: trans
+ fileNamed: fileName]]!
- fileNamed: (result directory fullNameFor: result name)]]!

Item was changed:
  ----- Method: LanguageEditor>>selectTranslationFileName (in category 'gui methods') -----
  selectTranslationFileName
  "answer a file with a translation"
+ | fileName |
+ fileName :=FileChooserDialog openOnSuffixList: { 'translation'  } label:  'Select the file...' translated.
+ ^ fileName isNil
+ ifFalse: [fileName]!
- | file |
- file := (StandardFileMenu oldFileMenu: FileDirectory default withPattern: '*.translation')
- startUpWithCaption: 'Select the file...' translated.
- ^ file isNil
- ifFalse: [file directory fullNameFor: file name]!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: GetText-tpr.46.mcz

Tobias Pape

> On 07.03.2018, at 20:11, [hidden email] wrote:
>
> Convert usage of nasty old StandardFileMenu to gleaming new file dialogues

Reading that, I ask myself whether we should also have file dialogues managed by UIManager or ToolSet (whichever fits best... I see argument for both)


Best regards
        -Tobias

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: GetText-tpr.46.mcz

timrowledge


> On 07-03-2018, at 11:23 AM, Tobias Pape <[hidden email]> wrote:
>
>
>> On 07.03.2018, at 20:11, [hidden email] wrote:
>>
>> Convert usage of nasty old StandardFileMenu to gleaming new file dialogues
>
> Reading that, I ask myself whether we should also have file dialogues managed by UIManager or ToolSet (whichever fits best... I see argument for both)

The file dialogues are built by ToolBuilder and I did add calls from UIManager (UIManager default chooseDirectory etc) some time back. If you prefer to see the UIManager idiom used everywhere (and I think I'd argue that it isn't all that useful in places where we are explicitly within Morphic code, for example) then I'd have no problem at all with  you changing code to do that. Mostly right now I'd just like to be able to deprecate StandardFileMenu. Which, oddly, already has a very ugly switch within its doe to do quite different things in Morphic and MVC....


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- A mental midget with the IQ of a fencepost.