[gnome-boxes] UnattendedInstaller.check_needed_info -> InstallerMedia
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] UnattendedInstaller.check_needed_info -> InstallerMedia
- Date: Wed, 11 Jul 2012 17:01:48 +0000 (UTC)
commit e788db134f96a2e8d55e12c0e03633e763639111
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Jul 11 12:05:22 2012 +0300
UnattendedInstaller.check_needed_info -> InstallerMedia
Move check_needed_info from UnattendedInstaller to parent InstallerMedia
so that users of this function don't need type checks and casting to be
able to use it.
https://bugzilla.gnome.org/show_bug.cgi?id=679706
src/installer-media.vala | 1 +
src/unattended-installer.vala | 2 +-
src/wizard.vala | 3 +--
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/installer-media.vala b/src/installer-media.vala
index 3ae0a84..5d78edc 100644
--- a/src/installer-media.vala
+++ b/src/installer-media.vala
@@ -81,6 +81,7 @@ private class Boxes.InstallerMedia : GLib.Object {
public virtual void setup_spice_config (DomainGraphicsSpice graphics) {}
public virtual void populate_setup_vbox (Gtk.VBox setup_vbox) {}
+ public virtual void check_needed_info () throws UnattendedInstallerError.SETUP_INCOMPLETE {}
public bool is_architecture_compatible (string architecture) {
return os_media == null || // Unknown media
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index 1b6f03c..639d38e 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -162,7 +162,7 @@ private abstract class Boxes.UnattendedInstaller: InstallerMedia {
}
// Ensure needed information was provided by user
- public virtual void check_needed_info () throws UnattendedInstallerError.SETUP_INCOMPLETE {
+ public override void check_needed_info () throws UnattendedInstallerError.SETUP_INCOMPLETE {
if (!express_toggle.active)
return;
diff --git a/src/wizard.vala b/src/wizard.vala
index a022b8b..dcb15f0 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -304,8 +304,7 @@ private class Boxes.Wizard: Boxes.UI {
if (vm_creator != null) {
try {
- if (vm_creator.install_media is UnattendedInstaller)
- (vm_creator.install_media as UnattendedInstaller).check_needed_info ();
+ vm_creator.install_media.check_needed_info ();
machine = yield vm_creator.create_vm (null);
} catch (IOError.CANCELLED cancel_error) { // We did this, so ignore!
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]