[gnome-boxes] More descriptive identifier names
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] More descriptive identifier names
- Date: Mon, 24 Oct 2011 20:43:47 +0000 (UTC)
commit 1522e430b5203a0f8d752155d924e48784498a31
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Oct 24 23:35:54 2011 +0300
More descriptive identifier names
src/app.vala | 18 +++++++++---------
src/collection.vala | 2 +-
src/machine.vala | 8 ++++----
src/main.vala | 12 ++++++------
src/util.vala | 10 +++++-----
5 files changed, 25 insertions(+), 25 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index f345fb0..9e52118 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -70,8 +70,8 @@ private class Boxes.App: Boxes.UI {
try {
yield connection.open_async (null);
connection.fetch_domains (null);
- } catch (GLib.Error e) {
- warning (e.message);
+ } catch (GLib.Error error) {
+ warning (error.message);
}
foreach (var domain in connection.get_domains ()) {
@@ -86,17 +86,17 @@ private class Boxes.App: Boxes.UI {
var dst = File.new_for_path (get_pkgconfig_source ("QEMU Session"));
try {
yield src.copy_async (dst, FileCopyFlags.NONE);
- } catch (GLib.Error e) {
- critical ("Can't setup default sources: %s", e.message);
+ } catch (GLib.Error error) {
+ critical ("Can't setup default sources: %s", error.message);
}
}
var dir = File.new_for_path (get_pkgconfig_source ());
try {
- var e = yield dir.enumerate_children_async (FILE_ATTRIBUTE_STANDARD_NAME,
- 0, Priority.DEFAULT);
+ var enumerator = yield dir.enumerate_children_async (FILE_ATTRIBUTE_STANDARD_NAME,
+ 0, Priority.DEFAULT);
while (true) {
- var files = yield e.next_files_async (10, Priority.DEFAULT);
+ var files = yield enumerator.next_files_async (10, Priority.DEFAULT);
if (files == null)
break;
foreach (var file in files) {
@@ -105,8 +105,8 @@ private class Boxes.App: Boxes.UI {
setup_libvirt (source.uri);
}
}
- } catch (GLib.Error e) {
- warning (e.message);
+ } catch (GLib.Error error) {
+ warning (error.message);
}
}
diff --git a/src/collection.vala b/src/collection.vala
index 206de8e..1138934 100644
--- a/src/collection.vala
+++ b/src/collection.vala
@@ -72,7 +72,7 @@ private class Boxes.CollectionSource: GLib.Object {
private string? get_string (string group, string key) {
try {
return keyfile.get_string (group, key);
- } catch (GLib.KeyFileError e) {
+ } catch (GLib.KeyFileError error) {
return null;
}
}
diff --git a/src/machine.vala b/src/machine.vala
index 541db2f..2c4b31d 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -139,8 +139,8 @@ private class Boxes.Machine: Boxes.CollectionItem {
});
try {
domain.resume ();
- } catch (GLib.Error e) {
- warning (e.message);
+ } catch (GLib.Error error) {
+ warning (error.message);
}
} else if (state != DomainState.RUNNING) {
started_id = domain.started.connect (() => {
@@ -150,8 +150,8 @@ private class Boxes.Machine: Boxes.CollectionItem {
});
try {
domain.start (0);
- } catch (GLib.Error e) {
- warning (e.message);
+ } catch (GLib.Error error) {
+ warning (error.message);
}
}
}
diff --git a/src/main.vala b/src/main.vala
index 01b0d0a..d8c7937 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -26,8 +26,8 @@ private static void parse_args (ref unowned string[] args) {
} catch (OptionError.BAD_VALUE err) {
GLib.stdout.printf (opt_context.get_help (true, null));
exit (1);
- } catch (OptionError e) {
- warning (e.message);
+ } catch (OptionError error) {
+ warning (error.message);
}
if (version) {
@@ -47,8 +47,8 @@ public void main (string[] args) {
try {
GVir.init_object_check (ref args);
- } catch (GLib.Error e) {
- error (e.message);
+ } catch (GLib.Error err) {
+ error (err.message);
}
Gtk.Window.set_default_icon_name ("gnome-boxes");
@@ -60,8 +60,8 @@ public void main (string[] args) {
Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (),
provider,
600);
- } catch (GLib.Error e) {
- warning (e.message);
+ } catch (GLib.Error error) {
+ warning (error.message);
}
new Boxes.App ();
diff --git a/src/util.vala b/src/util.vala
index fc5d5da..b73af2e 100644
--- a/src/util.vala
+++ b/src/util.vala
@@ -57,10 +57,10 @@ namespace Boxes {
try {
var file = GLib.File.new_for_path (dir);
file.make_directory_with_parents (null);
- } catch (GLib.Error e) {
- if (e is IOError.EXISTS)
+ } catch (GLib.Error error) {
+ if (error is IOError.EXISTS)
return;
- warning (e.message);
+ warning (error.message);
}
}
@@ -159,8 +159,8 @@ namespace Boxes {
try {
var regex = new GLib.Regex (old);
return regex.replace_literal (str, -1, 0, replacement);
- } catch (GLib.RegexError e) {
- critical (e.message);
+ } catch (GLib.RegexError error) {
+ critical (error.message);
return str;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]