[glom] Use libossomm on Maemo, to register a DBus service



commit 829cab4f58574de02b98bebf5b2b1e98be595d3a
Author: David King <davidk openismus com>
Date:   Fri Oct 30 11:18:08 2009 +0100

    Use libossomm on Maemo, to register a DBus service
    
    * configure.ac:
    * glom/main.cc: Initialize libossomm on Maemo, to register a DBus
    service.

 ChangeLog    |   18 ++++++++++++------
 configure.ac |    2 +-
 glom/main.cc |    6 ++++++
 3 files changed, 19 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index bd6adbb..6e61f72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-10-30  David King  <davidk openismus com>
+
+	* configure.ac:
+	* glom/main.cc: Initialize libossomm on Maemo, to register a DBus
+	service.
+
 2009-10-28  David King  <davidk openismus com>
 
 	* configure.ac:
@@ -17,8 +23,8 @@
 
 2009-10-27  Murray Cumming  <murrayc murrayc com>
 
-  Trying to ignore unwanted column resize signals.
-  
+	Trying to ignore unwanted column resize signals.
+
 	* glom/utility_widgets/db_adddel/db_adddel.[h|cc]: 
 	Removed unused set_column_width().
 	construct_specified_columns_cellrenderer(): Added an InnerIgnore, though 
@@ -28,16 +34,16 @@
 
 2009-10-27  Murray Cumming  <murrayc murrayc com>
 
-  Avoid runtime warnings about 0 size TreeViewColumn.
-  
+	Avoid runtime warnings about 0 size TreeViewColumn.
+
 	* glom/utility_widgets/db_adddel/db_adddel.cc: construct_specified_columns(), 
 	treeview_append_column(): Avoid calling TreeViewColumn::set_fixed_width() 
 	with a 0 size, avoiding a runtime assertion.
 
 2009-10-27  Murray Cumming  <murrayc murrayc com>
 
-  Fix some warnings.
-  
+	Fix some warnings.
+
 	* glom/dialog_existing_or_new.cc: get_service_info(): Replace a 0 with 
 	(void*)0 to avoid a warning after my change on 2009-10-13.
 	* glom/libglom/data_structure/has_title_singular.cc(): 
diff --git a/configure.ac b/configure.ac
index 7f5d313..db1ddab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,7 +162,7 @@ AS_IF([test "x$glom_enable_client_only" != xyes],
 AS_IF([test "x$glom_enable_sqlite" = xyes],
       [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS libgda-sqlite-4.0"])
 AS_IF([test "x$glom_enable_maemo" = xyes],
-      [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS hildonmm hildon-fmmm osso-af-settings"
+      [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS hildonmm hildon-fmmm libossomm osso-af-settings"
       MM_PKG_CONFIG_SUBST([OSSO_SERVICEDIR], [--variable=dbusservicedir osso-af-settings])
       MM_PKG_CONFIG_SUBST([OSSO_DESKTOPDIR], [--variable=desktopentrydir osso-af-settings])])
 AS_IF([test "x$glom_maemo_launcher" = xyes],
diff --git a/glom/main.cc b/glom/main.cc
index c73511a..98a6ad8 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -48,6 +48,7 @@
 #include <glibmm/i18n.h>
 
 #ifdef GLOM_ENABLE_MAEMO
+#include <libossomm/init.h>
 #include <hildonmm/init.h>
 #include <hildonmm/note.h>
 #include <hildonmm/program.h>
@@ -424,6 +425,11 @@ main(int argc, char* argv[])
   Glom::libglom_init();
    
 #ifdef GLOM_ENABLE_MAEMO
+  if(!(Osso::initialize("org.maemo.glom", PACKAGE_NAME)))
+  {
+    std::cerr << "Glom: Error while initializing libossomm" << std::endl;
+    return 0;
+  }
   Hildon::init();
 #endif
 



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