- IdlePasswordRequest *data = g_slice_new0 (IdlePasswordRequest);
- data->account_store = account_store;
- data->server_account_id = server_account_id;
- data->username = username;
- data->password = password;
- data->cancel = cancel;
- data->remember = remember;
-
- data->loop = g_main_loop_new (NULL, FALSE /* not running */);
-
- /* Cause the function to be run in an idle-handler, which is always
- * in the main thread:
- */
- g_idle_add (&on_idle_request_password, data);
-
- /* This main loop will run until the idle handler has stopped it: */
- printf ("DEBUG: %s: before g_main_loop_run()\n", __FUNCTION__);
- GDK_THREADS_LEAVE();
- g_main_loop_run (data->loop);
- GDK_THREADS_ENTER();
- printf ("DEBUG: %s: after g_main_loop_run()\n", __FUNCTION__);
- printf ("DEBUG: %s: Finished\n", __FUNCTION__);
- g_main_loop_unref (data->loop);
-
- g_slice_free (IdlePasswordRequest, data);
+ g_signal_emit (G_OBJECT(account_store), signals[PASSWORD_REQUESTED_SIGNAL], 0,
+ server_account_id, /* server_account_name */
+ username, password, cancel, remember);