* modest-ui-actions.c:
[modest] / src / modest-runtime.c
index a4fc46a..f4036ce 100644 (file)
@@ -59,10 +59,10 @@ static void     init_debug_logging (void);
 
 static ModestSingletons *_singletons = NULL;
 
+
 /*
  * defaults for the column headers
  */
-
 typedef struct {
        ModestHeaderViewColumn col;
        guint                  width;
@@ -183,14 +183,12 @@ modest_runtime_init_ui (gint argc, gchar** argv)
 gboolean
 modest_runtime_uninit (void)
 {
-       if (!_singletons) {
-               g_printerr ("modest: modest_runtime is not initialized\n");
-               return FALSE;
+       if (_singletons) {
+               g_object_unref (G_OBJECT(_singletons));
+               _singletons = NULL;
        }
+       modest_runtime_verify_object_death (_singletons, "_singletons");
        
-       g_object_unref (G_OBJECT(_singletons));
-       _singletons = NULL;
-
        return TRUE;
 }
 
@@ -235,6 +233,24 @@ modest_runtime_get_mail_operation_queue (void)
 
 
 
+TnyDevice*
+modest_runtime_get_device (void)
+{
+       g_return_val_if_fail (_singletons, NULL);
+       return modest_singletons_get_device (_singletons);
+}
+
+
+TnyPlatformFactory*
+modest_runtime_get_platform_factory  (void)
+{
+       g_return_val_if_fail (_singletons, NULL);
+       return modest_singletons_get_platform_factory (_singletons);
+}
+
+
+
+
 ModestTnySendQueue*
 modest_runtime_get_send_queue  (TnyTransportAccount *account)
 {
@@ -447,7 +463,7 @@ init_default_account_maybe  (ModestAccountMgr *acc_mgr)
        gchar *default_account;
        gboolean retval = TRUE;
        
-       all_accounts = modest_account_mgr_account_names (acc_mgr, NULL);
+       all_accounts = modest_account_mgr_account_names (acc_mgr);
        if (all_accounts) { /* if there are any accounts, there should be a default one */
                default_account = 
                        modest_account_mgr_get_default_account (acc_mgr);
@@ -543,26 +559,26 @@ init_stock_icons (void)
                static GtkStockItem items[] = {
                        { MODEST_STOCK_MAIL_SEND, "send mail", 0, 0, NULL },
                        { MODEST_STOCK_NEW_MAIL, "new mail", 0, 0, NULL },
-                       { MODEST_STOCK_SEND_RECEIVE, "send receive", 0, 0, NULL },
+/*                     { MODEST_STOCK_SEND_RECEIVE, "send receive", 0, 0, NULL }, */
                        { MODEST_STOCK_REPLY, "reply", 0, 0, NULL },
                        { MODEST_STOCK_REPLY_ALL, "reply all", 0, 0, NULL },
                        { MODEST_STOCK_FORWARD, "forward", 0, 0, NULL },
-                       { MODEST_STOCK_DELETE, "delete", 0, 0, NULL },
-                       { MODEST_STOCK_NEXT, "next", 0, 0, NULL },
-                       { MODEST_STOCK_PREV, "prev", 0, 0, NULL },
+/*                     { MODEST_STOCK_DELETE, "delete", 0, 0, NULL }, */
+/*                     { MODEST_STOCK_NEXT, "next", 0, 0, NULL }, */
+/*                     { MODEST_STOCK_PREV, "prev", 0, 0, NULL }, */
 /*                     { MODEST_STOCK_STOP, "stop", 0, 0, NULL } */
                };
       
                static gchar *items_names [] = {
                        MODEST_TOOLBAR_ICON_MAIL_SEND,
-                       MODEST_TOOLBAR_ICON_NEW_MAIL,           
+/*                     MODEST_TOOLBAR_ICON_NEW_MAIL,            */
                        MODEST_TOOLBAR_ICON_SEND_RECEIVE,
                        MODEST_TOOLBAR_ICON_REPLY,      
                        MODEST_TOOLBAR_ICON_REPLY_ALL,
                        MODEST_TOOLBAR_ICON_FORWARD,
-                       MODEST_TOOLBAR_ICON_DELETE,
-                       MODEST_TOOLBAR_ICON_NEXT,
-                       MODEST_TOOLBAR_ICON_PREV,
+/*                     MODEST_TOOLBAR_ICON_DELETE, */
+/*                     MODEST_TOOLBAR_ICON_NEXT, */
+/*                     MODEST_TOOLBAR_ICON_PREV, */
 /*                     MODEST_TOOLBAR_ICON_STOP */
                };