static void updated_connection_cb (NMRemoteConnection *connection, GError *error, gpointer data) { NetConnectionEditor *editor = data; nm_connection_clear_secrets (NM_CONNECTION (connection)); update_complete (editor, error); }
static void added_connection_cb (NMRemoteSettings *settings, NMRemoteConnection *connection, GError *error, gpointer data) { NetConnectionEditor *editor = data; if (error) { g_warning ("Failed to add connection: %s", error->message); /* Leave the editor open */ return; } update_complete (editor, error); }
static void updated_connection_cb (GObject *connection, GAsyncResult *result, gpointer user_data) { NMConnectionEditor *self = NM_CONNECTION_EDITOR (user_data); GError *error = NULL; nm_remote_connection_commit_changes_finish (NM_REMOTE_CONNECTION (connection), result, &error); /* Clear secrets so they don't lay around in memory; they'll get requested * again anyway next time the connection is edited. */ nm_connection_clear_secrets (NM_CONNECTION (connection)); update_complete (self, error); g_clear_error (&error); }
/** * Periodically check to see if effects need updating. */ CALLSET_ENTRY (effect_update, idle_every_100ms, start_ball, end_ball) { if (sys_init_complete && !in_test) { /* Update devices frequently */ if (in_game && !ball_search_timed_out ()) callset_invoke (device_update); /* Less frequently, update background display, music, and lamps. Normally this is done every 500ms. If effect_update_request() is called, then it will occur on the next 100ms interval. */ if (effect_update_counter == 0) { task_recreate_gid_while (GID_EFFECT_UPDATE, effect_update_task, TASK_DURATION_INF); update_complete (); } else { --effect_update_counter; } } }
CALLSET_ENTRY (effect_update, init) { update_complete (); }