Commit 9b12eaef authored by Darin Adler's avatar Darin Adler

Fixed callers that were using the escape and unescape calls from

	* components/services/startup/nautilus-view/nautilus-service-startup-view.c:
	(gather_config_button_cb), (register_button_cb):
	Fixed callers that were using the escape and unescape calls from
	gnome-vfs. My guess is that these callers don't want exactly what
	they are getting, but at least this makes it compile.

	* src/nautilus-window-manage-views.c:
	(nautilus_window_request_location_change):
	There was code here to just unescape. This is not a good idea,
	since it will turn good URIs into bad URIs. On the other hand, we
	may need to do something for basic characters like %20 for better
	readability.

	* nautilus-widgets/nautilus-user-level-manager.c:
	(user_level_manager_new),
	(nautilus_user_level_manager_get_user_level):
	Added some FIXMEs.
parent ba139d51
2000-06-01 Darin Adler <darin@eazel.com>
* components/services/startup/nautilus-view/nautilus-service-startup-view.c:
(gather_config_button_cb), (register_button_cb):
Fixed callers that were using the escape and unescape calls from
gnome-vfs. My guess is that these callers don't want exactly what
they are getting, but at least this makes it compile.
* src/nautilus-window-manage-views.c:
(nautilus_window_request_location_change):
There was code here to just unescape. This is not a good idea,
since it will turn good URIs into bad URIs. On the other hand, we
may need to do something for basic characters like %20 for better
readability.
* nautilus-widgets/nautilus-user-level-manager.c:
(user_level_manager_new),
(nautilus_user_level_manager_get_user_level):
Added some FIXMEs.
2000-06-01 John Sullivan <sullivan@eazel.com>
* libnautilus-extensions/nautilus-program-chooser.c:
......
......@@ -250,8 +250,8 @@ gather_config_button_cb (GtkWidget* button, NautilusServicesContentView* view) {
gethostname (&host_name[0], 511);
encoded_token = gnome_vfs_escape_string (view->details->auth_token, GNOME_VFS_URI_ENCODING_XALPHAS);
encoded_host_name = gnome_vfs_escape_string (host_name, GNOME_VFS_URI_ENCODING_XALPHAS);
encoded_token = gnome_vfs_escape_string (view->details->auth_token, GNOME_VFS_URI_UNSAFE_ALL);
encoded_host_name = gnome_vfs_escape_string (host_name, GNOME_VFS_URI_UNSAFE_ALL);
cookie_str = g_strdup_printf ("token=%s; computer=%s", encoded_token, encoded_host_name);
request = make_http_post_request (uri, config_string, cookie_str);
......@@ -324,8 +324,8 @@ register_button_cb (GtkWidget* button, NautilusServicesContentView* view) {
/* hide the error text and give feedback in the status area during the request */
gtk_widget_hide (view->details->feedback_text);
encoded_email = gnome_vfs_escape_string (email, GNOME_VFS_URI_ENCODING_XALPHAS);
encoded_password = gnome_vfs_escape_string (password, GNOME_VFS_URI_ENCODING_XALPHAS);
encoded_email = gnome_vfs_escape_string (email, GNOME_VFS_URI_UNSAFE_ALL);
encoded_password = gnome_vfs_escape_string (password, GNOME_VFS_URI_UNSAFE_ALL);
body = g_strdup_printf ("email=%s&pwd=%s", encoded_email, encoded_password);
uri = g_strdup_printf ("http://%s/member/new.pl", SERVICE_DOMAIN_NAME);
......@@ -380,7 +380,7 @@ register_button_cb (GtkWidget* button, NautilusServicesContentView* view) {
if (view->details->auth_token)
g_free (view->details->auth_token);
view->details->auth_token = g_strdup (gnome_vfs_unescape_string (temp_str));
view->details->auth_token = g_strdup (gnome_vfs_unescape_string (temp_str, NULL));
xmlSetProp (service_node, "token", view->details->auth_token);
temp_filename = g_strdup_printf ("%s/.nautilus/service.xml", g_get_home_dir ());
......
......@@ -104,7 +104,7 @@ NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusUserLevelManager, nautilus_user_level
/* Create the icon factory. */
static NautilusUserLevelManager *
user_level_manager_new ()
user_level_manager_new (void)
{
NautilusUserLevelManager *manager;
guint i;
......@@ -306,6 +306,10 @@ nautilus_user_level_manager_get_user_level (void)
gint index;
user_level_string = gconf_get_user_level_string ();
/* FIXME: Asserting based on something that's read from GConf
* seems like a bad idea. It means we core dump if
* something's wrong.
*/
g_assert (user_level_string != NULL);
index = nautilus_string_list_get_index_for_string (manager->user_level_names,
......@@ -313,6 +317,10 @@ nautilus_user_level_manager_get_user_level (void)
g_free (user_level_string);
/* FIXME: Asserting based on something that's read from GConf
* seems like a bad idea. It means we core dump if
* something's wrong.
*/
g_assert (index != NAUTILUS_STRING_LIST_NOT_FOUND);
return (guint) index;
......
......@@ -104,7 +104,7 @@ NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusUserLevelManager, nautilus_user_level
/* Create the icon factory. */
static NautilusUserLevelManager *
user_level_manager_new ()
user_level_manager_new (void)
{
NautilusUserLevelManager *manager;
guint i;
......@@ -306,6 +306,10 @@ nautilus_user_level_manager_get_user_level (void)
gint index;
user_level_string = gconf_get_user_level_string ();
/* FIXME: Asserting based on something that's read from GConf
* seems like a bad idea. It means we core dump if
* something's wrong.
*/
g_assert (user_level_string != NULL);
index = nautilus_string_list_get_index_for_string (manager->user_level_names,
......@@ -313,6 +317,10 @@ nautilus_user_level_manager_get_user_level (void)
g_free (user_level_string);
/* FIXME: Asserting based on something that's read from GConf
* seems like a bad idea. It means we core dump if
* something's wrong.
*/
g_assert (index != NAUTILUS_STRING_LIST_NOT_FOUND);
return (guint) index;
......
......@@ -104,7 +104,7 @@ NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusUserLevelManager, nautilus_user_level
/* Create the icon factory. */
static NautilusUserLevelManager *
user_level_manager_new ()
user_level_manager_new (void)
{
NautilusUserLevelManager *manager;
guint i;
......@@ -306,6 +306,10 @@ nautilus_user_level_manager_get_user_level (void)
gint index;
user_level_string = gconf_get_user_level_string ();
/* FIXME: Asserting based on something that's read from GConf
* seems like a bad idea. It means we core dump if
* something's wrong.
*/
g_assert (user_level_string != NULL);
index = nautilus_string_list_get_index_for_string (manager->user_level_names,
......@@ -313,6 +317,10 @@ nautilus_user_level_manager_get_user_level (void)
g_free (user_level_string);
/* FIXME: Asserting based on something that's read from GConf
* seems like a bad idea. It means we core dump if
* something's wrong.
*/
g_assert (index != NAUTILUS_STRING_LIST_NOT_FOUND);
return (guint) index;
......
......@@ -657,8 +657,6 @@ nautilus_window_request_location_change (NautilusWindow *window,
NautilusWindow *new_window;
gboolean create_new_window;
loc->requested_uri = gnome_vfs_unescape_string (loc->requested_uri);
if (handle_unreadable_location (window, loc->requested_uri)) {
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment