[tuxdroid-svn] r5902 - software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisali
Status: Beta
Brought to you by:
ks156
|
From: ks156 <c2m...@c2...> - 2009-11-18 10:28:08
|
Author: ks156
Date: 2009-11-18 11:27:56 +0100 (Wed, 18 Nov 2009)
New Revision: 5902
Modified:
software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/visual/ATTBlockViewer.java
Log:
* Merged the user_mode from rev 5375.
This branch is now done and discontinued.
Modified: software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/visual/ATTBlockViewer.java
===================================================================
--- software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/visual/ATTBlockViewer.java 2009-11-18 10:25:57 UTC (rev 5901)
+++ software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/visual/ATTBlockViewer.java 2009-11-18 10:27:56 UTC (rev 5902)
@@ -104,7 +104,7 @@
public ATTFormatReadWrite attituneFile;
- public TuxAPI tux = new TuxAPI("localhost", 270); //$NON-NLS-1$
+ public TuxAPI tux; //$NON-NLS-1$
private boolean sceneHaveChanged = false;
@@ -210,8 +210,25 @@
/* Set visible */
this.setVisible(true);
/* Connect the tuxdroid api */
+ tux = new TuxAPI("127.0.0.1", 270);
tux.server.autoConnect(TuxAPIConst.CLIENT_LEVEL_RESTRICTED, "AttitunesStudio", "attscene"); //$NON-NLS-1$ //$NON-NLS-2$
- /* Refresh the viewer */
+
+ /* Wait 1 second, and check if the API is connected */
+ try {
+ Thread.sleep(1000);
+ }
+ catch(Exception except) {
+ except.printStackTrace();
+ }
+
+ /* If the API is not connected, try with the port 54321 */
+ if (tux.server.getConnected() != true)
+ {
+ tux = new TuxAPI("127.0.0.1", 54321);
+ tux.server.autoConnect(TuxAPIConst.CLIENT_LEVEL_RESTRICTED, "AttitunesStudio", "attscene"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /* Refresh the viewer */
this.setZoomFactor(1);
}
|