[gnome-boxes] Coding style fixes to last commit (1411ba9)
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Coding style fixes to last commit (1411ba9)
- Date: Mon, 4 Mar 2013 21:20:58 +0000 (UTC)
commit 317aff9c52fb7add4eb83984cc5e304dd7f86c70
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Mar 4 19:50:26 2013 +0200
Coding style fixes to last commit (1411ba9)
Coding style fixes to 1411ba9 ("Don't pass GError::message directly to
got_error"). Mainly, code was exceeding 120 chars.
https://bugzilla.gnome.org/show_bug.cgi?id=695111
src/libvirt-machine-properties.vala | 14 ++++++++------
src/spice-display.vala | 14 ++++++++------
2 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 1c697e3..b9fb884 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -253,11 +253,13 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
label.set_text (get_utf8_basename (path));
empty = false;
} catch (GLib.Error e) {
- machine.got_error (_("Insertion of '%s' as a CD/DVD into '%s'
failed").printf (get_utf8_basename (path),
-
machine.domain.get_name ()));
+ var path_basename = get_utf8_basename (path);
+ machine.got_error (_("Insertion of '%s' as a CD/DVD " +
+ "into '%s' failed").printf (path_basename,
+ machine.name));
debug ("Error inserting '%s' as CD into '%s': %s",
- get_utf8_basename (path),
- machine.domain.get_name (),
+ path_basename,
+ machine.name,
e.message);
}
}
@@ -272,8 +274,8 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
button_label.set_text (_("Select"));
label.set_markup (Markup.printf_escaped ("<i>%s</i>", _("empty")));
} catch (GLib.Error e) {
- machine.got_error (_("Removal of CD/DVD from '%s' failed").printf
(machine.domain.get_name ()));
- debug ("Error ejecting CD from '%s': %s", machine.domain.get_name (),
e.message);
+ machine.got_error (_("Removal of CD/DVD from '%s' failed").printf
(machine.name));
+ debug ("Error ejecting CD from '%s': %s", machine.name, e.message);
}
}
});
diff --git a/src/spice-display.vala b/src/spice-display.vala
index 7e6a2f3..99c2f08 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -45,13 +45,14 @@ private class Boxes.SpiceDisplay: Boxes.Display {
try {
var manager = UsbDeviceManager.get (session);
manager.auto_connect_failed.connect ( (dev, err) => {
- got_error (_("Automatic redirection of USB device '%s' failed").printf
(dev.get_description ("%1$s %2$s")));
- debug ("Error auto-connecting %s: %s", dev.get_description ("%1$s %2$s"), err.message);
+ var device_description = dev.get_description ("%1$s %2$s");
+ got_error (_("Automatic redirection of USB device '%s' failed").printf (device_description));
+ debug ("Error auto-connecting %s: %s", device_description, err.message);
});
manager.device_error.connect ( (dev, err) => {
- got_error (_("Redirection of USB device '%s' failed").printf (dev.get_description ("%1$s
%2$s")));
- debug ("Error connecting %s: %s", dev.get_description ("%1$s %2$s"), err.message);
+ got_error (_("Redirection of USB device '%s' failed").printf (dev.get_description ("%1$s
%2$s")));
+ debug ("Error connecting %s: %s", dev.get_description ("%1$s %2$s"), err.message);
});
} catch (GLib.Error error) {
}
@@ -306,8 +307,9 @@ private class Boxes.SpiceDisplay: Boxes.Display {
manager.connect_device_async.end (res);
} catch (GLib.Error err) {
dev_toggle.active = false;
- got_error (_("Redirection of USB device '%s' failed").printf
(dev.get_description ("%1$s %2$s")));
- debug ("Error connecting %s: %s", dev.get_description ("%1$s
%2$s"), err.message);
+ var device_desc = dev.get_description ("%1$s %2$s");
+ got_error (_("Redirection of USB device '%s' failed").printf
(device_desc));
+ debug ("Error connecting %s: %s", device_desc, err.message);
}
});
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]