-static void
-connection_status_changed (TnyAccount *account,
- TnyConnectionStatus status,
- gpointer data)
-{
- /* We do this here and not in the connection policy because we
- don't want to do it for every account, just for the
- accounts that are interactively added when modest is
- runnning */
- if (status == TNY_CONNECTION_STATUS_CONNECTED) {
- const gchar *account_name;
- ModestWindow *top_window;
- ModestTnyAccountStorePrivate *priv = NULL;
-
- priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE (data);
-
- /* Remove this handler */
- priv->sighandlers = modest_signal_mgr_disconnect (priv->sighandlers,
- G_OBJECT (account),
- "connection_status_changed");
-
- /* Perform a send receive */
- account_name = modest_tny_account_get_parent_modest_account_name_for_server_account (account);
- top_window = modest_window_mgr_get_current_top (modest_runtime_get_window_mgr ());
- modest_ui_actions_do_send_receive (account_name, FALSE, FALSE, TRUE, top_window);
- }
-}
-