[connections/fix-simultaneous-displays-2: 2/6] display-view: Show "loading" screen when connection isn't ready
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [connections/fix-simultaneous-displays-2: 2/6] display-view: Show "loading" screen when connection isn't ready
- Date: Wed, 28 Jul 2021 10:11:46 +0000 (UTC)
commit 6160a31d67e25428de961698456bab773dac41b4
Author: Felipe Borges <felipeborges gnome org>
Date: Wed Jul 28 11:40:20 2021 +0200
display-view: Show "loading" screen when connection isn't ready
When switching from opening one connection to another.
src/display-view.vala | 2 ++
src/ui/display-view.ui | 5 ++++-
src/vnc-connection.vala | 5 ++++-
3 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/display-view.vala b/src/display-view.vala
index 1548fb4..2364023 100644
--- a/src/display-view.vala
+++ b/src/display-view.vala
@@ -78,6 +78,8 @@ namespace Connections {
}
public void connect_to (Connection connection) {
+ stack.set_visible_child_name ("loading");
+
replace_display (connection.widget);
if (show_display_id != 0) {
diff --git a/src/ui/display-view.ui b/src/ui/display-view.ui
index bc5c3b6..ad4dddf 100644
--- a/src/ui/display-view.ui
+++ b/src/ui/display-view.ui
@@ -12,7 +12,7 @@
<property name="visible">True</property>
<child>
- <object class="GtkBox" id="loading">
+ <object class="GtkBox">
<property name="visible">True</property>
<property name="halign">center</property>
<child>
@@ -23,6 +23,9 @@
</object>
</child>
</object>
+ <packing>
+ <property name="name">loading</property>
+ </packing>
</child>
<child>
diff --git a/src/vnc-connection.vala b/src/vnc-connection.vala
index 59a6f54..08fd539 100644
--- a/src/vnc-connection.vala
+++ b/src/vnc-connection.vala
@@ -157,8 +157,11 @@ namespace Connections {
}
public override void connect_it () {
- if (connected)
+ if (connected) {
+ show ();
+
return;
+ }
connected = true;
display.set_credential (DisplayCredential.USERNAME, username);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]