aboutsummaryrefslogtreecommitdiff
path: root/gpgme-vala/src
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-03-11 12:13:06 +0100
committerfiaxh <git@mx.ax.lt>2017-03-11 12:22:55 +0100
commit47ab19b3a06b6f96965482e4a33d443c2276c1d8 (patch)
treef6616e248a92b707269eda6a396c94180687dc45 /gpgme-vala/src
parent7bb6ff6250e7bfc1f5d8ee4cc5d49c7aaf5ac435 (diff)
downloaddino-47ab19b3a06b6f96965482e4a33d443c2276c1d8.tar.gz
dino-47ab19b3a06b6f96965482e4a33d443c2276c1d8.zip
UI to choose PGP key/disabled in account settings
Diffstat (limited to 'gpgme-vala/src')
-rw-r--r--gpgme-vala/src/fix.c3
-rw-r--r--gpgme-vala/src/fix.h8
-rw-r--r--gpgme-vala/src/gpgme_fix.c12
-rw-r--r--gpgme-vala/src/gpgme_fix.h12
-rw-r--r--gpgme-vala/src/gpgme_helper.vala (renamed from gpgme-vala/src/gpgme-helper.vala)3
5 files changed, 25 insertions, 13 deletions
diff --git a/gpgme-vala/src/fix.c b/gpgme-vala/src/fix.c
deleted file mode 100644
index 76aff720..00000000
--- a/gpgme-vala/src/fix.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <fix.h>
-
-static GRecMutex gpgme_global_mutex = {0};
diff --git a/gpgme-vala/src/fix.h b/gpgme-vala/src/fix.h
deleted file mode 100644
index 15ecd3ac..00000000
--- a/gpgme-vala/src/fix.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef GPGME_FIX
-#define GPGME_FIX 1
-
-#include <glib.h>
-
-static GRecMutex gpgme_global_mutex;
-
-#endif \ No newline at end of file
diff --git a/gpgme-vala/src/gpgme_fix.c b/gpgme-vala/src/gpgme_fix.c
new file mode 100644
index 00000000..2bc139e9
--- /dev/null
+++ b/gpgme-vala/src/gpgme_fix.c
@@ -0,0 +1,12 @@
+#include <gpgme_fix.h>
+
+static GRecMutex gpgme_global_mutex = {0};
+
+gpgme_key_t gpgme_key_ref_vapi (gpgme_key_t key) {
+ gpgme_key_ref(key);
+ return key;
+}
+gpgme_key_t gpgme_key_unref_vapi (gpgme_key_t key) {
+ gpgme_key_unref(key);
+ return key;
+} \ No newline at end of file
diff --git a/gpgme-vala/src/gpgme_fix.h b/gpgme-vala/src/gpgme_fix.h
new file mode 100644
index 00000000..3daa7db0
--- /dev/null
+++ b/gpgme-vala/src/gpgme_fix.h
@@ -0,0 +1,12 @@
+#ifndef GPGME_FIX
+#define GPGME_FIX 1
+
+#include <glib.h>
+#include <gpgme.h>
+
+static GRecMutex gpgme_global_mutex;
+
+gpgme_key_t gpgme_key_ref_vapi (gpgme_key_t key);
+gpgme_key_t gpgme_key_unref_vapi (gpgme_key_t key);
+
+#endif \ No newline at end of file
diff --git a/gpgme-vala/src/gpgme-helper.vala b/gpgme-vala/src/gpgme_helper.vala
index d2f3f7e6..2a27ba3e 100644
--- a/gpgme-vala/src/gpgme-helper.vala
+++ b/gpgme-vala/src/gpgme_helper.vala
@@ -58,8 +58,7 @@ public static Gee.List<Key> get_keylist(string? pattern = null, bool secret_only
keys.add(key);
}
} catch (Error e) {
-// if (e.message != GPGError.ErrorCode.EOF.to_string()) throw e;
- if (e.message != "EOF") throw e;
+ if (e.code != GPGError.ErrorCode.EOF) throw e;
}
return keys;
}