[gnome-boxes] installer: Drop now redundant async declarations
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] installer: Drop now redundant async declarations
- Date: Thu, 7 Mar 2013 17:51:27 +0000 (UTC)
commit 65b1f0dc680b295127cbde28793f37b18543af89
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Mar 7 19:19:57 2013 +0200
installer: Drop now redundant async declarations
Some of the methods no longer do any async stuff so no need for them to
be async. Declaring a sync method as async only complicates things for
caller for no benefit.
https://bugzilla.gnome.org/show_bug.cgi?id=695335
src/media-manager.vala | 10 +++++-----
src/unattended-installer.vala | 2 +-
src/wizard-source.vala | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/media-manager.vala b/src/media-manager.vala
index 1e9576d..902f1b3 100644
--- a/src/media-manager.vala
+++ b/src/media-manager.vala
@@ -27,7 +27,7 @@ private class Boxes.MediaManager : Object {
Cancellable? cancellable = null) throws
GLib.Error {
var media = yield new InstallerMedia.for_path (path, this, cancellable);
- return yield create_installer_media_from_media (media);
+ return create_installer_media_from_media (media);
}
public async InstallerMedia? create_installer_media_from_config (GVirConfig.Domain config) {
@@ -60,7 +60,7 @@ private class Boxes.MediaManager : Object {
return_val_if_fail (media != null, null);
try {
- media = yield create_installer_media_from_media (media);
+ media = create_installer_media_from_media (media);
} catch (GLib.Error error) {
debug ("%s", error.message); // We just failed to create more specific media instance, no biggie!
}
@@ -121,7 +121,7 @@ private class Boxes.MediaManager : Object {
return list;
}
- public async InstallerMedia create_installer_media_from_media (InstallerMedia media) throws GLib.Error {
+ public InstallerMedia create_installer_media_from_media (InstallerMedia media) throws GLib.Error {
if (media.os == null)
return media;
@@ -132,7 +132,7 @@ private class Boxes.MediaManager : Object {
InstallerMedia install_media;
if (install_scripts.get_length () > 0) {
- install_media = yield new UnattendedInstaller.from_media (media, install_scripts);
+ install_media = new UnattendedInstaller.from_media (media, install_scripts);
} else
install_media = media;
@@ -169,6 +169,6 @@ private class Boxes.MediaManager : Object {
var resources = os_db.get_resources_for_os (os, os_media.architecture);
var media = new InstallerMedia.from_iso_info (path, label, os, os_media, resources);
- return yield create_installer_media_from_media (media);
+ return create_installer_media_from_media (media);
}
}
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index 79ea62e..41c3bb8 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -99,7 +99,7 @@ private class Boxes.UnattendedInstaller: InstallerMedia {
}
}
- public async UnattendedInstaller.from_media (InstallerMedia media, InstallScriptList scripts) throws
GLib.Error {
+ public UnattendedInstaller.from_media (InstallerMedia media, InstallScriptList scripts) throws
GLib.Error {
os = media.os;
os_media = media.os_media;
label = media.label;
diff --git a/src/wizard-source.vala b/src/wizard-source.vala
index 10c784a..f331511 100644
--- a/src/wizard-source.vala
+++ b/src/wizard-source.vala
@@ -221,7 +221,7 @@ private class Boxes.WizardSource: GLib.Object {
private void add_media_entry (InstallerMedia media) {
var hbox = add_entry (media_vbox, () => {
- on_media_selected.begin (media);
+ on_media_selected (media);
return true;
}, 15, 5, media.device_file);
@@ -324,9 +324,9 @@ private class Boxes.WizardSource: GLib.Object {
return ret;
}
- private async void on_media_selected (InstallerMedia media) {
+ private void on_media_selected (InstallerMedia media) {
try {
- install_media = yield media_manager.create_installer_media_from_media (media);
+ install_media = media_manager.create_installer_media_from_media (media);
uri = media.device_file;
url_entry.activate ();
} catch (GLib.Error error) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]