[gnome-control-center] sound: ensure "Test Speakers" dialog is closed if panel changed
- From: Thomas Wood <thos src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] sound: ensure "Test Speakers" dialog is closed if panel changed
- Date: Tue, 4 Jun 2013 11:00:47 +0000 (UTC)
commit b2658567dd886394261cddb44c39cec3b6b91d4d
Author: Joshua Lock <joshua lock intel com>
Date: Mon Jun 3 16:40:04 2013 -0700
sound: ensure "Test Speakers" dialog is closed if panel changed
When the g-c-c panel is changed from Sound to another panel whilst the Test
Speakers dialog is still open (i.e. user activates a panel via one of the
Shell indicators) the dialog remains shown and modal for the g-c-c window.
This change ensures that the "Test Speakers" dialog is closed when the panel
changes.
https://bugzilla.gnome.org/show_bug.cgi?id=700856
panels/sound/gvc-mixer-dialog.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/panels/sound/gvc-mixer-dialog.c b/panels/sound/gvc-mixer-dialog.c
index be5251e..eb9e49b 100644
--- a/panels/sound/gvc-mixer-dialog.c
+++ b/panels/sound/gvc-mixer-dialog.c
@@ -76,6 +76,7 @@ struct GvcMixerDialogPrivate
GtkWidget *sound_theme_chooser;
GtkWidget *click_feedback_button;
GtkWidget *audible_bell_button;
+ GtkWidget *test_dialog;
GtkSizeGroup *size_group;
gdouble last_input_peak;
@@ -1602,6 +1603,9 @@ on_test_speakers_clicked (GvcComboBox *widget,
container = gtk_dialog_get_content_area (GTK_DIALOG (d));
gtk_container_add (GTK_CONTAINER (container), speaker_test);
+ dialog->priv->test_dialog = d;
+ g_object_add_weak_pointer (G_OBJECT (d),
+ (gpointer *) &dialog->priv->test_dialog);
gtk_dialog_run (GTK_DIALOG (d));
gtk_widget_destroy (d);
}
@@ -1889,6 +1893,11 @@ gvc_mixer_dialog_dispose (GObject *object)
dialog->priv->bars = NULL;
}
+ if (dialog->priv->test_dialog != NULL) {
+ gtk_dialog_response (GTK_DIALOG (dialog->priv->test_dialog),
+ GTK_RESPONSE_OK);
+ }
+
G_OBJECT_CLASS (gvc_mixer_dialog_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]