]> SALOME platform Git repositories - samples/pylight.git/commitdiff
Salome HOME
Merge from V6_main_20120808 08Aug12
authorvsr <vsr@opencascade.com>
Thu, 9 Aug 2012 12:20:37 +0000 (12:20 +0000)
committervsr <vsr@opencascade.com>
Thu, 9 Aug 2012 12:20:37 +0000 (12:20 +0000)
23 files changed:
Makefile.am
adm_local/Makefile.am
adm_local/unix/Makefile.am
adm_local/unix/config_files/Makefile.am
adm_local/unix/config_files/check_PYLIGHT.m4
adm_local/unix/make_common_starter.am
bin/Makefile.am
bin/VERSION.in
build_configure
clean_configure
configure.ac
resources/LightApp.xml
resources/Makefile.am
resources/PYLIGHT_en.xml
resources/SalomeApp.xml [deleted file]
resources/SalomeApp.xml.in [new file with mode: 0644]
src/Makefile.am
src/PYLIGHTGUI/Makefile.am
src/PYLIGHTGUI/PYLIGHTGUI.py
src/PYLIGHTGUI/PYLIGHT_DataModel.py
src/PYLIGHTGUI/PYLIGHT_icons.ts
src/PYLIGHTGUI/PYLIGHT_msg_en.ts
src/PYLIGHTGUI/PYLIGHT_msg_fr.ts [new file with mode: 0644]

index a9bc1c1505f1e009b04c391f3dd23fa9124dfed1..92060dd070014fe6adb69277a1627a0f89b4789c 100644 (file)
@@ -1,27 +1,25 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 
 #  Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
 #  Date   : 13/04/2009
-
+#
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 ACLOCAL_AMFLAGS = -I adm_local/unix/config_files \
@@ -30,7 +28,7 @@ ACLOCAL_AMFLAGS = -I adm_local/unix/config_files \
 
 SUBDIRS = adm_local resources src bin
 
-DISTCLEANFILES = a.out aclocal.m4 configure
+DISTCLEANFILES = a.out aclocal.m4 configure local-install.sh hack_libtool
 
 EXTRA_DIST +=          \
        build_configure \
index f35273fac7de52921e587cdc5f9641c7f3116fc3..98ec131042f0168c6ae35cf7e8adb048a6d289b5 100644 (file)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 SUBDIRS = unix
index 5f6d5f7536c72fc43090c511c2a26518cb92af5d..9957566fef6f9fedb3e87bdd9c731c71dfd80bdb 100644 (file)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 SUBDIRS = config_files
index 8e13ce06a1bfad83faac4a940aac4ba46e1958e7..c56f0804f10304b19e52fc6e65a66757274c7355 100644 (file)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 dist_admlocalm4_DATA = \
index 957ba229291553abb18df4bf6e229b0e9e54b9a0..fbb32cda3e10b13d929d9cc46d07a4dae58dad5f 100755 (executable)
@@ -1,23 +1,21 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 
 #  Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
 #  Date   : 13/04/2009
index 36ad8c3a7c7e37c3da0591452c8cc09f24250858..fe8e1e7525d3e19782a2e61a306d49cff1eda5e0 100644 (file)
@@ -1,24 +1,30 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+# ============================================================
+# The following is to avoid PACKAGE_... env variable
+# redefinition compilation warnings
+# ============================================================
 #
+AM_CXXFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
+AM_CPPFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
+
 # ============================================================
 # This file defines the common definitions used in several
 # Makefile. This file must be included, if needed, by the file
index 76ed72c927f6b2cf0995f4227d2717615329ad8e..8a53a725941622f38ac8fd4400512ed8c90f8bd6 100644 (file)
@@ -1,27 +1,25 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 
 #  Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
 #  Date   : 13/04/2009
-
+#
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 nodist_salomescript_DATA = \
index 3e9913ac4bd3beb035d5806f6a68c90bba11f43e..9dcdb4eb0d87b7e21b2332276823d2e5fb0a371a 100755 (executable)
@@ -1 +1,3 @@
-THIS IS SALOME - PYLIGHT VERSION: @VERSION@
+[SALOME PYLIGHT] : @VERSION@
+[DEVELOPMENT]    : @VERSION_DEV@
+[DESCRIPTION]    : Sample Python SALOME module
index 2bc396d63155bf0b67939d725dba1695f4a5b0a6..727ec3111e7ed07897200ce6c5b0d2273d19f66c 100755 (executable)
@@ -1,27 +1,26 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#!/bin/bash
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 
 #  Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
 #  Date   : 13/04/2009
-
+#
 ORIG_DIR=`pwd`
 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
 
@@ -45,18 +44,16 @@ fi
 cd ${CONF_DIR}
 ABS_CONF_DIR=`pwd`
 
-
-mkdir -p salome_adm/unix/config_files
-cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
+########################################################################
 
 # ____________________________________________________________________
 # aclocal creates the aclocal.m4 file from the standard macro and the
-# custom macro embedded in the directory salome_adm/unix/config_files
+# custom macro embedded in the directory adm_local/unix/config_files
 # and KERNEL config_files directory.
 # output:
 #   aclocal.m4
 #   autom4te.cache (directory)
-echo "====================================================== aclocal"
+echo "======================================================= aclocal"
 
 aclocal -I adm_local/unix/config_files \
         -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
@@ -68,10 +65,10 @@ aclocal -I adm_local/unix/config_files \
 # version. The files are created in the directory specified with the
 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
 # output:
-#   salome_adm/unix/config_files/config.guess
-#   salome_adm/unix/config_files/config.sub
-#   salome_adm/unix/config_files/ltmain.sh
-#echo "====================================================== libtoolize"
+#   adm_local/unix/config_files/config.guess
+#   adm_local/unix/config_files/config.sub
+#   adm_local/unix/config_files/ltmain.sh
+echo "==================================================== libtoolize"
 
 libtoolize --force --copy --automake || exit 1
 
@@ -91,11 +88,11 @@ autoconf
 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
 # creates the Makefile.in files from the Makefile.am files.
 # output:
-#   salome_adm/unix/config_files/compile
-#   salome_adm/unix/config_files/depcomp
-#   salome_adm/unix/config_files/install-sh
-#   salome_adm/unix/config_files/missing
-#   salome_adm/unix/config_files/py-compile
+#   adm_local/unix/config_files/compile
+#   adm_local/unix/config_files/depcomp
+#   adm_local/unix/config_files/install-sh
+#   adm_local/unix/config_files/missing
+#   adm_local/unix/config_files/py-compile
 #   Makefile.in (from Makefile.am)
 echo "====================================================== automake"
 
index 2e993803df33680da44b5872033c47d4ab13f32f..28a9a403330269e3924d5b1c024c336014b4a95e 100755 (executable)
@@ -1,33 +1,25 @@
 #!/bin/sh
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 rm -rf autom4te.cache aclocal.m4 configure make_config
 find . -name "*~" -print -exec rm {} \;
 find . -name "*.pyc" -print -exec rm {} \;
-#exit
-# ==================== ON SORT AVANT
-
-find bin -name Makefile.in | xargs rm -f
-find resources -name Makefile.in | xargs rm -f
-find salome_adm -name Makefile.in | xargs rm -f
-find src -name Makefile.in | xargs rm -f
-rm -f Makefile.in
+find . -name Makefile.in | xargs rm -f
+( cd adm_local/unix/config_files && rm -f config.* depcomp install-sh l*.m4 ltmain.sh missing py-compile )
index 29d4f27d9dab34bc49135f68f9c08cd056201907..447a1beb6983347baddfe19dc76effc0d88d2ac5 100644 (file)
@@ -1,38 +1,34 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  PLEASE DO NOT MODIFY configure.in FILE
 #  ALL CHANGES WILL BE DISCARDED BY THE NEXT
 #  build_configure COMMAND
 #  CHANGES MUST BE MADE IN configure.ac file
-
 #  Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
 #  Date   : 13/04/2009
-
-
-AC_INIT([Salome2 Project PYLIGHT module], [5.1.1], [webmaster.salome@opencascade.com], [SalomePYLIGHT])
-AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
+#
+AC_INIT([Salome2 Project PYLIGHT module], [6.5.0], [webmaster.salome@opencascade.com], [SalomePYLIGHT])
+AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([-Wno-portability])
 
 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
 AC_SUBST(XVERSION)
@@ -40,6 +36,8 @@ AC_SUBST(XVERSION)
 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
 MODULE_NAME=pylight
 AC_SUBST(MODULE_NAME)
+VERSION_DEV=1
+AC_SUBST(VERSION_DEV)
 
 dnl
 dnl Initialize source and build root directories
@@ -80,6 +78,7 @@ echo
 
 AC_PROG_MAKE_SET
 AC_PROG_INSTALL
+AC_LOCAL_INSTALL
 dnl 
 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + for shared libraries
 
@@ -101,7 +100,7 @@ dnl Fix up the INSTALL macro if it s a relative path. We want the
 dnl full-path to the binary instead.
 case "$INSTALL" in
    *install-sh*)
-      INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
+      INSTALL='\${KERNEL_ROOT_DIR}'/adm_local/unix/config_files/install-sh
       ;;
 esac
 
@@ -189,19 +188,30 @@ AC_OUTPUT_COMMANDS([ \
       chmod +x ./bin/*; \
 ])
 
+AC_HACK_LIBTOOL
+AC_CONFIG_COMMANDS([hack_libtool],[
+sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
+  $(pwd)/hack_libtool \1 \"\$[@]\" \n\
+}\n\
+CC=\"hack_libtool\"%g" libtool
+sed -i "s%\(\s*\)for searchdir in \$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path; do%\1searchdirs=\"\$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path\"\n\1for searchdir in \$searchdirs; do%g" libtool
+sed -i "s%\(\s*\)searchdirs=\"\$newlib_search_path \$lib_search_path \(.*\)\"%\1searchdirs=\"\$newlib_search_path \$lib_search_path\"\n\1sss_beg=\"\"\n\1sss_end=\"\2\"%g" libtool
+sed -i "s%\(\s*\)\(for searchdir in \$searchdirs; do\)%\1for sss in \$searchdirs; do\n\1  if ! test -d \$sss; then continue; fi\n\1  ssss=\$(cd \$sss; pwd)\n\1  if test \"\$ssss\" != \"\" \&\& test -d \$ssss; then\n\1    case \$ssss in\n\1      /usr/lib | /usr/lib64 ) ;;\n\1      * ) sss_beg=\"\$sss_beg \$ssss\" ;;\n\1    esac\n\1  fi\n\1done\n\1searchdirs=\"\$sss_beg \$sss_end\"\n\1\2%g" libtool
+],[])
+
 # This list is initiated using autoscan and must be updated manually
 # when adding a new file <filename>.in to manage. When you execute
 # autoscan, the Makefile list is generated in the output file configure.scan.
 # This could be helpfull to update de configuration.
 AC_OUTPUT([ \
-  ./salome_adm/unix/SALOMEconfig.h \
-  ./adm_local/Makefile \
-  ./adm_local/unix/Makefile \
-  ./adm_local/unix/config_files/Makefile \
-  ./bin/VERSION \
-  ./bin/Makefile \
-  ./src/Makefile \
-  ./src/PYLIGHTGUI/Makefile \
-  ./resources/Makefile \
+  adm_local/Makefile \
+  adm_local/unix/Makefile \
+  adm_local/unix/config_files/Makefile \
+  bin/VERSION \
+  bin/Makefile \
+  src/Makefile \
+  src/PYLIGHTGUI/Makefile \
+  resources/Makefile \
+  resources/SalomeApp.xml \
   Makefile \
 ])
index 84f2dad7a3bb42b9ef59b5ad28618b0eee18d5f6..b16fa29e3300d2652cef2e9d3ff0820a12016df3 100644 (file)
@@ -1,3 +1,23 @@
+<!--
+  Copyright (C) 2009-2012  OPEN CASCADE
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+-->
 <document>
   <section name="PYLIGHT">
     <!-- Major module parameters -->
index f8c0e44901c2c2b6eb16cfd80bd7c3cc14223572..6b152c1a4725042e462765a0655bf3628d479bef 100644 (file)
@@ -1,27 +1,25 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 
 #  Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
 #  Date   : 13/04/2009
-
+#
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 dist_salomeres_DATA = \
@@ -30,6 +28,6 @@ dist_salomeres_DATA = \
        PYLIGHT_line_icon.png \
        PYLIGHT_paragraph_icon.png \
        queen.txt \
-       LightApp.xml \
-       SalomeApp.xml
-       
\ No newline at end of file
+       LightApp.xml
+
+nodist_salomeres_SCRIPTS = SalomeApp.xml
\ No newline at end of file
index 98e62a54de2120151a9eb3290d9d144307284ab9..c91672c3725c627f27773085ddf15cd0412d003d 100644 (file)
@@ -1,4 +1,24 @@
 <?xml version='1.0' encoding='us-ascii'?>
+<!--
+  Copyright (C) 2009-2012  OPEN CASCADE
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+-->
 <!DOCTYPE application PUBLIC "" "desktop.dtd">
 <application title="PYHELLO component" date="9/12/2001" author="C Caremoli" appId="PYHELLO" >
 <desktop>
diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml
deleted file mode 100644 (file)
index 84f2dad..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<document>
-  <section name="PYLIGHT">
-    <!-- Major module parameters -->
-    <parameter name="name"    value="PyLight"/>
-    <parameter name="icon"    value="PYLIGHT.png"/>
-    <parameter name="library" value="SalomePyQtGUILight"/>
-  </section>
-  
-  <section name="resources">
-    <!-- Module resources -->
-    <parameter name="PYLIGHT" value="${PYLIGHT_ROOT_DIR}/share/salome/resources/pylight"/>
-  </section>
-  
-</document>
diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in
new file mode 100644 (file)
index 0000000..d635b8f
--- /dev/null
@@ -0,0 +1,35 @@
+<!--
+  Copyright (C) 2009-2012  OPEN CASCADE
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+-->
+<document>
+  <section name="PYLIGHT">
+    <!-- Major module parameters -->
+    <parameter name="name"    value="PyLight"/>
+    <parameter name="icon"    value="PYLIGHT.png"/>
+    <parameter name="version" value="@VERSION@"/>
+    <parameter name="library" value="SalomePyQtGUILight"/>
+  </section>
+  
+  <section name="resources">
+    <!-- Module resources -->
+    <parameter name="PYLIGHT" value="%PYLIGHT_ROOT_DIR%/share/salome/resources/pylight"/>
+  </section>
+  
+</document>
index 7d037de7a9d017a5de9389213ac55e9d4a914f30..590ab5915b03ea363607a2dcef205b5bfb88fbdc 100755 (executable)
@@ -1,27 +1,25 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 
 #  Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
 #  Date   : 13/04/2009
-
+#
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 SUBDIRS = PYLIGHTGUI
index 64ad10cac280f3d562d9bad4d1919187e7b2f75a..878ba306cd9ef6f5b7b6d6d4d8f2b3159acf10e6 100755 (executable)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SuperVisionTest AddComponent : example of component that adds two numbers
 #  File   : Makefile.in
 #  Author : , CEA
@@ -34,4 +32,5 @@ dist_salomescript_SCRIPTS = \
 # resources files
 nodist_salomeres_DATA = \
        PYLIGHT_msg_en.qm \
+       PYLIGHT_msg_fr.qm \
        PYLIGHT_icons.qm
index 29d5024f110bbba5ffa83c8b90f52cddbaac2659..b96f7896604fdcd4eb32e1d1c45f46df48237ea3 100644 (file)
@@ -1,27 +1,25 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 
-#  Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
+#  Author : Roman NIKOLAEV, Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
 #  Date   : 13/04/2009
-
+#
 import traceback
 from SalomePyQt import *
 import PYLIGHT_DataModel
@@ -34,129 +32,218 @@ import libSalomePy
 import vtk
 
 # Get SALOME PyQt interface
-sgPyQt=SalomePyQt()
+sgPyQt = SalomePyQt()
 # Get SALOME Swig interface
 sg = libSALOME_Swig.SALOMEGUI_Swig()
 
-# Create DataModel
-DM = PYLIGHT_DataModel.PYLIGHT_DataModel()
+################################################
+# GUI context class
+# Used to store actions, menus, toolbars, etc...
+################################################
+
+class GUIcontext:
+
+    # constructor
+    def __init__( self ):
+        # Load File action
+        sgPyQt.createAction(dict_actions["loadfile"], "Load text File", "Load text file")
+        # Save File action
+        sgPyQt.createAction(dict_actions["savefile"], "Save text File", "Save text file")
+        # Insert Line action
+        sgPyQt.createAction(dict_actions["insertLine"], "Insert Line", "Insert new text line")
+        # Insert new line action
+        sgPyQt.createAction(dict_actions["insertLine"], "Insert Line", "Insert new line")
+        # Edit selected line action
+        sgPyQt.createAction(dict_actions["editLine"], "Edit Line", "Edit selected line")
+        # Remove selected line action
+        sgPyQt.createAction(dict_actions["removeLine"], "Remove Lines", "Remove selected lines")
+        # Clear all paragraphs
+        sgPyQt.createAction(dict_actions["clearAll"], "Clear All", "Clear all paragraphs")
+        # Display line
+        sgPyQt.createAction(dict_actions["displayLine"], "Display Line", "Display selected line")
+        # Erase line
+        sgPyQt.createAction(dict_actions["eraseLine"], "Erase Line", "Erase selected line")
+        # Separator
+        separator = sgPyQt.createSeparator()
+
+        # Get Menu 'File'
+        menuFile = sgPyQt.createMenu( "File", -1, -1 )
+        # Add actions in the menu 'File'
+        sgPyQt.createMenu( separator,                menuFile, -1, 10)
+        sgPyQt.createMenu( dict_actions["loadfile"], menuFile, 10 );
+        sgPyQt.createMenu( dict_actions["savefile"], menuFile, 10 );
+        sgPyQt.createMenu( separator,                menuFile, -1, 10)
+        # Create 'PyLight' menu 
+        menuPyLight = sgPyQt.createMenu( "PyLight", -1, -1, 50)
+        # Add actions in the menu 'PyLight'
+        sgPyQt.createMenu( dict_actions["insertLine"],  menuPyLight, 10 );
+        sgPyQt.createMenu( dict_actions["editLine"],    menuPyLight, 10 );
+        sgPyQt.createMenu( dict_actions["removeLine"],  menuPyLight, 10 );
+        sgPyQt.createMenu( separator,                   menuPyLight, -1, 10);
+        sgPyQt.createMenu( dict_actions["clearAll"],    menuPyLight, 10 );
+        sgPyQt.createMenu( separator,                   menuPyLight, -1, 10);
+        sgPyQt.createMenu( dict_actions["displayLine"], menuPyLight, 10 );
+        sgPyQt.createMenu( dict_actions["eraseLine"],   menuPyLight, 10 );
+
+        # Create DataModel
+        self.DM = PYLIGHT_DataModel.PYLIGHT_DataModel()
+
+        pass # def __init__( self )
+
+    pass # class GUIcontext
+
+################################################
+# Global variables and functions
+################################################
+
+###
+# get active study ID
+###
+def _getStudyId():
+    return sgPyQt.getStudyId()
+
+# verbosity level
+__verbose__ = None
+
+###
+# Get verbose level
+###
+def verbose():
+    global __verbose__
+    if __verbose__ is None:
+        try:
+            __verbose__ = int( os.getenv( 'SALOME_VERBOSE', 0 ) )
+        except:
+            __verbose__ = 0
+            pass
+        pass
+    return __verbose__
+
+# study-to-context map
+__study2context__   = {}
+# current context
+__current_context__ = None
+
+###
+# get current GUI context
+###
+def _getContext():
+    global __current_context__
+    return __current_context__
+
+###
+# set and return current GUI context
+# study ID is passed as parameter
+###
+def _setContext( studyID ):
+    global __study2context__, __current_context__
+    if not __study2context__.has_key(studyID):
+        __study2context__[studyID] = GUIcontext()
+        pass
+    __current_context__ = __study2context__[studyID]
+    return __current_context__
+
+################################################
 
 # Create actions and menus
 def initialize():
-    
-    print "PYLIGHTGUI::initialize()"
-    # Load File action
-    sgPyQt.createAction(dict_actions["loadfile"], "Load text File", "Load text file")
-    # Save File action
-    sgPyQt.createAction(dict_actions["savefile"], "Save text File", "Save text file")
-    # Insert Line action
-    sgPyQt.createAction(dict_actions["insertLine"], "Insert Line", "Insert new text line")
-    # Separator
-    separator = sgPyQt.createSeparator()
-    # Get Menu 'File'
-    menuFile = sgPyQt.createMenu( "File", -1, -1 )
-    # Add actions in the menu 'File'
-    sgPyQt.createMenu( separator ,menuFile, -1, 10)
-    sgPyQt.createMenu( dict_actions["loadfile"],  menuFile, 10 );
-    sgPyQt.createMenu( dict_actions["savefile"],  menuFile, 10 );
-    sgPyQt.createMenu( separator ,menuFile, -1, 10)
-    
-    # Insert new line action
-    sgPyQt.createAction(dict_actions["insertLine"], "Insert Line", "Insert new line")
-    # Edit selected line action
-    sgPyQt.createAction(dict_actions["editLine"], "Edit Line", "Edit selected line")
-    # Remove selected line action
-    sgPyQt.createAction(dict_actions["removeLine"], "Remove Lines", "Remove selected lines")
-    # Clear all paragraphs
-    sgPyQt.createAction(dict_actions["clearAll"], "Clear All", "Clear all paragraphs")
-    # Display line
-    sgPyQt.createAction(dict_actions["displayLine"], "Display Line", "Display selected line")
-    # Erase line
-    sgPyQt.createAction(dict_actions["eraseLine"], "Erase Line", "Erase selected line")
-    
-    # Create 'PyLight' menu 
-    menuPyLight = sgPyQt.createMenu( "PyLight",-1,-1,50)
-    # Add actions in the menu 'PyLight'
-    sgPyQt.createMenu( dict_actions["insertLine"],  menuPyLight, 10 );
-    sgPyQt.createMenu( dict_actions["editLine"],  menuPyLight, 10 );
-    sgPyQt.createMenu( dict_actions["removeLine"],  menuPyLight, 10 );
-    sgPyQt.createMenu( separator, menuPyLight, -1, 10);
-    sgPyQt.createMenu( dict_actions["clearAll"],  menuPyLight, 10 );
-    sgPyQt.createMenu( separator, menuPyLight, -1, 10);
-    sgPyQt.createMenu( dict_actions["displayLine"],  menuPyLight, 10 );
-    sgPyQt.createMenu( dict_actions["eraseLine"],  menuPyLight, 10 );
-    
+    if verbose(): print "PYLIGHTGUI::initialize()"
     return
 
+# called when module is activated
+# returns True if activating is successfull and False otherwise
+def activate():
+    if verbose() : print "PYLIGHTGUI.activate() : study : %d" % _getStudyId()
+    ctx = _setContext( _getStudyId() )
+    return True
+
+# called when module is deactivated
+def deactivate():
+    if verbose() : print "PYLIGHTGUI.deactivate() : study : %d" % _getStudyId()
+    pass
+
+# called when active study is changed
+# active study ID is passed as parameter
+def activeStudyChanged( studyID ):
+    if verbose() : print "PYLIGHTGUI.activeStudyChanged(): study : %d" % studyID
+    ctx = _setContext( _getStudyId() )
+    pass
 
 # Process GUI action
 def OnGUIEvent(commandID):
-    print "PYLIGHTGUI::OnGUIEvent : commandID =",commandID
+    if verbose() : print "PYLIGHTGUI::OnGUIEvent : commandID = %d" % commandID
     if dict_command.has_key( commandID ):
         try:
             dict_command[commandID]()
         except:
             traceback.print_exc()
     else:
-       print "The command is not implemented: ",commandID
+       if verbose() : print "The command is not implemented: %d" % commandID
     pass
 
 # Customize popup menu
 def createPopupMenu(popup, context):
+    if verbose() : print "PYLIGHTGUI.createPopupMenu(): context = %s" % context
 
-
-    
     if context != 'ObjectBrowser':
         return
     
+    studyId = _getStudyId()
+    ctx = _setContext( studyId )
     selcount = sg.SelectedCount()
     if selcount == 1:
         entry = sg.getSelected( 0 )
-        obj = DM.getObject(entry)
+        obj = ctx.DM.getObject(entry)
         if obj is not None:
             if obj.getText() != "\n":
-                #Line is selected
+                # Line is selected
                 popup.addAction(sgPyQt.action(dict_actions["editLine"]))
                 popup.addAction(sgPyQt.action(dict_actions["removeLine"]))
                 popup.addSeparator()
                 popup.addAction(sgPyQt.action(dict_actions["displayLine"]))
                 popup.addAction(sgPyQt.action(dict_actions["displayLine"]))
                 popup.addAction(sgPyQt.action(dict_actions["eraseLine"]))
-
-                                                
+                pass
             else:
-                #Paragraph is selected
+                # Paragraph is selected
                 popup.addAction(sgPyQt.action(dict_actions["insertLine"]))
                 popup.addAction(sgPyQt.action(dict_actions["clearParagraph"]))
+                pass
+            pass
         else:
-            onlyLines = True            
+            onlyLines = True
+            pass
+        pass # if selcount == 1
     pass
 
 # For saving data in the study
 def saveFiles(prefix):
-    print "PYLIGHTGUI::saveFile()"
+    if verbose(): print "PYLIGHTGUI::saveFile()"
+    ctx = _setContext( _getStudyId() )
     postfix = "PYLIGHT.txt"
     filename = prefix+postfix
-    DM.saveFile(QString(filename))
+    ctx.DM.saveFile(QString(filename))
     return postfix
 
 # For restore data from the study
 def openFiles(filelist):
-    print "PYLIGHTGUI::openFile()"
+    if verbose(): print "PYLIGHTGUI::openFile()"
+    ctx = _setContext( _getStudyId() )
     filename =  filelist[0]
     filename.append(filelist[1])
-    DM.loadFile(filename)
+    ctx.DM.loadFile(filename)
     return True
 
 # Loading a text file
 def loadfile():
+    ctx = _setContext( _getStudyId() )
     aFilter = "Text files (*.txt)"
     filename = QFileDialog.getOpenFileName(sgPyQt.getDesktop(), "Open text file", "", aFilter, "Choose a text file to open")
     if filename.isEmpty():
         return
     
     if os.access(str(filename),os.R_OK):
-        DM.loadFile(filename)
+        ctx.DM.loadFile(filename)
     else:
         QMessageBox.warning(sgPyQt.getDesktop(),
                             "Error!",
@@ -167,16 +254,16 @@ def loadfile():
 
 # Saving a text file
 def savefile():
+    ctx = _setContext( _getStudyId() )
     aFilter = "Text files (*.txt)"
     filename = QFileDialog.getSaveFileName(sgPyQt.getDesktop(),"Save text file", "", aFilter, "Choose a text file to save")
     if filename.contains(".txt") == 0:
         filename.append(".txt")
         pass
     fn = filename
-    print filename
     # Get directory name and check access
     if os.access(str(fn.left(fn.lastIndexOf("/"))), os.W_OK):
-        DM.saveFile(filename)
+        ctx.DM.saveFile(filename)
     else:
         QMessageBox.warning(sgPyQt.getDesktop(),
                             "Error!",
@@ -188,6 +275,7 @@ def insertLine():
     '''
     Insert new line in the selected paragraph.
     '''
+    ctx = _setContext( _getStudyId() )
     #Get result
     res = QInputDialog.getText(sgPyQt.getDesktop(),
                                "Add new line",
@@ -200,19 +288,19 @@ def insertLine():
     # Nb selected objects
     selcount = sg.SelectedCount()
     # Nb object in the Data Model
-    paragrCount = len(DM.getParagraphs())
+    paragrCount = len(ctx.DM.getParagraphs())
 
     # Create first paragraph
     if paragrCount == 0:
-        DM.createObject()
+        ctx.DM.createObject()
         # If line not empty create first line
         if text != "\n":
-            DM.createObject(text,DM.getParagraphs()[0])
+            ctx.DM.createObject(text,ctx.DM.getParagraphs()[0])
         sg.updateObjBrowser(True)
         return
     # Create paragraph
     if text == "\n":
-        DM.createObject()
+        ctx.DM.createObject()
         sg.updateObjBrowser(True)
         return
     else:
@@ -223,11 +311,11 @@ def insertLine():
             return
         if selcount == 1:
             entry = sg.getSelected( 0 )
-            obj = DM.getObject(entry)
+            obj = ctx.DM.getObject(entry)
             if obj is not None:
                 # Create line
                 if(obj.getText() == "\n"):
-                    DM.createObject(text,entry)
+                    ctx.DM.createObject(text,entry)
                     sg.updateObjBrowser(True);
                     return
                 else:
@@ -243,9 +331,10 @@ def insertLine():
         
 # Edit selected line
 def editLine():
+    ctx = _setContext( _getStudyId() )
     if sg.SelectedCount() == 1:
         entry = sg.getSelected( 0 )
-        obj = DM.getObject(entry)
+        obj = ctx.DM.getObject(entry)
         if(obj.getText() != "\n"):
             #Get text line
             res = QInputDialog.getText(sgPyQt.getDesktop(),
@@ -271,13 +360,14 @@ def editLine():
 
 # Remove selected lines
 def removeLine():
+    ctx = _setContext( _getStudyId() )
     selcount = sg.SelectedCount()
     onlyLines = True
     lines = []
     while selcount != 0:
         entry = sg.getSelected( selcount - 1)
         #Check what only lines selected
-        if DM.getObject(entry).getText() == "\n":
+        if ctx.DM.getObject(entry).getText() == "\n":
             onlyLines = False
             break
         lines.append(entry)
@@ -293,17 +383,18 @@ def removeLine():
                 renderer.RemoveActor(actor)
                 pass
             pass
-        DM.removeObjects(lines)
+        ctx.DM.removeObjects(lines)
         sg.updateObjBrowser(True)
         pass
     pass
 
 # Remove all lines from all paragraphs
 def clearAll():
-    paragraphs = DM.getParagraphs()
+    ctx = _setContext( _getStudyId() )
+    paragraphs = ctx.DM.getParagraphs()
     for paragr in paragraphs:
         lines = sgPyQt.getChildren(paragr)
-        DM.removeObjects(lines)
+        ctx.DM.removeObjects(lines)
         renderer=libSalomePy.getRenderer()
         for l in lines:
             actor = getActor(l)
@@ -316,10 +407,11 @@ def clearAll():
 
 # Display the selected line
 def displayLine():
+    ctx = _setContext( _getStudyId() )
     if sg.SelectedCount() != 1:
         return
     entry = sg.getSelected(0)
-    text = DM.getObject(entry).getText()
+    text = ctx.DM.getObject(entry).getText()
     if text == "\n":
         return
     renderer=libSalomePy.getRenderer()
@@ -341,17 +433,19 @@ def displayLine():
 
 # Clear remove all lines under selected paragraph
 def clearParagraph():
+    ctx = _setContext( _getStudyId() )
     lines = sgPyQt.getChildren(sg.getSelected(0))
-    DM.removeObjects(lines)
+    ctx.DM.removeObjects(lines)
     sg.updateObjBrowser(True)
     pass
 
 # Erase the selected line
 def eraseLine():
+    ctx = _setContext( _getStudyId() )
     if sg.SelectedCount() != 1:
         return
     entry = sg.getSelected(0)
-    text = DM.getObject(entry).getText()
+    text = ctx.DM.getObject(entry).getText()
     if text == "\n":
         return
     renderer=libSalomePy.getRenderer()
index eae48d64a052d2b368bfebdbaea0b859e70140ae..76db17ac555c0fc7547f175dc250b88bce2fed9b 100644 (file)
@@ -1,27 +1,25 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012  OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 
 #  Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
 #  Date   : 13/04/2009
-
+#
 import SalomePyQt
 from PyQt4.QtCore import *
 
index dadb246efbb65d8c71568284931edc2ae2d3633d..96b8a03dad88cb32f693d58603606e01ccdf7b87 100644 (file)
@@ -1,27 +1,6 @@
-<!DOCTYPE TS><TS>
-<!--
-  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
-
-  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation; either
-  version 2.1 of the License.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-
-  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-
--->
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
 <context>
     <name>@default</name>
     <message>
index 8025ecd712c9463d0aa8f92db1db4fcded25d1e4..2ee4f7f85e21fe959cc55c87176221952e7450d3 100644 (file)
@@ -1,25 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS>
-<!--
-  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
-
-  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation; either
-  version 2.1 of the License.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-
-  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-
--->
-<TS version="1.1" />
+<TS version="2.0" language="en_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source></source>
+        <translation></translation>
+    </message>
+</context>
+</TS>
diff --git a/src/PYLIGHTGUI/PYLIGHT_msg_fr.ts b/src/PYLIGHTGUI/PYLIGHT_msg_fr.ts
new file mode 100644 (file)
index 0000000..1e4dea3
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_FR">
+<context>
+    <name>@default</name>
+    <message>
+        <source></source>
+        <translation></translation>
+    </message>
+</context>
+</TS>