[gnome-control-center] display: Ensure we generate the UI initially on two output mode
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] display: Ensure we generate the UI initially on two output mode
- Date: Fri, 25 Aug 2017 14:57:01 +0000 (UTC)
commit 337802315ce91572d9de69c36e3f32e48e252fef
Author: Rui Matos <tiagomatos gmail com>
Date: Fri Aug 25 16:44:50 2017 +0200
display: Ensure we generate the UI initially on two output mode
We rely on visible-child-name notifications to generate the
appropriate UI, unfortunately it doesn't happen for the first added
stack page if the widget is already visible. Work around this by
adding a dummy page first.
panels/display/cc-display-panel.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index 4101899..0940e18 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -2016,6 +2016,9 @@ make_two_output_ui (CcDisplayPanel *panel)
stack = gtk_stack_new ();
gtk_container_add (GTK_CONTAINER (vbox), stack);
+ /* Add a dummy first stack page so that setting the visible child
+ * below triggers a visible-child-name notification. */
+ gtk_stack_add_named (GTK_STACK (stack), make_bin (), "dummy");
add_two_output_page (switcher, stack, "join", _("Join Displays"),
"video-joined-displays-symbolic");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]