- /* Get transport account */
- acc_store = modest_runtime_get_account_store();
- account_name = modest_window_get_active_account (win);
-
- /* If no account defined, this action must be always dimmed */
- if (account_name == NULL) return FALSE;
- account = modest_tny_account_store_get_transport_account_for_open_connection (acc_store, account_name);
- if (!TNY_IS_TRANSPORT_ACCOUNT (account)) return FALSE;
-
- /* Get send queue for current ransport account */
- send_queue = modest_runtime_get_send_queue (TNY_TRANSPORT_ACCOUNT(account));
- g_return_val_if_fail (MODEST_IS_TNY_SEND_QUEUE (send_queue), FALSE);