[network-manager-openconnect/nm-0-9-8] auth-dialog: Add support for OC_FORM_OPT_IGNORE
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openconnect/nm-0-9-8] auth-dialog: Add support for OC_FORM_OPT_IGNORE
- Date: Wed, 19 Feb 2014 13:55:13 +0000 (UTC)
commit e2144cbd1b7f71c2fc57264f125ef298c60f22b7
Author: Kevin Cernekee <cernekee gmail com>
Date: Mon Dec 30 17:49:37 2013 -0800
auth-dialog: Add support for OC_FORM_OPT_IGNORE
Hide any options that libopenconnect doesn't want us to display.
auth-dialog/main.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index 4ab28cb..2174ea8 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -75,11 +75,13 @@
#define AUTHGROUP_OPT(form) (void *)(form)->authgroup_opt
#define AUTHGROUP_SELECTION(form) (form)->authgroup_selection
#define FORMCHOICE(sopt, i) ((sopt)->choices[i])
+#define IGNORE_OPT(opt) ((opt)->flags & OC_FORM_OPT_IGNORE)
#else
#define NEWGROUP_SUPPORTED 0
#define AUTHGROUP_OPT(form) NULL
#define AUTHGROUP_SELECTION(form) 0
#define FORMCHOICE(sopt, i) (&(sopt)->choices[i])
+#define IGNORE_OPT(opt) 0
#define OC_FORM_RESULT_ERR -1
#define OC_FORM_RESULT_OK 0
#define OC_FORM_RESULT_CANCELLED 1
@@ -704,7 +706,8 @@ static gboolean ui_form (struct oc_auth_form *form)
for (opt = form->opts; opt; opt = opt->next) {
ui_fragment_data *data;
- if (opt->type == OC_FORM_OPT_HIDDEN)
+ if (opt->type == OC_FORM_OPT_HIDDEN ||
+ IGNORE_OPT(opt))
continue;
data = g_slice_new0 (ui_fragment_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]