- g_signal_connect (modest_runtime_get_window_mgr (),
- "window-list-empty",
- G_CALLBACK (on_window_list_empty),
- NULL);
+ /* Create the account store & launch send queues */
+ acc_store = modest_runtime_get_account_store ();
+ modest_tny_account_store_start_send_queues (acc_store);
+
+ handlers = g_malloc0 (sizeof (MainSignalHandlers));
+ /* Connect to the "queue-emtpy" signal */
+ handlers->queue_handler =
+ g_signal_connect (modest_runtime_get_mail_operation_queue (),
+ "queue-empty",
+ G_CALLBACK (on_queue_empty),
+ handlers);
+
+ /* Connect to the "window-list-emtpy" signal */
+ handlers->window_list_handler =
+ g_signal_connect (modest_runtime_get_window_mgr (),
+ "window-list-empty",
+ G_CALLBACK (on_window_list_empty),
+ handlers);
+
+ /* Connect to the "password-requested" signal */
+ handlers->get_password_handler =
+ g_signal_connect (acc_store,
+ "password_requested",
+ G_CALLBACK (modest_ui_actions_on_password_requested),
+ NULL);
+
+ /* Create cached windows */
+ mgr = modest_runtime_get_window_mgr ();
+ modest_window_mgr_create_caches (mgr);