[seahorse] Fix issues building without pgp, ssh, or pkcs11 backends
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] Fix issues building without pgp, ssh, or pkcs11 backends
- Date: Wed, 26 Oct 2011 18:38:25 +0000 (UTC)
commit 0dfc94bc94f47a820424b4516be5844397e8973a
Author: Stef Walter <stefw collabora co uk>
Date: Wed Oct 26 20:35:36 2011 +0200
Fix issues building without pgp, ssh, or pkcs11 backends
libseahorse/seahorse-util.c | 4 +++-
pgp/seahorse-pgp.h | 7 +++----
pkcs11/seahorse-pkcs11.h | 4 ++--
src/seahorse-main.c | 8 ++++++++
ssh/seahorse-ssh.h | 7 +++----
5 files changed, 19 insertions(+), 11 deletions(-)
---
diff --git a/libseahorse/seahorse-util.c b/libseahorse/seahorse-util.c
index 86db6fa..f9ee911 100644
--- a/libseahorse/seahorse-util.c
+++ b/libseahorse/seahorse-util.c
@@ -578,10 +578,12 @@ seahorse_util_detect_mime_type (const gchar *mime)
return 0;
}
+#ifdef WITH_PGP
if (g_ascii_strcasecmp (mime, "application/pgp-encrypted") == 0 ||
g_ascii_strcasecmp (mime, "application/pgp-keys") == 0)
return SEAHORSE_PGP;
-
+#endif
+
#ifdef WITH_SSH
/* TODO: For now all PEM keys are treated as SSH keys */
else if (g_ascii_strcasecmp (mime, "application/x-ssh-key") == 0 ||
diff --git a/pgp/seahorse-pgp.h b/pgp/seahorse-pgp.h
index 3509aa4..383c361 100644
--- a/pgp/seahorse-pgp.h
+++ b/pgp/seahorse-pgp.h
@@ -29,16 +29,15 @@
G_BEGIN_DECLS
-#ifdef WITH_PGP
-
#define SEAHORSE_PGP_NAME "openpgp"
#define SEAHORSE_PGP_TYPE_STR SEAHORSE_PGP_NAME
#define SEAHORSE_PGP g_quark_from_string (SEAHORSE_PGP_NAME)
-#define SEAHORSE_PGP_STOCK_ICON "seahorse-key-personal"
+
+#ifdef WITH_PGP
void seahorse_pgp_backend_initialize (void);
-#endif /* WITH_PGP */
+#endif
G_END_DECLS
diff --git a/pkcs11/seahorse-pkcs11.h b/pkcs11/seahorse-pkcs11.h
index 9bfb0a4..fa37edc 100644
--- a/pkcs11/seahorse-pkcs11.h
+++ b/pkcs11/seahorse-pkcs11.h
@@ -22,14 +22,14 @@
#ifndef __SEAHORSE_PKCS11_H__
#define __SEAHORSE_PKCS11_H__
-#ifdef WITH_PKCS11
-
#include <glib.h>
#include <gcr/gcr.h>
#define SEAHORSE_PKCS11_NAME "pkcs11"
+#ifdef WITH_PKCS11
+
void seahorse_pkcs11_backend_initialize (void);
#endif /* WITH_PKCS11 */
diff --git a/src/seahorse-main.c b/src/seahorse-main.c
index 5cbf7cd..0b1ce73 100644
--- a/src/seahorse-main.c
+++ b/src/seahorse-main.c
@@ -73,7 +73,9 @@ main (int argc, char **argv)
if (show_version) {
g_print ("%s\n", PACKAGE_STRING);
+#ifdef WITH_PGP
g_print ("GNUPG: %s (%d.%d.%d)\n", GNUPG, GPG_MAJOR, GPG_MINOR, GPG_MICRO);
+#endif
exit (1);
}
@@ -85,9 +87,15 @@ main (int argc, char **argv)
context = seahorse_context_instance ();
/* Initialize the various components */
+#ifdef WITH_PGP
seahorse_pgp_backend_initialize ();
+#endif
+#ifdef WITH_SSH
seahorse_ssh_backend_initialize ();
+#endif
+#ifdef WITH_PKCS11
seahorse_pkcs11_backend_initialize ();
+#endif
seahorse_gkr_backend_initialize ();
swidget = seahorse_key_manager_show ();
diff --git a/ssh/seahorse-ssh.h b/ssh/seahorse-ssh.h
index 387b0cc..0d8a782 100644
--- a/ssh/seahorse-ssh.h
+++ b/ssh/seahorse-ssh.h
@@ -22,8 +22,6 @@
#ifndef __SEAHORSE_SSH_H__
#define __SEAHORSE_SSH_H__
-#ifdef WITH_SSH
-
#include <glib.h>
#include <glib-object.h>
@@ -31,8 +29,9 @@
#define SEAHORSE_SSH_NAME "openssh"
#define SEAHORSE_SSH_TYPE_STR SEAHORSE_SSH_NAME
-#define SEAHORSE_SSH (g_quark_from_static_string (SEAHORSE_PGP_NAME))
-#define SEAHORSE_SSH_STOCK_ICON "seahorse-key-ssh"
+#define SEAHORSE_SSH (g_quark_from_static_string (SEAHORSE_SSH_NAME))
+
+#ifdef WITH_SSH
void seahorse_ssh_backend_initialize (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]