From: Florian Boor Date: Fri, 23 Jun 2006 12:08:29 +0000 (+0000) Subject: * Reggister application service. X-Git-Tag: git_migration_finished~4533 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=052ac9eaa107b334f0f835264f0d103984f47c71 * Reggister application service. pmo-trunk-r340 --- diff --git a/configure.ac b/configure.ac index f36140e..0206b0c 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,7 @@ else modest_ui="gtk-glade" fi +AM_CONDITIONAL(HILDON, test x$hildon_support = xyes) dnl now, determine what to build AC_MSG_NOTICE([Determining what UI to build]) diff --git a/src/Makefile.am b/src/Makefile.am index 81e5435..4411eaf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,8 +9,12 @@ INCLUDES=\ $(MODEST_LIBTINYMAIL_MAEMO_CFLAGS) \ -I$(MODEST_UI_DIR) -Wall\ -DPREFIX=\"@prefix@\" \ - -Wall + -Wall +if HILDON +INCLUDES += -DIS_HILDON +endif + BUILT_SOURCES = modest-marshal.c modest-marshal.h modest-marshal.c: marshall.list diff --git a/src/modest-main.c b/src/modest-main.c index 0804f1c..ca3805f 100644 --- a/src/modest-main.c +++ b/src/modest-main.c @@ -12,6 +12,12 @@ #endif /*HAVE_CONFIG_H*/ #include +#ifdef IS_HILDON /* Hildon includes */ +#include +#define APPLICATION_DBUS_SERVICE "modest" +#endif + + static void install_basic_conf_settings (ModestConf *conf); static void install_test_account (ModestConf *conf); @@ -50,6 +56,9 @@ main (int argc, char *argv[]) { NULL } }; +#ifdef IS_HILDON + osso_context_t *osso_context; +#endif g_type_init (); @@ -88,6 +97,15 @@ main (int argc, char *argv[]) g_warning ("failed to initialize ui"); goto cleanup; } + +#ifdef IS_HILDON + /* Initialize maemo application */ + osso_context = osso_initialize(APPLICATION_DBUS_SERVICE, "0.1", TRUE, NULL); + + /* Check that initialization was ok */ + if (osso_context == NULL) + goto cleanup; +#endif { gboolean ok;