X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-singletons.c;h=045ff090bc835d135fdffa1d3cdd012f9070af65;hb=c17a6e8e45a7e36ea1c4ac2841f081c4e34d651e;hp=ca28aeb711b7bc169c3a1acf686380063f9bae90;hpb=2d054bb7d85614c1b2afb7614ba6cf2e8d5cb465;p=modest diff --git a/src/modest-singletons.c b/src/modest-singletons.c index ca28aeb..045ff09 100644 --- a/src/modest-singletons.c +++ b/src/modest-singletons.c @@ -55,6 +55,7 @@ struct _ModestSingletonsPrivate { ModestWindowMgr *window_mgr; ModestProtocolRegistry *protocol_registry; ModestPluginFactory *plugin_factory; + ModestToolkitFactory *toolkit_factory; TnyStreamCache *images_cache; }; #define MODEST_SINGLETONS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), \ @@ -116,6 +117,7 @@ modest_singletons_init (ModestSingletons *obj) priv->window_mgr = NULL; priv->protocol_registry = NULL; priv->plugin_factory = NULL; + priv->toolkit_factory = NULL; priv->protocol_registry = modest_protocol_registry_new (); if (!priv->protocol_registry) { @@ -149,6 +151,12 @@ modest_singletons_init (ModestSingletons *obj) return; } + priv->toolkit_factory = modest_toolkit_factory_get_instance (); + if (!priv->toolkit_factory) { + g_printerr ("modest: cannot create toolkit factory instance\n"); + return; + } + priv->device = tny_platform_factory_new_device (priv->platform_fact); if (!priv->device) { g_printerr ("modest: cannot create tny device instance\n"); @@ -354,6 +362,13 @@ modest_singletons_get_platform_factory (ModestSingletons *self) return MODEST_SINGLETONS_GET_PRIVATE(self)->platform_fact; } +ModestToolkitFactory* +modest_singletons_get_toolkit_factory (ModestSingletons *self) +{ + g_return_val_if_fail (self, NULL); + return MODEST_SINGLETONS_GET_PRIVATE(self)->toolkit_factory; +} + ModestWindowMgr* modest_singletons_get_window_mgr (ModestSingletons *self) {