diff options
author | Darin Adler <darin@src.gnome.org> | 2000-10-09 23:27:12 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2000-10-09 23:27:12 +0000 |
commit | 4ae258e14ee90cd86297381f631c850dd370e920 (patch) | |
tree | e0f6309bd3fa64b6f57c180cd79a7a4bae6121c5 /libnautilus-private | |
parent | eea192b04c4a27badabc24e16e944c85b50a9d6e (diff) | |
download | nautilus-4ae258e14ee90cd86297381f631c850dd370e920.tar.gz |
Unescape the names of files for display in the tree view. Fixes bug 2892
* components/tree/nautilus-tree-view.c:
(nautilus_tree_view_uri_to_name): Unescape the names of files for
display in the tree view. Fixes bug 2892 (tree displays files
with escaped characters).
* libnautilus-extensions/nautilus-directory-async.c:
(dequeue_pending_idle_callback): Fixed the structure here to make
it more clear that it's handling ref. counts correctly.
* libnautilus-extensions/nautilus-directory.h:
* libnautilus-extensions/nautilus-file.h:
Wrote better comments to explain the convenience cover functions.
* src/nautilus-window-menus.c: Got rid of some UIH stuff.
* src/nautilus-window-toolbars.c: (set_up_button),
(nautilus_window_initialize_toolbars),
(nautilus_window_toolbar_remove_theme_callback):
Changed commented-out code back to ifdef UIH.
* src/nautilus-window.c: (nautilus_window_clear_status),
(nautilus_window_set_status): Change to use the new Bonobo call
for setting status.
(navigation_bar_mode_changed_callback): Changed commented-out code
back to ifdef UIH.
(nautilus_window_constructed): Removed some status-bar-related
code.
Diffstat (limited to 'libnautilus-private')
-rw-r--r-- | libnautilus-private/nautilus-directory-async.c | 20 | ||||
-rw-r--r-- | libnautilus-private/nautilus-directory.h | 5 | ||||
-rw-r--r-- | libnautilus-private/nautilus-file.h | 9 |
3 files changed, 22 insertions, 12 deletions
diff --git a/libnautilus-private/nautilus-directory-async.c b/libnautilus-private/nautilus-directory-async.c index d4afcb36f..9650b8529 100644 --- a/libnautilus-private/nautilus-directory-async.c +++ b/libnautilus-private/nautilus-directory-async.c @@ -901,21 +901,23 @@ dequeue_pending_idle_callback (gpointer callback_data) next = p->next; if (file->details->unconfirmed) { + nautilus_file_ref (file); + changed_files = g_list_prepend (changed_files, file); + file->details->is_gone = TRUE; directory->details->files = g_list_remove_link (directory->details->files, p); g_list_free_1 (p); - if (!nautilus_directory_is_file_list_monitored (directory)) { - /* FIXME: is this right? - * I would expect to have to ref a file if the directory is monitored, - * not the other way around. - * - * If it's correct, a comment here would help. - */ - nautilus_file_ref (file); + /* Since we removed from the files + * list, we must unref in the case + * where the directory was monitored + * (holding a ref on each item in the + * files list). + */ + if (nautilus_directory_is_file_list_monitored (directory)) { + nautilus_file_unref (file); } - changed_files = g_list_prepend (changed_files, file); } } } diff --git a/libnautilus-private/nautilus-directory.h b/libnautilus-private/nautilus-directory.h index 5845a6b4f..31775fac3 100644 --- a/libnautilus-private/nautilus-directory.h +++ b/libnautilus-private/nautilus-directory.h @@ -140,7 +140,10 @@ GtkType nautilus_directory_get_type (void); */ NautilusDirectory *nautilus_directory_get (const char *uri); -/* Convenience functions, since we do a lot of ref'ing and unref'ing. */ +/* Covers for gtk_object_ref and gtk_object_unref that provide two conveniences: + * 1) You don't have to cast to GtkObject *, so using these is type safe. + * 2) You are allowed to call these with NULL, + */ void nautilus_directory_ref (NautilusDirectory *directory); void nautilus_directory_unref (NautilusDirectory *directory); diff --git a/libnautilus-private/nautilus-file.h b/libnautilus-private/nautilus-file.h index acab8c78a..93a10d633 100644 --- a/libnautilus-private/nautilus-file.h +++ b/libnautilus-private/nautilus-file.h @@ -84,7 +84,10 @@ GtkType nautilus_file_get_type (void); /* Getting at a single file. */ NautilusFile * nautilus_file_get (const char *uri); -/* Basic operations on file objects. */ +/* Covers for gtk_object_ref and gtk_object_unref that provide two conveniences: + * 1) You don't have to cast to GtkObject *, so using these is type safe. + * 2) You are allowed to call these with NULL, + */ NautilusFile * nautilus_file_ref (NautilusFile *file); void nautilus_file_unref (NautilusFile *file); @@ -241,7 +244,9 @@ int nautilus_file_compare_name (NautilusFile */ char * nautilus_file_get_activation_uri (NautilusFile *file); -/* Convenience functions for dealing with a list of NautilusFile objects that each have a ref. */ +/* Convenience functions for dealing with a list of NautilusFile objects that each have a ref. + * These are just convenient names for functions that work on lists of GtkObject *. + */ GList * nautilus_file_list_ref (GList *file_list); void nautilus_file_list_unref (GList *file_list); void nautilus_file_list_free (GList *file_list); |