[gnome-boxes/wip/feborges/rdp] wizard: Notify when unable to add RDP server
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/feborges/rdp] wizard: Notify when unable to add RDP server
- Date: Wed, 2 May 2018 13:54:22 +0000 (UTC)
commit 910a888faab9def1871053bd018a76d045dc3961
Author: Felipe Borges <felipeborges gnome org>
Date: Wed May 2 15:48:42 2018 +0200
wizard: Notify when unable to add RDP server
Whenever Boxes is compiled without RDP support (rdp=false build
option) and the user wants to add an rdp:// address, we present
an human-readable error message notifying that.
This is a counter measure because we want to advertise the RDP
support in the "Enter an URL" dialog, but the RDP support is
optional (build option).
data/ui/wizard-source.ui | 2 +-
src/wizard.vala | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/wizard-source.ui b/data/ui/wizard-source.ui
index b59fccfc..4167c602 100644
--- a/data/ui/wizard-source.ui
+++ b/data/ui/wizard-source.ui
@@ -348,7 +348,7 @@
<property name="max-width-chars">64</property>
<property name="halign">start</property>
<property name="xalign">0.0</property>
- <property name="label" translatable="yes">Enter an address for the box you want to add.
Addresses can be of installation images, SPICE and VNC servers, or oVirt or Libvirt brokers.</property>
+ <property name="label" translatable="yes">Enter an address for the box you want to add.
Addresses can be of installation images, SPICE, RDP and VNC servers, or oVirt or Libvirt brokers.</property>
</object>
<packing>
<property name="expand">True</property>
diff --git a/src/wizard.vala b/src/wizard.vala
index 0b83f95f..cb584b8a 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -363,9 +363,10 @@ private void prepare_for_uri (string uri_as_text, string? filename = null) throw
source.source_type = "spice";
} else if (uri.scheme == "vnc") {
// accept any vnc:// uri
- #if HAVE_RDP
} else if (uri.scheme == "rdp") {
// accept any rdp:// uri
+ #if !HAVE_RDP
+ throw new Boxes.Error.INVALID (_("Boxes was compiled without RDP support"));
#endif
} else if (uri.scheme.has_prefix ("qemu")) {
// accept any qemu..:// uri
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]