[seahorse] Split out libcryptui into its own module.
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] Split out libcryptui into its own module.
- Date: Mon, 25 Jul 2011 10:12:08 +0000 (UTC)
commit 010fbf3f6ae6548208599ca4b101d31d5eb90bf7
Author: Stef Walter <stefw collabora co uk>
Date: Wed Jul 20 19:28:07 2011 +0200
Split out libcryptui into its own module.
* And seahorse-daemon too.
* This is part of refacting seahorse to make it more manageable
and more focused on key management.
https://bugzilla.gnome.org/show_bug.cgi?id=655118
COPYING-LIBCRYPTUI | 482 --------
Makefile.am | 3 -
configure.ac | 95 --
daemon/.gitignore | 14 -
daemon/Makefile.am | 84 --
daemon/org.gnome.seahorse.service.in | 3 -
daemon/seahorse-daemon.1 | 100 --
daemon/seahorse-daemon.c | 310 -----
daemon/seahorse-daemon.h | 36 -
daemon/seahorse-dbus-server.c | 142 ---
daemon/seahorse-service-crypto.c | 894 ---------------
daemon/seahorse-service-crypto.xml | 76 --
daemon/seahorse-service-keyset.c | 516 ---------
daemon/seahorse-service-keyset.xml | 68 --
daemon/seahorse-service.c | 540 ---------
daemon/seahorse-service.h | 219 ----
daemon/seahorse-service.xml | 65 --
gkr/Makefile.am | 5 +-
gkr/seahorse-gkr-add-item.c | 2 +-
gkr/seahorse-gkr-add-keyring.c | 2 +-
gkr/seahorse-gkr-keyring-commands.c | 2 +-
libcryptui/.gitignore | 12 -
libcryptui/Makefile.am | 126 --
libcryptui/cryptui-defines.h | 36 -
libcryptui/cryptui-key-chooser.c | 650 -----------
libcryptui/cryptui-key-chooser.h | 88 --
libcryptui/cryptui-key-combo.c | 157 ---
libcryptui/cryptui-key-combo.h | 50 -
libcryptui/cryptui-key-list.c | 277 -----
libcryptui/cryptui-key-list.h | 64 -
libcryptui/cryptui-key-store.c | 1243 --------------------
libcryptui/cryptui-key-store.h | 138 ---
libcryptui/cryptui-keyset.c | 769 -------------
libcryptui/cryptui-keyset.h | 120 --
libcryptui/cryptui-marshal.list | 1 -
libcryptui/cryptui-priv.h | 64 -
libcryptui/cryptui.c | 477 --------
libcryptui/cryptui.h | 167 ---
libcryptui/cryptui.pc.in | 14 -
libcryptui/tests/.gitignore | 6 -
libcryptui/tests/Makefile.am | 19 -
libcryptui/tests/cryptui-test-ui.c | 134 ---
libegg/Makefile.am | 34 +-
libegg/eggdesktopfile.c | 1520 -------------------------
libegg/eggdesktopfile.h | 163 ---
libegg/eggsmclient-private.h | 59 -
libegg/eggsmclient-xsmp.c | 1368 ----------------------
libegg/eggsmclient.c | 589 ----------
libegg/eggsmclient.h | 117 --
libseahorse/Makefile.am | 12 +-
libseahorse/seahorse-combo-keys.c | 8 +-
libseahorse/seahorse-context.c | 200 +---
libseahorse/seahorse-context.h | 23 +-
libseahorse/seahorse-gconf.h | 7 +-
libseahorse/seahorse-libdialogs.h | 48 -
libseahorse/seahorse-notification.c | 607 ----------
libseahorse/seahorse-notify.xml | 75 --
libseahorse/seahorse-passphrase.c | 1 -
libseahorse/seahorse-set-model.c | 6 +-
libseahorse/seahorse-set.c | 66 +-
libseahorse/seahorse-set.h | 13 +-
libseahorse/seahorse-types.h | 22 +-
libseahorse/seahorse-validity.h | 15 +-
libseahorse/seahorse-xxx.c | 147 ---
libseahorse/seahorse-xxx.h | 55 -
pgp/Makefile.am | 5 +-
pgp/seahorse-gpgme-expires.c | 1 -
pgp/seahorse-gpgme-generate.c | 2 +-
pgp/seahorse-gpgme-key-op.c | 1 -
pgp/seahorse-gpgme-key.c | 8 +-
pgp/seahorse-gpgme-revoke.c | 1 -
pgp/seahorse-gpgme-source.c | 1 -
pgp/seahorse-signer.c | 1 -
pkcs11/Makefile.am | 3 -
po/POTFILES.in | 11 -
reference/Makefile.am | 3 +-
reference/libcryptui/.gitignore | 17 -
reference/libcryptui/Makefile.am | 61 -
reference/libcryptui/libcryptui-docs.sgml | 28 -
reference/libcryptui/libcryptui-sections.txt | 165 ---
reference/libcryptui/version.xml.in | 1 -
src/Makefile.am | 3 -
src/seahorse-key-manager.c | 6 +-
src/seahorse-main.c | 3 +-
src/seahorse-viewer.c | 2 +-
ssh/Makefile.am | 6 +-
ssh/seahorse-ssh-generate.c | 2 +-
87 files changed, 127 insertions(+), 13629 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 360f2d7..4467b78 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,6 @@ PGP_DIR =
endif
SUBDIRS = libegg \
- libcryptui \
common \
libseahorse \
gkr \
@@ -33,14 +32,12 @@ SUBDIRS = libegg \
data \
help \
pixmaps \
- daemon \
reference
EXTRA_DIST = \
AUTHORS \
COPYING \
COPYING-DOCS \
- COPYING-LIBCRYPTUI \
ChangeLog \
ChangeLog.pre-auto \
ChangeLog.pre-1.0 \
diff --git a/configure.ac b/configure.ac
index 1b6a075..9827da2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,17 +8,6 @@ dnl MAIN SEAHORSE VERSION (update after release)
AC_INIT(seahorse, 3.1.2)
dnl ****************************************************************************
-dnl LIBCRYPTUI libtool versioning
-dnl CURRENT : REVISION : AGE
-dnl +1 : 0 : +1 == new interface that does not break old one.
-dnl +1 : 0 : 0 == removed an interface. Breaks old apps.
-dnl ? : +1 : ? == internal changes that doesn't break anything.
-
-LIBCRYPTUI_CURRENT=0
-LIBCRYPTUI_REVISION=0
-LIBCRYPTUI_AGE=0
-
-dnl ****************************************************************************
AC_CONFIG_SRCDIR(src/seahorse-main.c)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
@@ -381,55 +370,6 @@ fi
AM_CONDITIONAL(WITH_SHARING, test "$enable_sharing" = "yes")
-
-dnl ****************************************************************************
-dnl DBUS
-dnl ****************************************************************************
-
-DBUS_GLIB_REQUIRED=0.35
-
-PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_GLIB_REQUIRED], [enable_dbus=yes],[enable_dbus=no])
-if test "$enable_dbus" = "no"; then
- AC_MSG_ERROR([dbus or dbus-glib-1 bindings not found.])
-fi
-
-AC_SUBST([DBUS_CFLAGS])
-AC_SUBST([DBUS_LIBS])
-
-AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool], [no])
-if test x$DBUS_BINDING_TOOL = "xno" ; then
- AC_MSG_ERROR([dbus-binding-tool executable not found in your path - should be installed with dbus glib bindings])
-fi
-
-SEAHORSE_CFLAGS="$SEAHORSE_CFLAGS $DBUS_CFLAGS"
-SEAHORSE_LIBS="$SEAHORSE_LIBS $DBUS_LIBS"
-
-dnl *******************
-dnl LIBNOTIFY
-dnl *******************
-
-LIBNOTIFY_REQUIRED=0.3
-
-# Allow libnotify to be disabled
-AC_ARG_ENABLE(libnotify,
- AC_HELP_STRING([--disable-libnotify],
- [Don't compile in libnotify support]))
-
-if test "x$enable_libnotify" = "xno"; then
- echo "disabling libnotify support"
-else
-
- PKG_CHECK_MODULES(LIBNOTIFY, [libnotify >= $LIBNOTIFY_REQUIRED],
- enable_libnotify=yes, enable_libnotify=no)
- if test "$enable_libnotify" = "yes"; then
-
- AC_DEFINE(HAVE_LIBNOTIFY, 1, [libnotify available])
-
- SEAHORSE_CFLAGS="$SEAHORSE_CFLAGS $LIBNOTIFY_CFLAGS"
- SEAHORSE_LIBS="$SEAHORSE_LIBS $LIBNOTIFY_LIBS"
- fi
-fi
-
dnl ****************************************************************************
dnl PKCS11
dnl ****************************************************************************
@@ -523,26 +463,6 @@ fi
AM_CONDITIONAL(WITH_TESTS, test "$enable_tests" = "yes")
-dnl ****************************************************************************
-dnl LIBCRYPTUI
-dnl ****************************************************************************
-
-LIBCRYPTUI_LT_RELEASE=$LIBCRYPTUI_CURRENT:$LIBCRYPTUI_REVISION:$LIBCRYPTUI_AGE
-AC_SUBST(LIBCRYPTUI_LT_RELEASE)
-
-LIBCRYPTUI_MAJOR=$LIBCRYPTUI_CURRENT.$LIBCRYPTUI_REVISION
-AC_SUBST(LIBCRYPTUI_MAJOR)
-
-PKG_CHECK_MODULES(LIBCRYPTUI, gtk+-3.0 >= $GTK_REQUIRED gconf-2.0)
-
-cryptuitargetlib=libcryptui.la
-AC_SUBST(cryptuitargetlib)
-
-LIBCRYPTUI_CFLAGS="$LIBCRYPTUI_CFLAGS $DBUS_CFLAGS"
-LIBCRYPTUI_LIBS="$LIBCRYPTUI_LIBS $DBUS_LIBS"
-AC_SUBST(LIBCRYPTUI_CFLAGS)
-AC_SUBST(LIBCRYPTUI_LIBS)
-
GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
@@ -554,12 +474,6 @@ AC_SUBST(PANGO_PREFIX)
AC_SUBST(CAIRO_PREFIX)
dnl ****************************************************************************
-dnl GObject Introspection
-dnl ****************************************************************************
-
-GOBJECT_INTROSPECTION_CHECK([0.6.4])
-
-dnl ****************************************************************************
AC_SUBST(SEAHORSE_CFLAGS)
AC_SUBST(SEAHORSE_LIBS)
@@ -595,12 +509,8 @@ dnl ****************************************************************************
AC_OUTPUT([
Makefile
-seahorse.spec
common/Makefile
gkr/Makefile
-libcryptui/cryptui.pc
-libcryptui/Makefile
-libcryptui/tests/Makefile
libegg/Makefile
libseahorse/Makefile
pgp/Makefile
@@ -616,10 +526,7 @@ pkcs11/Makefile
src/Makefile
src/seahorse.desktop.in
ssh/Makefile
-daemon/Makefile
reference/Makefile
-reference/libcryptui/Makefile
-reference/libcryptui/version.xml
reference/libseahorse/Makefile
reference/libseahorse/version.xml
])
@@ -638,6 +545,4 @@ Keyserver Support: $with_keyserver
LDAP: $with_ldap
HKP: $enable_hkp
Key Sharing: $enable_sharing
-Notification Support: $enable_libnotify
-Build introspection data: ${enable_introspection}
"
diff --git a/gkr/Makefile.am b/gkr/Makefile.am
index 5c3eb1c..73599b7 100644
--- a/gkr/Makefile.am
+++ b/gkr/Makefile.am
@@ -5,14 +5,12 @@ seahorselibexecbindir = $(libdir)/seahorse/
INCLUDES = -I$(top_builddir) \
-I$(top_srcdir) \
- -I$(top_srcdir)/libcryptui \
-I$(top_srcdir)/libseahorse \
$(SEAHORSE_CFLAGS) \
-DDATA_DIR=\""$(datadir)"\" \
-DSEAHORSE_UIDIR=\""$(uidir)"\" \
-DLOCALEDIR=\"$(localedir)\" \
-DEXECDIR=\""$(seahorselibexecbindir)"\" \
- -DLIBCRYPTUI_API_SUBJECT_TO_CHANGE \
-DGETTEXT_PACKAGE=\""seahorse\""
noinst_LTLIBRARIES = libseahorse-gkr.la
@@ -34,8 +32,7 @@ libseahorse_gkr_la_SOURCES = \
libseahorse_gkr_la_LIBADD = \
$(top_builddir)/libseahorse/libseahorse.la \
- $(top_builddir)/common/libseahorse-common.la \
- $(top_builddir)/libcryptui/libcryptui.la
+ $(top_builddir)/common/libseahorse-common.la
ui_DATA = \
seahorse-add-keyring.xml \
diff --git a/gkr/seahorse-gkr-add-item.c b/gkr/seahorse-gkr-add-item.c
index ff7bd07..182ed00 100644
--- a/gkr/seahorse-gkr-add-item.c
+++ b/gkr/seahorse-gkr-add-item.c
@@ -52,7 +52,7 @@ item_add_done (GnomeKeyringResult result, guint32 item, gpointer data)
* so for now we're just going to let any viewers listen in on this
* operation like so:
*/
- g_signal_emit_by_name (seahorse_context_for_app (), "refreshing", op);
+ g_signal_emit_by_name (seahorse_context_instance (), "refreshing", op);
g_object_unref (op);
/* Setting the default keyring failed */
diff --git a/gkr/seahorse-gkr-add-keyring.c b/gkr/seahorse-gkr-add-keyring.c
index 81b3c24..5cc3f8c 100644
--- a/gkr/seahorse-gkr-add-keyring.c
+++ b/gkr/seahorse-gkr-add-keyring.c
@@ -64,7 +64,7 @@ keyring_add_done (GnomeKeyringResult result, gpointer data)
* so for now we're just going to let any viewers listen in on this
* operation like so:
*/
- g_signal_emit_by_name (seahorse_context_for_app (), "refreshing", op);
+ g_signal_emit_by_name (seahorse_context_instance (), "refreshing", op);
g_object_unref (op);
/* Setting the default keyring failed */
diff --git a/gkr/seahorse-gkr-keyring-commands.c b/gkr/seahorse-gkr-keyring-commands.c
index cf7c5b7..3a3ce30 100644
--- a/gkr/seahorse-gkr-keyring-commands.c
+++ b/gkr/seahorse-gkr-keyring-commands.c
@@ -88,7 +88,7 @@ refresh_all_keyrings (SeahorseCommands *self)
* so for now we're just going to let any viewers listen in on this
* operation like so:
*/
- g_signal_emit_by_name (seahorse_context_for_app (), "refreshing", op);
+ g_signal_emit_by_name (seahorse_context_instance (), "refreshing", op);
seahorse_operation_watch (op, on_refresh_done, g_object_ref (self), NULL, NULL);
g_object_unref (op);
diff --git a/libegg/Makefile.am b/libegg/Makefile.am
index 7e08346..be85a96 100644
--- a/libegg/Makefile.am
+++ b/libegg/Makefile.am
@@ -1,6 +1,4 @@
-noinst_LTLIBRARIES = libeggdatetime.la \
- libeggsmclient.la \
- libeggdesktopfile.la
+noinst_LTLIBRARIES = libeggdatetime.la
libeggdatetime_la_INCLUDES = -DGTK_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
@@ -10,33 +8,3 @@ libeggdatetime_la_INCLUDES = -DGTK_DISABLE_DEPRECATED \
libeggdatetime_la_LIBADD = $(GTK_LIBS)
libeggdatetime_la_CFLAGS = $(GTK_CFLAGS)
libeggdatetime_la_SOURCES = egg-datetime.h egg-datetime.c
-
-libeggsmclient_la_INCLUDES = -DEGG_SM_CLIENT_BACKEND_XSMP \
- -DGTK_DISABLE_DEPRECATED \
- -DGDK_DISABLE_DEPRECATED \
- -DG_DISABLE_DEPRECATED \
- -DGETTEXT_PACKAGE=NULL \
- -DG_LOG_DOMAIN=\""EggSMClient"\"
-
-libeggsmclient_la_CFLAGS = $(EGG_CFLAGS) \
- $(EGG_SMCLIENT_CFLAGS)
-
-libeggsmclient_la_LIBADD = $(EGG_SMCLIENT_LIBS) \
- $(GTK_LIBS) \
- libeggdesktopfile.la -lSM -lICE
-libeggsmclient_la_SOURCES = eggsmclient.c \
- eggsmclient.h \
- eggsmclient-private.h \
- eggsmclient-xsmp.c \
- eggdesktopfile.c \
- eggdesktopfile.h
-
-libeggdesktopfile_la_INCLUDES = -DGTK_DISABLE_DEPRECATED \
- -DGDK_DISABLE_DEPRECATED \
- -DG_DISABLE_DEPRECATED \
- -DGETTEXT_PACKAGE=NULL
-libeggdesktopfile_la_CFLAGS = $(EGG_CFLAGS)
-libeggdesktopfile_la_LIBADD = $(EGG_LIBS)
-libeggdesktopfile_la_SOURCES = eggdesktopfile.c \
- eggdesktopfile.h
-
diff --git a/libseahorse/Makefile.am b/libseahorse/Makefile.am
index 825cb21..af67555 100644
--- a/libseahorse/Makefile.am
+++ b/libseahorse/Makefile.am
@@ -6,14 +6,12 @@ seahorselibexecbindir = $(libdir)/seahorse/
INCLUDES = -I$(top_builddir) \
-I$(top_srcdir) \
- -I$(top_srcdir)/libcryptui \
$(SEAHORSE_CFLAGS) \
-DDATA_DIR=\""$(datadir)"\" \
-DSEAHORSE_UIDIR=\""$(uidir)"\" \
-DLOCALEDIR=\"$(localedir)\" \
-DPIXMAPSDIR=\""$(pixmapsdir)"\" \
- -DEXECDIR=\""$(seahorselibexecbindir)"\" \
- -DLIBCRYPTUI_API_SUBJECT_TO_CHANGE
+ -DEXECDIR=\""$(seahorselibexecbindir)"\"
MARSHAL_SRCS = \
seahorse-marshal.c seahorse-marshal.h
@@ -37,8 +35,6 @@ libseahorse_la_SOURCES = \
seahorse-dns-sd.c seahorse-dns-sd.h \
seahorse-gconf.c seahorse-gconf.h \
seahorse-gtkstock.c seahorse-gtkstock.h \
- seahorse-libdialogs.h \
- seahorse-notification.c \
seahorse-object.c seahorse-object.h \
seahorse-object-model.c seahorse-object-model.h \
seahorse-object-widget.c seahorse-object-widget.h \
@@ -64,8 +60,7 @@ libseahorse_la_SOURCES = \
$(KEYSERVER_SRCS)
libseahorse_la_LIBADD = \
- $(top_builddir)/common/libseahorse-common.la \
- $(top_builddir)/libcryptui/libcryptui.la
+ $(top_builddir)/common/libseahorse-common.la
seahorse-marshal.h: seahorse-marshal.list $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) $< --header --prefix=seahorse_marshal > $@
@@ -77,8 +72,7 @@ seahorse-marshal.c: seahorse-marshal.list $(GLIB_GENMARSHAL)
ui_DATA = \
seahorse-prefs.xml \
seahorse-add-keyserver.xml \
- seahorse-progress.xml \
- seahorse-notify.xml
+ seahorse-progress.xml
EXTRA_DIST = $(ui_DATA) \
seahorse-marshal.list
diff --git a/libseahorse/seahorse-combo-keys.c b/libseahorse/seahorse-combo-keys.c
index 10f704e..fb269a4 100644
--- a/libseahorse/seahorse-combo-keys.c
+++ b/libseahorse/seahorse-combo-keys.c
@@ -55,13 +55,10 @@ object_added (SeahorseSet *skset, SeahorseObject *object, GtkComboBox *combo)
COMBO_STRING, userid,
COMBO_POINTER, object,
-1);
-
- seahorse_set_set_closure (skset, object, GINT_TO_POINTER (TRUE));
}
static void
-object_changed (SeahorseSet *skset, SeahorseObject *object,
- GtkWidget *closure, GtkComboBox *combo)
+object_changed (SeahorseSet *skset, SeahorseObject *object, GtkComboBox *combo)
{
GtkTreeModel *model;
GtkTreeIter iter;
@@ -96,8 +93,7 @@ object_changed (SeahorseSet *skset, SeahorseObject *object,
}
static void
-object_removed (SeahorseSet *skset, SeahorseObject *object,
- GtkWidget *closure, GtkComboBox *combo)
+object_removed (SeahorseSet *skset, SeahorseObject *object, GtkComboBox *combo)
{
GtkTreeModel *model;
GtkTreeIter iter;
diff --git a/libseahorse/seahorse-context.c b/libseahorse/seahorse-context.c
index 12c558b..04a033d 100644
--- a/libseahorse/seahorse-context.c
+++ b/libseahorse/seahorse-context.c
@@ -29,7 +29,6 @@
#include "seahorse-context.h"
#include "seahorse-dns-sd.h"
#include "seahorse-gconf.h"
-#include "seahorse-libdialogs.h"
#include "seahorse-marshal.h"
#include "seahorse-servers.h"
#include "seahorse-transfer-operation.h"
@@ -96,6 +95,27 @@ static void seahorse_context_finalize (GObject *gobject);
static void refresh_keyservers (GConfClient *client, guint id,
GConfEntry *entry, SeahorseContext *sctx);
+static void
+seahorse_context_constructed (GObject *obj)
+{
+ SeahorseContext *self = SEAHORSE_CONTEXT (obj);
+
+ G_OBJECT_CLASS(seahorse_context_parent_class)->constructed (obj);
+
+ /* DNS-SD discovery */
+ self->pv->discovery = seahorse_service_discovery_new ();
+
+ /* Automatically added remote key sources */
+ self->pv->auto_sources = g_hash_table_new_full (g_str_hash, g_str_equal,
+ g_free, NULL);
+
+ /* Listen for new gconf remote key sources automatically */
+ self->pv->notify_id = seahorse_gconf_notify (KEYSERVER_KEY,
+ (GConfClientNotifyFunc)refresh_keyservers, self);
+
+ refresh_keyservers (NULL, 0, NULL, self);
+
+}
/**
* klass: The class to initialise
*
@@ -109,10 +129,11 @@ seahorse_context_class_init (SeahorseContextClass *klass)
seahorse_context_parent_class = g_type_class_peek_parent (klass);
gobject_class = G_OBJECT_CLASS (klass);
-
+
+ gobject_class->constructed = seahorse_context_constructed;
gobject_class->dispose = seahorse_context_dispose;
- gobject_class->finalize = seahorse_context_finalize;
-
+ gobject_class->finalize = seahorse_context_finalize;
+
signals[ADDED] = g_signal_new ("added", SEAHORSE_TYPE_CONTEXT,
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (SeahorseContextClass, added),
NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, SEAHORSE_TYPE_OBJECT);
@@ -152,9 +173,6 @@ seahorse_context_init (SeahorseContext *sctx)
sctx->pv->objects_by_type = g_hash_table_new_full (g_direct_hash, g_direct_equal,
NULL, NULL);
-
- /* The context is explicitly destroyed */
- g_object_ref (sctx);
}
/**
@@ -258,61 +276,29 @@ seahorse_context_finalize (GObject *gobject)
}
/**
-* seahorse_context_for_app:
+* seahorse_context_instance:
*
* Returns: the application main context as #SeahorseContext
*/
SeahorseContext*
-seahorse_context_for_app (void)
+seahorse_context_instance (void)
{
g_return_val_if_fail (app_context != NULL, NULL);
return app_context;
}
/**
- * seahorse_context_new:
- * @flags: Flags define the type of the context to create.
+ * seahorse_context_instance:
*
- * Creates a new #SeahorseContext.
- * Flags:
- * SEAHORSE_CONTEXT_DAEMON: internal daemon flag will be set
- * SEAHORSE_CONTEXT_APP: will support DNS-SD discovery and remote key sources
+ * Gets the main seahorse context or returns a new one if none already exist.
*
- * Returns: The new context
+ * Returns: The context instance
*/
-SeahorseContext*
-seahorse_context_new (guint flags)
+void
+seahorse_context_create (void)
{
- SeahorseContext *sctx = g_object_new (SEAHORSE_TYPE_CONTEXT, NULL);
-
- if (flags & SEAHORSE_CONTEXT_DAEMON)
- sctx->is_daemon = TRUE;
-
- if (flags & SEAHORSE_CONTEXT_APP) {
-
- /* DNS-SD discovery */
- sctx->pv->discovery = seahorse_service_discovery_new ();
-
- /* Automatically added remote key sources */
- sctx->pv->auto_sources = g_hash_table_new_full (g_str_hash, g_str_equal,
- g_free, NULL);
-
- /* Listen for new gconf remote key sources automatically */
- sctx->pv->notify_id = seahorse_gconf_notify (KEYSERVER_KEY,
- (GConfClientNotifyFunc)refresh_keyservers, sctx);
-
- if (app_context)
- g_object_unref (app_context);
-
- g_object_ref (sctx);
- g_object_ref_sink (sctx);
- g_object_unref (sctx);
- app_context = sctx;
-
- refresh_keyservers (NULL, 0, NULL, sctx);
- }
-
- return sctx;
+ g_return_if_fail (app_context == NULL);
+ app_context = g_object_new (SEAHORSE_TYPE_CONTEXT, NULL);
}
/**
@@ -325,9 +311,10 @@ void
seahorse_context_destroy (SeahorseContext *sctx)
{
g_return_if_fail (SEAHORSE_IS_CONTEXT (sctx));
+ g_return_if_fail (sctx == app_context);
g_object_run_dispose (G_OBJECT (sctx));
- if (sctx == app_context)
- app_context = NULL;
+ g_object_unref (sctx);
+ app_context = NULL;
}
/**
@@ -364,7 +351,7 @@ seahorse_context_take_source (SeahorseContext *sctx, SeahorseSource *sksrc)
g_return_if_fail (SEAHORSE_IS_SOURCE (sksrc));
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_if_fail (SEAHORSE_IS_CONTEXT (sctx));
take_source (sctx, sksrc);
@@ -384,7 +371,7 @@ seahorse_context_add_source (SeahorseContext *sctx, SeahorseSource *sksrc)
g_return_if_fail (SEAHORSE_IS_SOURCE (sksrc));
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_if_fail (SEAHORSE_IS_CONTEXT (sctx));
if (take_source (sctx, sksrc))
@@ -407,7 +394,7 @@ seahorse_context_remove_source (SeahorseContext *sctx, SeahorseSource *sksrc)
g_return_if_fail (SEAHORSE_IS_SOURCE (sksrc));
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_if_fail (SEAHORSE_IS_CONTEXT (sctx));
if (!g_slist_find (sctx->pv->sources, sksrc))
@@ -441,7 +428,7 @@ seahorse_context_find_source (SeahorseContext *sctx, GQuark ktype,
GSList *l;
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (sctx), NULL);
for (l = sctx->pv->sources; l; l = g_slist_next (l)) {
@@ -487,7 +474,7 @@ seahorse_context_find_sources (SeahorseContext *sctx, GQuark ktype,
GSList *l;
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (sctx), NULL);
for (l = sctx->pv->sources; l; l = g_slist_next (l)) {
@@ -528,7 +515,7 @@ seahorse_context_remote_source (SeahorseContext *sctx, const gchar *uri)
g_return_val_if_fail (uri && *uri, NULL);
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (sctx), NULL);
for (l = sctx->pv->sources; l; l = g_slist_next (l)) {
@@ -684,7 +671,7 @@ void
seahorse_context_add_object (SeahorseContext *sctx, SeahorseObject *sobj)
{
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_if_fail (SEAHORSE_IS_CONTEXT (sctx));
g_object_ref (sobj);
@@ -705,7 +692,7 @@ seahorse_context_take_object (SeahorseContext *sctx, SeahorseObject *sobj)
gpointer ks;
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_if_fail (SEAHORSE_IS_CONTEXT (sctx));
g_return_if_fail (SEAHORSE_IS_OBJECT (sobj));
g_return_if_fail (seahorse_object_get_id (sobj) != 0);
@@ -738,7 +725,7 @@ guint
seahorse_context_get_count (SeahorseContext *sctx)
{
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (sctx), 0);
return g_hash_table_size (sctx->pv->objects_by_source);
}
@@ -760,7 +747,7 @@ seahorse_context_get_object (SeahorseContext *sctx, SeahorseSource *sksrc,
gconstpointer k;
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (sctx), NULL);
g_return_val_if_fail (SEAHORSE_IS_SOURCE (sksrc), NULL);
@@ -843,7 +830,7 @@ seahorse_context_find_objects_full (SeahorseContext *self, SeahorseObjectPredica
ObjectMatcher km;
if (!self)
- self = seahorse_context_for_app ();
+ self = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (self), NULL);
g_return_val_if_fail (pred, NULL);
@@ -874,7 +861,7 @@ seahorse_context_for_objects_full (SeahorseContext *self, SeahorseObjectPredicat
ObjectMatcher km;
if (!self)
- self = seahorse_context_for_app ();
+ self = seahorse_context_instance ();
g_return_if_fail (SEAHORSE_IS_CONTEXT (self));
g_return_if_fail (pred);
g_return_if_fail (func);
@@ -903,7 +890,7 @@ seahorse_context_get_objects (SeahorseContext *self, SeahorseSource *source)
SeahorseObjectPredicate pred;
if (!self)
- self = seahorse_context_for_app ();
+ self = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (self), NULL);
g_return_val_if_fail (source == NULL || SEAHORSE_IS_SOURCE (source), NULL);
@@ -930,7 +917,7 @@ seahorse_context_find_object (SeahorseContext *sctx, GQuark id, SeahorseLocation
SeahorseObject *sobj;
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (sctx), NULL);
sobj = (SeahorseObject*)g_hash_table_lookup (sctx->pv->objects_by_type, GUINT_TO_POINTER (id));
@@ -970,7 +957,7 @@ seahorse_context_find_objects (SeahorseContext *sctx, GQuark ktype,
memset (&pred, 0, sizeof (pred));
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (sctx), NULL);
pred.tag = ktype;
@@ -1000,22 +987,6 @@ verify_each_object (gpointer key, gpointer value, gpointer user_data)
}
/**
- * seahorse_context_verify_objects:
- * @self: A #SeahorseContext to verify
- *
- * Verifies each key in the given context.
- * An assertion handles failure.
- */
-void
-seahorse_context_verify_objects (SeahorseContext *self)
-{
- if (!self)
- self = seahorse_context_for_app ();
- g_return_if_fail (SEAHORSE_IS_CONTEXT (self));
- g_hash_table_foreach (self->pv->objects_by_source, verify_each_object, self);
-}
-
-/**
* seahorse_context_remove_object:
* @sctx: The #SeahorseContext (can be NULL)
* @sobj: The #SeahorseObject to remove
@@ -1029,7 +1000,7 @@ seahorse_context_remove_object (SeahorseContext *sctx, SeahorseObject *sobj)
gconstpointer k;
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_if_fail (SEAHORSE_IS_CONTEXT (sctx));
g_return_if_fail (SEAHORSE_IS_OBJECT (sobj));
g_return_if_fail (seahorse_object_get_id (sobj) != 0);
@@ -1070,7 +1041,7 @@ seahorse_context_get_default_key (SeahorseContext *sctx)
gchar *id;
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (sctx), NULL);
/* TODO: All of this needs to take multiple key types into account */
@@ -1100,7 +1071,7 @@ SeahorseServiceDiscovery*
seahorse_context_get_discovery (SeahorseContext *sctx)
{
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (sctx), NULL);
g_return_val_if_fail (sctx->pv->discovery != NULL, NULL);
@@ -1122,7 +1093,7 @@ seahorse_context_refresh_auto (SeahorseContext *sctx)
GSList *l;
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_if_fail (SEAHORSE_IS_CONTEXT (sctx));
if (!sctx->pv->refresh_ops)
@@ -1163,7 +1134,7 @@ seahorse_context_search_remote (SeahorseContext *sctx, const gchar *search)
gchar *uri;
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (sctx), NULL);
/* Get a list of all selected key servers */
@@ -1322,7 +1293,7 @@ seahorse_context_transfer_objects (SeahorseContext *sctx, GList *objects,
GQuark ktype;
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (sctx), NULL);
objects = g_list_copy (objects);
@@ -1415,7 +1386,7 @@ seahorse_context_retrieve_objects (SeahorseContext *sctx, GQuark ktype,
GSList *sources, *l;
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (sctx), NULL);
if (!to) {
@@ -1479,7 +1450,7 @@ seahorse_context_discover_objects (SeahorseContext *sctx, GQuark ktype,
GSList *l;
if (!sctx)
- sctx = seahorse_context_for_app ();
+ sctx = seahorse_context_instance ();
g_return_val_if_fail (SEAHORSE_IS_CONTEXT (sctx), NULL);
/* Check all the ids */
@@ -1558,57 +1529,6 @@ seahorse_context_discover_objects (SeahorseContext *sctx, GQuark ktype,
}
/**
- * seahorse_context_object_from_dbus:
- * @sctx: A #SeahorseContext
- * @key: the string id of the object to get
- *
- * Finds an object basing on the @key
- *
- * Returns: The #SeahorseObject found. NULL on not found.
- */
-SeahorseObject*
-seahorse_context_object_from_dbus (SeahorseContext *sctx, const gchar *key)
-{
- SeahorseObject *sobj;
-
- /* This will always get the most preferred key */
- sobj = seahorse_context_find_object (sctx, g_quark_from_string (key),
- SEAHORSE_LOCATION_INVALID);
-
- return sobj;
-}
-
-/**
- * seahorse_context_object_to_dbus:
- * @sctx: A seahorse context
- * @sobj: the object
- *
- * Translates an object to a string id
- *
- * Returns: The string id of the object. Free with #g_free
- */
-gchar*
-seahorse_context_object_to_dbus (SeahorseContext *sctx, SeahorseObject *sobj)
-{
- return seahorse_context_id_to_dbus (sctx, seahorse_object_get_id (sobj));
-}
-
-/**
- * seahorse_context_id_to_dbus:
- * @sctx: ignored
- * @id: the id to translate
- *
- * Translates an id to a dbus compatible string
- *
- * Returns: A string, free with #g_free
- */
-gchar*
-seahorse_context_id_to_dbus (SeahorseContext* sctx, GQuark id)
-{
- return g_strdup (g_quark_to_string (id));
-}
-
-/**
* seahorse_context_canonize_id:
* @ktype: a keytype defining the canonization function
* @id: The id to canonize
diff --git a/libseahorse/seahorse-context.h b/libseahorse/seahorse-context.h
index 832eff4..76a3f07 100644
--- a/libseahorse/seahorse-context.h
+++ b/libseahorse/seahorse-context.h
@@ -95,20 +95,15 @@ struct _SeahorseContextClass {
void (*destroy) (SeahorseContext *sctx);
};
-enum SeahorseContextType {
- SEAHORSE_CONTEXT_APP = 1,
- SEAHORSE_CONTEXT_DAEMON = 2,
-};
-
typedef void (*SeahorseObjectFunc) (struct _SeahorseObject *obj, gpointer user_data);
-#define SCTX_APP() (seahorse_context_for_app ())
+#define SCTX_APP() (seahorse_context_instance ())
GType seahorse_context_get_type (void);
-SeahorseContext* seahorse_context_for_app (void);
+SeahorseContext* seahorse_context_instance (void);
-SeahorseContext* seahorse_context_new (guint flags);
+void seahorse_context_create (void);
void seahorse_context_destroy (SeahorseContext *sctx);
@@ -167,8 +162,6 @@ void seahorse_context_for_objects_full (SeahorseContext *self,
SeahorseObjectFunc func,
gpointer user_data);
-void seahorse_context_verify_objects (SeahorseContext *self);
-
void seahorse_context_remove_object (SeahorseContext *sctx,
struct _SeahorseObject *sobj);
@@ -196,16 +189,6 @@ GList* seahorse_context_discover_objects (SeahorseContext *sct
GQuark ktype,
GSList *ids);
-struct _SeahorseObject* seahorse_context_object_from_dbus (SeahorseContext *sctx,
- const gchar *dbusid);
-
-gchar* seahorse_context_object_to_dbus (SeahorseContext *sctx,
- struct _SeahorseObject *sobj);
-
-gchar* seahorse_context_id_to_dbus (SeahorseContext *sctx,
- GQuark id);
-
-
typedef GQuark (*SeahorseCanonizeFunc) (const gchar *id);
GQuark seahorse_context_canonize_id (GQuark ktype, const gchar *id);
diff --git a/libseahorse/seahorse-gconf.h b/libseahorse/seahorse-gconf.h
index 516cf92..26a787b 100644
--- a/libseahorse/seahorse-gconf.h
+++ b/libseahorse/seahorse-gconf.h
@@ -28,7 +28,12 @@
#include <gconf/gconf-client.h>
#include <gtk/gtk.h>
-#include "cryptui-defines.h"
+
+#define SEAHORSE_DESKTOP_KEYS "/desktop/pgp"
+#define SEAHORSE_DEFAULT_KEY SEAHORSE_DESKTOP_KEYS "/default_key"
+#define SEAHORSE_LASTSIGNER_KEY SEAHORSE_DESKTOP_KEYS "/last_signer"
+#define SEAHORSE_ENCRYPTSELF_KEY SEAHORSE_DESKTOP_KEYS "/encrypt_to_self"
+#define SEAHORSE_RECIPIENTS_SORT_KEY SEAHORSE_DESKTOP_KEYS "/recipients/sort_by"
#define ENCRYPTSELF_KEY SEAHORSE_DESKTOP_KEYS "/encrypt_to_self"
#define MULTI_EXTENSION_KEY SEAHORSE_DESKTOP_KEYS "/package_extension"
diff --git a/libseahorse/seahorse-passphrase.c b/libseahorse/seahorse-passphrase.c
index 9bbdf1c..ea84c90 100644
--- a/libseahorse/seahorse-passphrase.c
+++ b/libseahorse/seahorse-passphrase.c
@@ -45,7 +45,6 @@
#include <gdk/gdkkeysyms.h>
#include <gdk/gdkkeysyms-compat.h>
-#include "seahorse-libdialogs.h"
#include "seahorse-widget.h"
#include "seahorse-util.h"
#include "seahorse-passphrase.h"
diff --git a/libseahorse/seahorse-set-model.c b/libseahorse/seahorse-set-model.c
index b0409ff..54ae425 100644
--- a/libseahorse/seahorse-set-model.c
+++ b/libseahorse/seahorse-set-model.c
@@ -317,8 +317,7 @@ find_node_in_set (GNode *node, gpointer user_data)
}
static void
-set_removed (SeahorseSet *set, SeahorseObject *sobj, gpointer closure,
- SeahorseSetModel *smodel)
+set_removed (SeahorseSet *set, SeahorseObject *sobj, SeahorseSetModel *smodel)
{
SeahorseSetModelPrivate *pv = SEAHORSE_SET_MODEL_GET_PRIVATE (smodel);
find_node_in_set_args args = { set, FALSE };
@@ -342,8 +341,7 @@ set_removed (SeahorseSet *set, SeahorseObject *sobj, gpointer closure,
}
static void
-set_changed (SeahorseSet *set, SeahorseObject *sobj,
- gpointer closure, SeahorseSetModel *smodel)
+set_changed (SeahorseSet *set, SeahorseObject *sobj, SeahorseSetModel *smodel)
{
SeahorseSetModelPrivate *pv = SEAHORSE_SET_MODEL_GET_PRIVATE (smodel);
GtkTreeIter iter;
diff --git a/libseahorse/seahorse-set.c b/libseahorse/seahorse-set.c
index a6d325a..c714744 100644
--- a/libseahorse/seahorse-set.c
+++ b/libseahorse/seahorse-set.c
@@ -50,24 +50,18 @@ G_DEFINE_TYPE (SeahorseSet, seahorse_set, G_TYPE_OBJECT);
*/
static gboolean
-remove_update (SeahorseObject *sobj, gpointer closure, SeahorseSet *skset)
+remove_update (SeahorseObject *sobj, SeahorseSet *skset)
{
- if (closure == GINT_TO_POINTER (TRUE))
- closure = NULL;
-
- g_signal_emit (skset, signals[REMOVED], 0, sobj, closure);
+ g_signal_emit (skset, signals[REMOVED], 0, sobj);
g_signal_emit (skset, signals[SET_CHANGED], 0);
return TRUE;
}
static void
-remove_object (SeahorseObject *sobj, gpointer closure, SeahorseSet *skset)
+remove_object (SeahorseObject *sobj, SeahorseSet *skset)
{
- if (!closure)
- closure = g_hash_table_lookup (skset->pv->objects, sobj);
-
g_hash_table_remove (skset->pv->objects, sobj);
- remove_update (sobj, closure, skset);
+ remove_update (sobj, skset);
}
static gboolean
@@ -97,7 +91,7 @@ maybe_remove_object (SeahorseSet *skset, SeahorseObject *sobj)
if (skset->pv->pred && seahorse_object_predicate_match (skset->pv->pred, sobj))
return FALSE;
- remove_object (sobj, NULL, skset);
+ remove_object (sobj, skset);
return TRUE;
}
@@ -117,28 +111,21 @@ object_removed (SeahorseContext *sctx, SeahorseObject *sobj, SeahorseSet *skset)
g_assert (SEAHORSE_IS_SET (skset));
if (g_hash_table_lookup (skset->pv->objects, sobj))
- remove_object (sobj, NULL, skset);
+ remove_object (sobj, skset);
}
static void
object_changed (SeahorseContext *sctx, SeahorseObject *sobj, SeahorseSet *skset)
{
- gpointer closure = g_hash_table_lookup (skset->pv->objects, sobj);
-
g_assert (SEAHORSE_IS_OBJECT (sobj));
g_assert (SEAHORSE_IS_SET (skset));
- if (closure) {
-
+ if (g_hash_table_lookup (skset->pv->objects, sobj)) {
+
/* See if needs to be removed, otherwise emit signal */
- if (!maybe_remove_object (skset, sobj)) {
-
- if (closure == GINT_TO_POINTER (TRUE))
- closure = NULL;
-
- g_signal_emit (skset, signals[CHANGED], 0, sobj, closure);
- }
-
+ if (!maybe_remove_object (skset, sobj))
+ g_signal_emit (skset, signals[CHANGED], 0, sobj);
+
/* Not in our set yet */
} else
maybe_add_object (skset, sobj);
@@ -251,11 +238,11 @@ seahorse_set_class_init (SeahorseSetClass *klass)
signals[REMOVED] = g_signal_new ("removed", SEAHORSE_TYPE_SET,
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (SeahorseSetClass, removed),
- NULL, NULL, seahorse_marshal_VOID__OBJECT_POINTER, G_TYPE_NONE, 2, SEAHORSE_TYPE_OBJECT, G_TYPE_POINTER);
+ NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, SEAHORSE_TYPE_OBJECT);
signals[CHANGED] = g_signal_new ("changed", SEAHORSE_TYPE_SET,
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (SeahorseSetClass, changed),
- NULL, NULL, seahorse_marshal_VOID__OBJECT_POINTER, G_TYPE_NONE, 2, SEAHORSE_TYPE_OBJECT, G_TYPE_POINTER);
+ NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, SEAHORSE_TYPE_OBJECT);
signals[SET_CHANGED] = g_signal_new ("set-changed", SEAHORSE_TYPE_SET,
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (SeahorseSetClass, set_changed),
@@ -349,30 +336,3 @@ seahorse_set_refresh (SeahorseSet *skset)
g_hash_table_foreach (check, (GHFunc)remove_object, skset);
g_hash_table_destroy (check);
}
-
-gpointer
-seahorse_set_get_closure (SeahorseSet *skset, SeahorseObject *sobj)
-{
- gpointer closure = g_hash_table_lookup (skset->pv->objects, sobj);
- g_return_val_if_fail (closure != NULL, NULL);
-
- /* |TRUE| means no closure has been set */
- if (closure == GINT_TO_POINTER (TRUE))
- return NULL;
-
- return closure;
-}
-
-void
-seahorse_set_set_closure (SeahorseSet *skset, SeahorseObject *sobj,
- gpointer closure)
-{
- /* Make sure we have the object */
- g_return_if_fail (g_hash_table_lookup (skset->pv->objects, sobj) != NULL);
-
- /* |TRUE| means no closure has been set */
- if (closure == NULL)
- closure = GINT_TO_POINTER (TRUE);
-
- g_hash_table_insert (skset->pv->objects, sobj, closure);
-}
diff --git a/libseahorse/seahorse-set.h b/libseahorse/seahorse-set.h
index 3ab2b99..2f1b4e1 100644
--- a/libseahorse/seahorse-set.h
+++ b/libseahorse/seahorse-set.h
@@ -50,8 +50,6 @@ typedef struct _SeahorseSetPrivate SeahorseSetPrivate;
* - Uses a SeahorseObjectPredicate to match keys.
* - Sends out events when keys get added and removed from it's view. Or a
* key in the view changes etc...
- * - Supports per key event 'closures'. When a closure is set for a key, it's
- * then passed as an argument to the 'changed' and 'removed' events.
*
* Signals:
* added: A key was added to this keyset.
@@ -80,10 +78,10 @@ struct _SeahorseSetClass {
void (*added) (SeahorseSet *skset, SeahorseObject *sobj);
/* Removed a key from this view */
- void (*removed) (SeahorseSet *skset, SeahorseObject *sobj, gpointer closure);
+ void (*removed) (SeahorseSet *skset, SeahorseObject *sobj);
/* One of the key's attributes has changed */
- void (*changed) (SeahorseSet *skset, SeahorseObject *sobj, gpointer closure);
+ void (*changed) (SeahorseSet *skset, SeahorseObject *sobj);
/* The set of keys changed */
void (*set_changed) (SeahorseSet *skset);
@@ -108,11 +106,4 @@ guint seahorse_set_get_count (SeahorseSet *skset);
void seahorse_set_refresh (SeahorseSet *skset);
-gpointer seahorse_set_get_closure (SeahorseSet *skset,
- SeahorseObject *sobj);
-
-void seahorse_set_set_closure (SeahorseSet *skset,
- SeahorseObject *sobj,
- gpointer closure);
-
#endif /* __SEAHORSE_SET_H__ */
diff --git a/libseahorse/seahorse-types.h b/libseahorse/seahorse-types.h
index d6e63e4..a8e3c85 100644
--- a/libseahorse/seahorse-types.h
+++ b/libseahorse/seahorse-types.h
@@ -25,8 +25,6 @@
#include <glib.h>
#include <glib-object.h>
-#include "libcryptui/cryptui.h"
-
G_BEGIN_DECLS
@@ -35,7 +33,7 @@ G_BEGIN_DECLS
#define SEAHORSE_TYPE_USAGE (seahorse_usage_get_type ())
/*
- * These types should never change. These values are exported via DBUS. In the
+ * These types should never change. These values are exported. In the
* case of a key being in multiple locations, the highest location always 'wins'.
*/
typedef enum {
@@ -62,15 +60,15 @@ typedef enum {
GType seahorse_usage_get_type (void);
typedef enum {
- SEAHORSE_FLAG_IS_VALID = CRYPTUI_FLAG_IS_VALID,
- SEAHORSE_FLAG_CAN_ENCRYPT = CRYPTUI_FLAG_CAN_ENCRYPT,
- SEAHORSE_FLAG_CAN_SIGN = CRYPTUI_FLAG_CAN_SIGN,
- SEAHORSE_FLAG_EXPIRED = CRYPTUI_FLAG_EXPIRED,
- SEAHORSE_FLAG_REVOKED = CRYPTUI_FLAG_REVOKED,
- SEAHORSE_FLAG_DISABLED = CRYPTUI_FLAG_DISABLED,
- SEAHORSE_FLAG_TRUSTED = CRYPTUI_FLAG_TRUSTED,
- SEAHORSE_FLAG_EXPORTABLE = CRYPTUI_FLAG_EXPORTABLE,
- SEAHORSE_FLAG_DELETABLE = 0x10000000
+ SEAHORSE_FLAG_IS_VALID = 0x00000001,
+ SEAHORSE_FLAG_CAN_ENCRYPT = 0x00000002,
+ SEAHORSE_FLAG_CAN_SIGN = 0x00000004,
+ SEAHORSE_FLAG_EXPIRED = 0x00000100,
+ SEAHORSE_FLAG_REVOKED = 0x00000200,
+ SEAHORSE_FLAG_DISABLED = 0x00000400,
+ SEAHORSE_FLAG_TRUSTED = 0x00001000,
+ SEAHORSE_FLAG_EXPORTABLE = 0x00100000,
+ SEAHORSE_FLAG_DELETABLE = 0x10000000
} SeahorseKeyFlags;
#define SEAHORSE_TAG_INVALID 0
diff --git a/libseahorse/seahorse-validity.h b/libseahorse/seahorse-validity.h
index 4582dbb..1ecd965 100644
--- a/libseahorse/seahorse-validity.h
+++ b/libseahorse/seahorse-validity.h
@@ -27,16 +27,15 @@
#define __SEAHORSE_VALIDITY_H__
#include <gtk/gtk.h>
-#include "cryptui.h"
typedef enum {
- SEAHORSE_VALIDITY_REVOKED = CRYPTUI_VALIDITY_REVOKED,
- SEAHORSE_VALIDITY_DISABLED = CRYPTUI_VALIDITY_DISABLED,
- SEAHORSE_VALIDITY_NEVER = CRYPTUI_VALIDITY_NEVER,
- SEAHORSE_VALIDITY_UNKNOWN = CRYPTUI_VALIDITY_UNKNOWN,
- SEAHORSE_VALIDITY_MARGINAL = CRYPTUI_VALIDITY_MARGINAL,
- SEAHORSE_VALIDITY_FULL = CRYPTUI_VALIDITY_FULL,
- SEAHORSE_VALIDITY_ULTIMATE = CRYPTUI_VALIDITY_ULTIMATE
+ SEAHORSE_VALIDITY_REVOKED = -3,
+ SEAHORSE_VALIDITY_DISABLED = -2,
+ SEAHORSE_VALIDITY_NEVER = -1,
+ SEAHORSE_VALIDITY_UNKNOWN = 0,
+ SEAHORSE_VALIDITY_MARGINAL = 1,
+ SEAHORSE_VALIDITY_FULL = 5,
+ SEAHORSE_VALIDITY_ULTIMATE = 10
} SeahorseValidity;
const gchar* seahorse_validity_get_string (SeahorseValidity validity);
diff --git a/pgp/Makefile.am b/pgp/Makefile.am
index a8dac98..0837e8b 100644
--- a/pgp/Makefile.am
+++ b/pgp/Makefile.am
@@ -6,7 +6,6 @@ seahorselibexecbindir = $(libdir)/seahorse/
INCLUDES = -I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_srcdir)/libegg \
- -I$(top_srcdir)/libcryptui \
-I$(top_srcdir)/libseahorse \
$(SEAHORSE_CFLAGS) \
-DDATA_DIR=\""$(datadir)"\" \
@@ -14,7 +13,6 @@ INCLUDES = -I$(top_builddir) \
-DLOCALEDIR=\"$(localedir)\" \
-DEXECDIR=\""$(seahorselibexecbindir)"\" \
-DLDAP_DEPRECATED \
- -DLIBCRYPTUI_API_SUBJECT_TO_CHANGE \
-DGETTEXT_PACKAGE=\""seahorse\""
noinst_LTLIBRARIES = libseahorse-pgp.la
@@ -75,8 +73,7 @@ libseahorse_pgp_la_SOURCES = \
libseahorse_pgp_la_LIBADD = \
$(top_builddir)/libseahorse/libseahorse.la \
- $(top_builddir)/common/libseahorse-common.la \
- $(top_builddir)/libcryptui/libcryptui.la
+ $(top_builddir)/common/libseahorse-common.la
seahorselibexecbin_PROGRAMS = xloadimage
diff --git a/pgp/seahorse-gpgme-expires.c b/pgp/seahorse-gpgme-expires.c
index 8b16a7c..51f42eb 100644
--- a/pgp/seahorse-gpgme-expires.c
+++ b/pgp/seahorse-gpgme-expires.c
@@ -26,7 +26,6 @@
#include <glib/gi18n.h>
#include "seahorse-object-widget.h"
-#include "seahorse-libdialogs.h"
#include "seahorse-util.h"
#include "seahorse-gpgme-dialogs.h"
diff --git a/pgp/seahorse-gpgme-generate.c b/pgp/seahorse-gpgme-generate.c
index b1977cb..95beb7b 100644
--- a/pgp/seahorse-gpgme-generate.c
+++ b/pgp/seahorse-gpgme-generate.c
@@ -69,7 +69,7 @@ on_pgp_generate_key (GtkAction *action, gpointer unused)
g_return_if_fail (GTK_IS_ACTION (action));
- sksrc = seahorse_context_find_source (seahorse_context_for_app (), SEAHORSE_PGP_TYPE, SEAHORSE_LOCATION_LOCAL);
+ sksrc = seahorse_context_find_source (seahorse_context_instance (), SEAHORSE_PGP_TYPE, SEAHORSE_LOCATION_LOCAL);
g_return_if_fail (sksrc != NULL);
seahorse_gpgme_generate_show (SEAHORSE_GPGME_SOURCE (sksrc), NULL, NULL, NULL, NULL);
diff --git a/pgp/seahorse-gpgme-key-op.c b/pgp/seahorse-gpgme-key-op.c
index 0c41f9c..2cfdb33 100644
--- a/pgp/seahorse-gpgme-key-op.c
+++ b/pgp/seahorse-gpgme-key-op.c
@@ -32,7 +32,6 @@
#include <glib/gi18n.h>
#include "seahorse-util.h"
-#include "seahorse-libdialogs.h"
#include "common/seahorse-object-list.h"
diff --git a/pgp/seahorse-gpgme-key.c b/pgp/seahorse-gpgme-key.c
index 3b74567..e9bba72 100644
--- a/pgp/seahorse-gpgme-key.c
+++ b/pgp/seahorse-gpgme-key.c
@@ -416,15 +416,15 @@ seahorse_gpgme_key_set_uids (SeahorsePgpKey *base, GList *uids)
/* Remove the parent on each old one */
for (l = self->pv->uids; l; l = g_list_next (l))
- seahorse_context_remove_object (seahorse_context_for_app (), l->data);
+ seahorse_context_remove_object (seahorse_context_instance (), l->data);
/* Keep our own copy of the UID list */
seahorse_object_list_free (self->pv->uids);
self->pv->uids = seahorse_object_list_copy (uids);
- /* Add UIDS to context so that they show up in libcryptui */
+ /* Add UIDS to context so that they show up */
for (l = self->pv->uids; l; l = g_list_next (l))
- seahorse_context_add_object (seahorse_context_for_app (), l->data);
+ seahorse_context_add_object (seahorse_context_instance (), l->data);
renumber_actual_uids (self);
}
@@ -507,7 +507,7 @@ seahorse_gpgme_key_object_dispose (GObject *obj)
/* Remove the attached UIDs */
for (l = self->pv->uids; l; l = g_list_next (l))
- seahorse_context_remove_object (seahorse_context_for_app (), l->data);
+ seahorse_context_remove_object (seahorse_context_instance (), l->data);
if (self->pv->pubkey)
gpgme_key_unref (self->pv->pubkey);
diff --git a/pgp/seahorse-gpgme-revoke.c b/pgp/seahorse-gpgme-revoke.c
index 7217bb0..ca60f74 100644
--- a/pgp/seahorse-gpgme-revoke.c
+++ b/pgp/seahorse-gpgme-revoke.c
@@ -26,7 +26,6 @@
#include <glib/gi18n.h>
#include "seahorse-object-widget.h"
-#include "seahorse-libdialogs.h"
#include "seahorse-util.h"
#include "seahorse-gpgme-dialogs.h"
diff --git a/pgp/seahorse-gpgme-source.c b/pgp/seahorse-gpgme-source.c
index a1554ff..b8d1a44 100644
--- a/pgp/seahorse-gpgme-source.c
+++ b/pgp/seahorse-gpgme-source.c
@@ -34,7 +34,6 @@
#include "seahorse-operation.h"
#include "seahorse-util.h"
-#include "seahorse-libdialogs.h"
#include "seahorse-passphrase.h"
#include "common/seahorse-registry.h"
diff --git a/pgp/seahorse-signer.c b/pgp/seahorse-signer.c
index 2bc706c..1b575ee 100755
--- a/pgp/seahorse-signer.c
+++ b/pgp/seahorse-signer.c
@@ -27,7 +27,6 @@
#include "seahorse-operation.h"
#include "seahorse-progress.h"
-#include "seahorse-libdialogs.h"
#include "seahorse-widget.h"
#include "seahorse-validity.h"
#include "seahorse-combo-keys.h"
diff --git a/pkcs11/Makefile.am b/pkcs11/Makefile.am
index 344456c..c52093f 100644
--- a/pkcs11/Makefile.am
+++ b/pkcs11/Makefile.am
@@ -5,14 +5,12 @@ seahorselibexecbindir = $(libdir)/seahorse/
INCLUDES = -I$(top_builddir) \
-I$(top_srcdir) \
- -I$(top_srcdir)/libcryptui \
-I$(top_srcdir)/libseahorse \
$(SEAHORSE_CFLAGS) \
-DDATA_DIR=\""$(datadir)"\" \
-DSEAHORSE_UIDIR=\""$(uidir)"\" \
-DLOCALEDIR=\"$(localedir)\" \
-DEXECDIR=\""$(seahorselibexecbindir)"\" \
- -DLIBCRYPTUI_API_SUBJECT_TO_CHANGE \
-DGCR_API_SUBJECT_TO_CHANGE \
-DGCK_API_SUBJECT_TO_CHANGE \
-DGETTEXT_PACKAGE=\""seahorse\""
@@ -32,7 +30,6 @@ libseahorse_pkcs11_la_SOURCES = \
libseahorse_pkcs11_la_LIBADD = \
$(top_builddir)/libseahorse/libseahorse.la \
- $(top_builddir)/libcryptui/libcryptui.la \
$(GCR_LIBS)
ui_DATA =
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 77cdbd0..cebc5b9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,9 +1,5 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
-daemon/seahorse-daemon.c
-daemon/seahorse-service.c
-daemon/seahorse-service-crypto.c
-daemon/seahorse-service-keyset.c
data/seahorse.schemas.in
[type: gettext/glade]gkr/seahorse-add-keyring.xml
gkr/seahorse-gkr-add-item.c
@@ -19,16 +15,9 @@ gkr/seahorse-gkr-keyring-commands.c
gkr/seahorse-gkr-keyring-properties.c
gkr/seahorse-gkr-operation.c
gkr/seahorse-gkr-source.c
-libcryptui/cryptui.c
-libcryptui/cryptui-key-chooser.c
-libcryptui/cryptui-key-list.c
libegg/egg-datetime.c
-libegg/eggdesktopfile.c
-libegg/eggsmclient.c
[type: gettext/glade]libseahorse/seahorse-add-keyserver.xml
libseahorse/seahorse-context.c
-libseahorse/seahorse-notification.c
-[type: gettext/glade]libseahorse/seahorse-notify.xml
libseahorse/seahorse-object.c
libseahorse/seahorse-passphrase.c
libseahorse/seahorse-prefs.c
diff --git a/reference/Makefile.am b/reference/Makefile.am
index 1061052..7f41f0f 100644
--- a/reference/Makefile.am
+++ b/reference/Makefile.am
@@ -1,2 +1 @@
-SUBDIRS = libcryptui \
- libseahorse
+SUBDIRS = libseahorse
diff --git a/src/Makefile.am b/src/Makefile.am
index 6c9232c..948436a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,14 +6,12 @@ pixmapsdir = $(datadir)/pixmaps/
INCLUDES = -I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_srcdir)/libegg \
- -I$(top_srcdir)/libcryptui \
-I$(top_srcdir)/libseahorse \
$(SEAHORSE_CFLAGS) \
-DDATA_DIR=\""$(datadir)"\" \
-DSEAHORSE_UIDIR=\""$(uidir)"\" \
-DLOCALEDIR=\"$(localedir)\" \
-DPIXMAPSDIR=\""$(pixmapsdir)"\" \
- -DLIBCRYPTUI_API_SUBJECT_TO_CHANGE \
-DGETTEXT_PACKAGE=\""seahorse\""
if WITH_KEYSERVER
@@ -61,7 +59,6 @@ seahorse_LDADD = \
$(PKCS11_LDADD) \
$(top_builddir)/gkr/libseahorse-gkr.la \
$(top_builddir)/common/libseahorse-common.la \
- $(top_builddir)/libcryptui/libcryptui.la \
$(top_builddir)/libegg/libeggdatetime.la \
$(SEAHORSE_LIBS)
diff --git a/src/seahorse-key-manager.c b/src/seahorse-key-manager.c
index 6a3d357..7304047 100644
--- a/src/seahorse-key-manager.c
+++ b/src/seahorse-key-manager.c
@@ -535,7 +535,7 @@ import_text (SeahorseKeyManager* self, const char* text)
}
/* All our supported key types have a local key source */
- sksrc = seahorse_context_find_source (seahorse_context_for_app (), ktype, SEAHORSE_LOCATION_LOCAL);
+ sksrc = seahorse_context_find_source (seahorse_context_instance (), ktype, SEAHORSE_LOCATION_LOCAL);
g_return_if_fail (sksrc != NULL);
input = seahorse_util_memory_input_string (text, len);
@@ -632,7 +632,7 @@ on_remote_sync (GtkAction* action, SeahorseKeyManager* self)
static gboolean
quit_app_later (gpointer unused)
{
- seahorse_context_destroy (seahorse_context_for_app ());
+ seahorse_context_destroy (seahorse_context_instance ());
return FALSE;
}
@@ -998,7 +998,7 @@ seahorse_key_manager_constructor (GType type, guint n_props, GObjectConstructPar
/* To show first time dialog */
g_timeout_add_seconds (1, (GSourceFunc)on_first_timer, self);
- g_signal_connect (seahorse_context_for_app (), "refreshing", G_CALLBACK (on_refreshing), self);
+ g_signal_connect (seahorse_context_instance (), "refreshing", G_CALLBACK (on_refreshing), self);
return G_OBJECT (self);
}
diff --git a/src/seahorse-main.c b/src/seahorse-main.c
index ecbd0cb..1e2a759 100644
--- a/src/seahorse-main.c
+++ b/src/seahorse-main.c
@@ -24,7 +24,6 @@
#include "seahorse-context.h"
#include "seahorse-util.h"
-#include "seahorse-libdialogs.h"
#include "seahorse-gtkstock.h"
#include "seahorse-secure-memory.h"
@@ -91,7 +90,7 @@ main (int argc, char **argv)
seahorse_gtkstock_init ();
/* Make the default SeahorseContext */
- seahorse_context_new (SEAHORSE_CONTEXT_APP);
+ seahorse_context_create ();
/* Initialize the various components */
#ifdef WITH_PGP
diff --git a/src/seahorse-viewer.c b/src/seahorse-viewer.c
index 04ea904..9cbf220 100644
--- a/src/seahorse-viewer.c
+++ b/src/seahorse-viewer.c
@@ -480,7 +480,7 @@ on_key_import_keyring (GtkAction* action, SeahorseViewer* self)
if (objects == NULL)
return;
- op = seahorse_context_transfer_objects (seahorse_context_for_app (), objects, NULL);
+ op = seahorse_context_transfer_objects (seahorse_context_instance (), objects, NULL);
seahorse_progress_show (op, _ ("Importing keys from key servers"), TRUE);
seahorse_operation_watch (op, (SeahorseDoneFunc)imported_keys, self, NULL, NULL);
diff --git a/ssh/Makefile.am b/ssh/Makefile.am
index b2d86a6..e4f3c23 100644
--- a/ssh/Makefile.am
+++ b/ssh/Makefile.am
@@ -5,14 +5,12 @@ seahorselibexecbindir = $(libdir)/seahorse/
INCLUDES = -I$(top_builddir) \
-I$(top_srcdir) \
- -I$(top_srcdir)/libcryptui \
-I$(top_srcdir)/libseahorse \
$(SEAHORSE_CFLAGS) \
-DDATA_DIR=\""$(datadir)"\" \
-DSEAHORSE_UIDIR=\""$(uidir)"\" \
-DLOCALEDIR=\"$(localedir)\" \
-DEXECDIR=\""$(seahorselibexecbindir)"\" \
- -DLIBCRYPTUI_API_SUBJECT_TO_CHANGE \
-DGETTEXT_PACKAGE=\""seahorse\""
AM_LDFLAGS = @NETLIBS@
@@ -34,15 +32,13 @@ libseahorse_ssh_la_SOURCES = \
seahorse-ssh-upload.c
libseahorse_ssh_la_LIBADD = \
- $(top_builddir)/libseahorse/libseahorse.la \
- $(top_builddir)/libcryptui/libcryptui.la
+ $(top_builddir)/libseahorse/libseahorse.la
seahorselibexecbin_PROGRAMS = seahorse-ssh-askpass
seahorse_ssh_askpass_SOURCES = seahorse-ssh-askpass.c
seahorse_ssh_askpass_LDADD = \
$(top_builddir)/libseahorse/libseahorse.la \
- $(top_builddir)/libcryptui/libcryptui.la \
$(SEAHORSE_LIBS)
ui_DATA = \
diff --git a/ssh/seahorse-ssh-generate.c b/ssh/seahorse-ssh-generate.c
index 5fce7b7..a8478bd 100644
--- a/ssh/seahorse-ssh-generate.c
+++ b/ssh/seahorse-ssh-generate.c
@@ -49,7 +49,7 @@ on_ssh_generate_key (GtkAction *action, gpointer unused)
g_return_if_fail (GTK_IS_ACTION (action));
- sksrc = seahorse_context_find_source (seahorse_context_for_app (), SEAHORSE_SSH_TYPE, SEAHORSE_LOCATION_LOCAL);
+ sksrc = seahorse_context_find_source (seahorse_context_instance (), SEAHORSE_SSH_TYPE, SEAHORSE_LOCATION_LOCAL);
g_return_if_fail (sksrc != NULL);
seahorse_ssh_generate_show (SEAHORSE_SSH_SOURCE (sksrc), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]