glom r1952 - in trunk: . glom glom/libglom/document



Author: arminb
Date: Tue Mar  3 22:52:26 2009
New Revision: 1952
URL: http://svn.gnome.org/viewvc/glom?rev=1952&view=rev

Log:
2009-03-03  Armin Burgmeier  <armin openismus com>

	* glom/libglom/document/document_glom.cc (load_after): Fixed another
	misplaced else which prevented postgresql files from being opened
	when support for both postgresql and sqlite was enabled.

	* glom/libglom/document/document_glom.h: Changed DEFAULT_HOSTED to
	HOSTING_MODE_POSTGRES_SELF if postgresql is enabled.

	* glom/application.cc (constructor): Use DEFAULT_HOSTED to initialize
	m_ui_save_extra_newdb_hosting_mode, so that we don't need an #ifdef.


Modified:
   trunk/ChangeLog
   trunk/glom/application.cc
   trunk/glom/libglom/document/document_glom.cc
   trunk/glom/libglom/document/document_glom.h

Modified: trunk/glom/application.cc
==============================================================================
--- trunk/glom/application.cc	(original)
+++ trunk/glom/application.cc	Tue Mar  3 22:52:26 2009
@@ -113,12 +113,7 @@
   m_menu_print_layouts_ui_merge_id(0),
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   m_ui_save_extra_showextras(false),
-
-#ifdef GLOM_ENABLE_POSTGRESQL
-  m_ui_save_extra_newdb_hosting_mode(Document_Glom::HOSTING_MODE_POSTGRES_CENTRAL),
-#else
-  m_ui_save_extra_newdb_hosting_mode(Document_Glom::HOSTING_MODE_SQLITE),
-#endif //GLOM_ENABLE_POSTGRESQL
+  m_ui_save_extra_newdb_hosting_mode(Document_Glom::DEFAULT_HOSTED),
 
 #endif // !GLOM_ENABLE_CLIENT_ONLY
   m_show_sql_debug(false)

Modified: trunk/glom/libglom/document/document_glom.cc
==============================================================================
--- trunk/glom/libglom/document/document_glom.cc	(original)
+++ trunk/glom/libglom/document/document_glom.cc	Tue Mar  3 22:52:26 2009
@@ -2364,13 +2364,14 @@
             mode = HOSTING_MODE_POSTGRES_CENTRAL;
           else if(attr_mode == GLOM_ATTRIBUTE_CONNECTION_HOSTING_POSTGRES_SELF)
             mode = HOSTING_MODE_POSTGRES_SELF;
+          else
 #endif //GLOM_ENABLE_POSTGRESQL
 
 #ifdef GLOM_ENABLE_SQLITE
           if(attr_mode == GLOM_ATTRIBUTE_CONNECTION_HOSTING_SQLITE)
             mode = HOSTING_MODE_SQLITE;
-#endif //GLOM_ENABLE_SQLITE
           else
+#endif //GLOM_ENABLE_SQLITE
 	  {
             std::cerr << "Document_Glom::load_after(): Hosting mode " << attr_mode << " is not supported" << std::endl;
             return false; //TODO: Provide more information so the application (or Bakery) can say exactly why loading failed.

Modified: trunk/glom/libglom/document/document_glom.h
==============================================================================
--- trunk/glom/libglom/document/document_glom.h	(original)
+++ trunk/glom/libglom/document/document_glom.h	Tue Mar  3 22:52:26 2009
@@ -120,7 +120,7 @@
 
     //This reduces the ifdefs elsewhere:
 #ifdef GLOM_ENABLE_POSTGRESQL
-    DEFAULT_HOSTED = HOSTING_MODE_POSTGRES_CENTRAL
+    DEFAULT_HOSTED = HOSTING_MODE_POSTGRES_SELF
 #else
     DEFAULT_HOSTED = HOSTING_MODE_SQLITE
 #endif



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