* Reggister application service.
authorFlorian Boor <florian@kernelconcepts.de>
Fri, 23 Jun 2006 12:08:29 +0000 (12:08 +0000)
committerFlorian Boor <florian@kernelconcepts.de>
Fri, 23 Jun 2006 12:08:29 +0000 (12:08 +0000)
pmo-trunk-r340

configure.ac
src/Makefile.am
src/modest-main.c

index f36140e..0206b0c 100644 (file)
@@ -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])
index 81e5435..4411eaf 100644 (file)
@@ -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
index 0804f1c..ca3805f 100644 (file)
 #endif /*HAVE_CONFIG_H*/
 #include <gtk/gtk.h>
 
+#ifdef IS_HILDON /* Hildon includes */
+#include <libosso.h>
+#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;