Use DialogBox class>>requestProject:.. instead of hand-crafted dialog.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 16 Feb 2015 18:03:18 +0100
changeset 3187 3fcd97a56a0e
parent 3186 80a20e5881a5
child 3188 351c645c0921
Use DialogBox class>>requestProject:.. instead of hand-crafted dialog.
Tools__InternationalLanguageTranslationEditor.st
--- a/Tools__InternationalLanguageTranslationEditor.st	Sun Feb 15 11:29:55 2015 +0100
+++ b/Tools__InternationalLanguageTranslationEditor.st	Mon Feb 16 18:03:18 2015 +0100
@@ -1684,18 +1684,9 @@
 extractTranslationsFromProject
     |box projectID newTranslations|
 
-    box := ListSelectionBox new.
-"/    box useComboBoxWithList:(Smalltalk allProjectIDs).
-    box title:(resources string:'Project to extract translations from:').
-    box list:Smalltalk allProjectIDs.
-    box okAction:[:sel | projectID := sel].
-    box initialText:(lastExtractedProject ? LastExtractedProject).
-    box label:'Find Translations in Project'.
-
-    box showAtPointer.
-
+    projectID := Dialog requestProject:(resources string:'Package to extract translations from:') initialAnswer:(lastExtractedProject ? LastExtractedProject) suggestions:(lastExtractedProject ? LastExtractedProject).
     projectID notNil ifTrue:[
-	projectID := projectID withoutSeparators asSymbol.
+        projectID := projectID withoutSeparators asSymbol.
     ].
     projectID isEmptyOrNil ifTrue:[^ self ].
 
@@ -1704,13 +1695,15 @@
     newTranslations := Set new.
 
     Smalltalk allClassesDo:[:eachClass |
-	eachClass theNonMetaclass package == projectID ifTrue:[
+        eachClass theNonMetaclass package == projectID ifTrue:[
 "/ eachClass isLoaded ifTrue:[ self halt. ].
-	    newTranslations addAll:( self extractTranslationsFromClass:eachClass theNonMetaclass).
-	]
+            newTranslations addAll:( self extractTranslationsFromClass:eachClass theNonMetaclass).
+        ]
     ].
 
     self addAllTranslations:newTranslations.
+
+    "Modified: / 16-02-2015 / 16:54:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 importExistingTranslationsFromFile