[gnome-boxes] Allow Display::connect_it to throw errors
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Allow Display::connect_it to throw errors
- Date: Tue, 18 Sep 2012 11:03:42 +0000 (UTC)
commit 49cbb6fccab8e1614abc744e424e84f43347bc06
Author: Christophe Fergeau <cfergeau redhat com>
Date: Mon Sep 17 16:34:47 2012 +0200
Allow Display::connect_it to throw errors
It's only called from Machine::connect_display overrides from
where we want to be able to forward connection errors to the caller.
https://bugzilla.gnome.org/show_bug.cgi?id=684224
src/display.vala | 2 +-
src/spice-display.vala | 2 +-
src/vnc-display.vala | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/display.vala b/src/display.vala
index 7f75f35..d9a9436 100644
--- a/src/display.vala
+++ b/src/display.vala
@@ -20,7 +20,7 @@ private abstract class Boxes.Display: Boxes.DisplayProperties, Boxes.IProperties
public abstract Gdk.Pixbuf? get_pixbuf (int n) throws Boxes.Error;
public abstract void set_enable_inputs (Gtk.Widget widget, bool enable);
- public abstract void connect_it ();
+ public abstract void connect_it () throws GLib.Error;
public abstract void disconnect_it ();
public abstract List<Boxes.Property> get_properties (Boxes.PropertiesPage page);
diff --git a/src/spice-display.vala b/src/spice-display.vala
index df428b0..dbc8797 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -119,7 +119,7 @@ private class Boxes.SpiceDisplay: Boxes.Display, Boxes.IPropertiesProvider {
return display.get_pixbuf ();
}
- public override void connect_it () {
+ public override void connect_it () throws GLib.Error {
main_cleanup ();
// FIXME: vala does't want to put this in ctor..
diff --git a/src/vnc-display.vala b/src/vnc-display.vala
index 5fc7232..35b54de 100644
--- a/src/vnc-display.vala
+++ b/src/vnc-display.vala
@@ -111,7 +111,7 @@ private class Boxes.VncDisplay: Boxes.Display {
return display.get_pixbuf ();
}
- public override void connect_it () {
+ public override void connect_it () throws GLib.Error {
// FIXME: we ignore return value which seems to be inconsistent
display.set_credential (DisplayCredential.USERNAME, username);
display.set_credential (DisplayCredential.PASSWORD, password);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]