[seahorse/gnome-3-2] pgp: Fix issues adding key servers
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse/gnome-3-2] pgp: Fix issues adding key servers
- Date: Mon, 14 Nov 2011 07:00:30 +0000 (UTC)
commit 0bf8e278d1637083555cfdb97675a6a8f26bd123
Author: Stef Walter <stefw collabora co uk>
Date: Mon Nov 14 07:59:40 2011 +0100
pgp: Fix issues adding key servers
* Make all key server types show up
* Fix validation code for hkp server type
* These were regressions because of port to GTK+3
libseahorse/seahorse-prefs.c | 11 +++++------
pgp/seahorse-hkp-source.c | 2 +-
2 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/libseahorse/seahorse-prefs.c b/libseahorse/seahorse-prefs.c
index 8afbc7a..bd500fd 100644
--- a/libseahorse/seahorse-prefs.c
+++ b/libseahorse/seahorse-prefs.c
@@ -282,7 +282,7 @@ calculate_keyserver_uri (SeahorseWidget *swidget)
}
G_MODULE_EXPORT void
-on_prefs_add_keyserver_uri_changed (GtkWidget *button,
+on_prefs_add_keyserver_uri_changed (GtkWidget *unused,
gpointer user_data)
{
SeahorseWidget *swidget = SEAHORSE_WIDGET (user_data);
@@ -341,19 +341,18 @@ on_prefs_keyserver_add_clicked (GtkButton *button,
/* The list of types */
types = seahorse_servers_get_types ();
+ /* Save these away for later */
+ g_object_set_data_full (G_OBJECT (swidget), "keyserver-types", types,
+ (GDestroyNotify)g_strfreev);
+
/* The description for the key server types, plus custom */
for (i = 0; types[i] != NULL; i++)
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget),
seahorse_servers_get_description (types[i]));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget),
_("Custom"));
- gtk_combo_box_text_remove (GTK_COMBO_BOX_TEXT (widget), 0);
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
- /* Save these away for later */
- g_object_set_data_full (G_OBJECT (swidget), "keyserver-types", types,
- (GDestroyNotify)g_strfreev);
-
response = gtk_dialog_run (GTK_DIALOG (seahorse_widget_get_toplevel (swidget)));
if (response == GTK_RESPONSE_ACCEPT) {
result = calculate_keyserver_uri (swidget);
diff --git a/pgp/seahorse-hkp-source.c b/pgp/seahorse-hkp-source.c
index 95226cd..826f972 100644
--- a/pgp/seahorse-hkp-source.c
+++ b/pgp/seahorse-hkp-source.c
@@ -1245,7 +1245,7 @@ seahorse_hkp_is_valid_uri (const gchar *uri)
/* Must be http or https, have a host. No querystring, user, path, passwd etc... */
if ((soup->scheme == SOUP_URI_SCHEME_HTTP || soup->scheme == SOUP_URI_SCHEME_HTTPS) &&
!soup->user && !soup->password && !soup->query && !soup->fragment &&
- soup->host && g_str_equal (soup->path ? soup->path : "/", "/"))
+ soup->host && soup->host[0] && g_str_equal (soup->path ? soup->path : "/", "/"))
ret = TRUE;
soup_uri_free (soup);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]