[gnome-boxes] libvirt-machine-properties: Drop use of AppWindow singleton



commit 3517b7a7b83fc6d0a8b14f391596118f97d41803
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri Jul 18 16:01:52 2014 +0200

    libvirt-machine-properties: Drop use of AppWindow singleton
    
    This is needed to drop the use of AppWindow singleton and therefore to
    make multiple windows possible.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=732098

 src/libvirt-machine-properties.vala |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 7b57a60..98527d6 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -132,7 +132,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
             button.clicked.connect (() => {
                 var log = collect_logs ();
                 var dialog = new Gtk.Dialog.with_buttons (_("Troubleshooting log"),
-                                                          App.window,
+                                                          machine.window,
                                                           DialogFlags.DESTROY_WITH_PARENT,
                                                           _("_Save"), 100,
                                                           _("Copy to clipboard"), 101,
@@ -150,7 +150,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
 
                 dialog.response.connect ( (response_id) => {
                     if (response_id == 100) {
-                        var chooser = new Gtk.FileChooserDialog (_("Save log"), App.window,
+                        var chooser = new Gtk.FileChooserDialog (_("Save log"), machine.window,
                                                                  Gtk.FileChooserAction.SAVE,
                                                                  _("_Save"), ResponseType.OK);
                         chooser.local_only = false;
@@ -313,7 +313,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
         button.clicked.connect ( () => {
             if (empty) {
                 var dialog = new Gtk.FileChooserDialog (_("Select a device or ISO file"),
-                                                        App.window,
+                                                        machine.window,
                                                         Gtk.FileChooserAction.OPEN,
                                                         _("_Cancel"), Gtk.ResponseType.CANCEL,
                                                         _("_Open"), Gtk.ResponseType.ACCEPT);
@@ -421,7 +421,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
                                               FormatSizeFlags.IEC_UNITS);
             if ((VMConfigurator.is_install_config (machine.domain_config) ||
                  VMConfigurator.is_live_config (machine.domain_config)) &&
-                App.window.previous_ui_state != Boxes.UIState.WIZARD)
+                machine.window.previous_ui_state != Boxes.UIState.WIZARD)
                 property.sensitive = false;
             else
                 property.changed.connect (on_ram_changed);
@@ -485,7 +485,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
             property.defer_interval = 0;
             if ((VMConfigurator.is_install_config (machine.domain_config) ||
                  VMConfigurator.is_live_config (machine.domain_config)) &&
-                App.window.previous_ui_state != Boxes.UIState.WIZARD)
+                machine.window.previous_ui_state != Boxes.UIState.WIZARD)
                 property.sensitive = false;
             else
                 property.changed.connect (on_storage_changed);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]