From 319178581b32533357051ba3c88fbd46e5e4129b Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Wed, 20 Jul 2011 13:13:52 +0100 Subject: [PATCH] Add ID constraint selection to the service selection implementation --- src/moonshot-window.vala | 10 +++++- webprovisioning/complex-test.msht | 68 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 webprovisioning/complex-test.msht diff --git a/src/moonshot-window.vala b/src/moonshot-window.vala index 5522953..9ae8806 100644 --- a/src/moonshot-window.vala +++ b/src/moonshot-window.vala @@ -527,7 +527,15 @@ class MainWindow : Window } if (candidates.length () > 1) - confirm = true; + { + if (has_nai && nai_provided != null) + { + identity = nai_provided; + confirm = false; + } + else + confirm = true; + } else identity = candidates.nth_data (0); diff --git a/webprovisioning/complex-test.msht b/webprovisioning/complex-test.msht new file mode 100644 index 0000000..3fe1ce8 --- /dev/null +++ b/webprovisioning/complex-test.msht @@ -0,0 +1,68 @@ + + + Unique Name + user1 + + foo.baz + + xmpp@jabber.project-moonshot.org + + + + PATTERN + true + + + + imap@*moonshot.org + false + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZ123455678910 + Foo + Bar + + ABCDEFGHIJKLMNOPQRSTUVWXYZ123455678910 + + + + Another Unique Name + user2 + + foo.bar + + email@project-moonshot.org + + + + *@project-moonshot.org + true + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZ123455678910 + Foo + Bar + + ABCDEFGHIJKLMNOPQRSTUVWXYZ123455678910 + + + + Yet Another Unique Name + user3 + + foo.com + + email@project-moonshot.org + + + ABCDEFGHIJKLMNOPQRSTUVWXYZ123455678910 + Foo + Bar + + ABCDEFGHIJKLMNOPQRSTUVWXYZ123455678910 + + + -- 2.1.4