rename to addModulePreferences and removeModulePreferences 65/5965/2
Allan CORNET [Wed, 18 Jan 2012 07:31:12 +0000 (08:31 +0100)]
Change-Id: I3eb10ddf35f3dc9ab76b1f8281a9c4397522ce12

scilab/contrib/toolbox_skeleton/etc/toolbox_skeleton.quit
scilab/contrib/toolbox_skeleton/etc/toolbox_skeleton.start
scilab/modules/preferences/Makefile.am
scilab/modules/preferences/Makefile.in
scilab/modules/preferences/includes/gw_preferences.h
scilab/modules/preferences/sci_gateway/c/gw_preferences.c
scilab/modules/preferences/sci_gateway/cpp/sci_addModulePreferences.cpp [moved from scilab/modules/preferences/sci_gateway/cpp/sci_addToolboxInfos.cpp with 97% similarity]
scilab/modules/preferences/sci_gateway/cpp/sci_removeModulePreferences.cpp [moved from scilab/modules/preferences/sci_gateway/cpp/sci_removeToolboxInfos.cpp with 96% similarity]
scilab/modules/preferences/sci_gateway/preferences_gateway.xml
scilab/modules/preferences/src/c/preferences.vcxproj
scilab/modules/preferences/src/c/preferences.vcxproj.filters

index 615d458..6b6e145 100644 (file)
@@ -2,9 +2,20 @@
 
 // Some specific hooks can be specify here when the module is unloaded.
 
-etc_tlbx  = get_absolute_file_path("toolbox_skeleton.quit");   
-etc_tlbx  = getshortpathname(etc_tlbx);
-root_tlbx = strncpy( etc_tlbx, length(etc_tlbx)-length("\etc\") );
-removeToolboxInfos(root_tlbx);
+function quitModule()
 
-clear etc_tlbx root_tlbx
+  etc_tlbx  = get_absolute_file_path("toolbox_skeleton.quit"); 
+  etc_tlbx  = getshortpathname(etc_tlbx);
+  root_tlbx = strncpy( etc_tlbx, length(etc_tlbx)-length("\etc\") );
+
+  // Remove Preferences GUI
+  // =============================================================================
+  if getscilabmode() == "STD" then
+    removeModulePreferences(root_tlbx);
+  end
+
+endfunction
+
+
+quitModule();
+clear quitModule;
index 527087e..7d17bb6 100644 (file)
@@ -50,7 +50,11 @@ function toolbox_skeletonlib = startModule()
     add_demo(toolbox_name, pathdemos);
   end
 
-  addToolboxInfos(toolbox_name, root_tlbx, etc_tlbx + "toolbox_skeleton_preferences.xml");
+// Load Preferences GUI
+// =============================================================================
+  if getscilabmode() == "STD" then
+    addModulePreferences(toolbox_name, root_tlbx, etc_tlbx + "toolbox_skeleton_preferences.xml");
+  end
 
 endfunction
 
index 774a18f..1644acf 100644 (file)
@@ -40,8 +40,8 @@ endif
 
 GATEWAY_C_SOURCES = sci_gateway/c/gw_preferences.c
 
-GATEWAY_CPP_SOURCES = sci_gateway/cpp/sci_addToolboxInfos.cpp \
-                      sci_gateway/cpp/sci_removeToolboxInfos.cpp
+GATEWAY_CPP_SOURCES = sci_gateway/cpp/sci_addModulePreferences.cpp \
+                      sci_gateway/cpp/sci_removeModulePreferences.cpp
 
 libscipreferences_la_CFLAGS= $(JAVA_JNI_INCLUDE) \
     -I$(top_srcdir)/libs/MALLOC/includes/ \
index 7a8d2c7..33c61d6 100644 (file)
@@ -137,8 +137,8 @@ libscipreferences_la_DEPENDENCIES = libscipreferences-algo.la \
        $(top_builddir)/modules/jvm/libscijvm.la \
        $(top_builddir)/modules/output_stream/libscioutput_stream.la
 am__objects_4 = libscipreferences_la-gw_preferences.lo
-am__objects_5 = libscipreferences_la-sci_addToolboxInfos.lo \
-       libscipreferences_la-sci_removeToolboxInfos.lo
+am__objects_5 = libscipreferences_la-sci_addModulePreferences.lo \
+       libscipreferences_la-sci_removeModulePreferences.lo
 am_libscipreferences_la_OBJECTS = $(am__objects_4) $(am__objects_5)
 libscipreferences_la_OBJECTS = $(am_libscipreferences_la_OBJECTS)
 libscipreferences_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
@@ -508,8 +508,8 @@ GIWS_WRAPPERS = src/jni/ScilabPreferences.giws.xml
 @GIWS_TRUE@BUILT_SOURCES = giws
 @SWIG_TRUE@BUILT_SOURCES = swig
 GATEWAY_C_SOURCES = sci_gateway/c/gw_preferences.c
-GATEWAY_CPP_SOURCES = sci_gateway/cpp/sci_addToolboxInfos.cpp \
-                      sci_gateway/cpp/sci_removeToolboxInfos.cpp
+GATEWAY_CPP_SOURCES = sci_gateway/cpp/sci_addModulePreferences.cpp \
+                      sci_gateway/cpp/sci_removeModulePreferences.cpp
 
 libscipreferences_la_CFLAGS = $(JAVA_JNI_INCLUDE) \
     -I$(top_srcdir)/libs/MALLOC/includes/ \
@@ -655,8 +655,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscipreferences_algo_la-ScilabPreferences.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscipreferences_disable_la-nopreferences.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscipreferences_la-gw_preferences.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscipreferences_la-sci_addToolboxInfos.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscipreferences_la-sci_removeToolboxInfos.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscipreferences_la-sci_addModulePreferences.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscipreferences_la-sci_removeModulePreferences.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -721,19 +721,19 @@ libscipreferences_algo_la-ScilabPreferences.lo: src/jni/ScilabPreferences.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscipreferences_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscipreferences_algo_la-ScilabPreferences.lo `test -f 'src/jni/ScilabPreferences.cpp' || echo '$(srcdir)/'`src/jni/ScilabPreferences.cpp
 
-libscipreferences_la-sci_addToolboxInfos.lo: sci_gateway/cpp/sci_addToolboxInfos.cpp
-@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscipreferences_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscipreferences_la-sci_addToolboxInfos.lo -MD -MP -MF $(DEPDIR)/libscipreferences_la-sci_addToolboxInfos.Tpo -c -o libscipreferences_la-sci_addToolboxInfos.lo `test -f 'sci_gateway/cpp/sci_addToolboxInfos.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_addToolboxInfos.cpp
-@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscipreferences_la-sci_addToolboxInfos.Tpo $(DEPDIR)/libscipreferences_la-sci_addToolboxInfos.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_addToolboxInfos.cpp' object='libscipreferences_la-sci_addToolboxInfos.lo' libtool=yes @AMDEPBACKSLASH@
+libscipreferences_la-sci_addModulePreferences.lo: sci_gateway/cpp/sci_addModulePreferences.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscipreferences_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscipreferences_la-sci_addModulePreferences.lo -MD -MP -MF $(DEPDIR)/libscipreferences_la-sci_addModulePreferences.Tpo -c -o libscipreferences_la-sci_addModulePreferences.lo `test -f 'sci_gateway/cpp/sci_addModulePreferences.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_addModulePreferences.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscipreferences_la-sci_addModulePreferences.Tpo $(DEPDIR)/libscipreferences_la-sci_addModulePreferences.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_addModulePreferences.cpp' object='libscipreferences_la-sci_addModulePreferences.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscipreferences_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscipreferences_la-sci_addToolboxInfos.lo `test -f 'sci_gateway/cpp/sci_addToolboxInfos.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_addToolboxInfos.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscipreferences_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscipreferences_la-sci_addModulePreferences.lo `test -f 'sci_gateway/cpp/sci_addModulePreferences.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_addModulePreferences.cpp
 
-libscipreferences_la-sci_removeToolboxInfos.lo: sci_gateway/cpp/sci_removeToolboxInfos.cpp
-@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscipreferences_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscipreferences_la-sci_removeToolboxInfos.lo -MD -MP -MF $(DEPDIR)/libscipreferences_la-sci_removeToolboxInfos.Tpo -c -o libscipreferences_la-sci_removeToolboxInfos.lo `test -f 'sci_gateway/cpp/sci_removeToolboxInfos.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_removeToolboxInfos.cpp
-@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscipreferences_la-sci_removeToolboxInfos.Tpo $(DEPDIR)/libscipreferences_la-sci_removeToolboxInfos.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_removeToolboxInfos.cpp' object='libscipreferences_la-sci_removeToolboxInfos.lo' libtool=yes @AMDEPBACKSLASH@
+libscipreferences_la-sci_removeModulePreferences.lo: sci_gateway/cpp/sci_removeModulePreferences.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscipreferences_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscipreferences_la-sci_removeModulePreferences.lo -MD -MP -MF $(DEPDIR)/libscipreferences_la-sci_removeModulePreferences.Tpo -c -o libscipreferences_la-sci_removeModulePreferences.lo `test -f 'sci_gateway/cpp/sci_removeModulePreferences.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_removeModulePreferences.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscipreferences_la-sci_removeModulePreferences.Tpo $(DEPDIR)/libscipreferences_la-sci_removeModulePreferences.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_removeModulePreferences.cpp' object='libscipreferences_la-sci_removeModulePreferences.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscipreferences_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscipreferences_la-sci_removeToolboxInfos.lo `test -f 'sci_gateway/cpp/sci_removeToolboxInfos.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_removeToolboxInfos.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscipreferences_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscipreferences_la-sci_removeModulePreferences.lo `test -f 'sci_gateway/cpp/sci_removeModulePreferences.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_removeModulePreferences.cpp
 
 mostlyclean-libtool:
        -rm -f *.lo
index f6e98bf..6dfb0c2 100644 (file)
@@ -16,8 +16,8 @@
 #include "dynlib_preferences_scilab.h"
 /*--------------------------------------------------------------------------*/
 PREFERENCES_SCILAB_IMPEXP int gw_preferences(void);
-int sci_addToolboxInfos(char * fname, unsigned long l);
-int sci_removeToolboxInfos(char * fname, unsigned long l);
+int sci_addModulePreferences(char * fname, unsigned long l);
+int sci_removeModulePreferences(char * fname, unsigned long l);
 /*--------------------------------------------------------------------------*/
 #endif /* __GW_PREFERENCES__ */
 /*--------------------------------------------------------------------------*/
index 13b387c..641ee0c 100644 (file)
@@ -24,8 +24,8 @@ static BOOL loadedDep = FALSE;
 /*--------------------------------------------------------------------------*/
 static gw_generic_table Tab[]=
 {
-    {sci_addToolboxInfos, "addToolboxInfos"},
-    {sci_removeToolboxInfos, "removeToolboxInfos"}
+    {sci_addModulePreferences, "addModulePreferences"},
+    {sci_removeModulePreferences, "removeModulePreferences"}
 };
 /*--------------------------------------------------------------------------*/
 int gw_preferences(void)
@@ -28,7 +28,7 @@ extern "C"
 using namespace org_scilab_modules_preferences;
 
 /*--------------------------------------------------------------------------*/
-int sci_addToolboxInfos(char * fname, unsigned long fname_len)
+int sci_addModulePreferences(char * fname, unsigned long fname_len)
 {
     SciErr err;
     int * addr = 0;
@@ -26,7 +26,7 @@ extern "C"
 using namespace org_scilab_modules_preferences;
 
 /*--------------------------------------------------------------------------*/
-int sci_removeToolboxInfos(char * fname, unsigned long fname_len)
+int sci_removeModulePreferences(char * fname, unsigned long fname_len)
 {
     SciErr err;
     int * addr = 0;
index cfc0853..6a14972 100644 (file)
@@ -22,6 +22,6 @@
  Don't touch if you do not know what you are doing
 -->
 <!-- =================== -->
-<PRIMITIVE gatewayId="69" primitiveId="1" primitiveName="addToolboxInfos" />
-<PRIMITIVE gatewayId="69" primitiveId="2" primitiveName="removeToolboxInfos" />
+<PRIMITIVE gatewayId="69" primitiveId="1" primitiveName="addModulePreferences" />
+<PRIMITIVE gatewayId="69" primitiveId="2" primitiveName="removeModulePreferences" />
 </GATEWAY>
index 9915448..4aaf989 100644 (file)
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_addToolboxInfos.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_removeToolboxInfos.cpp" />
+    <ClCompile Include="..\..\sci_gateway\cpp\sci_addModulePreferences.cpp" />
+    <ClCompile Include="..\..\sci_gateway\cpp\sci_removeModulePreferences.cpp" />
     <ClCompile Include="..\..\sci_gateway\c\gw_preferences.c" />
     <ClCompile Include="..\jni\GiwsException.cpp" />
     <ClCompile Include="..\jni\ScilabPreferences.cpp" />
index d33f086..017c7f7 100644 (file)
     <ClCompile Include="..\..\sci_gateway\c\gw_preferences.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_addToolboxInfos.cpp">
+    <ClCompile Include="..\..\sci_gateway\cpp\sci_addModulePreferences.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_removeToolboxInfos.cpp">
+    <ClCompile Include="..\..\sci_gateway\cpp\sci_removeModulePreferences.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>