Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>2005-09-22 20:01:31 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2005-09-22 20:01:31 (GMT)
commit5ab351ff58ce0c38a084ab060548a4d04a2aedbf (patch)
treee2f7b17065e6f9b1b7ce70f96d3bcdd74bc3bf6a
parent064a924a0f06b6cca264bfdef530311da2bac1c8 (diff)
Fix for bug 316972. Use async gnome-keyring API.
* shell/ev-password.c: (ev_password_item_created_callback), (ev_password_dialog_save_password): Fix for bug 316972. Use async gnome-keyring API.
-rw-r--r--ChangeLog7
-rw-r--r--shell/ev-password.c38
2 files changed, 30 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 8beb2d5..ecddb72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-09-22 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+
+ * shell/ev-password.c: (ev_password_item_created_callback),
+ (ev_password_dialog_save_password):
+
+ Fix for bug 316972. Use async gnome-keyring API.
+
2005-09-22 Christian Persch <chpe@cvs.gnome.org>
* shell/ev-view.c: (ev_view_scroll_event), (ev_view_class_init):
diff --git a/shell/ev-password.c b/shell/ev-password.c
index 4dc312d..e9a57ba 100644
--- a/shell/ev-password.c
+++ b/shell/ev-password.c
@@ -219,12 +219,20 @@ ev_password_dialog_entry_activated_cb (GtkEntry *entry,
gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
}
+static void
+ev_password_item_created_callback (GnomeKeyringResult result,
+ guint32 val,
+ gpointer data)
+{
+ /* Nothing yet */
+ return;
+}
+
void
ev_password_dialog_save_password (EvPasswordDialog *dialog)
{
GnomeKeyringAttributeList *attributes;
GnomeKeyringAttribute attribute;
- guint32 item_id;
gchar *name;
gchar *unescaped_uri;
@@ -244,23 +252,23 @@ ev_password_dialog_save_password (EvPasswordDialog *dialog)
name = g_strdup_printf (_("Password for document %s"), unescaped_uri);
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->priv->check_default))) {
- gnome_keyring_item_create_sync (NULL,
- GNOME_KEYRING_ITEM_GENERIC_SECRET,
- name,
- attributes,
- ev_password_dialog_get_password (dialog),
- TRUE,
- &item_id);
+ gnome_keyring_item_create (NULL,
+ GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ name,
+ attributes,
+ ev_password_dialog_get_password (dialog),
+ TRUE, ev_password_item_created_callback,
+ NULL, NULL);
}
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->priv->check_session))) {
- gnome_keyring_item_create_sync ("session",
- GNOME_KEYRING_ITEM_GENERIC_SECRET,
- name,
- attributes,
- ev_password_dialog_get_password (dialog),
- TRUE,
- &item_id);
+ gnome_keyring_item_create ("session",
+ GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ name,
+ attributes,
+ ev_password_dialog_get_password (dialog),
+ TRUE, ev_password_item_created_callback,
+ NULL, NULL);
}
gnome_keyring_attribute_list_free (attributes);