glom r1499 - in trunk: . glom glom/libglom/python_embed glom/utility_widgets/db_adddel



Author: murrayc
Date: Mon Mar 31 18:40:47 2008
New Revision: 1499
URL: http://svn.gnome.org/viewvc/glom?rev=1499&view=rev

Log:
2008-03-31  Murray Cumming  <murrayc murrayc com>

* glom/utility_widgets/db_adddel/db_adddel.cc:
constructor: Do not handle style changes, because that currently 
causes an extra SQL query. It is still enabled for Maemo, which needs 
it. We should fix this properly.

Modified:
   trunk/ChangeLog
   trunk/glom/base_db.cc
   trunk/glom/libglom/python_embed/py_glom_relatedrecord.cc
   trunk/glom/utility_widgets/db_adddel/db_adddel.cc
   trunk/glom/utility_widgets/db_adddel/glom_db_treemodel.cc

Modified: trunk/glom/base_db.cc
==============================================================================
--- trunk/glom/base_db.cc	(original)
+++ trunk/glom/base_db.cc	Mon Mar 31 18:40:47 2008
@@ -231,7 +231,7 @@
       try
       {
 #endif
-        std::cout << "Debug: query_execute():  " << strQuery << std::endl;
+        std::cout << "Debug: Base_DB::query_execute():  " << strQuery << std::endl;
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
       }
       catch(const Glib::Exception& ex)

Modified: trunk/glom/libglom/python_embed/py_glom_relatedrecord.cc
==============================================================================
--- trunk/glom/libglom/python_embed/py_glom_relatedrecord.cc	(original)
+++ trunk/glom/libglom/python_embed/py_glom_relatedrecord.cc	Mon Mar 31 18:40:47 2008
@@ -220,7 +220,7 @@
             {
               try
               {
-                std::cout << "Debug: query_execute():  " << sql_query << std::endl;
+                std::cout << "Debug: RelatedRecord_tp_as_mapping_getitem():  " << sql_query << std::endl;
               }
               catch(const Glib::Exception& ex)
               {

Modified: trunk/glom/utility_widgets/db_adddel/db_adddel.cc
==============================================================================
--- trunk/glom/utility_widgets/db_adddel/db_adddel.cc	(original)
+++ trunk/glom/utility_widgets/db_adddel/db_adddel.cc	Mon Mar 31 18:40:47 2008
@@ -122,8 +122,13 @@
 
   show_all_children();
 
+#ifndef GLOM_ENABLE_CLIENT_ONLY //Actually this has only been necessary for Maemo.
   // Adjust sizing when style changed
+  // TODO_Maemo: This calls construct_specified_columns(), which runs the SQL query again.
+  //       Try to change the row and column sizes without doing that.
+  
   signal_style_changed().connect(sigc::mem_fun(*this, &DbAddDel::on_self_style_changed));
+#endif // !GLOM_ENABLE_CLIENT_ONLY
 }
 
 DbAddDel::~DbAddDel()
@@ -2058,9 +2063,11 @@
 
 void DbAddDel::on_self_style_changed(const Glib::RefPtr<Gtk::Style>& style)
 {
-  // Reset fixed cell height because the font might have changed due to the new style
+  // Reset fixed cell height because the font might have changed due to the new style:
   m_fixed_cell_height = 0;
-  // Reconstruct columns because sizes might have changed
+
+  // Reconstruct columns because sizes might have changed:
+  // (TODO: But don't get the data again because that would be inefficient).
   construct_specified_columns();
 }
 

Modified: trunk/glom/utility_widgets/db_adddel/glom_db_treemodel.cc
==============================================================================
--- trunk/glom/utility_widgets/db_adddel/glom_db_treemodel.cc	(original)
+++ trunk/glom/utility_widgets/db_adddel/glom_db_treemodel.cc	Mon Mar 31 18:40:47 2008
@@ -533,7 +533,7 @@
   if(m_connection && !m_found_set.m_table_name.empty() && m_get_records)
   {
     const Glib::ustring sql_query = Utils::build_sql_select_with_where_clause(m_found_set.m_table_name, m_column_fields, m_found_set.m_where_clause, m_found_set.m_extra_join, m_found_set.m_sort_clause, m_found_set.m_extra_group_by);
-    //std::cout << "  Debug: query_execute():  " << sql_query << std::endl;
+    //std::cout << "  Debug: DbTreeModel::refresh_from_database():  " << sql_query << std::endl;
 
     const App_Glom* app = App_Glom::get_application();
     if(app && app->get_show_sql_debug())
@@ -542,7 +542,7 @@
       try
       {
 #endif //GLIBMM_EXCEPTIONS_ENABLED
-        std::cout << "Debug: query_execute():  " << sql_query << std::endl;
+        std::cout << "Debug: DbTreeModel::refresh_from_database():  " << sql_query << std::endl;
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
       }
       catch(const Glib::Exception& ex)



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