osso_context is now initialized in modest-maemo-utils instead of maemo-platform
authorSergio Villar Senin <svillar@igalia.com>
Wed, 10 Jun 2009 09:20:49 +0000 (11:20 +0200)
committerSergio Villar Senin <svillar@igalia.com>
Wed, 10 Jun 2009 09:21:15 +0000 (11:21 +0200)
The window mgr was not getting the osso context because of that

src/hildon2/modest-maemo-utils.c
src/hildon2/modest-platform.c

index 573c78f..2ca89a5 100644 (file)
@@ -64,18 +64,12 @@ osso_context_t *
 modest_maemo_utils_get_osso_context (void)
 {
        if (!__osso_context) 
-               g_debug ("%s: __osso_context == NULL", __FUNCTION__);
+               __osso_context = osso_initialize(PACKAGE,PACKAGE_VERSION,
+                                                FALSE, NULL);
 
        return __osso_context;
 }
 
-void
-modest_maemo_utils_set_osso_context (osso_context_t *osso_context)
-{
-       g_return_if_fail (osso_context);
-       __osso_context = osso_context;
-}
-
 static void
 get_properties_cb (DBusMessage *message)
 {
index 61a9b2c..64ec757 100644 (file)
@@ -163,23 +163,16 @@ gboolean
 modest_platform_init (int argc, char *argv[])
 {
        osso_context_t *osso_context;
-       
        osso_hw_state_t hw_state = { 0 };
-       DBusConnection *con;    
+       DBusConnection *con;
        GSList *acc_names;
-       
+
        if (!check_required_files ()) {
                g_printerr ("modest: missing required files\n");
                return FALSE;
        }
-       
-       osso_context =  osso_initialize(PACKAGE,PACKAGE_VERSION,
-                                       FALSE, NULL);   
-       if (!osso_context) {
-               g_printerr ("modest: failed to acquire osso context\n");
-               return FALSE;
-       }
-       modest_maemo_utils_set_osso_context (osso_context);
+
+       osso_context = modest_maemo_utils_get_osso_context();
 
        if ((con = osso_get_dbus_connection (osso_context)) == NULL) {
                g_printerr ("modest: could not get dbus connection\n");