[seahorse] Stricter warnings about declarations, and fix issues.
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] Stricter warnings about declarations, and fix issues.
- Date: Wed, 7 Sep 2011 07:21:15 +0000 (UTC)
commit 1da843ada29dba8e914fd90b375e1bdc30cf8369
Author: Stef Walter <stefw collabora co uk>
Date: Wed Sep 7 09:20:55 2011 +0200
Stricter warnings about declarations, and fix issues.
configure.ac | 42 +++++--
gkr/seahorse-gkr-add-item.c | 23 +++-
gkr/seahorse-gkr-add-keyring.c | 16 ++-
gkr/seahorse-gkr-item-properties.c | 39 ++++--
gkr/seahorse-gkr-item.c | 15 +--
gkr/seahorse-gkr-keyring-properties.c | 9 +-
gkr/seahorse-gkr-keyring.c | 2 +-
libseahorse/seahorse-context.c | 2 +-
libseahorse/seahorse-dns-sd.c | 2 +-
libseahorse/seahorse-dns-sd.h | 4 +-
libseahorse/seahorse-keyserver-control.h | 2 +
libseahorse/seahorse-prefs.c | 23 +++-
libseahorse/seahorse-set-model.c | 2 +-
libseahorse/seahorse-util.c | 42 ------
libseahorse/seahorse-widget.h | 2 +-
pgp/seahorse-gpg-options.c | 2 +-
pgp/seahorse-gpg-options.h | 2 +-
pgp/seahorse-gpgme-add-subkey.c | 21 +++-
pgp/seahorse-gpgme-add-uid.c | 21 +++-
pgp/seahorse-gpgme-expires.c | 14 ++-
pgp/seahorse-gpgme-generate.c | 30 ++++-
pgp/seahorse-gpgme-photos.c | 2 +-
pgp/seahorse-gpgme-revoke.c | 8 +-
pgp/seahorse-gpgme-sign.c | 13 ++-
pgp/seahorse-gpgme-source.h | 2 +-
pgp/seahorse-hkp-source.c | 4 +-
pgp/seahorse-pgp-key-properties.c | 206 ++++++++++++++++++++++++-----
pgp/seahorse-pgp-keysets.c | 4 +-
pgp/seahorse-pgp-keysets.h | 2 +-
pgp/seahorse-signer.c | 1 +
pkcs11/seahorse-pkcs11-certificate.c | 2 +-
pkcs11/seahorse-pkcs11-certificate.h | 2 +
src/seahorse-key-manager-store.h | 2 +
src/seahorse-key-manager.c | 18 +++
src/seahorse-keyserver-results.c | 7 +
src/seahorse-keyserver-search.c | 10 ++-
src/seahorse-keyserver-sync.c | 6 +
src/seahorse-viewer.c | 3 +
ssh/seahorse-ssh-key-data.c | 2 +-
ssh/seahorse-ssh-key-properties.c | 17 +++
ssh/seahorse-ssh-upload.c | 4 +
41 files changed, 469 insertions(+), 161 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index afbcb10..b6b3ece 100644
--- a/configure.ac
+++ b/configure.ac
@@ -443,7 +443,7 @@ fi
if test "$enable_debug" = "full"; then
debug_status="full"
- CFLAGS="$CFLAGS -g -O0 -Werror -Wall"
+ CFLAGS="$CFLAGS -g -O0 -Werror"
CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED"
CFLAGS="$CFLAGS -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
elif test "$enable_debug" = "no"; then
@@ -477,15 +477,37 @@ fi
AM_CONDITIONAL(WITH_TESTS, test "$enable_tests" = "yes")
-GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
-ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
-PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
-CAIRO_PREFIX="`pkg-config --variable=prefix cairo`"
-
-AC_SUBST(GLIB_PREFIX)
-AC_SUBST(ATK_PREFIX)
-AC_SUBST(PANGO_PREFIX)
-AC_SUBST(CAIRO_PREFIX)
+# -------------------------------------------------------------------
+# More warnings
+
+AC_MSG_CHECKING(for more warnings)
+if test "$GCC" = "yes"; then
+ AC_MSG_RESULT(yes)
+ CFLAGS="\
+ -Wall \
+ -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
+ -Wnested-externs -Wpointer-arith \
+ -Wcast-align -Wsign-compare \
+ $CFLAGS"
+
+ for option in -Wno-strict-aliasing -Wno-sign-compare; do
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $option"
+ AC_MSG_CHECKING([whether gcc understands $option])
+ AC_TRY_COMPILE([], [],
+ has_option=yes,
+ has_option=no,)
+ if test $has_option = no; then
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ AC_MSG_RESULT($has_option)
+ unset has_option
+ unset SAVE_CFLAGS
+ done
+ unset option
+else
+ AC_MSG_RESULT(no)
+fi
dnl ****************************************************************************
diff --git a/gkr/seahorse-gkr-add-item.c b/gkr/seahorse-gkr-add-item.c
index 9c4cdff..db4c13f 100644
--- a/gkr/seahorse-gkr-add-item.c
+++ b/gkr/seahorse-gkr-add-item.c
@@ -30,6 +30,16 @@
#include <glib/gi18n.h>
+void on_add_item_label_changed (GtkEntry *entry,
+ gpointer user_data);
+
+void on_add_item_password_toggled (GtkToggleButton *button,
+ gpointer user_data);
+
+void on_add_item_response (GtkDialog *dialog,
+ int response,
+ gpointer user_data);
+
static void
item_add_done (GnomeKeyringResult result, guint32 item, gpointer data)
{
@@ -56,22 +66,29 @@ item_add_done (GnomeKeyringResult result, guint32 item, gpointer data)
}
G_MODULE_EXPORT void
-on_add_item_label_changed (GtkEntry *entry, SeahorseWidget *swidget)
+on_add_item_label_changed (GtkEntry *entry,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
const gchar *keyring = gtk_entry_get_text (entry);
seahorse_widget_set_sensitive (swidget, "ok", keyring && keyring[0]);
}
G_MODULE_EXPORT void
-on_add_item_password_toggled (GtkToggleButton *button, SeahorseWidget *swidget)
+on_add_item_password_toggled (GtkToggleButton *button,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GtkWidget *widget= g_object_get_data (G_OBJECT (swidget), "gkr-secure-entry");
gtk_entry_set_visibility (GTK_ENTRY (widget), gtk_toggle_button_get_active (button));
}
G_MODULE_EXPORT void
-on_add_item_response (GtkDialog *dialog, int response, SeahorseWidget *swidget)
+on_add_item_response (GtkDialog *dialog,
+ int response,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GtkWidget *widget;
gchar *keyring;
const gchar *secret;
diff --git a/gkr/seahorse-gkr-add-keyring.c b/gkr/seahorse-gkr-add-keyring.c
index 48f9db1..eddc805 100644
--- a/gkr/seahorse-gkr-add-keyring.c
+++ b/gkr/seahorse-gkr-add-keyring.c
@@ -36,6 +36,13 @@
*
**/
+void on_add_keyring_name_changed (GtkEntry *entry,
+ gpointer user_data);
+
+void on_add_keyring_properties_response (GtkDialog *dialog,
+ int response,
+ gpointer user_data);
+
/**
* keyring_add_done:
* @result:GNOME_KEYRING_RESULT_CANCELLED or GNOME_KEYRING_RESULT_OK
@@ -78,8 +85,10 @@ keyring_add_done (GnomeKeyringResult result, gpointer data)
* entry @entry contains text
*/
G_MODULE_EXPORT void
-on_add_keyring_name_changed (GtkEntry *entry, SeahorseWidget *swidget)
+on_add_keyring_name_changed (GtkEntry *entry,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
const gchar *keyring = gtk_entry_get_text (entry);
seahorse_widget_set_sensitive (swidget, "ok", keyring && keyring[0]);
}
@@ -95,8 +104,11 @@ on_add_keyring_name_changed (GtkEntry *entry, SeahorseWidget *swidget)
* provided by gnome-keyring
*/
G_MODULE_EXPORT void
-on_add_keyring_properties_response (GtkDialog *dialog, int response, SeahorseWidget *swidget)
+on_add_keyring_properties_response (GtkDialog *dialog,
+ int response,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GtkEntry *entry;
const gchar *keyring;
gpointer request;
diff --git a/gkr/seahorse-gkr-item-properties.c b/gkr/seahorse-gkr-item-properties.c
index b06f72d..b8a300a 100644
--- a/gkr/seahorse-gkr-item-properties.c
+++ b/gkr/seahorse-gkr-item-properties.c
@@ -23,6 +23,7 @@
#include <glib/gi18n.h>
+#include "seahorse-gkr-dialogs.h"
#include "seahorse-gkr-item.h"
#include "seahorse-gkr-source.h"
#include "seahorse-gkr-operation.h"
@@ -37,16 +38,18 @@
#include "seahorse-util.h"
#include "seahorse-widget.h"
-GType
-boxed_access_control_type (void)
-{
- static GType type = 0;
- if (!type)
- type = g_boxed_type_register_static ("GnomeKeyringAccessControl",
- (GBoxedCopyFunc)gnome_keyring_access_control_copy,
- (GBoxedFreeFunc)gnome_keyring_access_control_free);
- return type;
-}
+void on_item_show_password_toggled (GtkToggleButton *button,
+ gpointer user_data);
+
+void on_item_password_expander_activate (GtkExpander *expander,
+ gpointer user_data);
+
+void on_item_description_activate (GtkWidget *entry,
+ gpointer user_data);
+
+gboolean on_item_description_focus_out (GtkWidget* widget,
+ GdkEventFocus *event,
+ gpointer user_data);
/* -----------------------------------------------------------------------------
* MAIN TAB
@@ -268,15 +271,19 @@ password_focus_out (GtkEntry* entry, GdkEventFocus *event, SeahorseWidget *swidg
}
G_MODULE_EXPORT void
-on_item_show_password_toggled (GtkToggleButton *button, SeahorseWidget *swidget)
+on_item_show_password_toggled (GtkToggleButton *button,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GtkWidget *widget = g_object_get_data (G_OBJECT (swidget), "secure-password-entry");
gtk_entry_set_visibility (GTK_ENTRY (widget), gtk_toggle_button_get_active (button));
}
G_MODULE_EXPORT void
-on_item_password_expander_activate (GtkExpander *expander, SeahorseWidget *swidget)
+on_item_password_expander_activate (GtkExpander *expander,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorseObject *object;
SeahorseGkrItem *git;
GtkWidget *widget;
@@ -339,8 +346,9 @@ on_item_description_complete (GObject *source,
G_MODULE_EXPORT void
on_item_description_activate (GtkWidget *entry,
- SeahorseWidget *swidget)
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
item_description_closure *closure;
GCancellable *cancellable;
SeahorseObject *object;
@@ -371,8 +379,11 @@ on_item_description_activate (GtkWidget *entry,
}
G_MODULE_EXPORT gboolean
-on_item_description_focus_out (GtkWidget* widget, GdkEventFocus *event, SeahorseWidget *swidget)
+on_item_description_focus_out (GtkWidget* widget,
+ GdkEventFocus *event,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
on_item_description_activate (widget, swidget);
return FALSE;
}
diff --git a/gkr/seahorse-gkr-item.c b/gkr/seahorse-gkr-item.c
index 8e14c02..6d1886a 100644
--- a/gkr/seahorse-gkr-item.c
+++ b/gkr/seahorse-gkr-item.c
@@ -79,7 +79,7 @@ G_DEFINE_TYPE (SeahorseGkrItem, seahorse_gkr_item, SEAHORSE_TYPE_OBJECT);
* INTERNAL HELPERS
*/
-GType
+static GType
boxed_item_info_type (void)
{
static GType type = 0;
@@ -90,7 +90,7 @@ boxed_item_info_type (void)
return type;
}
-GType
+static GType
boxed_attributes_type (void)
{
static GType type = 0;
@@ -101,17 +101,6 @@ boxed_attributes_type (void)
return type;
}
-GType
-boxed_acl_type (void)
-{
- static GType type = 0;
- if (!type)
- type = g_boxed_type_register_static ("GnomeKeyringAcl",
- (GBoxedCopyFunc)gnome_keyring_acl_copy,
- (GBoxedFreeFunc)gnome_keyring_acl_free);
- return type;
-}
-
static gboolean
received_result (SeahorseGkrItem *self, GnomeKeyringResult result)
{
diff --git a/gkr/seahorse-gkr-keyring-properties.c b/gkr/seahorse-gkr-keyring-properties.c
index 93aae12..1bd3052 100644
--- a/gkr/seahorse-gkr-keyring-properties.c
+++ b/gkr/seahorse-gkr-keyring-properties.c
@@ -31,6 +31,10 @@
#include "seahorse-object-widget.h"
#include "seahorse-util.h"
+void on_keyring_properties_response (GtkDialog *dialog,
+ int response,
+ gpointer user_data);
+
/* -----------------------------------------------------------------------------
* MAIN TAB
*/
@@ -82,8 +86,11 @@ setup_main (SeahorseWidget *swidget)
*/
G_MODULE_EXPORT void
-on_keyring_properties_response (GtkDialog *dialog, int response, SeahorseWidget *swidget)
+on_keyring_properties_response (GtkDialog *dialog,
+ int response,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
if (response == GTK_RESPONSE_HELP) {
seahorse_widget_show_help (swidget);
return;
diff --git a/gkr/seahorse-gkr-keyring.c b/gkr/seahorse-gkr-keyring.c
index 0c820bc..6d70899 100644
--- a/gkr/seahorse-gkr-keyring.c
+++ b/gkr/seahorse-gkr-keyring.c
@@ -53,7 +53,7 @@ static void seahorse_source_iface (SeahorseSourceIface *iface);
G_DEFINE_TYPE_EXTENDED (SeahorseGkrKeyring, seahorse_gkr_keyring, SEAHORSE_TYPE_OBJECT, 0,
G_IMPLEMENT_INTERFACE (SEAHORSE_TYPE_SOURCE, seahorse_source_iface));
-GType
+static GType
boxed_type_keyring_info (void)
{
static GType type = 0;
diff --git a/libseahorse/seahorse-context.c b/libseahorse/seahorse-context.c
index ec08389..ad4852e 100644
--- a/libseahorse/seahorse-context.c
+++ b/libseahorse/seahorse-context.c
@@ -842,7 +842,7 @@ typedef struct _ObjectMatcher {
* Returns: TRUE if the search terminates, FALSE if there could be another
* match or nothing was found
*/
-gboolean
+static gboolean
find_matching_objects (gpointer key, SeahorseObject *sobj, ObjectMatcher *km)
{
gboolean matched;
diff --git a/libseahorse/seahorse-dns-sd.c b/libseahorse/seahorse-dns-sd.c
index 1ba2429..bf3697a 100644
--- a/libseahorse/seahorse-dns-sd.c
+++ b/libseahorse/seahorse-dns-sd.c
@@ -389,7 +389,7 @@ seahorse_service_discovery_class_init (SeahorseServiceDiscoveryClass *klass)
* Returns: A new #SeahorseServiceDiscovery object
*/
SeahorseServiceDiscovery*
-seahorse_service_discovery_new ()
+seahorse_service_discovery_new (void)
{
return g_object_new (SEAHORSE_TYPE_SERVICE_DISCOVERY, NULL);
}
diff --git a/libseahorse/seahorse-dns-sd.h b/libseahorse/seahorse-dns-sd.h
index 67b0bbb..5ffbfa0 100644
--- a/libseahorse/seahorse-dns-sd.h
+++ b/libseahorse/seahorse-dns-sd.h
@@ -70,7 +70,7 @@ struct _SeahorseServiceDiscoveryClass {
GType seahorse_service_discovery_get_type (void);
-SeahorseServiceDiscovery* seahorse_service_discovery_new ();
+SeahorseServiceDiscovery* seahorse_service_discovery_new (void);
gchar ** seahorse_service_discovery_list (SeahorseServiceDiscovery *ssd);
@@ -80,4 +80,4 @@ const gchar* seahorse_service_discovery_get_uri (SeahorseServic
gchar ** seahorse_service_discovery_get_uris (SeahorseServiceDiscovery *ssd,
const gchar **services);
-#endif /* __SEAHORSE_KEY_H__ */
+#endif /* __SEAHORSE_DNS_SD_H__ */
diff --git a/libseahorse/seahorse-keyserver-control.h b/libseahorse/seahorse-keyserver-control.h
index 604a785..5b13c0c 100644
--- a/libseahorse/seahorse-keyserver-control.h
+++ b/libseahorse/seahorse-keyserver-control.h
@@ -60,6 +60,8 @@ struct _SeahorseKeyserverControlClass {
GtkComboBoxClass parent_class;
};
+GType seahorse_keyserver_control_get_type (void) G_GNUC_CONST;
+
SeahorseKeyserverControl* seahorse_keyserver_control_new (const gchar *settings_key,
const gchar *none_option);
diff --git a/libseahorse/seahorse-prefs.c b/libseahorse/seahorse-prefs.c
index 02e4c36..93f6c2f 100644
--- a/libseahorse/seahorse-prefs.c
+++ b/libseahorse/seahorse-prefs.c
@@ -32,7 +32,16 @@
#include "seahorse-widget.h"
/* From seahorse-prefs-cache.c */
-void seahorse_prefs_cache (SeahorseWidget *widget);
+void seahorse_prefs_cache (SeahorseWidget *widget);
+
+void on_prefs_keyserver_add_clicked (GtkButton *button,
+ gpointer user_data);
+
+void on_prefs_keyserver_remove_clicked (GtkWidget *button,
+ gpointer user_data);
+
+void on_prefs_add_keyserver_uri_changed (GtkWidget *button,
+ gpointer user_data);
/* Key Server Prefs --------------------------------------------------------- */
@@ -83,8 +92,10 @@ remove_row (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer
/* User wants to remove selected rows */
G_MODULE_EXPORT void
-on_prefs_keyserver_remove_clicked (GtkWidget *button, SeahorseWidget *swidget)
+on_prefs_keyserver_remove_clicked (GtkWidget *button,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GtkTreeView *treeview;
GtkTreeSelection *selection;
@@ -270,8 +281,10 @@ calculate_keyserver_uri (SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_prefs_add_keyserver_uri_changed (GtkWidget *button, SeahorseWidget *swidget)
+on_prefs_add_keyserver_uri_changed (GtkWidget *button,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GtkWidget *widget;
gchar **types;
gchar *t;
@@ -303,8 +316,10 @@ on_prefs_add_keyserver_uri_changed (GtkWidget *button, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_prefs_keyserver_add_clicked (GtkButton *button, SeahorseWidget *sw)
+on_prefs_keyserver_add_clicked (GtkButton *button,
+ gpointer user_data)
{
+ SeahorseWidget *sw = SEAHORSE_WIDGET (user_data);
SeahorseWidget *swidget;
gchar **types;
GtkWidget *widget;
diff --git a/libseahorse/seahorse-set-model.c b/libseahorse/seahorse-set-model.c
index 6944092..a35094d 100644
--- a/libseahorse/seahorse-set-model.c
+++ b/libseahorse/seahorse-set-model.c
@@ -110,7 +110,7 @@ key_hierarchy (SeahorseObject *sobj, GParamSpec *spec, SeahorseSetModel *smodel)
add_object (smodel, sobj);
}
-void
+static void
gone_object (SeahorseSetModel *smodel, gpointer was_sobj)
{
SeahorseSetModelPrivate *pv = SEAHORSE_SET_MODEL_GET_PRIVATE (smodel);
diff --git a/libseahorse/seahorse-util.c b/libseahorse/seahorse-util.c
index 2948881..e89e1f9 100644
--- a/libseahorse/seahorse-util.c
+++ b/libseahorse/seahorse-util.c
@@ -261,48 +261,6 @@ seahorse_util_get_display_date_string (const time_t time)
}
/**
- * seahorse_util_get_text_view_text:
- * @view: The text view #GtkTextView to extract text from
- *
- * Returns the whole text buffer
- *
- * Returns: The text buffer extracted. The returned string should be freed with
- * #g_free when no longer needed.
- */
-gchar*
-seahorse_util_get_text_view_text (GtkTextView *view)
-{
- GtkTextBuffer *buffer;
- GtkTextIter start;
- GtkTextIter end;
- gchar *text;
-
- g_return_val_if_fail (view != NULL, "");
-
- buffer = gtk_text_view_get_buffer (view);
- gtk_text_buffer_get_bounds (buffer, &start, &end);
- text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
- return text;
-}
-
-/**
- * seahorse_util_set_text_view_string:
- * @view: The view to set the text for (#GtkTextView)
- * @string: The string to set (#GString)
- *
- *
- */
-void
-seahorse_util_set_text_view_string (GtkTextView *view, GString *string)
-{
- GtkTextBuffer *buffer;
- g_return_if_fail (view != NULL && string != NULL);
-
- buffer = gtk_text_view_get_buffer (view);
- gtk_text_buffer_set_text (buffer, string->str, string->len);
-}
-
-/**
* seahorse_util_read_to_memory:
* @input: Data to read. The #GInputStream is read till the end.
* @len: Length of the data read (out)
diff --git a/libseahorse/seahorse-widget.h b/libseahorse/seahorse-widget.h
index 9acc8b9..15e9a9d 100644
--- a/libseahorse/seahorse-widget.h
+++ b/libseahorse/seahorse-widget.h
@@ -77,7 +77,7 @@ struct _SeahorseWidgetClass {
void (*destroy) (SeahorseWidget *swidget);
};
-GType seahorse_widget_get_type ();
+GType seahorse_widget_get_type (void) G_GNUC_CONST;
SeahorseWidget* seahorse_widget_new (const gchar *name,
GtkWindow *parent);
diff --git a/pgp/seahorse-gpg-options.c b/pgp/seahorse-gpg-options.c
index 1d06397..cdc0f70 100644
--- a/pgp/seahorse-gpg-options.c
+++ b/pgp/seahorse-gpg-options.c
@@ -277,7 +277,7 @@ gpg_options_init (GError **err)
* Returns: The home dir that GPG uses for it's keys and configuration
**/
const gchar*
-seahorse_gpg_homedir ()
+seahorse_gpg_homedir (void)
{
/* THis shouldn't normally fail, and as such we return an invalid
* directory to avoid NULL memory access */
diff --git a/pgp/seahorse-gpg-options.h b/pgp/seahorse-gpg-options.h
index b7a435b..00a6fe3 100644
--- a/pgp/seahorse-gpg-options.h
+++ b/pgp/seahorse-gpg-options.h
@@ -28,7 +28,7 @@
#include <glib.h>
-const gchar * seahorse_gpg_homedir ();
+const gchar * seahorse_gpg_homedir (void);
gboolean seahorse_gpg_options_find(const gchar* option,
gchar** value, GError** err);
diff --git a/pgp/seahorse-gpgme-add-subkey.c b/pgp/seahorse-gpgme-add-subkey.c
index 614a82d..2c347a2 100644
--- a/pgp/seahorse-gpgme-add-subkey.c
+++ b/pgp/seahorse-gpgme-add-subkey.c
@@ -39,9 +39,20 @@ enum {
N_COLUMNS
};
+void hanlder_gpgme_add_subkey_type_changed (GtkComboBox *combo,
+ gpointer user_data);
+
+void on_gpgme_add_subkey_never_expires_toggled (GtkToggleButton *togglebutton,
+ gpointer user_data);
+
+void on_gpgme_add_subkey_ok_clicked (GtkButton *button,
+ gpointer user_data);
+
G_MODULE_EXPORT void
-hanlder_gpgme_add_subkey_type_changed (GtkComboBox *combo, SeahorseWidget *swidget)
+hanlder_gpgme_add_subkey_type_changed (GtkComboBox *combo,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
gint type;
GtkSpinButton *length;
GtkTreeModel *model;
@@ -75,8 +86,10 @@ hanlder_gpgme_add_subkey_type_changed (GtkComboBox *combo, SeahorseWidget *swidg
}
G_MODULE_EXPORT void
-on_gpgme_add_subkey_never_expires_toggled (GtkToggleButton *togglebutton, SeahorseWidget *swidget)
+on_gpgme_add_subkey_never_expires_toggled (GtkToggleButton *togglebutton,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GtkWidget *widget;
widget = GTK_WIDGET (g_object_get_data (G_OBJECT (swidget), "expires-datetime"));
@@ -87,8 +100,10 @@ on_gpgme_add_subkey_never_expires_toggled (GtkToggleButton *togglebutton, Seahor
}
G_MODULE_EXPORT void
-on_gpgme_add_subkey_ok_clicked (GtkButton *button, SeahorseWidget *swidget)
+on_gpgme_add_subkey_ok_clicked (GtkButton *button,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorseObjectWidget *skwidget;
SeahorseKeyEncType real_type;
gint type;
diff --git a/pgp/seahorse-gpgme-add-uid.c b/pgp/seahorse-gpgme-add-uid.c
index 86ce3e0..3d37fe6 100644
--- a/pgp/seahorse-gpgme-add-uid.c
+++ b/pgp/seahorse-gpgme-add-uid.c
@@ -34,6 +34,15 @@
#define NAME "name"
#define EMAIL "email"
+void on_gpgme_add_uid_name_changed (GtkEditable *editable,
+ gpointer user_data);
+
+void on_gpgme_add_uid_email_changed (GtkEditable *editable,
+ gpointer user_data);
+
+void on_gpgme_add_uid_ok_clicked (GtkButton *button,
+ gpointer user_data);
+
static void
check_ok (SeahorseWidget *swidget)
{
@@ -52,20 +61,26 @@ check_ok (SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_gpgme_add_uid_name_changed (GtkEditable *editable, SeahorseWidget *swidget)
+on_gpgme_add_uid_name_changed (GtkEditable *editable,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
check_ok (swidget);
}
G_MODULE_EXPORT void
-on_gpgme_add_uid_email_changed (GtkEditable *editable, SeahorseWidget *swidget)
+on_gpgme_add_uid_email_changed (GtkEditable *editable,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
check_ok (swidget);
}
G_MODULE_EXPORT void
-on_gpgme_add_uid_ok_clicked (GtkButton *button, SeahorseWidget *swidget)
+on_gpgme_add_uid_ok_clicked (GtkButton *button,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorseObject *object;
const gchar *name, *email, *comment;
gpgme_error_t err;
diff --git a/pgp/seahorse-gpgme-expires.c b/pgp/seahorse-gpgme-expires.c
index bb057cc..a3788e7 100644
--- a/pgp/seahorse-gpgme-expires.c
+++ b/pgp/seahorse-gpgme-expires.c
@@ -32,9 +32,17 @@
#include "seahorse-gpgme-key-op.h"
#include "seahorse-gpgme-subkey.h"
+void on_gpgme_expire_ok_clicked (GtkButton *button,
+ gpointer user_data);
+
+void on_gpgme_expire_toggled (GtkWidget *widget,
+ gpointer user_data);
+
G_MODULE_EXPORT void
-on_gpgme_expire_ok_clicked (GtkButton *button, SeahorseWidget *swidget)
+on_gpgme_expire_ok_clicked (GtkButton *button,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GtkWidget *widget;
SeahorseGpgmeSubkey *subkey;
gpgme_error_t err;
@@ -77,8 +85,10 @@ on_gpgme_expire_ok_clicked (GtkButton *button, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_gpgme_expire_toggled (GtkWidget *widget, SeahorseWidget *swidget)
+on_gpgme_expire_toggled (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GtkWidget *expire;
GtkWidget *cal;
diff --git a/pgp/seahorse-gpgme-generate.c b/pgp/seahorse-gpgme-generate.c
index 4cae2ae..f70ca2c 100644
--- a/pgp/seahorse-gpgme-generate.c
+++ b/pgp/seahorse-gpgme-generate.c
@@ -49,6 +49,19 @@
*
**/
+void on_gpgme_generate_response (GtkDialog *dialog,
+ guint response,
+ gpointer user_data);
+
+void on_gpgme_generate_entry_changed (GtkEditable *editable,
+ gpointer user_data);
+
+void on_gpgme_generate_expires_toggled (GtkToggleButton *button,
+ gpointer user_data);
+
+void on_gpgme_generate_algorithm_changed (GtkComboBox *combo,
+ gpointer user_data);
+
/* --------------------------------------------------------------------------
* ACTIONS
*/
@@ -222,8 +235,11 @@ seahorse_gpgme_generate_key (SeahorseGpgmeSource *source,
*
*/
G_MODULE_EXPORT void
-on_gpgme_generate_response (GtkDialog *dialog, guint response, SeahorseWidget *swidget)
+on_gpgme_generate_response (GtkDialog *dialog,
+ guint response,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorseGpgmeSource *sksrc;
GtkWidget *widget;
gchar *name;
@@ -314,8 +330,10 @@ on_gpgme_generate_response (GtkDialog *dialog, guint response, SeahorseWidget *s
*
*/
G_MODULE_EXPORT void
-on_gpgme_generate_entry_changed (GtkEditable *editable, SeahorseWidget *swidget)
+on_gpgme_generate_entry_changed (GtkEditable *editable,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GtkWidget *widget;
gchar *name;
@@ -339,8 +357,10 @@ on_gpgme_generate_entry_changed (GtkEditable *editable, SeahorseWidget *swidget)
* Handles the expires toggle button feedback
*/
G_MODULE_EXPORT void
-on_gpgme_generate_expires_toggled (GtkToggleButton *button, SeahorseWidget *swidget)
+on_gpgme_generate_expires_toggled (GtkToggleButton *button,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GtkWidget *widget;
widget = get_expiry_date (swidget);
@@ -358,8 +378,10 @@ on_gpgme_generate_expires_toggled (GtkToggleButton *button, SeahorseWidget *swid
*
*/
G_MODULE_EXPORT void
-on_gpgme_generate_algorithm_changed (GtkComboBox *combo, SeahorseWidget *swidget)
+on_gpgme_generate_algorithm_changed (GtkComboBox *combo,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GtkWidget *widget;
gint sel;
diff --git a/pgp/seahorse-gpgme-photos.c b/pgp/seahorse-gpgme-photos.c
index feb0892..aa665ec 100644
--- a/pgp/seahorse-gpgme-photos.c
+++ b/pgp/seahorse-gpgme-photos.c
@@ -101,7 +101,7 @@ save_to_fd (const gchar *buf, gsize count, GError **error, gpointer data)
return TRUE;
}
-gboolean
+static gboolean
prepare_photo_id (GtkWindow *parent, gchar *path, gchar **result, GError **error)
{
GdkPixbuf *pixbuf = NULL;
diff --git a/pgp/seahorse-gpgme-revoke.c b/pgp/seahorse-gpgme-revoke.c
index ca60f74..d5ca3b8 100644
--- a/pgp/seahorse-gpgme-revoke.c
+++ b/pgp/seahorse-gpgme-revoke.c
@@ -39,9 +39,15 @@ enum {
N_COLUMNS
};
+
+void on_gpgme_revoke_ok_clicked (GtkButton *button,
+ gpointer user_data);
+
G_MODULE_EXPORT void
-on_gpgme_revoke_ok_clicked (GtkButton *button, SeahorseWidget *swidget)
+on_gpgme_revoke_ok_clicked (GtkButton *button,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorseRevokeReason reason;
SeahorseGpgmeSubkey *subkey;
const gchar *description;
diff --git a/pgp/seahorse-gpgme-sign.c b/pgp/seahorse-gpgme-sign.c
index 749c0c9..70a8d07 100644
--- a/pgp/seahorse-gpgme-sign.c
+++ b/pgp/seahorse-gpgme-sign.c
@@ -34,8 +34,11 @@
#include <glib/gi18n.h>
-G_MODULE_EXPORT gboolean
-on_gpgme_sign_ok_clicked (SeahorseWidget *swidget, GtkWindow *parent)
+void on_gpgme_sign_choice_toggled (GtkToggleButton *toggle,
+ gpointer user_data);
+
+static gboolean
+sign_ok_clicked (SeahorseWidget *swidget, GtkWindow *parent)
{
SeahorseSignCheck check;
SeahorseSignOptions options = 0;
@@ -117,8 +120,10 @@ keyset_changed (SeahorseSet *skset, GtkWidget *widget)
}
G_MODULE_EXPORT void
-on_gpgme_sign_choice_toggled (GtkToggleButton *toggle, SeahorseWidget *swidget)
+on_gpgme_sign_choice_toggled (GtkToggleButton *toggle,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GtkWidget *w;
/* Figure out choice */
@@ -218,7 +223,7 @@ sign_internal (SeahorseObject *to_sign, GtkWindow *parent)
case GTK_RESPONSE_HELP:
break;
case GTK_RESPONSE_OK:
- do_sign = !on_gpgme_sign_ok_clicked (swidget, parent);
+ do_sign = !sign_ok_clicked (swidget, parent);
break;
default:
do_sign = FALSE;
diff --git a/pgp/seahorse-gpgme-source.h b/pgp/seahorse-gpgme-source.h
index 6729744..d949f7b 100644
--- a/pgp/seahorse-gpgme-source.h
+++ b/pgp/seahorse-gpgme-source.h
@@ -69,6 +69,6 @@ GType seahorse_gpgme_source_get_type (void);
SeahorseGpgmeSource* seahorse_gpgme_source_new (void);
-gpgme_ctx_t seahorse_gpgme_source_new_context ();
+gpgme_ctx_t seahorse_gpgme_source_new_context (void);
#endif /* __SEAHORSE_GPGME_SOURCE_H__ */
diff --git a/pgp/seahorse-hkp-source.c b/pgp/seahorse-hkp-source.c
index 0a2f0a0..95226cd 100644
--- a/pgp/seahorse-hkp-source.c
+++ b/pgp/seahorse-hkp-source.c
@@ -290,7 +290,7 @@ dehtmlize(gchar *line)
*
* Returns: 0 on error or the timestamp
*/
-unsigned int
+static unsigned int
parse_hkp_date (const gchar *text)
{
int year, month, day;
@@ -558,7 +558,7 @@ get_send_result (const gchar *response)
*
* Returns: FALSE if no key is contained, TRUE else
*/
-gboolean
+static gboolean
detect_key (const gchar *text, gint len, const gchar **start, const gchar **end)
{
const gchar *t;
diff --git a/pgp/seahorse-pgp-key-properties.c b/pgp/seahorse-pgp-key-properties.c
index eabf62d..ea15d70 100644
--- a/pgp/seahorse-pgp-key-properties.c
+++ b/pgp/seahorse-pgp-key-properties.c
@@ -55,7 +55,93 @@
#define NOTEBOOK "notebook"
/* Forward declarations */
-static void properties_response (GtkDialog *dialog, int response, SeahorseWidget *swidget);
+static void properties_response (GtkDialog *dialog,
+ int response,
+ SeahorseWidget *swidget);
+
+void on_pgp_trust_sign (GtkWidget *widget,
+ gpointer user_data);
+
+void seahorse_pgp_details_signatures_delete_button (GtkWidget *widget,
+ SeahorseWidget *swidget);
+
+void on_pgp_details_signatures_revoke_button (GtkWidget *widget,
+ SeahorseWidget *swidget);
+
+void on_pgp_trust_marginal_toggled (GtkToggleButton *toggle,
+ gpointer user_data);
+
+void on_pgp_details_export_button (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_details_expires_button (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_details_expires_subkey (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_details_add_subkey_button (GtkButton *button,
+ gpointer user_data);
+
+void on_pgp_details_del_subkey_button (GtkButton *button,
+ gpointer user_data);
+
+void on_pgp_details_revoke_subkey_button (GtkButton *button,
+ gpointer user_data);
+
+void on_pgp_details_trust_changed (GtkComboBox *selection,
+ gpointer user_data);
+
+void on_pgp_owner_passphrase_button_clicked (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_owner_photoid_next (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_owner_photoid_prev (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_owner_photoid_button (GtkWidget *widget,
+ GdkEvent *event,
+ gpointer user_data);
+
+void on_pgp_owner_photo_drag_received (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ GtkSelectionData *sel_data,
+ guint target_type,
+ guint time,
+ gpointer user_data);
+
+void on_pgp_owner_photo_add_button (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_owner_photo_delete_button (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_owner_photo_primary_button (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_names_add_clicked (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_names_primary_clicked (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_names_delete_clicked (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_names_sign_clicked (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_names_revoke_clicked (GtkWidget *widget,
+ gpointer user_data);
+
+void on_pgp_signature_row_activated (GtkTreeView *treeview,
+ GtkTreePath *path,
+ GtkTreeViewColumn *arg2,
+ gpointer user_data);
static void
show_gtkbuilder_widget (SeahorseWidget *swidget, const gchar *name, gboolean show)
@@ -142,9 +228,12 @@ get_selected_object (SeahorseWidget *swidget, const gchar *objectid, guint colum
}
G_MODULE_EXPORT void
-on_pgp_signature_row_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *arg2,
- SeahorseWidget *swidget)
+on_pgp_signature_row_activated (GtkTreeView *treeview,
+ GtkTreePath *path,
+ GtkTreeViewColumn *arg2,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorseObject *object = NULL;
GtkTreeModel *model;
GtkTreeIter iter;
@@ -204,8 +293,10 @@ names_get_selected_uid (SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_names_add_clicked (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_names_add_clicked (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorseObject *obj = SEAHORSE_OBJECT_WIDGET (swidget)->object;
g_return_if_fail (SEAHORSE_IS_GPGME_KEY (obj));
seahorse_gpgme_add_uid_new (SEAHORSE_GPGME_KEY (obj),
@@ -213,8 +304,10 @@ on_pgp_names_add_clicked (GtkWidget *widget, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_names_primary_clicked (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_names_primary_clicked (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorsePgpUid *uid;
gpgme_error_t err;
@@ -228,8 +321,10 @@ on_pgp_names_primary_clicked (GtkWidget *widget, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_names_delete_clicked (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_names_delete_clicked (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorsePgpUid *uid;
gboolean ret;
gchar *message;
@@ -254,8 +349,10 @@ on_pgp_names_delete_clicked (GtkWidget *widget, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_names_sign_clicked (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_names_sign_clicked (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorsePgpUid *uid;
uid = names_get_selected_uid (swidget);
@@ -267,7 +364,8 @@ on_pgp_names_sign_clicked (GtkWidget *widget, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_names_revoke_clicked (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_names_revoke_clicked (GtkWidget *widget,
+ gpointer user_data)
{
/* TODO: */
/* SeahorseObject *skey;
@@ -481,10 +579,16 @@ static GtkTargetEntry target_list[] = {
static guint n_targets = G_N_ELEMENTS (target_list);
G_MODULE_EXPORT void
-on_pgp_owner_photo_drag_received (GtkWidget *widget, GdkDragContext *context, gint x, gint y,
- GtkSelectionData *sel_data, guint target_type, guint time,
- SeahorseWidget *swidget)
-{
+on_pgp_owner_photo_drag_received (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ GtkSelectionData *sel_data,
+ guint target_type,
+ guint time,
+ gpointer user_data)
+{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
gboolean dnd_success = FALSE;
SeahorseGpgmeKey *pkey;
gchar **uri_list;
@@ -524,8 +628,10 @@ on_pgp_owner_photo_drag_received (GtkWidget *widget, GdkDragContext *context, gi
}
G_MODULE_EXPORT void
-on_pgp_owner_photo_add_button (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_owner_photo_add_button (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorsePgpKey *pkey;
pkey = SEAHORSE_PGP_KEY (SEAHORSE_OBJECT_WIDGET (swidget)->object);
@@ -536,8 +642,10 @@ on_pgp_owner_photo_add_button (GtkWidget *widget, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_owner_photo_delete_button (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_owner_photo_delete_button (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorseGpgmePhoto *photo;
photo = g_object_get_data (G_OBJECT (swidget), "current-photoid");
@@ -548,8 +656,10 @@ on_pgp_owner_photo_delete_button (GtkWidget *widget, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_owner_photo_primary_button (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_owner_photo_primary_button (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
gpgme_error_t gerr;
SeahorseGpgmePhoto *photo;
@@ -636,8 +746,10 @@ do_photo_id (SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_owner_photoid_next (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_owner_photoid_next (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorsePgpKey *pkey;
SeahorsePgpPhoto *photo;
GList *photos;
@@ -659,8 +771,10 @@ on_pgp_owner_photoid_next (GtkWidget *widget, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_owner_photoid_prev (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_owner_photoid_prev (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorsePgpKey *pkey;
SeahorsePgpPhoto *photo;
GList *photos;
@@ -682,8 +796,11 @@ on_pgp_owner_photoid_prev (GtkWidget *widget, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_owner_photoid_button (GtkWidget *widget, GdkEvent *event, SeahorseWidget *swidget)
+on_pgp_owner_photoid_button (GtkWidget *widget,
+ GdkEvent *event,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GdkEventScroll *event_scroll;
if(event->type == GDK_SCROLL) {
@@ -717,8 +834,10 @@ const GType uid_columns[] = {
};
G_MODULE_EXPORT void
-on_pgp_owner_passphrase_button_clicked (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_owner_passphrase_button_clicked (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorseObject *object = SEAHORSE_OBJECT_WIDGET (swidget)->object;
if (seahorse_object_get_usage (object) == SEAHORSE_USAGE_PRIVATE_KEY &&
SEAHORSE_IS_GPGME_KEY (object))
@@ -925,16 +1044,20 @@ details_subkey_selected (GtkTreeSelection *selection, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_details_add_subkey_button (GtkButton *button, SeahorseWidget *swidget)
+on_pgp_details_add_subkey_button (GtkButton *button,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorseObject *object = SEAHORSE_OBJECT_WIDGET (swidget)->object;
g_return_if_fail (SEAHORSE_IS_GPGME_KEY (object));
seahorse_gpgme_add_subkey_new (SEAHORSE_GPGME_KEY (object), GTK_WINDOW (seahorse_widget_get_widget (swidget, swidget->name)));
}
G_MODULE_EXPORT void
-on_pgp_details_del_subkey_button (GtkButton *button, SeahorseWidget *swidget)
+on_pgp_details_del_subkey_button (GtkButton *button,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorsePgpSubkey *subkey;
SeahorsePgpKey *pkey;
guint index;
@@ -965,8 +1088,10 @@ on_pgp_details_del_subkey_button (GtkButton *button, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_details_revoke_subkey_button (GtkButton *button, SeahorseWidget *swidget)
+on_pgp_details_revoke_subkey_button (GtkButton *button,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorsePgpSubkey *subkey = get_selected_subkey (swidget);
if (subkey != NULL) {
g_return_if_fail (SEAHORSE_IS_GPGME_SUBKEY (subkey));
@@ -975,8 +1100,10 @@ on_pgp_details_revoke_subkey_button (GtkButton *button, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_details_trust_changed (GtkComboBox *selection, SeahorseWidget *swidget)
+on_pgp_details_trust_changed (GtkComboBox *selection,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorseObject *object;
gint trust;
GtkTreeModel *model;
@@ -1020,8 +1147,10 @@ export_complete (GFile *file, GAsyncResult *result, gchar *contents)
}
G_MODULE_EXPORT void
-on_pgp_details_export_button (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_details_export_button (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorseObject *object;
GtkDialog *dialog;
gchar* uri = NULL;
@@ -1072,8 +1201,10 @@ on_pgp_details_export_button (GtkWidget *widget, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_details_expires_button (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_details_expires_button (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
GList *subkeys;
SeahorsePgpKey *pkey;
@@ -1086,8 +1217,10 @@ on_pgp_details_expires_button (GtkWidget *widget, SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_pgp_details_expires_subkey (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_details_expires_subkey (GtkWidget *widget,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorsePgpSubkey *subkey;
SeahorsePgpKey *pkey;
GList *subkeys;
@@ -1404,20 +1537,20 @@ const GType sign_columns[] = {
G_MODULE_EXPORT void
seahorse_pgp_details_signatures_delete_button (GtkWidget *widget, SeahorseWidget *skey)
{
- /* TODO: */
- g_assert (FALSE);
+
}
G_MODULE_EXPORT void
on_pgp_details_signatures_revoke_button (GtkWidget *widget, SeahorseWidget *skey)
{
- /* TODO: */
- g_assert (FALSE);
+
}
G_MODULE_EXPORT void
-on_pgp_trust_marginal_toggled (GtkToggleButton *toggle, SeahorseWidget *swidget)
+on_pgp_trust_marginal_toggled (GtkToggleButton *toggle,
+ gpointer user_data)
{
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
SeahorseObject *object;
guint trust;
gpgme_error_t err;
@@ -1537,7 +1670,7 @@ signatures_populate_model (SeahorseWidget *swidget, SeahorseObjectModel *skmodel
}
/* Refilter when the user toggles the 'only show trusted' checkbox */
-G_MODULE_EXPORT void
+static void
on_pgp_trusted_toggled (GtkToggleButton *toggle, GtkTreeModelFilter *filter)
{
/* Set flag on the store */
@@ -1549,10 +1682,11 @@ on_pgp_trusted_toggled (GtkToggleButton *toggle, GtkTreeModelFilter *filter)
/* Add a signature */
G_MODULE_EXPORT void
-on_pgp_trust_sign (GtkWidget *widget, SeahorseWidget *swidget)
+on_pgp_trust_sign (GtkWidget *widget,
+ gpointer user_data)
{
- SeahorseObject *object;
- object = SEAHORSE_OBJECT_WIDGET (swidget)->object;
+ SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
+ SeahorseObject *object = SEAHORSE_OBJECT_WIDGET (swidget)->object;
g_return_if_fail (SEAHORSE_IS_GPGME_KEY (object));
seahorse_gpgme_sign_prompt (SEAHORSE_GPGME_KEY (object), GTK_WINDOW (seahorse_widget_get_widget (swidget, swidget->name)));
}
@@ -1599,7 +1733,7 @@ trust_filter (GtkTreeModel *model, GtkTreeIter *iter, gpointer userdata)
return !g_object_get_data (G_OBJECT (model), "only-trusted") || trusted;
}
-gboolean
+static gboolean
key_have_signatures (SeahorsePgpKey *pkey, guint types)
{
GList *uids, *u;
diff --git a/pgp/seahorse-pgp-keysets.c b/pgp/seahorse-pgp-keysets.c
index 9dda768..94d890c 100644
--- a/pgp/seahorse-pgp-keysets.c
+++ b/pgp/seahorse-pgp-keysets.c
@@ -56,8 +56,8 @@ pgp_signers_match (SeahorseObject *obj, gpointer data)
return TRUE;
}
-SeahorseSet*
-seahorse_keyset_pgp_signers_new ()
+SeahorseSet *
+seahorse_keyset_pgp_signers_new (void)
{
SeahorseObjectPredicate *pred = g_new0 (SeahorseObjectPredicate, 1);
SeahorseSet *skset;
diff --git a/pgp/seahorse-pgp-keysets.h b/pgp/seahorse-pgp-keysets.h
index 1f9196e..788bef4 100644
--- a/pgp/seahorse-pgp-keysets.h
+++ b/pgp/seahorse-pgp-keysets.h
@@ -28,6 +28,6 @@
* SOME COMMON KEYSETS
*/
-SeahorseSet* seahorse_keyset_pgp_signers_new ();
+SeahorseSet* seahorse_keyset_pgp_signers_new (void);
#endif /*SEAPGPKEYSETS_H_*/
diff --git a/pgp/seahorse-signer.c b/pgp/seahorse-signer.c
index d43e8c7..aacf861 100755
--- a/pgp/seahorse-signer.c
+++ b/pgp/seahorse-signer.c
@@ -26,6 +26,7 @@
#include <glib/gi18n.h>
+#include "seahorse-pgp-dialogs.h"
#include "seahorse-progress.h"
#include "seahorse-widget.h"
#include "seahorse-validity.h"
diff --git a/pkcs11/seahorse-pkcs11-certificate.c b/pkcs11/seahorse-pkcs11-certificate.c
index 3c25316..76edec4 100644
--- a/pkcs11/seahorse-pkcs11-certificate.c
+++ b/pkcs11/seahorse-pkcs11-certificate.c
@@ -259,7 +259,7 @@ seahorse_pkcs11_certificate_class_init (SeahorsePkcs11CertificateClass *klass)
gcr_certificate_mixin_class_init (gobject_class);
}
-const guchar*
+static const guchar*
seahorse_pkcs11_certificate_get_der_data (GcrCertificate *cert, gsize *n_length)
{
SeahorsePkcs11Object *obj = SEAHORSE_PKCS11_OBJECT (cert);
diff --git a/pkcs11/seahorse-pkcs11-certificate.h b/pkcs11/seahorse-pkcs11-certificate.h
index bcc301a..aa1b733 100644
--- a/pkcs11/seahorse-pkcs11-certificate.h
+++ b/pkcs11/seahorse-pkcs11-certificate.h
@@ -52,6 +52,8 @@ GType seahorse_pkcs11_certificate_get_type (
SeahorsePkcs11Certificate* seahorse_pkcs11_certificate_new (GckObject* object);
+void seahorse_pkcs11_certificate_realize (SeahorsePkcs11Certificate *self);
+
gchar* seahorse_pkcs11_certificate_get_fingerprint (SeahorsePkcs11Certificate* self);
guint seahorse_pkcs11_certificate_get_validity (SeahorsePkcs11Certificate* self);
diff --git a/src/seahorse-key-manager-store.h b/src/seahorse-key-manager-store.h
index 1dfc859..11c627c 100644
--- a/src/seahorse-key-manager-store.h
+++ b/src/seahorse-key-manager-store.h
@@ -56,6 +56,8 @@ struct _SeahorseKeyManagerStoreClass {
SeahorseSetModelClass parent_class;
};
+GType seahorse_key_manager_store_get_type (void) G_GNUC_CONST;
+
SeahorseKeyManagerStore* seahorse_key_manager_store_new (SeahorseSet *skset,
GtkTreeView *view,
GSettings *settings);
diff --git a/src/seahorse-key-manager.c b/src/seahorse-key-manager.c
index ebcacd2..2da358a 100644
--- a/src/seahorse-key-manager.c
+++ b/src/seahorse-key-manager.c
@@ -36,6 +36,24 @@
#include <glib/gi18n.h>
+void on_keymanager_row_activated (GtkTreeView* view,
+ GtkTreePath* path,
+ GtkTreeViewColumn* column,
+ SeahorseKeyManager* self);
+
+gboolean on_keymanager_key_list_button_pressed (GtkTreeView* view,
+ GdkEventButton* event,
+ SeahorseKeyManager* self);
+
+gboolean on_keymanager_key_list_popup_menu (GtkTreeView* view,
+ SeahorseKeyManager* self);
+
+void on_keymanager_new_button (GtkButton* button,
+ SeahorseKeyManager* self);
+
+void on_keymanager_import_button (GtkButton* button,
+ SeahorseKeyManager* self);
+
enum {
PROP_0,
PROP_SELECTED
diff --git a/src/seahorse-keyserver-results.c b/src/seahorse-keyserver-results.c
index 4168714..43432bf 100644
--- a/src/seahorse-keyserver-results.c
+++ b/src/seahorse-keyserver-results.c
@@ -32,6 +32,13 @@
#include <string.h>
+gboolean on_key_list_button_pressed (GtkTreeView* view,
+ GdkEventButton* event,
+ SeahorseKeyserverResults* self);
+
+gboolean on_key_list_popup_menu (GtkTreeView* view,
+ SeahorseKeyserverResults* self);
+
enum {
PROP_0,
PROP_SEARCH,
diff --git a/src/seahorse-keyserver-search.c b/src/seahorse-keyserver-search.c
index f3a9794..25e7c3a 100644
--- a/src/seahorse-keyserver-search.c
+++ b/src/seahorse-keyserver-search.c
@@ -24,18 +24,26 @@
#include "seahorse-context.h"
#include "seahorse-dns-sd.h"
-#include "seahorse-keyserver-results.h"
#include "seahorse-preferences.h"
#include "seahorse-servers.h"
#include "seahorse-util.h"
#include "seahorse-widget.h"
+#include "seahorse-keyserver-results.h"
+#include "seahorse-windows.h"
+
/**
* SECTION:seahorse-keyserver-search
* @short_description: Contains the functions to start a search for keys on a
* keyserver.
**/
+void on_keyserver_search_control_changed (GtkWidget *widget,
+ SeahorseWidget *swidget);
+
+void on_keyserver_search_ok_clicked (GtkButton *button,
+ SeahorseWidget *swidget);
+
/**
* KeyserverSelection:
* @names: A list of keyserver names
diff --git a/src/seahorse-keyserver-sync.c b/src/seahorse-keyserver-sync.c
index 2b1b30e..5cf63ab 100644
--- a/src/seahorse-keyserver-sync.c
+++ b/src/seahorse-keyserver-sync.c
@@ -35,6 +35,12 @@
#include "seahorse-widget.h"
#include "seahorse-windows.h"
+void on_sync_ok_clicked (GtkButton *button,
+ SeahorseWidget *swidget);
+
+void on_sync_configure_clicked (GtkButton *button,
+ SeahorseWidget *swidget);
+
static void
on_transfer_upload_complete (GObject *object,
GAsyncResult *result,
diff --git a/src/seahorse-viewer.c b/src/seahorse-viewer.c
index 2997fce..bbd470b 100644
--- a/src/seahorse-viewer.c
+++ b/src/seahorse-viewer.c
@@ -36,6 +36,9 @@
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
+void on_app_preferences (GtkAction* action,
+ SeahorseViewer* self);
+
enum {
PROP_0,
PROP_SELECTED,
diff --git a/ssh/seahorse-ssh-key-data.c b/ssh/seahorse-ssh-key-data.c
index dfb562c..51d5ec5 100644
--- a/ssh/seahorse-ssh-key-data.c
+++ b/ssh/seahorse-ssh-key-data.c
@@ -155,7 +155,7 @@ parse_key_data (gchar *line, SeahorseSSHKeyData *data)
return TRUE;
}
-gchar*
+static gchar *
parse_lines_block (gchar ***lx, const gchar *start, const gchar* end)
{
GString *result;
diff --git a/ssh/seahorse-ssh-key-properties.c b/ssh/seahorse-ssh-key-properties.c
index 1e4ff5d..b21c681 100644
--- a/ssh/seahorse-ssh-key-properties.c
+++ b/ssh/seahorse-ssh-key-properties.c
@@ -28,6 +28,7 @@
#include "seahorse-util.h"
#include "seahorse-validity.h"
+#include "ssh/seahorse-ssh-dialogs.h"
#include "ssh/seahorse-ssh-key.h"
#include "ssh/seahorse-ssh-operation.h"
@@ -35,6 +36,22 @@
#define NOTEBOOK "notebook"
+void on_ssh_comment_activate (GtkWidget *entry,
+ SeahorseWidget *swidget);
+
+gboolean on_ssh_comment_focus_out (GtkWidget* widget,
+ GdkEventFocus *event,
+ SeahorseWidget *swidget);
+
+void on_ssh_trust_toggled (GtkToggleButton *button,
+ SeahorseWidget *swidget);
+
+void on_ssh_passphrase_button_clicked (GtkWidget *widget,
+ SeahorseWidget *swidget);
+
+void on_ssh_export_button_clicked (GtkWidget *widget,
+ SeahorseWidget *swidget);
+
typedef struct {
SeahorseWidget *swidget;
GtkEntry *entry;
diff --git a/ssh/seahorse-ssh-upload.c b/ssh/seahorse-ssh-upload.c
index 655163b..8bc59fc 100644
--- a/ssh/seahorse-ssh-upload.c
+++ b/ssh/seahorse-ssh-upload.c
@@ -31,10 +31,14 @@
#include "seahorse-progress.h"
#include "seahorse-gtkstock.h"
+#include "ssh/seahorse-ssh-dialogs.h"
#include "ssh/seahorse-ssh-source.h"
#include "ssh/seahorse-ssh-key.h"
#include "ssh/seahorse-ssh-operation.h"
+void on_upload_input_changed (GtkWidget *dummy,
+ SeahorseWidget *swidget);
+
static void
on_upload_complete (GObject *source,
GAsyncResult *result,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]