Author: remi
Date: 2009-09-14 12:19:00 +0200 (Mon, 14 Sep 2009)
New Revision: 5369

Modified:
   
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginDescription.py
   
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreter.py
   
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreterContext.py
   
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreterJava.py
Log:
* Added support of splash screen for the java plugins on Windows

Modified: 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginDescription.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginDescription.py
  2009-09-14 10:17:52 UTC (rev 5368)
+++ 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginDescription.py
  2009-09-14 10:19:00 UTC (rev 5369)
@@ -32,6 +32,7 @@
         self.__version = None
         self.__description = None
         self.__iconFile = None
+        self.__splashScreenFile = None
         self.__helpFile = None
         self.__platform = None
         self.__ttsName = None
@@ -69,6 +70,12 @@
         self.__version = dictionary['version']
         self.__uuid = dictionary['uuid']
         self.__iconFile = os.path.join(workingPath, dictionary['iconFile'])
+        tmpFileName = os.path.join(workingPath, "resources", "splash.gif")
+        if os.path.isfile(tmpFileName):
+            self.__splashScreenFile = tmpFileName
+            print self.__splashScreenFile
+        else:
+            self.__splashScreenFile = None
         self.__description = dictionary['description']
         self.__workingPath = workingPath
         self.__platform = "all"
@@ -160,6 +167,15 @@
         return self.__iconFile
 
     # 
--------------------------------------------------------------------------
+    # Get the splash-screen image of the plugin.
+    # 
--------------------------------------------------------------------------
+    def getSplashScreenFile(self):
+        """Get the splash-screen image of the plugin.
+        @return: A string.
+        """
+        return self.__splashScreenFile
+
+    # 
--------------------------------------------------------------------------
     # Get the translated help content of the plugin.
     # 
--------------------------------------------------------------------------
     def getHelpFile(self, language = None):

Modified: 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreter.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreter.py
     2009-09-14 10:17:52 UTC (rev 5368)
+++ 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreter.py
     2009-09-14 10:19:00 UTC (rev 5369)
@@ -30,6 +30,7 @@
         self.__process = None
         self.__pid = None
         self.__daemon = False
+        self.__splashScreen = None
         self.__onPluginStartedCallback = None
         self.__onPluginStoppedCallback = None
         self.__onNotificationThrowedCallback = None
@@ -78,6 +79,24 @@
         return self.__workingPath
 
     # 
--------------------------------------------------------------------------
+    # Set the splash screen image.
+    # 
--------------------------------------------------------------------------
+    def setSplashScreen(self, splashScreen):
+        """Set the splash screen image.
+        @param splashScreen: Splash screen image path.
+        """
+        self.__splashScreen = splashScreen
+
+    # 
--------------------------------------------------------------------------
+    # Get the splash screen image.
+    # 
--------------------------------------------------------------------------
+    def getSplashScreen(self):
+        """Get the splash screen image.
+        @return: A string.
+        """
+        return self.__splashScreen
+
+    # 
--------------------------------------------------------------------------
     # Set the executable.
     # 
--------------------------------------------------------------------------
     def setExecutable(self, executable):

Modified: 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreterContext.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreterContext.py
      2009-09-14 10:17:52 UTC (rev 5368)
+++ 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreterContext.py
      2009-09-14 10:19:00 UTC (rev 5369)
@@ -26,6 +26,7 @@
         
self.__pluginInterpreter.setOnNotificationThrowedCallback(self.__onInterpreterNotification)
         
self.__pluginInterpreter.setWorkingPath(self.__parentPlugin.getWorkingPath())
         self.__pluginInterpreter.setExecutable(interpreterExecution)
+        
self.__pluginInterpreter.setSplashScreen(self.__parentPlugin.getDescription().getSplashScreenFile())
         self.__pluginInstanceParameters = {}
         self.__pluginInstanceCommand = ""
         self.__pluginInstanceIsDaemon = False

Modified: 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreterJava.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreterJava.py
 2009-09-14 10:17:52 UTC (rev 5368)
+++ 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreterJava.py
 2009-09-14 10:19:00 UTC (rev 5369)
@@ -67,4 +67,7 @@
             fClassPath,
             self.getExecutable(),
         ]
+        if self.getSplashScreen() != None:
+            if os.name == 'nt':
+                command.insert(1, "-splash:%s" % self.getSplashScreen())
         return command


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to