diff options
author | Michael Fleming <mfleming@src.gnome.org> | 2001-03-31 02:38:25 +0000 |
---|---|---|
committer | Michael Fleming <mfleming@src.gnome.org> | 2001-03-31 02:38:25 +0000 |
commit | 00d84b24fb1461c153e9fe95c9333fc74a856800 (patch) | |
tree | 514d6e578542c55defc1f8089f4ef82cfe574bf2 | |
parent | 42cd551224d106794287674d93dda7dc0ef1d61e (diff) | |
download | nautilus-00d84b24fb1461c153e9fe95c9333fc74a856800.tar.gz |
reviewed by: John Sullivan <sullivan@eazel.com>
Part of bug 4832
Added preferences for HTTP proxy username/password.
Really, this is sub-optimal:
o The first-time druid still doesn't have UI for this
o The password is presented and stored in the clear (? does this matter?
It's transmitted in the clear, too)
o If the user is using an HTTP proxy that requires authentication, but
have not filled out the username/password correctly, they get an
"Access Denied" dialog
o There's no way to tell embedded mozilla about this (bug 74171), so
embedded mozilla prompts the user again for the password
* libnautilus-extensions/nautilus-global-preferences.c:
* libnautilus-extensions/nautilus-global-preferences.h:
-rw-r--r-- | ChangeLog | 22 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-global-preferences.c | 41 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-global-preferences.h | 11 | ||||
-rw-r--r-- | libnautilus-private/nautilus-global-preferences.c | 41 | ||||
-rw-r--r-- | libnautilus-private/nautilus-global-preferences.h | 11 |
5 files changed, 104 insertions, 22 deletions
@@ -1,3 +1,25 @@ +2001-03-30 Michael K. Fleming <mfleming@eazel.com> + + reviewed by: John Sullivan <sullivan@eazel.com> + + Part of bug 4832 + + Added preferences for HTTP proxy username/password. + + Really, this is sub-optimal: + + o The first-time druid still doesn't have UI for this + o The password is presented and stored in the clear (? does this matter? + It's transmitted in the clear, too) + o If the user is using an HTTP proxy that requires authentication, but + have not filled out the username/password correctly, they get an + "Access Denied" dialog + o There's no way to tell embedded mozilla about this (bug 74171), so + embedded mozilla prompts the user again for the password + + * libnautilus-extensions/nautilus-global-preferences.c: + * libnautilus-extensions/nautilus-global-preferences.h: + 2001-03-30 Ramiro Estrugo <ramiro@eazel.com> reviewed by: Mike Fleming <mfleming@eazel.com> diff --git a/libnautilus-extensions/nautilus-global-preferences.c b/libnautilus-extensions/nautilus-global-preferences.c index 121cbaa50..1cfbfafeb 100644 --- a/libnautilus-extensions/nautilus-global-preferences.c +++ b/libnautilus-extensions/nautilus-global-preferences.c @@ -50,9 +50,7 @@ static const char untranslated_global_preferences_dialog_title[] = N_("Nautilus Preferences"); #define GLOBAL_PREFERENCES_DIALOG_TITLE _(untranslated_global_preferences_dialog_title) -static const char PROXY_HOST_KEY[] = "/system/gnome-vfs/http-proxy-host"; -static const char PROXY_PORT_KEY[] = "/system/gnome-vfs/http-proxy-port"; -static const char USE_PROXY_KEY[] = "/system/gnome-vfs/use-http-proxy"; +/* base path for NAUTILUS_PREFERENCES_HTTP_* */ static const char SYSTEM_GNOME_VFS_PATH[] = "/system/gnome-vfs"; /* A structure that describes a single preferences dialog ui item. */ @@ -355,18 +353,24 @@ static const PreferenceDefault preference_defaults[] = { }, /* Proxy defaults */ - { USE_PROXY_KEY, + { NAUTILUS_PREFERENCES_HTTP_USE_PROXY, PREFERENCE_BOOLEAN, NAUTILUS_USER_LEVEL_NOVICE, { NAUTILUS_USER_LEVEL_NOVICE, GINT_TO_POINTER (FALSE) }, { USER_LEVEL_NONE } }, - { PROXY_PORT_KEY, + { NAUTILUS_PREFERENCES_HTTP_PROXY_PORT, PREFERENCE_INTEGER, NAUTILUS_USER_LEVEL_NOVICE, { NAUTILUS_USER_LEVEL_NOVICE, GINT_TO_POINTER (8080) }, { USER_LEVEL_NONE } }, + { NAUTILUS_PREFERENCES_HTTP_PROXY_USE_AUTH, + PREFERENCE_BOOLEAN, + NAUTILUS_USER_LEVEL_NOVICE, + { NAUTILUS_USER_LEVEL_NOVICE, GINT_TO_POINTER (FALSE) }, + { USER_LEVEL_NONE } + }, { NULL } }; @@ -810,26 +814,47 @@ static PreferenceDialogItem navigation_items[] = { 0 }, { N_("HTTP Proxy Settings"), - USE_PROXY_KEY, + NAUTILUS_PREFERENCES_HTTP_USE_PROXY, N_("Use HTTP Proxy"), NAUTILUS_PREFERENCE_ITEM_BOOLEAN, NULL, 0 }, { N_("HTTP Proxy Settings"), - PROXY_HOST_KEY, + NAUTILUS_PREFERENCES_HTTP_PROXY_HOST, N_("Location:"), NAUTILUS_PREFERENCE_ITEM_EDITABLE_STRING, NULL, 0 }, { N_("HTTP Proxy Settings"), - PROXY_PORT_KEY, + NAUTILUS_PREFERENCES_HTTP_PROXY_PORT, N_("Port:"), NAUTILUS_PREFERENCE_ITEM_EDITABLE_INTEGER, NULL, 0 }, + { N_("HTTP Proxy Settings"), + NAUTILUS_PREFERENCES_HTTP_PROXY_USE_AUTH, + N_("Proxy requires a username and password:"), + NAUTILUS_PREFERENCE_ITEM_BOOLEAN, + NULL, + 0 + }, + { N_("HTTP Proxy Settings"), + NAUTILUS_PREFERENCES_HTTP_PROXY_AUTH_USERNAME, + N_("Username:"), + NAUTILUS_PREFERENCE_ITEM_EDITABLE_STRING, + NULL, + 0 + }, + { N_("HTTP Proxy Settings"), + NAUTILUS_PREFERENCES_HTTP_USE_AUTH_PASSWORD, + N_("Password:"), + NAUTILUS_PREFERENCE_ITEM_EDITABLE_STRING, + NULL, + 0 + }, { N_("Built-in Bookmarks"), NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS, N_("Don't include the built-in bookmarks in the Bookmarks menu"), diff --git a/libnautilus-extensions/nautilus-global-preferences.h b/libnautilus-extensions/nautilus-global-preferences.h index eeb37815e..f8acb8374 100644 --- a/libnautilus-extensions/nautilus-global-preferences.h +++ b/libnautilus-extensions/nautilus-global-preferences.h @@ -68,9 +68,14 @@ BEGIN_GNOME_DECLS #define NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS "preferences/hide_built_in_bookmarks" /* Proxy */ -#define NAUTILUS_PREFERENCES_HTTP_PROXY "preferences/http-proxy" -#define NAUTILUS_PREFERENCES_HTTP_PROXY_PORT "preferences/http-proxy-port" -#define NAUTILUS_PREFERENCES_HTTP_USE_PROXY "preferences/http-use-proxy" +#define NAUTILUS_PREFERENCES_HTTP_USE_PROXY "/system/gnome-vfs/use-http-proxy" +#define NAUTILUS_PREFERENCES_HTTP_PROXY_HOST "/system/gnome-vfs/http-proxy-host" +#define NAUTILUS_PREFERENCES_HTTP_PROXY_PORT "/system/gnome-vfs/http-proxy-port" + +/* HTTP Proxy Authentication */ +#define NAUTILUS_PREFERENCES_HTTP_PROXY_USE_AUTH "/system/gnome-vfs/use-http-proxy-authorization" +#define NAUTILUS_PREFERENCES_HTTP_PROXY_AUTH_USERNAME "/system/gnome-vfs/http-proxy-authorization-user" +#define NAUTILUS_PREFERENCES_HTTP_USE_AUTH_PASSWORD "/system/gnome-vfs/http-proxy-authorization-password" /* adding/removing from property browser */ #define NAUTILUS_PREFERENCES_CAN_ADD_CONTENT "preferences/can_add_content" diff --git a/libnautilus-private/nautilus-global-preferences.c b/libnautilus-private/nautilus-global-preferences.c index 121cbaa50..1cfbfafeb 100644 --- a/libnautilus-private/nautilus-global-preferences.c +++ b/libnautilus-private/nautilus-global-preferences.c @@ -50,9 +50,7 @@ static const char untranslated_global_preferences_dialog_title[] = N_("Nautilus Preferences"); #define GLOBAL_PREFERENCES_DIALOG_TITLE _(untranslated_global_preferences_dialog_title) -static const char PROXY_HOST_KEY[] = "/system/gnome-vfs/http-proxy-host"; -static const char PROXY_PORT_KEY[] = "/system/gnome-vfs/http-proxy-port"; -static const char USE_PROXY_KEY[] = "/system/gnome-vfs/use-http-proxy"; +/* base path for NAUTILUS_PREFERENCES_HTTP_* */ static const char SYSTEM_GNOME_VFS_PATH[] = "/system/gnome-vfs"; /* A structure that describes a single preferences dialog ui item. */ @@ -355,18 +353,24 @@ static const PreferenceDefault preference_defaults[] = { }, /* Proxy defaults */ - { USE_PROXY_KEY, + { NAUTILUS_PREFERENCES_HTTP_USE_PROXY, PREFERENCE_BOOLEAN, NAUTILUS_USER_LEVEL_NOVICE, { NAUTILUS_USER_LEVEL_NOVICE, GINT_TO_POINTER (FALSE) }, { USER_LEVEL_NONE } }, - { PROXY_PORT_KEY, + { NAUTILUS_PREFERENCES_HTTP_PROXY_PORT, PREFERENCE_INTEGER, NAUTILUS_USER_LEVEL_NOVICE, { NAUTILUS_USER_LEVEL_NOVICE, GINT_TO_POINTER (8080) }, { USER_LEVEL_NONE } }, + { NAUTILUS_PREFERENCES_HTTP_PROXY_USE_AUTH, + PREFERENCE_BOOLEAN, + NAUTILUS_USER_LEVEL_NOVICE, + { NAUTILUS_USER_LEVEL_NOVICE, GINT_TO_POINTER (FALSE) }, + { USER_LEVEL_NONE } + }, { NULL } }; @@ -810,26 +814,47 @@ static PreferenceDialogItem navigation_items[] = { 0 }, { N_("HTTP Proxy Settings"), - USE_PROXY_KEY, + NAUTILUS_PREFERENCES_HTTP_USE_PROXY, N_("Use HTTP Proxy"), NAUTILUS_PREFERENCE_ITEM_BOOLEAN, NULL, 0 }, { N_("HTTP Proxy Settings"), - PROXY_HOST_KEY, + NAUTILUS_PREFERENCES_HTTP_PROXY_HOST, N_("Location:"), NAUTILUS_PREFERENCE_ITEM_EDITABLE_STRING, NULL, 0 }, { N_("HTTP Proxy Settings"), - PROXY_PORT_KEY, + NAUTILUS_PREFERENCES_HTTP_PROXY_PORT, N_("Port:"), NAUTILUS_PREFERENCE_ITEM_EDITABLE_INTEGER, NULL, 0 }, + { N_("HTTP Proxy Settings"), + NAUTILUS_PREFERENCES_HTTP_PROXY_USE_AUTH, + N_("Proxy requires a username and password:"), + NAUTILUS_PREFERENCE_ITEM_BOOLEAN, + NULL, + 0 + }, + { N_("HTTP Proxy Settings"), + NAUTILUS_PREFERENCES_HTTP_PROXY_AUTH_USERNAME, + N_("Username:"), + NAUTILUS_PREFERENCE_ITEM_EDITABLE_STRING, + NULL, + 0 + }, + { N_("HTTP Proxy Settings"), + NAUTILUS_PREFERENCES_HTTP_USE_AUTH_PASSWORD, + N_("Password:"), + NAUTILUS_PREFERENCE_ITEM_EDITABLE_STRING, + NULL, + 0 + }, { N_("Built-in Bookmarks"), NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS, N_("Don't include the built-in bookmarks in the Bookmarks menu"), diff --git a/libnautilus-private/nautilus-global-preferences.h b/libnautilus-private/nautilus-global-preferences.h index eeb37815e..f8acb8374 100644 --- a/libnautilus-private/nautilus-global-preferences.h +++ b/libnautilus-private/nautilus-global-preferences.h @@ -68,9 +68,14 @@ BEGIN_GNOME_DECLS #define NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS "preferences/hide_built_in_bookmarks" /* Proxy */ -#define NAUTILUS_PREFERENCES_HTTP_PROXY "preferences/http-proxy" -#define NAUTILUS_PREFERENCES_HTTP_PROXY_PORT "preferences/http-proxy-port" -#define NAUTILUS_PREFERENCES_HTTP_USE_PROXY "preferences/http-use-proxy" +#define NAUTILUS_PREFERENCES_HTTP_USE_PROXY "/system/gnome-vfs/use-http-proxy" +#define NAUTILUS_PREFERENCES_HTTP_PROXY_HOST "/system/gnome-vfs/http-proxy-host" +#define NAUTILUS_PREFERENCES_HTTP_PROXY_PORT "/system/gnome-vfs/http-proxy-port" + +/* HTTP Proxy Authentication */ +#define NAUTILUS_PREFERENCES_HTTP_PROXY_USE_AUTH "/system/gnome-vfs/use-http-proxy-authorization" +#define NAUTILUS_PREFERENCES_HTTP_PROXY_AUTH_USERNAME "/system/gnome-vfs/http-proxy-authorization-user" +#define NAUTILUS_PREFERENCES_HTTP_USE_AUTH_PASSWORD "/system/gnome-vfs/http-proxy-authorization-password" /* adding/removing from property browser */ #define NAUTILUS_PREFERENCES_CAN_ADD_CONTENT "preferences/can_add_content" |