[glom] 1.13.6:



commit 8b2c66c85799de8fc5589211958bf59111020526
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Feb 28 04:18:52 2010 +0100

    1.13.6:
    
    2010-02-28  Murray Cumming  <murrayc murrayc com>
    
      Fix the python function tests.
    
    * glom/python_embed/glom_python.cc
    glom_execute_python_function_implementation,
    glom_evaluate_python_function_implementation: Import the glom python module
    before trying to create a boost::python::object(new PyGlomRecord), to avoid
    an exception in the tests.

 ChangeLog                        |   12 ++++++++++++
 NEWS                             |   14 ++++++++++++++
 configure.ac                     |    2 +-
 glom/libglom/connectionpool.cc   |    2 +-
 glom/python_embed/glom_python.cc |   17 +++++++++++++++++
 5 files changed, 45 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 45c4290..eb31f14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+1.13.6:
+
+2010-02-28  Murray Cumming  <murrayc murrayc com>
+
+  Fix the python function tests.
+  
+	* glom/python_embed/glom_python.cc
+	glom_execute_python_function_implementation,
+	glom_evaluate_python_function_implementation: Import the glom python module 
+	before trying to create a boost::python::object(new PyGlomRecord), to avoid 
+	an exception in the tests.
+
 2010-02-28  Murray Cumming  <murrayc murrayc com>
 
 	Many files: Rename App_Glom to Application (in namespace Glom).
diff --git a/NEWS b/NEWS
index 138250e..0414be6 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,17 @@
+1.13.6 (unstable):
+
+* Python scripts:
+  - Fields value may now be changed like so:
+    record["fieldname"] = 123
+  - Simple navigation is posible via, for instance:
+    ui.show_table_list("artists")
+    ui.show_table_details("artists", 10)
+    where 10 is the value of the primary key in the table.
+	(Murray Cumming)
+* Avoid showing %20 in the window title.
+	Noticed by Daniel Borgmann.
+	(Murray Cumming)
+  
 1.13.5 (unstable):
 
 * Python functions: Fix some regressions since the switch to boost::python.
diff --git a/configure.ac b/configure.ac
index ce23bd4..96a647c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-AC_INIT([Glom], [1.13.5], [http://bugzilla.gnome.org/enter_bug.cgi?product=Glom], [glom])
+AC_INIT([Glom], [1.13.6], [http://bugzilla.gnome.org/enter_bug.cgi?product=Glom], [glom])
 AC_PREREQ([2.60])
 
 AC_CONFIG_SRCDIR([glom/main.cc])
diff --git a/glom/libglom/connectionpool.cc b/glom/libglom/connectionpool.cc
index 6f793da..6152b89 100644
--- a/glom/libglom/connectionpool.cc
+++ b/glom/libglom/connectionpool.cc
@@ -535,7 +535,7 @@ bool ConnectionPool::startup(const SlotProgress& slot_progress, bool network_sha
 
   //If we crash while running (unlikely, hopefully), then try to cleanup.
   //Comment this out if you want to see the backtrace in a debugger.
-  //previous_sig_handler = signal(SIGSEGV, &on_linux_signal);
+  previous_sig_handler = signal(SIGSEGV, &on_linux_signal);
 
   return true;
 }
diff --git a/glom/python_embed/glom_python.cc b/glom/python_embed/glom_python.cc
index dd91d98..944dfd2 100644
--- a/glom/python_embed/glom_python.cc
+++ b/glom/python_embed/glom_python.cc
@@ -368,6 +368,14 @@ void glom_execute_python_function_implementation(const Glib::ustring& func_impl,
   const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection,
   const PythonUICallbacks& callbacks)
 {
+  //Import the glom module so that boost::python::object(new PyGlomRecord) can work.
+  boost::python::object module_glom = boost::python::import("glom_" GLOM_ABI_VERSION_UNDERLINED);
+  if(!module_glom)
+  {
+    g_warning("Could not import python glom module.");
+    return; // don't crash
+  }
+  
   boost::python::object objRecord(new PyGlomRecord);
   boost::python::extract<PyGlomRecord*> extractor(objRecord);
   if(!extractor.check())
@@ -398,7 +406,16 @@ Gnome::Gda::Value glom_evaluate_python_function_implementation(Field::glom_field
   const Gnome::Gda::Value& key_field_value,
   const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection)
 {
+  //Import the glom module so that boost::python::object(new PyGlomRecord) can work.
+  boost::python::object module_glom = boost::python::import("glom_" GLOM_ABI_VERSION_UNDERLINED);
+  if(!module_glom)
+  {
+    g_warning("Could not import python glom module.");
+    return Gnome::Gda::Value(); // don't crash
+  }
+  
   boost::python::object objRecord(new PyGlomRecord);
+  
   boost::python::extract<PyGlomRecord*> extractor(objRecord);
   if(!extractor.check())
   {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]