glom r1949 - in trunk: . glom glom/libglom glom/libglom/data_structure glom/libglom/data_structure/layout glom/libglom/data_structure/layout/report_parts glom/libglom/document glom/python_embed/python_module regression_tests



Author: murrayc
Date: Tue Mar  3 18:55:54 2009
New Revision: 1949
URL: http://svn.gnome.org/viewvc/glom?rev=1949&view=rev

Log:
2009-03-03  Murray Cumming  <murrayc murrayc com>

* configure.in:
* glom/libglom/Makefile.am:
* glom/libglom/glom-1.0.pc.in: Added and installed pkg-config file.

* glom/Makefile.am:
* glom/libglom/data_structure/Makefile.am:
* glom/libglom/data_structure/layout/Makefile.am:
* glom/libglom/data_structure/layout/report_parts/Makefile.am:
* glom/libglom/document/Makefile.am:
* glom/python_embed/python_module/Makefile.am:
* regression_tests/Makefile.am: Change libglom to libglom-1.0 so we can 
use proper API versioning. Install the headers.

* glom/libglom/document/document_glom.cc: Use std::auto_ptr<> to 
avoid instantiating Bakery::BusyCursor if no parent window was set, 
to avoid the need to initialize gtkmm/GTK+.

Added:
   trunk/glom/libglom/glom-1.0.pc.in
Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/glom/Makefile.am
   trunk/glom/libglom/Makefile.am
   trunk/glom/libglom/data_structure/Makefile.am
   trunk/glom/libglom/data_structure/layout/Makefile.am
   trunk/glom/libglom/data_structure/layout/report_parts/Makefile.am
   trunk/glom/libglom/document/Makefile.am
   trunk/glom/libglom/document/document_glom.cc
   trunk/glom/python_embed/python_module/Makefile.am
   trunk/regression_tests/Makefile.am

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Tue Mar  3 18:55:54 2009
@@ -230,6 +230,7 @@
   glom/Makefile \
     docs/Makefile \
       docs/user-guide/Makefile \
+    glom/libglom/glom-1.0.pc \
     glom/libglom/Makefile \
       glom/libglom/data_structure/Makefile \
         glom/libglom/data_structure/layout/Makefile \

Modified: trunk/glom/Makefile.am
==============================================================================
--- trunk/glom/Makefile.am	(original)
+++ trunk/glom/Makefile.am	Tue Mar  3 18:55:54 2009
@@ -89,7 +89,7 @@
               utility_widgets/egg/util/libeggutil.la
 
 glom_LDADD += python_embed/libpython_embed.a \
-              $(top_builddir)/glom/libglom/libglom.la \
+              $(top_builddir)/glom/libglom/libglom-1.0.la \
               $(GLOM_LIBS) $(PYTHON_LDFLAGS) $(MAEMO_LAUNCHER_LIBS)
 
 if !WIN32

Modified: trunk/glom/libglom/Makefile.am
==============================================================================
--- trunk/glom/libglom/Makefile.am	(original)
+++ trunk/glom/libglom/Makefile.am	Tue Mar  3 18:55:54 2009
@@ -19,8 +19,8 @@
            -DGLOM_EXAMPLES_DIR=\""$(glom_examples_dir)"\" \
            -DGLOM_ICON_DIR=\""$(glom_icon_dir)"\"
 
-lib_LTLIBRARIES = libglom.la
-libglom_la_SOURCES = appstate.h appstate.cc \
+lib_LTLIBRARIES = libglom-1.0.la
+libglom_1_0_la_SOURCES = appstate.h appstate.cc \
                      calcinprogress.h calcinprogress.cc \
                      connectionpool.h connectionpool.cc \
                      dialog_progress_creating.h dialog_progress_creating.cc \
@@ -30,14 +30,14 @@
                      standard_table_prefs_fields.h \
 		     gst-package.h gst-package.c
 
-libglom_la_LDFLAGS = -no-undefined
+libglom_1_0_la_LDFLAGS = -no-undefined
 
 # Link libglom statically on maemo and windows for now.
 if GLOM_ENABLE_MAEMO
-libglom_la_LDFLAGS += -static
+libglom_1_0_la_LDFLAGS += -static
 endif
 
-libglom_la_LIBADD  = document/libdocument.la \
+libglom_1_0_la_LIBADD  = document/libdocument.la \
                      connectionpool_backends/libconnectionpool_backends.la \
                      data_structure/libdata_structure.la \
                      data_structure/layout/libdata_structure_layout.la \
@@ -46,19 +46,23 @@
                      $(GLOM_LIBS) $(PYTHON_LDFLAGS)
 
 if !WIN32
-libglom_la_LIBADD += -lutil
+libglom_1_0_la_LIBADD += -lutil
 endif
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = glom-1.0.pc
+
+
 
 #Small test programs:
 noinst_PROGRAMS = test_sharedptr_layoutitem test_connectionpool
 
 test_sharedptr_layoutitem_SOURCES = test_sharedptr_layoutitem.cc
-test_sharedptr_layoutitem_LDADD =  libglom.la \
+test_sharedptr_layoutitem_LDADD =  libglom-1.0.la \
               $(GLOM_LIBS)
 
 test_connectionpool_SOURCES = test_connectionpool.cc
-test_connectionpool_LDADD =  libglom.la \
+test_connectionpool_LDADD =  libglom-1.0.la \
               $(GLOM_LIBS)
 
 if !WIN32

Modified: trunk/glom/libglom/data_structure/Makefile.am
==============================================================================
--- trunk/glom/libglom/data_structure/Makefile.am	(original)
+++ trunk/glom/libglom/data_structure/Makefile.am	Tue Mar  3 18:55:54 2009
@@ -2,24 +2,45 @@
 
 AM_CPPFLAGS = -I top_srcdir@/ $(GLOM_CFLAGS)
 
-noinst_LTLIBRARIES = libdata_structure.la
-libdata_structure_la_SOURCES = field.h field.cc \
-                              foundset.h foundset.cc \
-                              relationship.h relationship.cc \
-                              fieldtypes.h fieldtypes.cc \
-                              tableinfo.h tableinfo.cc \
-                              glomconversions.h glomconversions.cc \
-                              privileges.h privileges.cc \
-                              groupinfo.h groupinfo.cc \
-                              numeric_format.h numeric_format.cc \
-                              iso_codes.h iso_codes.cc \
-                              system_prefs.h system_prefs.cc \
-                              print_layout.h print_layout.cc \
-                              report.h report.cc \
-                              translatable_item.h translatable_item.cc \
-                              parameternamegenerator.h \
+h_sources = field.h \
+                              foundset.h \
+                              relationship.h \
+                              fieldtypes.h \
+                              tableinfo.h \
+                              glomconversions.h \
+                              privileges.h \
+                              groupinfo.h \
+                              numeric_format.h \
+                              iso_codes.h \
+                              system_prefs.h \
+                              print_layout.h \
+                              report.h \
+                              translatable_item.h \
+                              parameternamegenerator.h
+cc_sources = field.cc \
+                              foundset.cc \
+                              relationship.cc \
+                              fieldtypes.cc \
+                              tableinfo.cc \
+                              glomconversions.cc \
+                              privileges.cc \
+                              groupinfo.cc \
+                              numeric_format.cc \
+                              iso_codes.cc \
+                              system_prefs.cc \
+                              print_layout.cc \
+                              report.cc \
+                              translatable_item.cc \
                               parameternamegenerator.cc
 
+library_includedir=$(includedir)/glom-1.0/libglom/data_structure
+library_include_HEADERS = $(h_sources)
+
+noinst_LTLIBRARIES = libdata_structure.la
+libdata_structure_la_SOURCES = $(h_sources) $(cc_sources)
+
+ 
+
 
 
 

Modified: trunk/glom/libglom/data_structure/layout/Makefile.am
==============================================================================
--- trunk/glom/libglom/data_structure/layout/Makefile.am	(original)
+++ trunk/glom/libglom/data_structure/layout/Makefile.am	Tue Mar  3 18:55:54 2009
@@ -3,19 +3,40 @@
 AM_CPPFLAGS = -I top_srcdir@/ $(GLOM_CFLAGS)
 
 noinst_LTLIBRARIES = libdata_structure_layout.la
-libdata_structure_layout_la_SOURCES = layoutitem.h layoutitem.cc \
-                              layoutgroup.h layoutgroup.cc \
-                              layoutitem_field.h layoutitem_field.cc \
-                              layoutitem_portal.h layoutitem_portal.cc \
-                              layoutitem_calendarportal.h layoutitem_calendarportal.cc \
-                              layoutitem_notebook.h layoutitem_notebook.cc \
-                              layoutitem_button.h layoutitem_button.cc \
-                              layoutitem_text.h layoutitem_text.cc \
-                              layoutitem_image.h layoutitem_image.cc \
-                              layoutitem_line.h layoutitem_line.cc \
-                              usesrelationship.h usesrelationship.cc \
-                              fieldformatting.h fieldformatting.cc \
-                              custom_title.h custom_title.cc \
-                              layoutitem_placeholder.h \
+
+
+h_sources = layoutitem.h \
+                              layoutgroup.h\
+                              layoutitem_field.h \
+                              layoutitem_portal.h \
+                              layoutitem_calendarportal.h \
+                              layoutitem_notebook.h \
+                              layoutitem_button.h \
+                              layoutitem_text.h \
+                              layoutitem_image.h \
+                              layoutitem_line.h \
+                              usesrelationship.h \
+                              fieldformatting.h \
+                              custom_title.h \
+                              layoutitem_placeholder.h
+
+cc_sources = layoutitem.cc \
+                              layoutgroup.cc \
+                              layoutitem_field.cc \
+                              layoutitem_portal.cc \
+                              layoutitem_calendarportal.cc \
+                              layoutitem_notebook.cc \
+                              layoutitem_button.cc \
+                              layoutitem_text.cc \
+                              layoutitem_image.cc \
+                              layoutitem_line.cc \
+                              usesrelationship.cc \
+                              fieldformatting.cc \
+                              custom_title.cc \
                               layoutitem_placeholder.cc
 
+library_includedir=$(includedir)/glom-1.0/libglom/data_structure/layout
+library_include_HEADERS = $(h_sources)
+
+libdata_structure_layout_la_SOURCES = $(h_sources) $(cc_sources)
+

Modified: trunk/glom/libglom/data_structure/layout/report_parts/Makefile.am
==============================================================================
--- trunk/glom/libglom/data_structure/layout/report_parts/Makefile.am	(original)
+++ trunk/glom/libglom/data_structure/layout/report_parts/Makefile.am	Tue Mar  3 18:55:54 2009
@@ -1,10 +1,22 @@
 AM_CPPFLAGS = -I top_srcdir@/ $(GLOM_CFLAGS)
 
 noinst_LTLIBRARIES = libdata_structure_layout_reportparts.la
-libdata_structure_layout_reportparts_la_SOURCES = layoutitem_groupby.h layoutitem_groupby.cc \
-                              layoutitem_summary.h layoutitem_summary.cc \
-                              layoutitem_fieldsummary.h layoutitem_fieldsummary.cc \
-                              layoutitem_header.h layoutitem_header.cc \
-                              layoutitem_footer.h layoutitem_footer.cc \
-                              layoutitem_verticalgroup.h layoutitem_verticalgroup.cc
 
+h_sources = layoutitem_groupby.h \
+                              layoutitem_summary.h \
+                              layoutitem_fieldsummary.h \
+                              layoutitem_header.h \
+                              layoutitem_footer.h \
+                              layoutitem_verticalgroup.h
+
+cc_sources = layoutitem_groupby.cc \
+                              layoutitem_summary.cc \
+                              layoutitem_fieldsummary.cc \
+                              layoutitem_header.cc \
+                              layoutitem_footer.cc \
+                              layoutitem_verticalgroup.cc
+
+library_includedir=$(includedir)/glom-1.0/libglom/data_structure/layout/report_parts
+library_include_HEADERS = $(h_sources)
+
+libdata_structure_layout_reportparts_la_SOURCES = $(h_sources) $(cc_sources)

Modified: trunk/glom/libglom/document/Makefile.am
==============================================================================
--- trunk/glom/libglom/document/Makefile.am	(original)
+++ trunk/glom/libglom/document/Makefile.am	Tue Mar  3 18:55:54 2009
@@ -1,4 +1,10 @@
 AM_CPPFLAGS = -I top_srcdir@/ $(GLOM_CFLAGS)
 
+h_sources = document_glom.h view.h
+cc_sources = document_glom.cc
+
+library_includedir=$(includedir)/glom-1.0/libglom/document
+library_include_HEADERS = $(h_sources)
+
 noinst_LTLIBRARIES = libdocument.la
-libdocument_la_SOURCES = document_glom.h document_glom.cc view.h
+libdocument_la_SOURCES = $(h_sources) $(cc_sources)

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 18:55:54 2009
@@ -2304,7 +2304,11 @@
 
 bool Document_Glom::load_after()
 {
-  Bakery::BusyCursor busy_cursor(m_parent_window);
+  //Use a std::auto_ptr<> to avoid even unncessarily instantiating a BusyCursor,
+  //which would require GTK+ to be initialized:
+  std::auto_ptr<Bakery::BusyCursor> auto_cursor;
+  if(m_parent_window)
+    auto_cursor = std::auto_ptr<Bakery::BusyCursor>( new Bakery::BusyCursor(m_parent_window) );
 
   m_block_modified_set = true; //Prevent the set_ functions from trigerring a save.
 
@@ -3190,7 +3194,11 @@
 
 bool Document_Glom::save_before()
 {
-  Bakery::BusyCursor busy_cursor(m_parent_window);
+  //Use a std::auto_ptr<> to avoid even unncessarily instantiating a BusyCursor,
+  //which would require GTK+ to be initialized:
+  std::auto_ptr<Bakery::BusyCursor> auto_cursor;
+  if(m_parent_window)
+    auto_cursor = std::auto_ptr<Bakery::BusyCursor>( new Bakery::BusyCursor(m_parent_window) );
 
   xmlpp::Element* nodeRoot = get_node_document();
 

Added: trunk/glom/libglom/glom-1.0.pc.in
==============================================================================
--- (empty file)
+++ trunk/glom/libglom/glom-1.0.pc.in	Tue Mar  3 18:55:54 2009
@@ -0,0 +1,11 @@
+prefix= prefix@
+exec_prefix= exec_prefix@
+libdir= libdir@
+includedir= includedir@
+
+Name: libglom
+Description: Library for accessing Glom documents and data structures.
+Requires: glibmm-2.4 giomm-2.4
+Version: @VERSION@
+Libs: -L${libdir} -lglom
+Cflags: -I${includedir}/glom-1.0

Modified: trunk/glom/python_embed/python_module/Makefile.am
==============================================================================
--- trunk/glom/python_embed/python_module/Makefile.am	(original)
+++ trunk/glom/python_embed/python_module/Makefile.am	Tue Mar  3 18:55:54 2009
@@ -9,7 +9,7 @@
 pyexec_LTLIBRARIES = glom.la
 glom_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initglom
 
-glom_la_LIBADD = $(top_builddir)/glom/libglom/libglom.la \
+glom_la_LIBADD = $(top_builddir)/glom/libglom/libglom-1.0.la \
                  $(GLOM_LIBS) $(PYTHON_LDFLAGS)
 
 if !WIN32

Modified: trunk/regression_tests/Makefile.am
==============================================================================
--- trunk/regression_tests/Makefile.am	(original)
+++ trunk/regression_tests/Makefile.am	Tue Mar  3 18:55:54 2009
@@ -13,7 +13,7 @@
 noinst_PROGRAMS = test_parsing_time test_signal_reemit
 
 test_parsing_time_SOURCES = test_parsing_time.cc
-test_parsing_time_LDADD = $(GLOM_LIBS) $(top_builddir)/glom/libglom/libglom.la
+test_parsing_time_LDADD = $(GLOM_LIBS) $(top_builddir)/glom/libglom/libglom-1.0.la
 
 test_signal_reemit_SOURCES = test_signal_reemit.cc
 test_signal_reemit_LDADD = $(GLOM_LIBS) 



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