gnome-media r4033 - in trunk/gnome-volume-control: . src
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-media r4033 - in trunk/gnome-volume-control: . src
- Date: Thu, 6 Nov 2008 08:07:40 +0000 (UTC)
Author: mccann
Date: Thu Nov 6 08:07:40 2008
New Revision: 4033
URL: http://svn.gnome.org/viewvc/gnome-media?rev=4033&view=rev
Log:
2008-11-06 William Jon McCann <jmccann redhat com>
* src/gvc-mixer-dialog.c (add_stream),
(gvc_mixer_dialog_constructor):
* src/gvc-sound-theme-chooser.c (setup_theme_selector),
(gvc_sound_theme_chooser_init):
Fix up some layout. Hide the theme selector if there is
only one.
Modified:
trunk/gnome-volume-control/ChangeLog
trunk/gnome-volume-control/src/gvc-mixer-dialog.c
trunk/gnome-volume-control/src/gvc-sound-theme-chooser.c
Modified: trunk/gnome-volume-control/src/gvc-mixer-dialog.c
==============================================================================
--- trunk/gnome-volume-control/src/gvc-mixer-dialog.c (original)
+++ trunk/gnome-volume-control/src/gvc-mixer-dialog.c Thu Nov 6 08:07:40 2008
@@ -260,13 +260,13 @@
save_bar_for_stream (dialog, stream, bar);
if (GVC_IS_MIXER_SINK (stream)) {
- gtk_box_pack_start (GTK_BOX (dialog->priv->output_stream_box), bar, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (dialog->priv->output_stream_box), bar, TRUE, TRUE, 12);
} else if (GVC_IS_MIXER_SOURCE (stream)) {
- gtk_box_pack_end (GTK_BOX (dialog->priv->input_box), bar, FALSE, FALSE, 0);
+ gtk_box_pack_end (GTK_BOX (dialog->priv->input_box), bar, FALSE, FALSE, 12);
} else if (stream == gvc_mixer_control_get_event_sink_input (dialog->priv->mixer_control)) {
- gtk_box_pack_end (GTK_BOX (dialog->priv->sound_effects_box), bar, FALSE, FALSE, 0);
+ gtk_box_pack_end (GTK_BOX (dialog->priv->sound_effects_box), bar, FALSE, FALSE, 12);
} else {
- gtk_box_pack_start (GTK_BOX (dialog->priv->applications_box), bar, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (dialog->priv->applications_box), bar, FALSE, FALSE, 12);
}
gvc_channel_bar_set_is_muted (GVC_CHANNEL_BAR (bar), is_muted);
@@ -322,6 +322,8 @@
GvcMixerDialog *self;
GtkWidget *main_vbox;
GtkWidget *label;
+ GtkWidget *button;
+ GtkWidget *alignment;
GtkWidget *box;
GtkWidget *notebook;
GSList *streams;
@@ -345,12 +347,13 @@
notebook,
TRUE, TRUE, 6);
- self->priv->output_stream_box = gtk_hbox_new (FALSE, 12);
+ self->priv->output_stream_box = gtk_hbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (main_vbox),
self->priv->output_stream_box,
FALSE, FALSE, 6);
- self->priv->sound_effects_box = gtk_vbox_new (FALSE, 12);
+ /* Effects page */
+ self->priv->sound_effects_box = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (self->priv->sound_effects_box), 12);
label = gtk_label_new (_("Sound Effects"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
@@ -360,14 +363,34 @@
gtk_box_pack_start (GTK_BOX (self->priv->sound_effects_box),
box,
TRUE, TRUE, 6);
+ button = gtk_check_button_new_with_mnemonic (_("_Play alerts and sound effects"));
+ gtk_box_pack_start (GTK_BOX (self->priv->sound_effects_box),
+ button,
+ FALSE, FALSE, 0);
+ alignment = gtk_alignment_new (0, 0, 1, 1);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 12, 0);
+ gtk_box_pack_start (GTK_BOX (self->priv->sound_effects_box),
+ alignment,
+ FALSE, FALSE, 0);
+ box = gtk_vbox_new (FALSE, 6);
+ gtk_container_add (GTK_CONTAINER (alignment), box);
+ button = gtk_check_button_new_with_mnemonic (_("Play _sound effects when buttons are clicked"));
+ gtk_box_pack_start (GTK_BOX (box),
+ button,
+ FALSE, FALSE, 0);
+ button = gtk_check_button_new_with_mnemonic (_("Play _alert sound"));
+ gtk_box_pack_start (GTK_BOX (box),
+ button,
+ FALSE, FALSE, 0);
- self->priv->output_box = gtk_vbox_new (FALSE, 12);
+ /* Output page */
+ self->priv->output_box = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (self->priv->output_box), 12);
label = gtk_label_new (_("Output"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
self->priv->output_box,
label);
- self->priv->input_box = gtk_vbox_new (FALSE, 12);
+ self->priv->input_box = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (self->priv->input_box), 12);
label = gtk_label_new (_("Input"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
Modified: trunk/gnome-volume-control/src/gvc-sound-theme-chooser.c
==============================================================================
--- trunk/gnome-volume-control/src/gvc-sound-theme-chooser.c (original)
+++ trunk/gnome-volume-control/src/gvc-sound-theme-chooser.c Thu Nov 6 08:07:40 2008
@@ -41,6 +41,7 @@
{
GtkWidget *combo_box;
GtkWidget *treeview;
+ GtkWidget *theme_box;
};
static void gvc_sound_theme_chooser_class_init (GvcSoundThemeChooserClass *klass);
@@ -367,6 +368,7 @@
char *theme_name;
GConfClient *client;
guint i;
+ GtkTreeIter iter;
/* Add the theme names and their display name to a hash table,
* makes it easy to avoid duplicate themes */
@@ -391,6 +393,10 @@
g_warning ("Bad setup, install the freedesktop sound theme");
g_hash_table_destroy (hash);
return;
+ } else if (g_hash_table_size (hash) < 2) {
+ gtk_widget_hide (chooser->priv->theme_box);
+ } else {
+ gtk_widget_show_all (chooser->priv->theme_box);
}
/* Setup the tree model, 3 columns:
@@ -438,7 +444,6 @@
"changed",
G_CALLBACK (on_combobox_changed),
chooser);
-
}
static int
@@ -1450,19 +1455,6 @@
chooser->priv = GVC_SOUND_THEME_CHOOSER_GET_PRIVATE (chooser);
- frame = gtk_frame_new (_("Sound Theme"));
- label = gtk_frame_get_label_widget (GTK_FRAME (frame));
- _gtk_label_make_bold (GTK_LABEL (label));
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
- gtk_box_pack_start (GTK_BOX (chooser), frame, FALSE, FALSE, 0);
-
- alignment = gtk_alignment_new (0, 0, 1, 1);
- gtk_container_add (GTK_CONTAINER (frame), alignment);
- gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 12, 0, 12, 0);
-
- chooser->priv->combo_box = gtk_combo_box_new ();
- gtk_container_add (GTK_CONTAINER (alignment), chooser->priv->combo_box);
-
frame = gtk_frame_new (_("Alerts and Sound Effects"));
label = gtk_frame_get_label_widget (GTK_FRAME (frame));
_gtk_label_make_bold (GTK_LABEL (label));
@@ -1479,6 +1471,17 @@
GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (box), chooser->priv->treeview);
gtk_container_add (GTK_CONTAINER (alignment), box);
+
+ chooser->priv->theme_box = gtk_hbox_new (FALSE, 6);
+ gtk_widget_set_no_show_all (chooser->priv->theme_box, TRUE);
+ gtk_box_pack_start (GTK_BOX (chooser),
+ chooser->priv->theme_box, FALSE, FALSE, 0);
+
+ label = gtk_label_new (_("Sound Theme:"));
+ gtk_box_pack_start (GTK_BOX (chooser->priv->theme_box), label, FALSE, FALSE, 6);
+ chooser->priv->combo_box = gtk_combo_box_new ();
+ gtk_box_pack_start (GTK_BOX (chooser->priv->theme_box), chooser->priv->combo_box, FALSE, FALSE, 0);
+
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]