Revision: c09f8f790ddd Author: John Boyer <john.boyer@xxxxxxxxxxxxxxxxx> Date: Fri May 25 09:59:40 2012 Log: show whole translated file, whether in utd or not http://code.google.com/p/brailleblaster/source/detail?r=c09f8f790ddd Added: /dist/programData/lang/i18n_it_IT.properties Modified: /src/main/org/brailleblaster/settings/SettingsDialog.java /src/main/org/brailleblaster/wordprocessor/BBMenu.java /src/main/org/brailleblaster/wordprocessor/DocumentManager.java ======================================= --- /dev/null +++ /dist/programData/lang/i18n_it_IT.properties Fri May 25 09:59:40 2012 @@ -0,0 +1,88 @@ +# Menu items +# the & sign is placed before the letter that will be the hot key. +# Replace the material after the = sign with your translation. + +&File=&File +&Edit=&Modifica +&View=&Visualizza +&Translate=&Traduci +&Insert=&Inserisci +&Advanced=&Avanzate +&Help=&Ai&uto +&New=&Nuovo +&Open=&Apri +&Recent=&Recenti +&Import=&Importa +&Save=&Salva +Save&As=SalvaCon&Nome +&EmbosserSetup=&Configurazion&eStampaBraille +Embosser&Preview=Ante&primaStampaBraille +Emboss&InkPreview=AnteprimaStampaBrailleNero +Emboss&Now!=StampaBrailleOra!! +EmbossInkN&ow=StampaBrailleNeroOra! +PrintPageS&etup=ConfigurazionePaginadiStampa +PrintP&review=AnteprimaDiStampa +&Print=Stampa +&Language=&Lingua +&close=&chiudi +e&xit=esci +&Undo=&Annulla +&Redo=&Rifai +&Cut=&Taglia +c&Opy=c&opia +&Paste=&Incolla +&Search=&Cerca +&Replace=&Sostituisci +&SpellCheck=&ControlloOrtografico +&BoldToggle=&CommutaGrassetto +&ItalicToggle=&CommutaCorsivo +&UnderlineToggle=&CommutaSottolineato +&ZoomImage=&ZoomImagine +&SelectAll=&SelezionaTutto +&CreateStyle=&CreaStile +&NexstElement=&ElementoSuccessivo +&AssocSelection=&AssociaSelezione +&LockSelection=&BloccaSelezione +&UnlockSelection=&SbloccaSelezione +&EditLocked=&ModificheBloccate +&KeybdBrlToggle=&CommutaTastieraBraille +&CursorFollow=&SegueCursore +&DragCursor=&TrascinaCursore +&IncreaseFontSize=&AumentaDimensioneCarattere +&DecreaseFintSize=&DiminuisciDimensioneCarattere +&IncreaseContrast=&AumentaContrasto +&DecreaseContrast=&DiminuisciContrasto +&ShowOutline=&MostraProfilo +&BraillePresentation=&PresentazioneBraille +&FormatLikeBraille=&FormattaComeBraille +&ShowPageBreaks=&MostraInterruzioniPagina +&Translate=&Traduci +&BackTranslate=&TraduciIndietro +&TranslationTemplates=&ModelliDiTraduzione +&InLineMath=&SimboliMatematiciInLinea +&DisplayedMath=&MostraSimboliMatematici +&InLineGraphic=&GraficiInLinea +&DisplayedGraphic=&visualizzaGrafici +&Table=&Tabella +&BrailleFormat=Formato&Braille +&brailleASCIITable=&tabella&BrailleAscii +&ShowTranslationTemplates=Mo&straModelliDiTraduzione +&ShowFormatTemplates=Mo&straModelliDiFormato +&About=&Informazioni +&helpInfo=&Aiuto +&Tutorials=&Tutorial +&ReadManuals=&LeggiManuale +&CheckUpdates=&ControllaAggiornamenti + +# Messages + +badcom=Comando non valido o nessuna interfaccia grafica + + +-- +John J. Boyer; President, Chief Software Developer +Abilitiessoft, Inc. +http://www.abilitiessoft.com +Madison, Wisconsin USA +Developing software for people with disabilities + =======================================--- /src/main/org/brailleblaster/settings/SettingsDialog.java Sun Apr 29 18:47:11 2012 +++ /src/main/org/brailleblaster/settings/SettingsDialog.java Fri May 25 09:59:40 2012
@@ -59,7 +59,7 @@ private String userSettings; public SettingsDialog(){ - loadProperty(); + loadProperties(); } public void open(){ Display display = BBIni.getDisplay(); @@ -110,7 +110,7 @@ // shellBounds.y + (shellBounds.height - dialogSize.y) / 2); } - private void loadProperty(){ + private void loadProperties(){ userSettings= BBIni.getUserSettings(); prop = new Properties(); try { =======================================--- /src/main/org/brailleblaster/wordprocessor/BBMenu.java Sat May 5 18:43:13 2012 +++ /src/main/org/brailleblaster/wordprocessor/BBMenu.java Fri May 25 09:59:40 2012
@@ -116,9 +116,6 @@ MenuItem tutorialsItem; MenuItem checkUpdatesItem; MenuItem aboutItem; - - //5/3 - MenuItem switchItem; BBMenu (final DocumentManager dm) { LocaleHandler lh = new LocaleHandler(); @@ -171,16 +168,7 @@ dm.fileOpen(); } } - }); - - //5/3 just a tmp place to test the switch function - switchItem = new MenuItem (fileMenu, SWT.PUSH); - switchItem.setText (lh.localValue("S&witch")); - switchItem.addSelectionListener (new SelectionAdapter() { - public void widgetSelected (SelectionEvent e) { - dm.setReturn(WP.SwitchDocuments); - } - }); + }); recentItem = new MenuItem (fileMenu, SWT.PUSH); recentItem.setText (lh.localValue("&Recent")); =======================================--- /src/main/org/brailleblaster/wordprocessor/DocumentManager.java Wed May 9 19:47:26 2012 +++ /src/main/org/brailleblaster/wordprocessor/DocumentManager.java Fri May 25 09:59:40 2012
@@ -59,7 +59,7 @@ /** * This class manages each document in an MDI environment. It controls * the braille View and the daisy View. - */ + */ class DocumentManager { final Display display; @@ -97,6 +97,8 @@//static final String[] runningFiles = new String[WPManager.getMaxNumDocs()];
static String recentFileName = null; static int recentFileNameIndex = -1; + int numLines; + int numChars; /** * Constructor that sets things up for a new document. @@ -159,7 +161,7 @@ flags[documentNumber] =false; //all should be false now } //Then back to WPManager - } + } /** @@ -249,9 +251,6 @@ void fileNew() { placeholder(); } - - int numLines; - int numChars; void fileOpen () { if (doc != null){ @@ -272,7 +271,7 @@ } openDocument (documentName); } - + void recentOpen(String path){ if (doc != null){//see if this recent document is already opened in current windows set
@@ -291,7 +290,7 @@ openDocument (documentName); } - + void openDocument (String fileName) { Builder parser = new Builder(); try { @@ -316,7 +315,7 @@ new Thread() { public void run() { while (!stopRequested) { - walkTree (rootElement); + walkTree (rootElement); } } } @@ -370,8 +369,8 @@ return; } new FileUtils().copyFile (translatedFileName, saveTo); - //add this file to recentDocList - rd.addDocument(translatedFileName); + //add this file to recentDocList + rd.addDocument(translatedFileName); } void showBraille() { @@ -383,7 +382,10 @@ } catch (FileNotFoundException e) { new Notify ("Could not fine " + translatedFileName); } - for (int i = 0; i < 20; i++) { + numLines = 0; + numChars = 0; + + while(true){ try { line = translation.readLine(); } catch (IOException e) { @@ -393,7 +395,17 @@ if (line == null) { break; } - braille.view.append (line + "\n"); + numLines++; + numChars += line.length(); + final String myLine = line; + display.syncExec(new Runnable() { + public void run() { + braille.view.append (myLine + "\n");+ statusBar.setText ("Translated " + numLines + " lines, " + numChars
+ + " characters."); + + } + }); } try { translation.close(); @@ -440,7 +452,13 @@ if (BBIni.useUtd()) { utd.displayTranslatedFile(); } else { - showBraille(); + braille.view.setEditable(false); + new Thread() { + public void run() { + showBraille(); + } + } + .start(); } } @@ -476,30 +494,30 @@ } boolean isFinished(){ - return finished; - } - + return finished; + } + void recentDocuments(){ rd.open(); } - + //5/3 void switchDocuments(){ - - } - + + } + static boolean[] getflags(){ return flags; } - + static void setflags(int i,boolean b){ flags[i] = b; } - + static void printflags(){ for(boolean b:flags) System.out.print (b+", "); } - + static String getRecentFileName(){ return recentFileName; }