diff options
author | Colin Guthrie <cguthrie@mandriva.org> | 2009-02-28 20:37:44 +0000 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2009-02-28 20:37:44 +0000 |
commit | d816be58d6eaf53b17f52ed5162033d65659932e (patch) | |
tree | f9e9175c89aa7ec7e529c434ec9972c4755c7313 /src | |
parent | 188ee8c2c23f48b80e3403908167124af71d1916 (diff) |
Fix the number of outstanding operations.
This uses an incrementing rather than fixed value as it more obviously reflects what's going on.
Diffstat (limited to 'src')
-rw-r--r-- | src/pavucontrol.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/pavucontrol.cc b/src/pavucontrol.cc index 8ccd2b0..4a13fcd 100644 --- a/src/pavucontrol.cc +++ b/src/pavucontrol.cc @@ -2152,49 +2152,57 @@ void context_state_callback(pa_context *c, void *userdata) { } pa_operation_unref(o); + // Keep track of the outstanding callbacks for UI tweaks + n_outstanding = 0; + if (!(o = pa_context_get_server_info(c, server_info_cb, w))) { show_error(_("pa_context_get_server_info() failed")); return; } pa_operation_unref(o); + n_outstanding++; if (!(o = pa_context_get_client_info_list(c, client_cb, w))) { show_error(_("pa_context_client_info_list() failed")); return; } pa_operation_unref(o); + n_outstanding++; if (!(o = pa_context_get_card_info_list(c, card_cb, w))) { show_error(_("pa_context_get_card_info_list() failed")); return; } pa_operation_unref(o); + n_outstanding++; if (!(o = pa_context_get_sink_info_list(c, sink_cb, w))) { show_error(_("pa_context_get_sink_info_list() failed")); return; } pa_operation_unref(o); + n_outstanding++; if (!(o = pa_context_get_source_info_list(c, source_cb, w))) { show_error(_("pa_context_get_source_info_list() failed")); return; } pa_operation_unref(o); + n_outstanding++; if (!(o = pa_context_get_sink_input_info_list(c, sink_input_cb, w))) { show_error(_("pa_context_get_sink_input_info_list() failed")); return; } pa_operation_unref(o); + n_outstanding++; if (!(o = pa_context_get_source_output_info_list(c, source_output_cb, w))) { show_error(_("pa_context_get_source_output_info_list() failed")); return; } pa_operation_unref(o); - - n_outstanding = 6; + n_outstanding++; /* This call is not always supported */ if ((o = pa_ext_stream_restore_read(c, ext_stream_restore_read_cb, w))) { |