[gnome-control-center] sound: Don't use gtk_widget_show_all
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] sound: Don't use gtk_widget_show_all
- Date: Thu, 18 Oct 2018 01:23:59 +0000 (UTC)
commit 74b54f633602f5464976206287149937ff12c4e3
Author: Robert Ancell <robert ancell canonical com>
Date: Mon Oct 15 11:32:13 2018 +1300
sound: Don't use gtk_widget_show_all
It is removed in GTK+ 4
panels/sound/gvc-balance-bar.c | 7 ++++++-
panels/sound/gvc-channel-bar.c | 24 +++++++++++++-----------
panels/sound/gvc-combo-box.c | 9 +++++++--
panels/sound/gvc-mixer-dialog.c | 33 +++++++++++++++++++++++++++++++--
panels/sound/gvc-sound-theme-chooser.c | 3 +++
panels/sound/gvc-speaker-test.c | 7 +++++--
6 files changed, 65 insertions(+), 18 deletions(-)
---
diff --git a/panels/sound/gvc-balance-bar.c b/panels/sound/gvc-balance-bar.c
index 5a9a45bf6..063b99736 100644
--- a/panels/sound/gvc-balance-bar.c
+++ b/panels/sound/gvc-balance-bar.c
@@ -89,10 +89,12 @@ _scale_box_new (GvcBalanceBar *bar)
bar->scale_box = box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
bar->scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, bar->adjustment);
+ gtk_widget_show (bar->scale);
gtk_scale_set_has_origin (GTK_SCALE (bar->scale), FALSE);
gtk_widget_set_size_request (bar->scale, SCALE_SIZE, -1);
bar->start_box = sbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (sbox);
gtk_box_pack_start (GTK_BOX (box), sbox, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (sbox), bar->label, FALSE, FALSE, 0);
@@ -132,6 +134,7 @@ _scale_box_new (GvcBalanceBar *bar)
}
bar->end_box = ebox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (ebox);
gtk_box_pack_start (GTK_BOX (box), ebox, FALSE, FALSE, 0);
ca_gtk_widget_disable_sounds (bar->scale, FALSE);
@@ -296,18 +299,20 @@ gvc_balance_bar_set_balance_type (GvcBalanceBar *bar,
default:
g_assert_not_reached ();
}
+ gtk_widget_show (bar->label);
gtk_widget_set_halign (bar->label, GTK_ALIGN_START);
gtk_widget_set_valign (bar->label, GTK_ALIGN_START);
/* frame */
frame = gtk_frame_new (NULL);
+ gtk_widget_show (frame);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
gtk_box_pack_start (GTK_BOX (bar), frame, TRUE, TRUE, 0);
/* box with scale */
bar->scale_box = _scale_box_new (bar);
+ gtk_widget_show (bar->scale_box);
gtk_container_add (GTK_CONTAINER (frame), bar->scale_box);
- gtk_widget_show_all (frame);
gtk_widget_set_direction (bar->scale, GTK_TEXT_DIR_LTR);
gtk_label_set_mnemonic_widget (GTK_LABEL (bar->label),
diff --git a/panels/sound/gvc-channel-bar.c b/panels/sound/gvc-channel-bar.c
index dd6f47dfb..ec81c89b3 100644
--- a/panels/sound/gvc-channel-bar.c
+++ b/panels/sound/gvc-channel-bar.c
@@ -110,25 +110,26 @@ _scale_box_new (GvcChannelBar *bar)
bar->scale_box = box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
bar->scale = gtk_scale_new (GTK_ORIENTATION_VERTICAL, bar->adjustment);
+ gtk_widget_show (bar->scale);
gtk_widget_set_size_request (bar->scale, -1, SCALE_SIZE);
gtk_range_set_inverted (GTK_RANGE (bar->scale), TRUE);
bar->start_box = sbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_widget_show (sbox);
gtk_box_pack_start (GTK_BOX (box), sbox, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (sbox), bar->image, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (sbox), bar->label, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (sbox), bar->high_image, FALSE, FALSE, 0);
- gtk_widget_hide (bar->high_image);
gtk_box_pack_start (GTK_BOX (box), bar->scale, TRUE, TRUE, 0);
bar->end_box = ebox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_widget_show (ebox);
gtk_box_pack_start (GTK_BOX (box), ebox, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (ebox), bar->low_image, FALSE, FALSE, 0);
- gtk_widget_hide (bar->low_image);
gtk_box_pack_start (GTK_BOX (ebox), bar->mute_switch, FALSE, FALSE, 0);
} else {
@@ -136,10 +137,12 @@ _scale_box_new (GvcChannelBar *bar)
gtk_box_pack_start (GTK_BOX (box), bar->image, FALSE, FALSE, 0);
bar->scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, bar->adjustment);
+ gtk_widget_show (bar->scale);
gtk_widget_set_size_request (bar->scale, SCALE_SIZE, -1);
bar->start_box = sbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (sbox);
gtk_box_pack_start (GTK_BOX (box), sbox, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (sbox), bar->low_image, FALSE, FALSE, 0);
@@ -149,11 +152,13 @@ _scale_box_new (GvcChannelBar *bar)
gtk_box_pack_start (GTK_BOX (box), bar->scale, TRUE, TRUE, 0);
bar->end_box = ebox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (ebox);
gtk_box_pack_start (GTK_BOX (box), ebox, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (ebox), bar->high_image, FALSE, FALSE, 0);
gtk_widget_show (bar->high_image);
gtk_box_pack_start (GTK_BOX (ebox), bar->mute_switch, FALSE, FALSE, 0);
+ gtk_widget_show (bar->mute_switch);
}
ca_gtk_widget_disable_sounds (bar->scale, FALSE);
@@ -245,6 +250,7 @@ update_layout (GvcChannelBar *bar)
gtk_container_remove (GTK_CONTAINER (frame), box);
bar->scale_box = _scale_box_new (bar);
+ gtk_widget_show (bar->scale_box);
gtk_container_add (GTK_CONTAINER (frame), bar->scale_box);
g_object_unref (bar->image);
@@ -252,8 +258,6 @@ update_layout (GvcChannelBar *bar)
g_object_unref (bar->mute_switch);
g_object_unref (bar->low_image);
g_object_unref (bar->high_image);
-
- gtk_widget_show_all (frame);
}
void
@@ -910,7 +914,7 @@ gvc_channel_bar_init (GvcChannelBar *bar)
bar);
bar->mute_switch = gtk_switch_new ();
- gtk_widget_set_no_show_all (bar->mute_switch, TRUE);
+ gtk_widget_hide (bar->mute_switch);
g_signal_connect (bar->mute_switch,
"notify::active",
G_CALLBACK (on_mute_switch_toggled),
@@ -918,31 +922,29 @@ gvc_channel_bar_init (GvcChannelBar *bar)
bar->low_image = gtk_image_new_from_icon_name ("audio-volume-low-symbolic",
GTK_ICON_SIZE_MENU);
+ gtk_widget_hide (bar->low_image);
gtk_style_context_add_class (gtk_widget_get_style_context (bar->low_image), "dim-label");
- gtk_widget_set_no_show_all (bar->low_image, TRUE);
bar->high_image = gtk_image_new_from_icon_name ("audio-volume-high-symbolic",
GTK_ICON_SIZE_MENU);
+ gtk_widget_hide (bar->high_image);
gtk_style_context_add_class (gtk_widget_get_style_context (bar->high_image), "dim-label");
- gtk_widget_set_no_show_all (bar->high_image, TRUE);
bar->image = gtk_image_new ();
- gtk_widget_set_no_show_all (bar->image, TRUE);
bar->label = gtk_label_new (NULL);
gtk_widget_set_halign (bar->label, GTK_ALIGN_START);
- gtk_widget_set_no_show_all (bar->label, TRUE);
/* frame */
frame = gtk_frame_new (NULL);
+ gtk_widget_show (frame);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
gtk_box_pack_start (GTK_BOX (bar), frame, TRUE, TRUE, 0);
- gtk_widget_show_all (frame);
/* box with scale */
bar->scale_box = _scale_box_new (bar);
+ gtk_widget_show (bar->scale_box);
gtk_container_add (GTK_CONTAINER (frame), bar->scale_box);
- gtk_widget_show_all (frame);
}
static void
diff --git a/panels/sound/gvc-combo-box.c b/panels/sound/gvc-combo-box.c
index 5e09e6875..4b4663c5b 100644
--- a/panels/sound/gvc-combo-box.c
+++ b/panels/sound/gvc-combo-box.c
@@ -303,15 +303,19 @@ gvc_combo_box_init (GvcComboBox *combo_box)
G_TYPE_STRING));
combo_box->label = gtk_label_new (NULL);
+ gtk_widget_show (combo_box->label);
gtk_widget_set_halign (combo_box->label, GTK_ALIGN_START);
/* frame */
frame = gtk_frame_new (NULL);
+ gtk_widget_show (frame);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
gtk_box_pack_start (GTK_BOX (combo_box), frame, TRUE, TRUE, 0);
combo_box->drop_box = box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (box);
combo_box->combobox = gtk_combo_box_new_with_model (combo_box->model);
+ gtk_widget_show (combo_box->combobox);
renderer = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box->combobox),
renderer, TRUE);
@@ -325,6 +329,7 @@ gvc_combo_box_init (GvcComboBox *combo_box)
g_object_set (G_OBJECT (combo_box->combobox), "popup-fixed-width", FALSE, NULL);
combo_box->start_box = sbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (sbox);
gtk_box_pack_start (GTK_BOX (box), sbox, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (sbox), combo_box->label, FALSE, FALSE, 0);
@@ -332,12 +337,13 @@ gvc_combo_box_init (GvcComboBox *combo_box)
gtk_box_pack_start (GTK_BOX (box), combo_box->combobox, TRUE, TRUE, 0);
combo_box->button = gtk_button_new_with_label ("APPLICATION BUG");
+ gtk_widget_hide (combo_box->button);
gtk_button_set_use_underline (GTK_BUTTON (combo_box->button), TRUE);
- gtk_widget_set_no_show_all (combo_box->button, TRUE);
gtk_box_pack_start (GTK_BOX (box), combo_box->button, FALSE, FALSE, 0);
combo_box->end_box = ebox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (ebox);
gtk_box_pack_start (GTK_BOX (box), ebox, FALSE, FALSE, 0);
if (combo_box->size_group != NULL) {
@@ -349,7 +355,6 @@ gvc_combo_box_init (GvcComboBox *combo_box)
}
gtk_container_add (GTK_CONTAINER (frame), combo_box->drop_box);
- gtk_widget_show_all (frame);
gtk_label_set_mnemonic_widget (GTK_LABEL (combo_box->label),
combo_box->combobox);
diff --git a/panels/sound/gvc-mixer-dialog.c b/panels/sound/gvc-mixer-dialog.c
index e3e1efcac..cc3ea9106 100644
--- a/panels/sound/gvc-mixer-dialog.c
+++ b/panels/sound/gvc-mixer-dialog.c
@@ -1603,16 +1603,19 @@ gvc_mixer_dialog_constructor (GType type,
self = GVC_MIXER_DIALOG (object);
main_vbox = GTK_WIDGET (self);
+ gtk_widget_show (main_vbox);
gtk_box_set_spacing (GTK_BOX (main_vbox), 2);
gtk_container_set_border_width (GTK_CONTAINER (self), 12);
self->output_stream_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+ gtk_widget_show (self->output_stream_box);
gtk_widget_set_margin_top (self->output_stream_box, 12);
gtk_box_pack_start (GTK_BOX (main_vbox),
self->output_stream_box,
FALSE, FALSE, 0);
self->output_bar = create_bar (self, TRUE, TRUE);
+ gtk_widget_show (self->output_bar);
gvc_channel_bar_set_name (GVC_CHANNEL_BAR (self->output_bar),
_("_Output volume:"));
gtk_widget_set_sensitive (self->output_bar, FALSE);
@@ -1620,6 +1623,7 @@ gvc_mixer_dialog_constructor (GType type,
self->output_bar, TRUE, TRUE, 12);
self->notebook = gtk_notebook_new ();
+ gtk_widget_show (self->notebook);
gtk_box_pack_start (GTK_BOX (main_vbox),
self->notebook,
TRUE, TRUE, 0);
@@ -1627,13 +1631,16 @@ gvc_mixer_dialog_constructor (GType type,
/* Output page */
self->output_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
+ gtk_widget_show (self->output_box);
gtk_container_set_border_width (GTK_CONTAINER (self->output_box), 12);
label = gtk_label_new (_("Output"));
+ gtk_widget_show (label);
gtk_notebook_append_page (GTK_NOTEBOOK (self->notebook),
self->output_box,
label);
box = gtk_frame_new (_("C_hoose a device for sound output:"));
+ gtk_widget_show (box);
label = gtk_frame_get_label_widget (GTK_FRAME (box));
_gtk_label_make_bold (GTK_LABEL (label));
gtk_label_set_use_underline (GTK_LABEL (label), TRUE);
@@ -1642,9 +1649,11 @@ gvc_mixer_dialog_constructor (GType type,
self->output_treeview = create_ui_device_treeview (self,
G_CALLBACK (on_output_selection_changed));
+ gtk_widget_show (self->output_treeview);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), self->output_treeview);
sw = gtk_scrolled_window_new (NULL, NULL);
+ gtk_widget_show (sw);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
@@ -1656,22 +1665,27 @@ gvc_mixer_dialog_constructor (GType type,
gtk_container_add (GTK_CONTAINER (box), sw);
box = gtk_frame_new (_("Settings for the selected device:"));
+ gtk_widget_show (box);
label = gtk_frame_get_label_widget (GTK_FRAME (box));
_gtk_label_make_bold (GTK_LABEL (label));
gtk_frame_set_shadow_type (GTK_FRAME (box), GTK_SHADOW_NONE);
gtk_box_pack_start (GTK_BOX (self->output_box), box, FALSE, FALSE, 12);
self->output_settings_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_widget_show (self->output_settings_box);
gtk_container_add (GTK_CONTAINER (box), self->output_settings_box);
/* Input page */
self->input_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
+ gtk_widget_show (self->input_box);
gtk_container_set_border_width (GTK_CONTAINER (self->input_box), 12);
label = gtk_label_new (_("Input"));
+ gtk_widget_show (label);
gtk_notebook_append_page (GTK_NOTEBOOK (self->notebook),
self->input_box,
label);
self->input_bar = create_bar (self, TRUE, TRUE);
+ gtk_widget_show (self->input_bar);
gvc_channel_bar_set_name (GVC_CHANNEL_BAR (self->input_bar),
_("_Input volume:"));
gvc_channel_bar_set_low_icon_name (GVC_CHANNEL_BAR (self->input_bar),
@@ -1685,16 +1699,19 @@ gvc_mixer_dialog_constructor (GType type,
FALSE, FALSE, 0);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (box);
gtk_box_pack_start (GTK_BOX (self->input_box),
box,
FALSE, FALSE, 6);
sbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (sbox);
gtk_box_pack_start (GTK_BOX (box),
sbox,
FALSE, FALSE, 0);
label = gtk_label_new (_("Input level:"));
+ gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (sbox),
label,
FALSE, FALSE, 0);
@@ -1702,6 +1719,7 @@ gvc_mixer_dialog_constructor (GType type,
gtk_size_group_add_widget (self->size_group, sbox);
self->input_level_bar = gvc_level_bar_new ();
+ gtk_widget_show (self->input_level_bar);
gvc_level_bar_set_scale (GVC_LEVEL_BAR (self->input_level_bar),
GVC_LEVEL_SCALE_LINEAR);
gtk_box_pack_start (GTK_BOX (box),
@@ -1709,6 +1727,7 @@ gvc_mixer_dialog_constructor (GType type,
TRUE, TRUE, 6);
ebox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (ebox);
gtk_box_pack_start (GTK_BOX (box),
ebox,
FALSE, FALSE, 0);
@@ -1716,11 +1735,13 @@ gvc_mixer_dialog_constructor (GType type,
gtk_size_group_add_widget (self->size_group, ebox);
self->input_settings_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (self->input_settings_box);
gtk_box_pack_start (GTK_BOX (self->input_box),
self->input_settings_box,
FALSE, FALSE, 0);
box = gtk_frame_new (_("C_hoose a device for sound input:"));
+ gtk_widget_show (box);
label = gtk_frame_get_label_widget (GTK_FRAME (box));
_gtk_label_make_bold (GTK_LABEL (label));
gtk_label_set_use_underline (GTK_LABEL (label), TRUE);
@@ -1729,9 +1750,11 @@ gvc_mixer_dialog_constructor (GType type,
self->input_treeview = create_ui_device_treeview (self,
G_CALLBACK (on_input_selection_changed));
+ gtk_widget_show (self->input_treeview);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), self->input_treeview);
sw = gtk_scrolled_window_new (NULL, NULL);
+ gtk_widget_show (sw);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
@@ -1743,13 +1766,16 @@ gvc_mixer_dialog_constructor (GType type,
/* Effects page */
self->sound_effects_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_widget_show (self->sound_effects_box);
gtk_container_set_border_width (GTK_CONTAINER (self->sound_effects_box), 12);
label = gtk_label_new (_("Sound Effects"));
+ gtk_widget_show (label);
gtk_notebook_append_page (GTK_NOTEBOOK (self->notebook),
self->sound_effects_box,
label);
self->effects_bar = create_bar (self, TRUE, TRUE);
+ gtk_widget_show (self->effects_bar);
gvc_channel_bar_set_name (GVC_CHANNEL_BAR (self->effects_bar),
_("_Alert volume:"));
gtk_widget_set_sensitive (self->effects_bar, FALSE);
@@ -1757,22 +1783,27 @@ gvc_mixer_dialog_constructor (GType type,
self->effects_bar, FALSE, FALSE, 0);
self->sound_theme_chooser = gvc_sound_theme_chooser_new ();
+ gtk_widget_show (self->sound_theme_chooser);
gtk_box_pack_start (GTK_BOX (self->sound_effects_box),
self->sound_theme_chooser,
TRUE, TRUE, 6);
/* Applications */
self->applications_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
+ gtk_widget_show (self->applications_box);
gtk_container_set_border_width (GTK_CONTAINER (self->applications_box), 12);
gtk_widget_set_margin_end (self->applications_box, 10);
label = gtk_label_new (_("Applications"));
+ gtk_widget_show (label);
box = gtk_scrolled_window_new (NULL, NULL);
+ gtk_widget_show (box);
gtk_container_add (GTK_CONTAINER (box), self->applications_box);
gtk_notebook_append_page (GTK_NOTEBOOK (self->notebook),
box,
label);
self->no_apps_label = gtk_label_new (_("No application is currently playing or recording audio."));
+ gtk_widget_show (self->no_apps_label);
gtk_box_pack_start (GTK_BOX (self->applications_box),
self->no_apps_label,
TRUE, TRUE, 0);
@@ -1803,8 +1834,6 @@ gvc_mixer_dialog_constructor (GType type,
G_CALLBACK (on_control_stream_removed),
self);
- gtk_widget_show_all (main_vbox);
-
streams = gvc_mixer_control_get_streams (self->mixer_control);
for (l = streams; l != NULL; l = l->next) {
stream = l->data;
diff --git a/panels/sound/gvc-sound-theme-chooser.c b/panels/sound/gvc-sound-theme-chooser.c
index 93eeb155c..1c6603140 100644
--- a/panels/sound/gvc-sound-theme-chooser.c
+++ b/panels/sound/gvc-sound-theme-chooser.c
@@ -719,6 +719,7 @@ gvc_sound_theme_chooser_init (GvcSoundThemeChooser *chooser)
str = g_strdup_printf ("<b>%s</b>", _("C_hoose an alert sound:"));
chooser->selection_box = box = gtk_frame_new (str);
+ gtk_widget_show (box);
label = gtk_frame_get_label_widget (GTK_FRAME (box));
gtk_label_set_use_underline (GTK_LABEL (label), TRUE);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
@@ -728,9 +729,11 @@ gvc_sound_theme_chooser_init (GvcSoundThemeChooser *chooser)
gtk_box_pack_start (GTK_BOX (chooser), box, TRUE, TRUE, 6);
chooser->treeview = create_alert_treeview (chooser);
+ gtk_widget_show (chooser->treeview);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), chooser->treeview);
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+ gtk_widget_show (scrolled_window);
setup_list_size_constraint (scrolled_window, chooser->treeview);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
diff --git a/panels/sound/gvc-speaker-test.c b/panels/sound/gvc-speaker-test.c
index 21fd9eb3a..a5ffc33c6 100644
--- a/panels/sound/gvc-speaker-test.c
+++ b/panels/sound/gvc-speaker-test.c
@@ -332,13 +332,16 @@ channel_control_new (ca_context *canberra, pa_channel_position_t position)
if (name == NULL)
name = "audio-volume-medium";
image = gtk_image_new_from_icon_name (name, GTK_ICON_SIZE_DIALOG);
+ gtk_widget_show (image);
g_object_set_data (G_OBJECT (control), "image", image);
gtk_box_pack_start (GTK_BOX (control), image, FALSE, FALSE, 0);
label = gtk_label_new (pretty_position (position));
+ gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (control), label, FALSE, FALSE, 0);
test_button = gtk_button_new_with_label (_("Test"));
+ gtk_widget_show (test_button);
g_signal_connect (G_OBJECT (test_button), "clicked",
G_CALLBACK (on_test_button_clicked), control);
@@ -349,11 +352,10 @@ channel_control_new (ca_context *canberra, pa_channel_position_t position)
gtk_widget_get_accessible (label));
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_widget_show (box);
gtk_box_pack_start (GTK_BOX (box), test_button, TRUE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (control), box, FALSE, FALSE, 0);
- gtk_widget_show_all (control);
-
return control;
}
@@ -364,6 +366,7 @@ create_channel_controls (GvcSpeakerTest *speaker_test)
for (i = 0; i < G_N_ELEMENTS (position_table); i += 3) {
speaker_test->channel_controls[position_table[i]] = channel_control_new
(speaker_test->canberra, (pa_channel_position_t) position_table[i]);
+ gtk_widget_show (speaker_test->channel_controls[position_table[i]]);
gtk_grid_attach (GTK_GRID (speaker_test),
speaker_test->channel_controls[position_table[i]],
position_table[i+1], position_table[i+2], 1, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]