diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-12-17 05:53:41 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-12-17 06:03:54 +0800 |
commit | 6faf671382518db3a81af23bd67a5f5b41ab3b2e (patch) | |
tree | f05f4eb81bf648e9f8ee7ce2fffc0c91b2e2c999 | |
parent | f1ca58d40a5a005aa5fa751959edbe4ec5f2d22f (diff) | |
download | gsoc2013-evolution-6faf671382518db3a81af23bd67a5f5b41ab3b2e.tar.gz gsoc2013-evolution-6faf671382518db3a81af23bd67a5f5b41ab3b2e.tar.zst gsoc2013-evolution-6faf671382518db3a81af23bd67a5f5b41ab3b2e.zip |
e-passwords: Remove unused function parameters.
-rw-r--r-- | calendar/gui/e-meeting-store.c | 4 | ||||
-rw-r--r-- | e-util/e-passwords.c | 11 | ||||
-rw-r--r-- | e-util/e-passwords.h | 44 | ||||
-rw-r--r-- | libemail-engine/e-mail-session.c | 8 | ||||
-rw-r--r-- | modules/cal-config-google/e-google-chooser.c | 4 | ||||
-rw-r--r-- | plugins/publish-calendar/publish-calendar.c | 4 | ||||
-rw-r--r-- | plugins/publish-calendar/publish-location.c | 6 | ||||
-rw-r--r-- | plugins/publish-calendar/url-editor-dialog.c | 6 | ||||
-rw-r--r-- | smime/gui/component.c | 4 | ||||
-rw-r--r-- | smime/lib/e-pkcs12.c | 2 |
10 files changed, 43 insertions, 50 deletions
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c index 4e8e4e32d1..af15470938 100644 --- a/calendar/gui/e-meeting-store.c +++ b/calendar/gui/e-meeting-store.c @@ -1926,7 +1926,7 @@ soup_authenticate (SoupSession *session, } else { gchar *password; - password = e_passwords_get_password (NULL, orig_uri); + password = e_passwords_get_password (orig_uri); if (password) { soup_auth_authenticate (auth, suri->user, password); tried = TRUE; @@ -1963,7 +1963,7 @@ soup_authenticate (SoupSession *session, } password = e_passwords_ask_password ( - _("Enter password"), NULL, orig_uri, + _("Enter password"), orig_uri, description->str, E_PASSWORDS_REMEMBER_FOREVER | E_PASSWORDS_SECRET | E_PASSWORDS_ONLINE | (retrying ? E_PASSWORDS_REPROMPT : 0), diff --git a/e-util/e-passwords.c b/e-util/e-passwords.c index 1f2d3b2e89..89dc39ef5b 100644 --- a/e-util/e-passwords.c +++ b/e-util/e-passwords.c @@ -658,8 +658,7 @@ e_passwords_set_online (gint state) * Saves the password associated with @key to disk. **/ void -e_passwords_remember_password (const gchar *unused, - const gchar *key) +e_passwords_remember_password (const gchar *key) { EPassMsg *msg; @@ -679,8 +678,7 @@ e_passwords_remember_password (const gchar *unused, * Forgets the password associated with @key, in memory and on disk. **/ void -e_passwords_forget_password (const gchar *unused, - const gchar *key) +e_passwords_forget_password (const gchar *key) { EPassMsg *msg; @@ -701,8 +699,7 @@ e_passwords_forget_password (const gchar *unused, * must free the returned password. **/ gchar * -e_passwords_get_password (const gchar *unused, - const gchar *key) +e_passwords_get_password (const gchar *key) { EPassMsg *msg; gchar *passwd; @@ -749,7 +746,6 @@ e_passwords_add_password (const gchar *key, /** * e_passwords_ask_password: * @title: title for the password dialog - * @unused: this argument is no longer used * @key: key to store the password under * @prompt: prompt string * @remember_type: whether or not to offer to remember the password, @@ -767,7 +763,6 @@ e_passwords_add_password (const gchar *key, **/ gchar * e_passwords_ask_password (const gchar *title, - const gchar *unused, const gchar *key, const gchar *prompt, EPasswordsRememberType remember_type, diff --git a/e-util/e-passwords.h b/e-util/e-passwords.h index 2fa345839e..1c884bb62e 100644 --- a/e-util/e-passwords.h +++ b/e-util/e-passwords.h @@ -26,26 +26,13 @@ #ifndef EDS_DISABLE_DEPRECATED -#ifndef _E_PASSWORD_H_ -#define _E_PASSWORD_H_ +#ifndef E_PASSWORDS_H +#define E_PASSWORDS_H #include <gtk/gtk.h> G_BEGIN_DECLS -/* - * initialization is now implicit when you call any of the functions - * below, although this is only correct if the functions are called - * from the main thread. - */ -void e_passwords_init (void); - -void e_passwords_set_online (gint state); -void e_passwords_remember_password (const gchar *unused, const gchar *key); -void e_passwords_add_password (const gchar *key, const gchar *passwd); -gchar *e_passwords_get_password (const gchar *unused, const gchar *key); -void e_passwords_forget_password (const gchar *unused, const gchar *key); - typedef enum { E_PASSWORDS_REMEMBER_NEVER, E_PASSWORDS_REMEMBER_SESSION, @@ -60,16 +47,27 @@ typedef enum { E_PASSWORDS_PASSPHRASE = 1<<12 /* We are asking a passphrase */ } EPasswordsRememberType; -gchar * e_passwords_ask_password (const gchar *title, - const gchar *unused, - const gchar *key, - const gchar *prompt, - EPasswordsRememberType remember_type, - gboolean *remember, - GtkWindow *parent); +/* + * initialization is now implicit when you call any of the functions + * below, although this is only correct if the functions are called + * from the main thread. + */ +void e_passwords_init (void); +void e_passwords_set_online (gint state); +void e_passwords_remember_password (const gchar *key); +void e_passwords_add_password (const gchar *key, + const gchar *passwd); +gchar * e_passwords_get_password (const gchar *key); +void e_passwords_forget_password (const gchar *key); +gchar * e_passwords_ask_password (const gchar *title, + const gchar *key, + const gchar *prompt, + EPasswordsRememberType remember_type, + gboolean *remember, + GtkWindow *parent); G_END_DECLS -#endif /* _E_PASSWORD_H_ */ +#endif /* E_PASSWORDS_H */ #endif /* EDS_DISABLE_DEPRECATED */ diff --git a/libemail-engine/e-mail-session.c b/libemail-engine/e-mail-session.c index b5bf18df03..30a83d4230 100644 --- a/libemail-engine/e-mail-session.c +++ b/libemail-engine/e-mail-session.c @@ -1313,7 +1313,7 @@ mail_session_get_password (CamelSession *session, /* Otherwise this had better be the CamelGpgContext case. */ g_return_val_if_fail (service == NULL, NULL); - password = e_passwords_get_password (NULL, item); + password = e_passwords_get_password (item); if (password == NULL || (flags & CAMEL_SESSION_PASSWORD_REPROMPT)) { gboolean remember; @@ -1334,10 +1334,10 @@ mail_session_get_password (CamelSession *session, eflags |= E_PASSWORDS_PASSPHRASE; password = e_passwords_ask_password ( - "", NULL, item, prompt, eflags, &remember, NULL); + "", item, prompt, eflags, &remember, NULL); if (password == NULL) - e_passwords_forget_password (NULL, item); + e_passwords_forget_password (item); } if (password == NULL) @@ -1361,7 +1361,7 @@ mail_session_forget_password (CamelSession *session, g_return_val_if_fail (service == NULL, FALSE); - e_passwords_forget_password (NULL, item); + e_passwords_forget_password (item); return TRUE; } diff --git a/modules/cal-config-google/e-google-chooser.c b/modules/cal-config-google/e-google-chooser.c index d03c5dce8f..b51976f048 100644 --- a/modules/cal-config-google/e-google-chooser.c +++ b/modules/cal-config-google/e-google-chooser.c @@ -507,11 +507,11 @@ e_google_chooser_populate (EGoogleChooser *chooser, prompt = g_strdup_printf ( _("Enter Google password for user '%s'."), user); - /* XXX The 'key' (3rd) argument doesn't matter since we're + /* XXX The 'key' (2nd) argument doesn't matter since we're * passing E_PASSWORDS_REMEMBER_NEVER, it just needs to * be non-NULL. This API is degenerating rapidly. */ password = e_passwords_ask_password ( - "", NULL, "bogus key", prompt, + "", "bogus key", prompt, E_PASSWORDS_REMEMBER_NEVER | E_PASSWORDS_DISABLE_REMEMBER | E_PASSWORDS_SECRET, NULL, parent); diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c index 00afe6be17..95fa1553c7 100644 --- a/plugins/publish-calendar/publish-calendar.c +++ b/plugins/publish-calendar/publish-calendar.c @@ -325,7 +325,7 @@ ask_password (GMountOperation *op, g_return_if_fail (soup_uri != NULL); username = soup_uri_get_user (soup_uri); - password = e_passwords_get_password (NULL, ms->uri->location); + password = e_passwords_get_password (ms->uri->location); req_pass = ((username && *username) && !(ms->uri->service_type == TYPE_ANON_FTP && @@ -335,7 +335,7 @@ ask_password (GMountOperation *op, gboolean remember = FALSE; password = e_passwords_ask_password ( - _("Enter password"), NULL, + _("Enter password"), ms->uri->location, message, E_PASSWORDS_REMEMBER_FOREVER | E_PASSWORDS_SECRET | diff --git a/plugins/publish-calendar/publish-location.c b/plugins/publish-calendar/publish-location.c index f84d589287..79eddfc4f7 100644 --- a/plugins/publish-calendar/publish-location.c +++ b/plugins/publish-calendar/publish-location.c @@ -77,11 +77,11 @@ migrateURI (const gchar *xml, uri->publish_frequency = atoi ((gchar *) frequency); uri->publish_format = URI_PUBLISH_AS_FB; - password = e_passwords_get_password (NULL, (gchar *) location); + password = e_passwords_get_password ((gchar *) location); if (password) { - e_passwords_forget_password (NULL, (gchar *) location); + e_passwords_forget_password ((gchar *) location); e_passwords_add_password (uri->location, password); - e_passwords_remember_password (NULL, uri->location); + e_passwords_remember_password (uri->location); } for (p = root->children; p != NULL; p = p->next) { diff --git a/plugins/publish-calendar/url-editor-dialog.c b/plugins/publish-calendar/url-editor-dialog.c index 5f8a68e693..c672e94de3 100644 --- a/plugins/publish-calendar/url-editor-dialog.c +++ b/plugins/publish-calendar/url-editor-dialog.c @@ -471,7 +471,7 @@ url_editor_dialog_construct (UrlEditorDialog *dialog) gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->publish_frequency), uri->publish_frequency); gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->type_selector), uri->publish_format); - uri->password = e_passwords_get_password (NULL, uri->location); + uri->password = e_passwords_get_password (uri->location); if (uri->password) { if (strlen (uri->password) != 0) { gtk_entry_set_text (GTK_ENTRY (dialog->password_entry), uri->password); @@ -601,9 +601,9 @@ url_editor_dialog_run (UrlEditorDialog *dialog) if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->remember_pw))) { e_passwords_add_password (dialog->uri->location, dialog->uri->password); - e_passwords_remember_password (NULL, dialog->uri->location); + e_passwords_remember_password (dialog->uri->location); } else { - e_passwords_forget_password (NULL, dialog->uri->location); + e_passwords_forget_password (dialog->uri->location); } l = e_source_selector_get_selection (E_SOURCE_SELECTOR (dialog->events_selector)); diff --git a/smime/gui/component.c b/smime/gui/component.c index 576d890955..e2e3e1e574 100644 --- a/smime/gui/component.c +++ b/smime/gui/component.c @@ -52,7 +52,7 @@ smime_pk11_passwd (ECertDB *db, g_free (slot_name); *passwd = e_passwords_ask_password ( - _("Enter password"), NULL, "", prompt, + _("Enter password"), "", prompt, E_PASSWORDS_REMEMBER_NEVER | E_PASSWORDS_SECRET, NULL, NULL); @@ -77,7 +77,7 @@ smime_pk11_change_passwd (ECertDB *db, prompt = _("Enter new password for certificate database"); *passwd = e_passwords_ask_password ( - _("Enter new password"), NULL, "", prompt, + _("Enter new password"), "", prompt, E_PASSWORDS_REMEMBER_NEVER | E_PASSWORDS_SECRET, NULL, NULL); } diff --git a/smime/lib/e-pkcs12.c b/smime/lib/e-pkcs12.c index eef6acd32f..3cf2cb6479 100644 --- a/smime/lib/e-pkcs12.c +++ b/smime/lib/e-pkcs12.c @@ -148,7 +148,7 @@ prompt_for_password (gchar *title, gchar *passwd; passwd = e_passwords_ask_password ( - title, NULL, "", prompt, + title, "", prompt, E_PASSWORDS_REMEMBER_NEVER | E_PASSWORDS_SECRET, NULL, NULL); |