[gnome-control-center] sound: Update the sound theme for speaker testing
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] sound: Update the sound theme for speaker testing
- Date: Mon, 1 Aug 2011 15:24:56 +0000 (UTC)
commit 8c0a2279c1d1e5ebb4d1bae0e6dbcf9879cad81e
Author: David Henningsson <david henningsson canonical com>
Date: Mon Aug 1 16:21:27 2011 +0100
sound: Update the sound theme for speaker testing
https://bugzilla.gnome.org/show_bug.cgi?id=647254
panels/sound/gvc-speaker-test.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/panels/sound/gvc-speaker-test.c b/panels/sound/gvc-speaker-test.c
index 1dd1bc4..6a7938e 100644
--- a/panels/sound/gvc-speaker-test.c
+++ b/panels/sound/gvc-speaker-test.c
@@ -436,6 +436,24 @@ update_channel_map (GvcSpeakerTest *speaker_test)
}
static void
+gvc_speaker_test_set_theme (ca_context *ca)
+{
+ GtkSettings *settings;
+ char *theme_name;
+
+ settings = gtk_settings_get_for_screen (gdk_screen_get_default ());
+
+ g_object_get (G_OBJECT (settings),
+ "gtk-sound-theme-name", &theme_name,
+ NULL);
+
+ if (theme_name)
+ ca_context_change_props (ca, CA_PROP_CANBERRA_XDG_THEME_NAME, theme_name, NULL);
+
+ g_free (theme_name);
+}
+
+static void
gvc_speaker_test_init (GvcSpeakerTest *speaker_test)
{
GtkWidget *face;
@@ -447,6 +465,7 @@ gvc_speaker_test_init (GvcSpeakerTest *speaker_test)
ca_context_change_props (speaker_test->priv->canberra,
CA_PROP_APPLICATION_ID, "org.gnome.VolumeControl",
NULL);
+ gvc_speaker_test_set_theme (speaker_test->priv->canberra);
gtk_widget_set_direction (GTK_WIDGET (speaker_test), GTK_TEXT_DIR_LTR);
gtk_table_resize (GTK_TABLE (speaker_test), 3, 5);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]