[gnome-boxes] DisplayPage: Way to switch display widget w/o showing it
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] DisplayPage: Way to switch display widget w/o showing it
- Date: Fri, 29 Aug 2014 16:15:21 +0000 (UTC)
commit 662a0a9dbaa3c2c542da2301f2bc878668e99ec3
Author: Timm Bäder <mail baedert org>
Date: Tue Aug 12 21:19:40 2014 +0200
DisplayPage: Way to switch display widget w/o showing it
If the user is in the properties page and the machine's display
reconnects, we need to replace the display page's widget with the new
display without showing it.
https://bugzilla.gnome.org/show_bug.cgi?id=710306
src/display-page.vala | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/display-page.vala b/src/display-page.vala
index f4dc9ce..4c063a4 100644
--- a/src/display-page.vala
+++ b/src/display-page.vala
@@ -101,6 +101,13 @@ private class Boxes.DisplayPage: Gtk.Box {
}
public void show_display (Boxes.Display display, Widget widget) {
+ replace_display (display, widget);
+
+ window.below_bin.set_visible_child_name ("display-page");
+ widget.grab_focus ();
+ }
+
+ public void replace_display (Boxes.Display display, Widget widget) {
if (event_box.get_child () == widget)
return;
@@ -144,10 +151,6 @@ private class Boxes.DisplayPage: Gtk.Box {
return false;
});
-
- window.below_bin.set_visible_child_name ("display-page");
-
- widget.grab_focus ();
}
public Widget? remove_display () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]