summaryrefslogtreecommitdiff
path: root/src/nautilus-window-manage-views.c
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2000-05-31 23:27:26 +0000
committerDarin Adler <darin@src.gnome.org>2000-05-31 23:27:26 +0000
commitd90f8124e6dd2cec64f8db75fd38e1b3dc3d99fe (patch)
tree78adee748a0282633eadb6af849aa17f6c41b787 /src/nautilus-window-manage-views.c
parent3ec2e7fab72bae4d258a3f816a52a06100f77d71 (diff)
downloadnautilus-d90f8124e6dd2cec64f8db75fd38e1b3dc3d99fe.tar.gz
Fixed a bug where I accidentally treated root as "unable to access
* libnautilus-extensions/nautilus-file.c: (nautilus_file_denies_access_permission): Fixed a bug where I accidentally treated root as "unable to access anything" instead of "able to access everything". * src/nautilus-sidebar-tabs.h: Fixed file name in include guard. I'll probably need to write a script to find the broken ones. * src/nautilus-window-manage-views.c: (handle_unreadable_location): Fixed a bug where we unref's a file object before using it. * src/nautilus-window-private.h: Got rid of a straggler prototype for a nonexistent function. * RENAMING: Some are done.
Diffstat (limited to 'src/nautilus-window-manage-views.c')
-rw-r--r--src/nautilus-window-manage-views.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index f3df5666e..f2096eee9 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -609,7 +609,8 @@ nautilus_window_load_sidebar_panel (NautilusWindow *window,
}
static gboolean
-handle_unreadable_location (NautilusWindow *window, const char *uri) {
+handle_unreadable_location (NautilusWindow *window, const char *uri)
+{
NautilusFile *file;
gboolean unreadable;
char *file_name;
@@ -625,17 +626,17 @@ handle_unreadable_location (NautilusWindow *window, const char *uri) {
}
unreadable = !nautilus_file_can_read (file);
- nautilus_file_unref (file);
if (unreadable) {
file_name = nautilus_file_get_name (file);
- message = g_strdup_printf (_("You do not have the permissions necessary to view \"%s.\""), file_name);
- gtk_widget_show (gnome_error_dialog_parented (message,
- GTK_WINDOW (window)));
+ message = g_strdup_printf (_("You do not have the permissions necessary to view \"%s\"."), file_name);
g_free (file_name);
+ nautilus_error_dialog_parented (message, GTK_WINDOW (window));
g_free (message);
}
+ nautilus_file_unref (file);
+
return unreadable;
}
@@ -643,7 +644,7 @@ void
nautilus_window_request_location_change (NautilusWindow *window,
Nautilus_NavigationRequestInfo *loc,
NautilusViewFrame *requesting_view)
-{
+{
NautilusWindow *new_window;
gboolean create_new_window;