seahorse r2609 - in trunk: . ssh
- From: sadam svn gnome org
- To: svn-commits-list gnome org
- Subject: seahorse r2609 - in trunk: . ssh
- Date: Tue, 11 Nov 2008 03:50:28 +0000 (UTC)
Author: sadam
Date: Tue Nov 11 03:50:28 2008
New Revision: 2609
URL: http://svn.gnome.org/viewvc/seahorse?rev=2609&view=rev
Log:
2008-11-10 Adam Schreiber <sadam clemson edu>
* ssh/seahorse-ssh-operation.c: Fix upload password prompt.
Fixes bug #550755
Modified:
trunk/ChangeLog
trunk/ssh/seahorse-ssh-operation.c
Modified: trunk/ssh/seahorse-ssh-operation.c
==============================================================================
--- trunk/ssh/seahorse-ssh-operation.c (original)
+++ trunk/ssh/seahorse-ssh-operation.c Tue Nov 11 03:50:28 2008
@@ -460,6 +460,39 @@
return seahorse_passphrase_prompt_get (pv->prompt_dialog);
}
+static const gchar*
+prompt_password (SeahorseSSHOperation *sop, const gchar* title, const gchar* message,
+ const gchar* check, gboolean confirm)
+{
+ SeahorseSSHOperationPrivate *pv = SEAHORSE_SSH_OPERATION_GET_PRIVATE (sop);
+ gchar *display;
+ gchar *msg;
+
+ if (pv->prompt_dialog)
+ gtk_widget_destroy (GTK_WIDGET (pv->prompt_dialog));
+
+ if (pv->prompt_skey)
+ display = seahorse_key_get_display_name (pv->prompt_skey);
+ else
+ display = g_strdup (_("Secure Shell key"));
+ msg = g_strdup_printf (message, display);
+ g_free (display);
+
+ pv->prompt_dialog = seahorse_passphrase_prompt_show (title, msg, _("Password:"),
+ check, confirm);
+ g_free (msg);
+
+ /* Run and check if cancelled? */
+ if (gtk_dialog_run (pv->prompt_dialog) != GTK_RESPONSE_ACCEPT) {
+ gtk_widget_destroy (GTK_WIDGET (pv->prompt_dialog));
+ pv->prompt_dialog = NULL;
+ return NULL;
+ }
+
+ gtk_widget_hide (GTK_WIDGET (pv->prompt_dialog));
+ return seahorse_passphrase_prompt_get (pv->prompt_dialog);
+}
+
/* -----------------------------------------------------------------------------
* OBJECT
*/
@@ -727,7 +760,7 @@
DEBUG_OPERATION (("in upload_password_cb\n"));
/* Just prompt over and over again */
- return prompt_passphrase (sop, _("Secure Shell Passphrase"), msg, NULL, FALSE);
+ return prompt_password (sop, _("Remote Host Password"), msg, NULL, FALSE);
}
SeahorseOperation*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]