Merge lp:~charlesk/gnome-control-center/make-new-panel into lp:~cjcurran/gnome-control-center/make-new-panel

Proposed by Charles Kerr on 2012-02-03
Status: Needs review
Proposed branch: lp:~charlesk/gnome-control-center/make-new-panel
Merge into: lp:~cjcurran/gnome-control-center/make-new-panel
Diff against target: 51 lines (+17/-2)
1 file modified
panels/sound-nua/gvc-mixer-dialog.c (+17/-2)
To merge this branch: bzr merge lp:~charlesk/gnome-control-center/make-new-panel
Reviewer Review Type Date Requested Status
Conor Curran 2012-02-03 Pending
Review via email: mp+91475@code.launchpad.net

Description of the change

r225 is straightforward code that adds a paragraph for Bug #829648

https://wiki.ubuntu.com/SoundMenu#presence

To post a comment you must log in.
226. By Charles Kerr on 2012-02-03

Move the visibility checkbox to the bottom of the page (underneath the volume slider) as per mpt's request

Unmerged revisions

226. By Charles Kerr on 2012-02-03

Move the visibility checkbox to the bottom of the page (underneath the volume slider) as per mpt's request

225. By Charles Kerr on 2012-02-03

Add indicator visibility checkbox for Bug #829648

https://wiki.ubuntu.com/SoundMenu#presence

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panels/sound-nua/gvc-mixer-dialog.c'
2--- panels/sound-nua/gvc-mixer-dialog.c 2012-02-03 17:15:47 +0000
3+++ panels/sound-nua/gvc-mixer-dialog.c 2012-02-03 19:09:34 +0000
4@@ -83,9 +83,10 @@
5 GtkWidget *click_feedback_button;
6 GtkWidget *audible_bell_button;
7 GtkSizeGroup *size_group;
8- GtkWidget *selected_output_label;
9+ GtkWidget *selected_output_label;
10 GtkWidget *selected_input_label;
11- GtkWidget *test_output_button;
12+ GtkWidget *test_output_button;
13+ GSettings *indicator_settings;
14
15 gdouble last_input_peak;
16 guint num_apps;
17@@ -1666,6 +1667,7 @@
18 {
19 GObject *object;
20 GvcMixerDialog *self;
21+ GtkWidget *w;
22 GtkWidget *main_vbox;
23 GtkWidget *label;
24 GtkWidget *alignment;
25@@ -1983,6 +1985,17 @@
26 gtk_box_pack_start (GTK_BOX (self->priv->output_stream_box),
27 self->priv->output_bar, TRUE, FALSE, 12);
28
29+ /* Indicator visibility toggle */
30+ w = gtk_check_button_new_with_mnemonic(_( "_Show sound volume in the menu bar"));
31+ alignment = gtk_alignment_new (0, 0, 1, 1);
32+ gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 3, 3, 5, 5);
33+ gtk_container_add (GTK_CONTAINER (alignment), w);
34+ self->priv->indicator_settings = g_settings_new ("com.canonical.indicator.sound");
35+ g_settings_bind (self->priv->indicator_settings, "visible", w, "active", G_SETTINGS_BIND_DEFAULT);
36+ gtk_box_pack_start (GTK_BOX (main_vbox),
37+ alignment,
38+ FALSE, FALSE, 0);
39+
40 gtk_widget_show_all (main_vbox);
41
42 g_signal_connect (self->priv->mixer_control,
43@@ -2048,6 +2061,8 @@
44 {
45 GvcMixerDialog *dialog = GVC_MIXER_DIALOG (object);
46
47+ g_clear_object (&dialog->priv->indicator_settings);
48+
49 if (dialog->priv->mixer_control != NULL) {
50 g_signal_handlers_disconnect_by_func (dialog->priv->mixer_control,
51 on_control_output_added,

Subscribers

People subscribed via source and target branches

to all changes: