From: <sh...@us...> - 2008-09-29 13:01:19
|
Revision: 12491 http://cdk.svn.sourceforge.net/cdk/?rev=12491&view=rev Author: shk3 Date: 2008-09-29 13:01:04 +0000 (Mon, 29 Sep 2008) Log Message: ----------- smiles didnt't use extension, removed svg export since broken Modified Paths: -------------- cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/action/SaveAsAction.java cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/io/JCPSaveFileFilter.java Modified: cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/action/SaveAsAction.java =================================================================== --- cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/action/SaveAsAction.java 2008-09-29 12:30:59 UTC (rev 12490) +++ cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/action/SaveAsAction.java 2008-09-29 13:01:04 UTC (rev 12491) @@ -128,10 +128,12 @@ // XXX needs fixing // chooser.setFileFilter(jcpPanel.getCurrentSaveFileFilter()); } - if (currentFilter != null) + //shk3: this makes the choosen file type show up twice if save as is done a second + //time - no idea what it is good for + /*if (currentFilter != null) { chooser.setFileFilter(currentFilter); - } + }*/ chooser.setFileView(new JCPFileView()); int returnVal = chooser.showSaveDialog(jcpPanel); @@ -288,6 +290,7 @@ String fileName = outFile.toString(); if (!fileName.endsWith(".smi")) { fileName += ".smi"; + outFile = new File(fileName); } cow = new SMILESWriter(new FileWriter(outFile)); if (cow != null && askIOSettings()) Modified: cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/io/JCPSaveFileFilter.java =================================================================== --- cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/io/JCPSaveFileFilter.java 2008-09-29 12:30:59 UTC (rev 12490) +++ cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/io/JCPSaveFileFilter.java 2008-09-29 13:01:04 UTC (rev 12491) @@ -53,7 +53,8 @@ */ public static void addChoosableFileFilters(JFileChooser chooser) { chooser.addChoosableFileFilter(new JCPFileFilter(JCPFileFilter.mol)); - chooser.addChoosableFileFilter(new JCPSaveFileFilter(JCPSaveFileFilter.svg)); + //shk3: svg export is broken in 1.0 branch, I remove this. + //chooser.addChoosableFileFilter(new JCPSaveFileFilter(JCPSaveFileFilter.svg)); chooser.addChoosableFileFilter(new JCPSaveFileFilter(JCPSaveFileFilter.smiles)); chooser.addChoosableFileFilter(new JCPSaveFileFilter(JCPSaveFileFilter.cdk)); chooser.addChoosableFileFilter(new JCPFileFilter(JCPFileFilter.cml)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sh...@us...> - 2008-10-01 16:27:19
|
Revision: 12511 http://cdk.svn.sourceforge.net/cdk/?rev=12511&view=rev Author: shk3 Date: 2008-10-01 16:26:48 +0000 (Wed, 01 Oct 2008) Log Message: ----------- the direct entry of smiles now works in applet as well Modified Paths: -------------- cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/JChemPaintEditorPanel.java cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/resources/text/JCPGUI_applet.properties Modified: cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/JChemPaintEditorPanel.java =================================================================== --- cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/JChemPaintEditorPanel.java 2008-10-01 16:02:23 UTC (rev 12510) +++ cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/JChemPaintEditorPanel.java 2008-10-01 16:26:48 UTC (rev 12511) @@ -151,8 +151,11 @@ super.setJChemPaintModel(new JChemPaintModel(),null); setShowToolBar(true, lines); if(!guiString.equals("applet")){ - setShowInsertTextField(true); - + setShowInsertTextField(true); + }else{ + //in case of an applet, we just set the flag to false, + //nothing needs to be actually shown + this.showInsertTextField=false; } if (logger == null) { Modified: cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/resources/text/JCPGUI_applet.properties =================================================================== --- cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/resources/text/JCPGUI_applet.properties 2008-10-01 16:02:23 UTC (rev 12510) +++ cdk/branches/cdk-1.0.x/src/org/openscience/cdk/applications/jchempaint/resources/text/JCPGUI_applet.properties 2008-10-01 16:26:48 UTC (rev 12511) @@ -50,7 +50,7 @@ edit=undo redo - new copy paste cutSelected selectAll - @hydrogen \ adjustBondOrders resetBondOrders - @flip cleanup - \ modelProps -view=toolbar statusbar menubar insertstructure - zoomin zoomout zoomoriginal - renderOptions +view=toolbar statusbar menubar insertstructure+ - zoomin zoomout zoomoriginal - renderOptions insert=insertSMILES report=@validate - createSMILES help=help tutorial - about license This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |