mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-27 11:29:24 +00:00
reviewed by: Gene Ragan <gzr@eazel.com>
Finish fixing bug 6286 (need to re-apply optimization where we do a single directory load): * src/nautilus-window-manage-views.c: (begin_location_change): Do the force_reload work in here. We want it on all 4 kinds of location change (forward, back, new location, reload). Other browsers don't do reload on back, so we may want to change this at some point. (nautilus_window_reload): Remove the old code to invalidate from here now that it's done in begin_location_change. * src/file-manager/fm-directory-view.c: (load_location_callback), (load_directory), (finish_loading), (filtering_changed_callback): Remove the old code to do force_reload. The NautilusDirectory part of triggering a reload is now handled by the shell. * libnautilus-extensions/nautilus-directory.h: * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_file_monitor_add): No force_reload parameter any more. (nautilus_directory_force_reload): New separate call used to force a reload. A method call so subclasses can implement. (nautilus_self_check_directory): Removed the FALSE force_reload argument to file_monitor_add. * libnautilus-extensions/nautilus-vfs-directory.c: (vfs_file_monitor_add): No force_reload parameter any more. (vfs_force_reload): Call through to nautilus_directory_force_reload_internal to do the real work. (nautilus_vfs_directory_initialize_class): Install the new force_reload function. * libnautilus-extensions/nautilus-merged-directory.c: (merged_file_monitor_add): No force_reload parameter any more. (merged_force_reload): Tell all of the real directories to force a reload. (monitor_add_directory): No force_reload to track any more. (nautilus_merged_directory_initialize_class): Install the new force_reload function. * libnautilus-extensions/nautilus-directory-private.h: * libnautilus-extensions/nautilus-directory-async.c: (nautilus_directory_force_reload_internal): Change the name of this function, since there's now a public function that is named nautilus_directory_force_reload. * libnautilus-extensions/nautilus-file-private.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_all_attributes): Made a separate call so other parts of the framework can use it. (nautilus_file_invalidate_all_attributes): Use the new call. * components/tree/nautilus-tree-model.c: (nautilus_tree_model_monitor_add), (nautilus_tree_model_node_begin_monitoring_no_connect): Use the new force_reload call. The old one had more granularity and thus forced less to be reloaded, but it's OK to do a little more here. * libnautilus-extensions/nautilus-trash-monitor.c: (nautilus_trash_monitor_initialize): Removed the FALSE force_reload argument to file_monitor_add. Other stuff: * libnautilus-extensions/nautilus-directory-metafile.c: (get_metafile), (nautilus_directory_get_file_metadata), (nautilus_directory_get_file_metadata_list), (nautilus_directory_set_file_metadata), (nautilus_directory_set_file_metadata_list), (nautilus_directory_copy_file_metadata), (nautilus_directory_remove_file_metadata), (nautilus_directory_rename_file_metadata): Moved FIXMEs around. Pass NULL instead of &ev when calling bonobo_object_release_unref since we don't really want to do anything different if there's some kind of error. * nautilus-installer/install-lib/.cvsignore: * nautilus-installer/libtrilobite/.cvsignore: Gotta create these files when you make new directories. * README: Change xml-i18n-tools to mention the correct branch.
This commit is contained in:
parent
06f6ce7acb
commit
b31cdf226e
84
ChangeLog
84
ChangeLog
|
@ -1,3 +1,87 @@
|
|||
2001-02-16 Darin Adler <darin@eazel.com>
|
||||
|
||||
reviewed by: Gene Ragan <gzr@eazel.com>
|
||||
|
||||
Finish fixing bug 6286 (need to re-apply optimization where we do
|
||||
a single directory load):
|
||||
|
||||
* src/nautilus-window-manage-views.c: (begin_location_change): Do
|
||||
the force_reload work in here. We want it on all 4 kinds of
|
||||
location change (forward, back, new location, reload). Other
|
||||
browsers don't do reload on back, so we may want to change this at
|
||||
some point.
|
||||
(nautilus_window_reload): Remove the old code to invalidate from
|
||||
here now that it's done in begin_location_change.
|
||||
|
||||
* src/file-manager/fm-directory-view.c: (load_location_callback),
|
||||
(load_directory), (finish_loading), (filtering_changed_callback):
|
||||
Remove the old code to do force_reload. The NautilusDirectory part
|
||||
of triggering a reload is now handled by the shell.
|
||||
|
||||
* libnautilus-extensions/nautilus-directory.h:
|
||||
* libnautilus-extensions/nautilus-directory.c:
|
||||
(nautilus_directory_file_monitor_add): No force_reload parameter
|
||||
any more.
|
||||
(nautilus_directory_force_reload): New separate call used to force
|
||||
a reload. A method call so subclasses can implement.
|
||||
(nautilus_self_check_directory): Removed the FALSE force_reload
|
||||
argument to file_monitor_add.
|
||||
* libnautilus-extensions/nautilus-vfs-directory.c:
|
||||
(vfs_file_monitor_add): No force_reload parameter any more.
|
||||
(vfs_force_reload): Call through to
|
||||
nautilus_directory_force_reload_internal to do the real work.
|
||||
(nautilus_vfs_directory_initialize_class): Install the new
|
||||
force_reload function.
|
||||
* libnautilus-extensions/nautilus-merged-directory.c:
|
||||
(merged_file_monitor_add): No force_reload parameter any more.
|
||||
(merged_force_reload): Tell all of the real directories to force a
|
||||
reload.
|
||||
(monitor_add_directory): No force_reload to track any more.
|
||||
(nautilus_merged_directory_initialize_class): Install the new
|
||||
force_reload function.
|
||||
|
||||
* libnautilus-extensions/nautilus-directory-private.h:
|
||||
* libnautilus-extensions/nautilus-directory-async.c:
|
||||
(nautilus_directory_force_reload_internal): Change the name of
|
||||
this function, since there's now a public function that is named
|
||||
nautilus_directory_force_reload.
|
||||
|
||||
* libnautilus-extensions/nautilus-file-private.h:
|
||||
* libnautilus-extensions/nautilus-file.c:
|
||||
(nautilus_file_get_all_attributes): Made a separate call so other
|
||||
parts of the framework can use it.
|
||||
(nautilus_file_invalidate_all_attributes): Use the new call.
|
||||
|
||||
* components/tree/nautilus-tree-model.c:
|
||||
(nautilus_tree_model_monitor_add),
|
||||
(nautilus_tree_model_node_begin_monitoring_no_connect): Use the
|
||||
new force_reload call. The old one had more granularity and thus
|
||||
forced less to be reloaded, but it's OK to do a little more here.
|
||||
|
||||
* libnautilus-extensions/nautilus-trash-monitor.c:
|
||||
(nautilus_trash_monitor_initialize): Removed the FALSE
|
||||
force_reload argument to file_monitor_add.
|
||||
|
||||
Other stuff:
|
||||
|
||||
* libnautilus-extensions/nautilus-directory-metafile.c:
|
||||
(get_metafile), (nautilus_directory_get_file_metadata),
|
||||
(nautilus_directory_get_file_metadata_list),
|
||||
(nautilus_directory_set_file_metadata),
|
||||
(nautilus_directory_set_file_metadata_list),
|
||||
(nautilus_directory_copy_file_metadata),
|
||||
(nautilus_directory_remove_file_metadata),
|
||||
(nautilus_directory_rename_file_metadata): Moved FIXMEs around.
|
||||
Pass NULL instead of &ev when calling bonobo_object_release_unref
|
||||
since we don't really want to do anything different if there's
|
||||
some kind of error.
|
||||
|
||||
* nautilus-installer/install-lib/.cvsignore:
|
||||
* nautilus-installer/libtrilobite/.cvsignore:
|
||||
Gotta create these files when you make new directories.
|
||||
|
||||
* README: Change xml-i18n-tools to mention the correct branch.
|
||||
|
||||
2001-02-16 Ramiro Estrugo <ramiro@eazel.com>
|
||||
|
||||
* components/mozilla/Makefile.am:
|
||||
|
|
6
README
6
README
|
@ -131,7 +131,7 @@ The following lists the packages and the versions that are required.
|
|||
ORBit: orbit-stable-0-5
|
||||
gnome-libs: gnome-libs-1-0 --enable-prefer-db1
|
||||
gnome-http: HEAD
|
||||
xml-i18n-tools: HEAD
|
||||
xml-i18n-tools: xml-i18n-tools-stable-1-x
|
||||
oaf: oaf-stable-0-6
|
||||
gconf: gconf-1-0 --disable-debug
|
||||
gdk-pixbuf: HEAD --enable-canvas-pixbuf
|
||||
|
@ -218,8 +218,8 @@ The latest Mozilla RPMs that we require can be found here:
|
|||
RedHat 6.x: http://developer.eazel.com/eazel-hacking/updates/redhat62/mozilla
|
||||
RedHat 7.x: http://developer.eazel.com/eazel-hacking/updates/redhat70/mozilla
|
||||
|
||||
Currently the minimum Mozilla version we require is Mozilla 0.7.
|
||||
Mozilla M18, the 0.7 predecessor no longer works.
|
||||
The minimum Mozilla version required is Mozilla 0.7. Mozilla M18, the
|
||||
0.7 predecessor, no longer works.
|
||||
|
||||
After installing these rpms, you can build nautilus with Mozilla
|
||||
support as follows:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 Eazel, Inc
|
||||
* Copyright (C) 2000, 2001 Eazel, Inc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
|
@ -314,11 +314,9 @@ nautilus_tree_model_monitor_add (NautilusTreeModel *model,
|
|||
model);
|
||||
|
||||
monitor_attributes = g_list_prepend (NULL, NAUTILUS_FILE_ATTRIBUTE_IS_DIRECTORY);
|
||||
|
||||
nautilus_file_monitor_add (nautilus_tree_node_get_file (model->details->root_node),
|
||||
model,
|
||||
monitor_attributes);
|
||||
|
||||
g_list_free (monitor_attributes);
|
||||
}
|
||||
|
||||
|
@ -391,12 +389,15 @@ nautilus_tree_model_node_begin_monitoring_no_connect (NautilusTreeModel
|
|||
|
||||
directory = nautilus_tree_node_get_directory (node);
|
||||
|
||||
if (force_reload) {
|
||||
nautilus_directory_force_reload (directory);
|
||||
}
|
||||
|
||||
monitor_attributes = g_list_prepend (NULL, NAUTILUS_FILE_ATTRIBUTE_IS_DIRECTORY);
|
||||
nautilus_directory_file_monitor_add (directory,
|
||||
model,
|
||||
TRUE, TRUE,
|
||||
monitor_attributes,
|
||||
force_reload);
|
||||
monitor_attributes);
|
||||
g_list_free (monitor_attributes);
|
||||
}
|
||||
|
||||
|
|
|
@ -224,17 +224,17 @@ add_numbered_menu_item_internal (BonoboUIComponent *ui,
|
|||
*/
|
||||
if (is_toggle) {
|
||||
xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" id=\"%s\" type=\"toggle\"/>\n",
|
||||
item_name, encoded_label, command_name);
|
||||
item_name, encoded_label, command_name);
|
||||
} else if (pixbuf != NULL) {
|
||||
/* Encode pixbuf type and data into XML string */
|
||||
pixbuf_data = bonobo_ui_util_pixbuf_to_xml (pixbuf);
|
||||
|
||||
xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" verb=\"%s\" pixtype=\"pixbuf\" pixname=\"%s\"/>\n",
|
||||
item_name, encoded_label, command_name, pixbuf_data);
|
||||
item_name, encoded_label, command_name, pixbuf_data);
|
||||
g_free (pixbuf_data);
|
||||
} else {
|
||||
xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" verb=\"%s\"/>\n",
|
||||
item_name, encoded_label, command_name);
|
||||
item_name, encoded_label, command_name);
|
||||
}
|
||||
g_free (encoded_label);
|
||||
g_free (item_name);
|
||||
|
@ -251,7 +251,7 @@ add_numbered_menu_item_internal (BonoboUIComponent *ui,
|
|||
g_free (xml_command);
|
||||
|
||||
g_free (command_name);
|
||||
}
|
||||
}
|
||||
|
||||
/* Add a menu item specified by number into a given path. Used for
|
||||
* dynamically creating a related series of menu items. Each index
|
||||
|
@ -333,32 +333,33 @@ remove_commands (BonoboUIComponent *ui, const char *container_path)
|
|||
g_return_if_fail (BONOBO_IS_UI_COMPONENT (ui));
|
||||
g_return_if_fail (container_path != NULL);
|
||||
|
||||
path_node = bonobo_ui_component_get_tree (ui, container_path, TRUE, NULL);
|
||||
if (path_node == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
bonobo_ui_component_freeze (ui, NULL);
|
||||
|
||||
path_node = bonobo_ui_component_get_tree (ui, container_path, TRUE, NULL);
|
||||
|
||||
if (path_node != NULL) {
|
||||
for (child_node = bonobo_ui_node_children (path_node);
|
||||
child_node != NULL;
|
||||
child_node = bonobo_ui_node_next (child_node)) {
|
||||
verb_name = bonobo_ui_node_get_attr (child_node, "verb");
|
||||
if (verb_name != NULL) {
|
||||
bonobo_ui_component_remove_verb (ui, verb_name);
|
||||
bonobo_ui_node_free_string (verb_name);
|
||||
} else {
|
||||
for (child_node = bonobo_ui_node_children (path_node);
|
||||
child_node != NULL;
|
||||
child_node = bonobo_ui_node_next (child_node)) {
|
||||
verb_name = bonobo_ui_node_get_attr (child_node, "verb");
|
||||
if (verb_name != NULL) {
|
||||
bonobo_ui_component_remove_verb (ui, verb_name);
|
||||
bonobo_ui_node_free_string (verb_name);
|
||||
} else {
|
||||
/* Only look for an id if there's no verb */
|
||||
id_name = bonobo_ui_node_get_attr (child_node, "id");
|
||||
if (id_name != NULL) {
|
||||
bonobo_ui_component_remove_listener (ui, id_name);
|
||||
bonobo_ui_node_free_string (id_name);
|
||||
}
|
||||
id_name = bonobo_ui_node_get_attr (child_node, "id");
|
||||
if (id_name != NULL) {
|
||||
bonobo_ui_component_remove_listener (ui, id_name);
|
||||
bonobo_ui_node_free_string (id_name);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
bonobo_ui_node_free (path_node);
|
||||
bonobo_ui_component_thaw (ui, NULL);
|
||||
|
||||
bonobo_ui_node_free (path_node);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2267,8 +2267,8 @@ nautilus_directory_invalidate_file_attributes (NautilusDirectory *directory,
|
|||
}
|
||||
|
||||
void
|
||||
nautilus_directory_force_reload (NautilusDirectory *directory,
|
||||
GList *file_attributes)
|
||||
nautilus_directory_force_reload_internal (NautilusDirectory *directory,
|
||||
GList *file_attributes)
|
||||
{
|
||||
/* invalidate attributes that are getting reloaded for all files */
|
||||
nautilus_directory_invalidate_file_attributes (directory, file_attributes);
|
||||
|
|
|
@ -77,8 +77,6 @@ get_metafile (NautilusDirectory *directory, CORBA_Environment *ev)
|
|||
uri = nautilus_directory_get_uri (directory);
|
||||
metafile = Nautilus_MetafileFactory_open (get_factory (), uri, ev);
|
||||
g_free (uri);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
return metafile;
|
||||
}
|
||||
|
@ -100,13 +98,14 @@ nautilus_directory_get_file_metadata (NautilusDirectory *directory,
|
|||
g_return_val_if_fail (!nautilus_str_is_empty (file_name), NULL);
|
||||
g_return_val_if_fail (!nautilus_str_is_empty (key), NULL);
|
||||
|
||||
/* We can't pass NULL as a CORBA_string - pass "" instead.
|
||||
*/
|
||||
/* We can't pass NULL as a CORBA_string - pass "" instead. */
|
||||
non_null_default = default_metadata != NULL ? default_metadata : "";
|
||||
|
||||
CORBA_exception_init (&ev);
|
||||
metafile = get_metafile (directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
corba_value = Nautilus_Metafile_get (metafile, file_name, key, non_null_default, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
@ -122,7 +121,7 @@ nautilus_directory_get_file_metadata (NautilusDirectory *directory,
|
|||
|
||||
CORBA_free (corba_value);
|
||||
|
||||
bonobo_object_release_unref (metafile, &ev);
|
||||
bonobo_object_release_unref (metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
|
||||
return result;
|
||||
|
@ -149,6 +148,8 @@ nautilus_directory_get_file_metadata_list (NautilusDirectory *directory,
|
|||
CORBA_exception_init (&ev);
|
||||
metafile = get_metafile (directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
corba_value = Nautilus_Metafile_get_list (metafile, file_name, list_key, list_subkey, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
@ -160,7 +161,7 @@ nautilus_directory_get_file_metadata_list (NautilusDirectory *directory,
|
|||
result = g_list_reverse (result);
|
||||
CORBA_free (corba_value);
|
||||
|
||||
bonobo_object_release_unref (metafile, &ev);
|
||||
bonobo_object_release_unref (metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
|
||||
return result;
|
||||
|
@ -194,11 +195,13 @@ nautilus_directory_set_file_metadata (NautilusDirectory *directory,
|
|||
CORBA_exception_init (&ev);
|
||||
metafile = get_metafile (directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
result = Nautilus_Metafile_set (metafile, file_name, key, default_metadata, metadata, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
bonobo_object_release_unref (metafile, &ev);
|
||||
bonobo_object_release_unref (metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
|
||||
return result;
|
||||
|
@ -229,6 +232,8 @@ nautilus_directory_set_file_metadata_list (NautilusDirectory *directory,
|
|||
CORBA_exception_init (&ev);
|
||||
metafile = get_metafile (directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
len = g_list_length (list);
|
||||
|
||||
corba_list = Nautilus_MetadataList__alloc ();
|
||||
|
@ -255,7 +260,7 @@ nautilus_directory_set_file_metadata_list (NautilusDirectory *directory,
|
|||
|
||||
CORBA_free (corba_list);
|
||||
|
||||
bonobo_object_release_unref (metafile, &ev);
|
||||
bonobo_object_release_unref (metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
|
||||
return result;
|
||||
|
@ -371,6 +376,9 @@ nautilus_directory_copy_file_metadata (NautilusDirectory *source_directory,
|
|||
|
||||
CORBA_exception_init (&ev);
|
||||
source_metafile = get_metafile (source_directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
destination_uri = nautilus_directory_get_uri (destination_directory);
|
||||
|
||||
Nautilus_Metafile_copy (source_metafile, source_file_name, destination_uri, destination_file_name, &ev);
|
||||
|
@ -378,7 +386,7 @@ nautilus_directory_copy_file_metadata (NautilusDirectory *source_directory,
|
|||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
g_free (destination_uri);
|
||||
bonobo_object_release_unref (source_metafile, &ev);
|
||||
bonobo_object_release_unref (source_metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
}
|
||||
|
||||
|
@ -395,11 +403,13 @@ nautilus_directory_remove_file_metadata (NautilusDirectory *directory,
|
|||
CORBA_exception_init (&ev);
|
||||
metafile = get_metafile (directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
Nautilus_Metafile_remove (metafile, file_name, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
bonobo_object_release_unref (metafile, &ev);
|
||||
bonobo_object_release_unref (metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
}
|
||||
|
||||
|
@ -418,10 +428,12 @@ nautilus_directory_rename_file_metadata (NautilusDirectory *directory,
|
|||
CORBA_exception_init (&ev);
|
||||
metafile = get_metafile (directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
Nautilus_Metafile_rename (metafile, old_file_name, new_file_name, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
bonobo_object_release_unref (metafile, &ev);
|
||||
bonobo_object_release_unref (metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ void nautilus_directory_stop_monitoring_file_list (NautilusD
|
|||
void nautilus_directory_cancel (NautilusDirectory *directory);
|
||||
void nautilus_metafile_write_start (NautilusDirectory *directory);
|
||||
void nautilus_async_destroying_file (NautilusFile *file);
|
||||
void nautilus_directory_force_reload (NautilusDirectory *directory,
|
||||
void nautilus_directory_force_reload_internal (NautilusDirectory *directory,
|
||||
GList *file_attributes);
|
||||
void nautilus_directory_cancel_loading_file_attributes (NautilusDirectory *directory,
|
||||
NautilusFile *file,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
nautilus-directory.c: Nautilus directory model.
|
||||
|
||||
Copyright (C) 1999, 2000 Eazel, Inc.
|
||||
Copyright (C) 1999, 2000, 2001 Eazel, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
|
@ -1452,8 +1452,7 @@ nautilus_directory_file_monitor_add (NautilusDirectory *directory,
|
|||
gconstpointer client,
|
||||
gboolean monitor_hidden_files,
|
||||
gboolean monitor_backup_files,
|
||||
GList *file_attributes,
|
||||
gboolean force_reload)
|
||||
GList *file_attributes)
|
||||
{
|
||||
g_return_if_fail (NAUTILUS_IS_DIRECTORY (directory));
|
||||
g_return_if_fail (client != NULL);
|
||||
|
@ -1463,8 +1462,7 @@ nautilus_directory_file_monitor_add (NautilusDirectory *directory,
|
|||
file_monitor_add, (directory, client,
|
||||
monitor_hidden_files,
|
||||
monitor_backup_files,
|
||||
file_attributes,
|
||||
force_reload));
|
||||
file_attributes));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1479,6 +1477,16 @@ nautilus_directory_file_monitor_remove (NautilusDirectory *directory,
|
|||
file_monitor_remove, (directory, client));
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_directory_force_reload (NautilusDirectory *directory)
|
||||
{
|
||||
g_return_if_fail (NAUTILUS_IS_DIRECTORY (directory));
|
||||
|
||||
NAUTILUS_CALL_VIRTUAL
|
||||
(NAUTILUS_DIRECTORY_CLASS, directory,
|
||||
force_reload, (directory));
|
||||
}
|
||||
|
||||
gboolean
|
||||
nautilus_directory_is_not_empty (NautilusDirectory *directory)
|
||||
{
|
||||
|
@ -1538,8 +1546,7 @@ nautilus_self_check_directory (void)
|
|||
|
||||
nautilus_directory_file_monitor_add
|
||||
(directory, &data_dummy,
|
||||
TRUE, TRUE,
|
||||
NULL, FALSE);
|
||||
TRUE, TRUE, NULL);
|
||||
|
||||
got_metadata_flag = FALSE;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
nautilus-directory.h: Nautilus directory model.
|
||||
|
||||
Copyright (C) 1999, 2000 Eazel, Inc.
|
||||
Copyright (C) 1999, 2000, 2001 Eazel, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
|
@ -123,10 +123,10 @@ typedef struct
|
|||
gconstpointer client,
|
||||
gboolean monitor_hidden_files,
|
||||
gboolean monitor_backup_files,
|
||||
GList *monitor_attributes,
|
||||
gboolean force_reload);
|
||||
GList *monitor_attributes);
|
||||
void (* file_monitor_remove) (NautilusDirectory *directory,
|
||||
gconstpointer client);
|
||||
void (* force_reload) (NautilusDirectory *directory);
|
||||
gboolean (* are_all_files_seen) (NautilusDirectory *directory);
|
||||
gboolean (* is_not_empty) (NautilusDirectory *directory);
|
||||
char * (* get_name_for_self_as_new_file) (NautilusDirectory *directory);
|
||||
|
@ -183,10 +183,10 @@ void nautilus_directory_file_monitor_add (NautilusDirector
|
|||
gconstpointer client,
|
||||
gboolean monitor_hidden_files,
|
||||
gboolean monitor_backup_files,
|
||||
GList *monitor_attributes,
|
||||
gboolean force_reload);
|
||||
GList *attributes);
|
||||
void nautilus_directory_file_monitor_remove (NautilusDirectory *directory,
|
||||
gconstpointer client);
|
||||
void nautilus_directory_force_reload (NautilusDirectory *directory);
|
||||
|
||||
/* Return true if the directory has information about all the files.
|
||||
* This will be false until the directory has been read at least once.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
nautilus-directory.c: Nautilus directory model.
|
||||
|
||||
Copyright (C) 1999, 2000 Eazel, Inc.
|
||||
Copyright (C) 1999, 2000, 2001 Eazel, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
|
@ -113,7 +113,7 @@ void nautilus_file_set_directory (NautilusFile
|
|||
gboolean nautilus_file_get_date (NautilusFile *file,
|
||||
NautilusDateType date_type,
|
||||
time_t *date);
|
||||
void nautilus_file_updated_deep_count_in_progress (NautilusFile *file);
|
||||
void nautilus_file_updated_deep_count_in_progress (NautilusFile *file);
|
||||
|
||||
/* Compare file's state with a fresh file info struct, return FALSE if
|
||||
* no change, update file and return TRUE if the file info contains
|
||||
|
@ -133,6 +133,7 @@ gboolean nautilus_file_should_get_top_left_text (NautilusFile
|
|||
*/
|
||||
void nautilus_file_invalidate_attributes_internal (NautilusFile *file,
|
||||
GList *file_attributes);
|
||||
GList * nautilus_file_get_all_attributes (void);
|
||||
|
||||
/* Recognizing special file names. */
|
||||
gboolean nautilus_file_name_matches_hidden_pattern (const char *name_or_relative_uri);
|
||||
|
|
|
@ -4470,26 +4470,36 @@ nautilus_file_invalidate_attributes (NautilusFile *file,
|
|||
nautilus_directory_async_state_changed (file->details->directory);
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_file_invalidate_all_attributes (NautilusFile *file)
|
||||
GList *
|
||||
nautilus_file_get_all_attributes (void)
|
||||
{
|
||||
GList *attributes;
|
||||
|
||||
attributes = g_list_prepend (NULL, NAUTILUS_FILE_ATTRIBUTE_ACTIVATION_URI);
|
||||
attributes = NULL;
|
||||
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_ACTIVATION_URI);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_CAPABILITIES);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_CUSTOM_ICON);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_DEEP_COUNTS);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_DIRECTORY_ITEM_COUNT);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_DIRECTORY_ITEM_MIME_TYPES);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_FILE_TYPE);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_IS_DIRECTORY);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_METADATA);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_TOP_LEFT_TEXT);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_IS_DIRECTORY);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_FILE_TYPE);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_DIRECTORY_ITEM_MIME_TYPES);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_METADATA);
|
||||
|
||||
nautilus_file_invalidate_attributes (file, attributes);
|
||||
|
||||
g_list_free (attributes);
|
||||
return attributes;
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_file_invalidate_all_attributes (NautilusFile *file)
|
||||
{
|
||||
GList *all_attributes;
|
||||
|
||||
all_attributes = nautilus_file_get_all_attributes ();
|
||||
nautilus_file_invalidate_attributes (file, all_attributes);
|
||||
g_list_free (all_attributes);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ typedef struct {
|
|||
gboolean monitor_hidden_files;
|
||||
gboolean monitor_backup_files;
|
||||
GList *monitor_attributes;
|
||||
gboolean force_reload;
|
||||
} MergedMonitor;
|
||||
|
||||
enum {
|
||||
|
@ -289,8 +288,7 @@ merged_file_monitor_add (NautilusDirectory *directory,
|
|||
gconstpointer client,
|
||||
gboolean monitor_hidden_files,
|
||||
gboolean monitor_backup_files,
|
||||
GList *file_attributes,
|
||||
gboolean force_reload)
|
||||
GList *file_attributes)
|
||||
{
|
||||
NautilusMergedDirectory *merged;
|
||||
MergedMonitor *monitor;
|
||||
|
@ -314,14 +312,13 @@ merged_file_monitor_add (NautilusDirectory *directory,
|
|||
monitor->monitor_hidden_files = monitor_hidden_files;
|
||||
monitor->monitor_backup_files = monitor_backup_files;
|
||||
monitor->monitor_attributes = nautilus_g_str_list_copy (file_attributes);
|
||||
monitor->force_reload = force_reload;
|
||||
|
||||
/* Call through to the real directory add calls. */
|
||||
for (node = merged->details->directories; node != NULL; node = node->next) {
|
||||
nautilus_directory_file_monitor_add
|
||||
(node->data, monitor,
|
||||
monitor_hidden_files, monitor_backup_files,
|
||||
file_attributes, force_reload);
|
||||
file_attributes);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -353,6 +350,20 @@ merged_file_monitor_remove (NautilusDirectory *directory,
|
|||
g_free (monitor);
|
||||
}
|
||||
|
||||
static void
|
||||
merged_force_reload (NautilusDirectory *directory)
|
||||
{
|
||||
NautilusMergedDirectory *merged;
|
||||
GList *node;
|
||||
|
||||
merged = NAUTILUS_MERGED_DIRECTORY (directory);
|
||||
|
||||
/* Call through to the real force_reload calls. */
|
||||
for (node = merged->details->directories; node != NULL; node = node->next) {
|
||||
nautilus_directory_force_reload (node->data);
|
||||
}
|
||||
}
|
||||
|
||||
/* Return true if any directory in the list does. */
|
||||
static gboolean
|
||||
merged_contains_file (NautilusDirectory *directory,
|
||||
|
@ -444,8 +455,7 @@ monitor_add_directory (gpointer key,
|
|||
(NAUTILUS_DIRECTORY (callback_data), monitor,
|
||||
monitor->monitor_hidden_files,
|
||||
monitor->monitor_backup_files,
|
||||
monitor->monitor_attributes,
|
||||
monitor->force_reload);
|
||||
monitor->monitor_attributes);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -603,6 +613,7 @@ nautilus_merged_directory_initialize_class (gpointer klass)
|
|||
directory_class->cancel_callback = merged_cancel_callback;
|
||||
directory_class->file_monitor_add = merged_file_monitor_add;
|
||||
directory_class->file_monitor_remove = merged_file_monitor_remove;
|
||||
directory_class->force_reload = merged_force_reload;
|
||||
directory_class->are_all_files_seen = merged_are_all_files_seen;
|
||||
directory_class->is_not_empty = merged_is_not_empty;
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ nautilus_trash_monitor_initialize (gpointer object, gpointer klass)
|
|||
|
||||
/* Make sure we get notified about changes */
|
||||
nautilus_directory_file_monitor_add
|
||||
(trash_directory, trash_monitor, TRUE, TRUE, attributes, FALSE);
|
||||
(trash_directory, trash_monitor, TRUE, TRUE, attributes);
|
||||
|
||||
g_list_free (attributes);
|
||||
|
||||
|
|
|
@ -104,17 +104,11 @@ vfs_file_monitor_add (NautilusDirectory *directory,
|
|||
gconstpointer client,
|
||||
gboolean monitor_hidden_files,
|
||||
gboolean monitor_backup_files,
|
||||
GList *file_attributes,
|
||||
gboolean force_reload)
|
||||
GList *file_attributes)
|
||||
{
|
||||
g_assert (NAUTILUS_IS_VFS_DIRECTORY (directory));
|
||||
g_assert (client != NULL);
|
||||
|
||||
if (force_reload) {
|
||||
nautilus_directory_force_reload (directory,
|
||||
file_attributes);
|
||||
}
|
||||
|
||||
nautilus_directory_monitor_add_internal
|
||||
(directory, NULL,
|
||||
client,
|
||||
|
@ -133,6 +127,19 @@ vfs_file_monitor_remove (NautilusDirectory *directory,
|
|||
nautilus_directory_monitor_remove_internal (directory, NULL, client);
|
||||
}
|
||||
|
||||
static void
|
||||
vfs_force_reload (NautilusDirectory *directory)
|
||||
{
|
||||
GList *all_attributes;
|
||||
|
||||
g_assert (NAUTILUS_IS_DIRECTORY (directory));
|
||||
|
||||
all_attributes = nautilus_file_get_all_attributes ();
|
||||
nautilus_directory_force_reload_internal (directory,
|
||||
all_attributes);
|
||||
g_list_free (all_attributes);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
vfs_are_all_files_seen (NautilusDirectory *directory)
|
||||
{
|
||||
|
@ -193,6 +200,7 @@ nautilus_vfs_directory_initialize_class (gpointer klass)
|
|||
directory_class->cancel_callback = vfs_cancel_callback;
|
||||
directory_class->file_monitor_add = vfs_file_monitor_add;
|
||||
directory_class->file_monitor_remove = vfs_file_monitor_remove;
|
||||
directory_class->force_reload = vfs_force_reload;
|
||||
directory_class->are_all_files_seen = vfs_are_all_files_seen;
|
||||
directory_class->is_not_empty = vfs_is_not_empty;
|
||||
}
|
||||
|
|
|
@ -224,17 +224,17 @@ add_numbered_menu_item_internal (BonoboUIComponent *ui,
|
|||
*/
|
||||
if (is_toggle) {
|
||||
xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" id=\"%s\" type=\"toggle\"/>\n",
|
||||
item_name, encoded_label, command_name);
|
||||
item_name, encoded_label, command_name);
|
||||
} else if (pixbuf != NULL) {
|
||||
/* Encode pixbuf type and data into XML string */
|
||||
pixbuf_data = bonobo_ui_util_pixbuf_to_xml (pixbuf);
|
||||
|
||||
xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" verb=\"%s\" pixtype=\"pixbuf\" pixname=\"%s\"/>\n",
|
||||
item_name, encoded_label, command_name, pixbuf_data);
|
||||
item_name, encoded_label, command_name, pixbuf_data);
|
||||
g_free (pixbuf_data);
|
||||
} else {
|
||||
xml_item = g_strdup_printf ("<menuitem name=\"%s\" label=\"%s\" verb=\"%s\"/>\n",
|
||||
item_name, encoded_label, command_name);
|
||||
item_name, encoded_label, command_name);
|
||||
}
|
||||
g_free (encoded_label);
|
||||
g_free (item_name);
|
||||
|
@ -251,7 +251,7 @@ add_numbered_menu_item_internal (BonoboUIComponent *ui,
|
|||
g_free (xml_command);
|
||||
|
||||
g_free (command_name);
|
||||
}
|
||||
}
|
||||
|
||||
/* Add a menu item specified by number into a given path. Used for
|
||||
* dynamically creating a related series of menu items. Each index
|
||||
|
@ -333,32 +333,33 @@ remove_commands (BonoboUIComponent *ui, const char *container_path)
|
|||
g_return_if_fail (BONOBO_IS_UI_COMPONENT (ui));
|
||||
g_return_if_fail (container_path != NULL);
|
||||
|
||||
path_node = bonobo_ui_component_get_tree (ui, container_path, TRUE, NULL);
|
||||
if (path_node == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
bonobo_ui_component_freeze (ui, NULL);
|
||||
|
||||
path_node = bonobo_ui_component_get_tree (ui, container_path, TRUE, NULL);
|
||||
|
||||
if (path_node != NULL) {
|
||||
for (child_node = bonobo_ui_node_children (path_node);
|
||||
child_node != NULL;
|
||||
child_node = bonobo_ui_node_next (child_node)) {
|
||||
verb_name = bonobo_ui_node_get_attr (child_node, "verb");
|
||||
if (verb_name != NULL) {
|
||||
bonobo_ui_component_remove_verb (ui, verb_name);
|
||||
bonobo_ui_node_free_string (verb_name);
|
||||
} else {
|
||||
for (child_node = bonobo_ui_node_children (path_node);
|
||||
child_node != NULL;
|
||||
child_node = bonobo_ui_node_next (child_node)) {
|
||||
verb_name = bonobo_ui_node_get_attr (child_node, "verb");
|
||||
if (verb_name != NULL) {
|
||||
bonobo_ui_component_remove_verb (ui, verb_name);
|
||||
bonobo_ui_node_free_string (verb_name);
|
||||
} else {
|
||||
/* Only look for an id if there's no verb */
|
||||
id_name = bonobo_ui_node_get_attr (child_node, "id");
|
||||
if (id_name != NULL) {
|
||||
bonobo_ui_component_remove_listener (ui, id_name);
|
||||
bonobo_ui_node_free_string (id_name);
|
||||
}
|
||||
id_name = bonobo_ui_node_get_attr (child_node, "id");
|
||||
if (id_name != NULL) {
|
||||
bonobo_ui_component_remove_listener (ui, id_name);
|
||||
bonobo_ui_node_free_string (id_name);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
bonobo_ui_node_free (path_node);
|
||||
bonobo_ui_component_thaw (ui, NULL);
|
||||
|
||||
bonobo_ui_node_free (path_node);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2267,8 +2267,8 @@ nautilus_directory_invalidate_file_attributes (NautilusDirectory *directory,
|
|||
}
|
||||
|
||||
void
|
||||
nautilus_directory_force_reload (NautilusDirectory *directory,
|
||||
GList *file_attributes)
|
||||
nautilus_directory_force_reload_internal (NautilusDirectory *directory,
|
||||
GList *file_attributes)
|
||||
{
|
||||
/* invalidate attributes that are getting reloaded for all files */
|
||||
nautilus_directory_invalidate_file_attributes (directory, file_attributes);
|
||||
|
|
|
@ -77,8 +77,6 @@ get_metafile (NautilusDirectory *directory, CORBA_Environment *ev)
|
|||
uri = nautilus_directory_get_uri (directory);
|
||||
metafile = Nautilus_MetafileFactory_open (get_factory (), uri, ev);
|
||||
g_free (uri);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
return metafile;
|
||||
}
|
||||
|
@ -100,13 +98,14 @@ nautilus_directory_get_file_metadata (NautilusDirectory *directory,
|
|||
g_return_val_if_fail (!nautilus_str_is_empty (file_name), NULL);
|
||||
g_return_val_if_fail (!nautilus_str_is_empty (key), NULL);
|
||||
|
||||
/* We can't pass NULL as a CORBA_string - pass "" instead.
|
||||
*/
|
||||
/* We can't pass NULL as a CORBA_string - pass "" instead. */
|
||||
non_null_default = default_metadata != NULL ? default_metadata : "";
|
||||
|
||||
CORBA_exception_init (&ev);
|
||||
metafile = get_metafile (directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
corba_value = Nautilus_Metafile_get (metafile, file_name, key, non_null_default, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
@ -122,7 +121,7 @@ nautilus_directory_get_file_metadata (NautilusDirectory *directory,
|
|||
|
||||
CORBA_free (corba_value);
|
||||
|
||||
bonobo_object_release_unref (metafile, &ev);
|
||||
bonobo_object_release_unref (metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
|
||||
return result;
|
||||
|
@ -149,6 +148,8 @@ nautilus_directory_get_file_metadata_list (NautilusDirectory *directory,
|
|||
CORBA_exception_init (&ev);
|
||||
metafile = get_metafile (directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
corba_value = Nautilus_Metafile_get_list (metafile, file_name, list_key, list_subkey, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
@ -160,7 +161,7 @@ nautilus_directory_get_file_metadata_list (NautilusDirectory *directory,
|
|||
result = g_list_reverse (result);
|
||||
CORBA_free (corba_value);
|
||||
|
||||
bonobo_object_release_unref (metafile, &ev);
|
||||
bonobo_object_release_unref (metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
|
||||
return result;
|
||||
|
@ -194,11 +195,13 @@ nautilus_directory_set_file_metadata (NautilusDirectory *directory,
|
|||
CORBA_exception_init (&ev);
|
||||
metafile = get_metafile (directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
result = Nautilus_Metafile_set (metafile, file_name, key, default_metadata, metadata, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
bonobo_object_release_unref (metafile, &ev);
|
||||
bonobo_object_release_unref (metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
|
||||
return result;
|
||||
|
@ -229,6 +232,8 @@ nautilus_directory_set_file_metadata_list (NautilusDirectory *directory,
|
|||
CORBA_exception_init (&ev);
|
||||
metafile = get_metafile (directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
len = g_list_length (list);
|
||||
|
||||
corba_list = Nautilus_MetadataList__alloc ();
|
||||
|
@ -255,7 +260,7 @@ nautilus_directory_set_file_metadata_list (NautilusDirectory *directory,
|
|||
|
||||
CORBA_free (corba_list);
|
||||
|
||||
bonobo_object_release_unref (metafile, &ev);
|
||||
bonobo_object_release_unref (metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
|
||||
return result;
|
||||
|
@ -371,6 +376,9 @@ nautilus_directory_copy_file_metadata (NautilusDirectory *source_directory,
|
|||
|
||||
CORBA_exception_init (&ev);
|
||||
source_metafile = get_metafile (source_directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
destination_uri = nautilus_directory_get_uri (destination_directory);
|
||||
|
||||
Nautilus_Metafile_copy (source_metafile, source_file_name, destination_uri, destination_file_name, &ev);
|
||||
|
@ -378,7 +386,7 @@ nautilus_directory_copy_file_metadata (NautilusDirectory *source_directory,
|
|||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
g_free (destination_uri);
|
||||
bonobo_object_release_unref (source_metafile, &ev);
|
||||
bonobo_object_release_unref (source_metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
}
|
||||
|
||||
|
@ -395,11 +403,13 @@ nautilus_directory_remove_file_metadata (NautilusDirectory *directory,
|
|||
CORBA_exception_init (&ev);
|
||||
metafile = get_metafile (directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
Nautilus_Metafile_remove (metafile, file_name, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
bonobo_object_release_unref (metafile, &ev);
|
||||
bonobo_object_release_unref (metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
}
|
||||
|
||||
|
@ -418,10 +428,12 @@ nautilus_directory_rename_file_metadata (NautilusDirectory *directory,
|
|||
CORBA_exception_init (&ev);
|
||||
metafile = get_metafile (directory, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
Nautilus_Metafile_rename (metafile, old_file_name, new_file_name, &ev);
|
||||
|
||||
/* FIXME bugzilla.eazel.com 6664: examine ev for errors */
|
||||
|
||||
bonobo_object_release_unref (metafile, &ev);
|
||||
bonobo_object_release_unref (metafile, NULL);
|
||||
CORBA_exception_free (&ev);
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ void nautilus_directory_stop_monitoring_file_list (NautilusD
|
|||
void nautilus_directory_cancel (NautilusDirectory *directory);
|
||||
void nautilus_metafile_write_start (NautilusDirectory *directory);
|
||||
void nautilus_async_destroying_file (NautilusFile *file);
|
||||
void nautilus_directory_force_reload (NautilusDirectory *directory,
|
||||
void nautilus_directory_force_reload_internal (NautilusDirectory *directory,
|
||||
GList *file_attributes);
|
||||
void nautilus_directory_cancel_loading_file_attributes (NautilusDirectory *directory,
|
||||
NautilusFile *file,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
nautilus-directory.c: Nautilus directory model.
|
||||
|
||||
Copyright (C) 1999, 2000 Eazel, Inc.
|
||||
Copyright (C) 1999, 2000, 2001 Eazel, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
|
@ -1452,8 +1452,7 @@ nautilus_directory_file_monitor_add (NautilusDirectory *directory,
|
|||
gconstpointer client,
|
||||
gboolean monitor_hidden_files,
|
||||
gboolean monitor_backup_files,
|
||||
GList *file_attributes,
|
||||
gboolean force_reload)
|
||||
GList *file_attributes)
|
||||
{
|
||||
g_return_if_fail (NAUTILUS_IS_DIRECTORY (directory));
|
||||
g_return_if_fail (client != NULL);
|
||||
|
@ -1463,8 +1462,7 @@ nautilus_directory_file_monitor_add (NautilusDirectory *directory,
|
|||
file_monitor_add, (directory, client,
|
||||
monitor_hidden_files,
|
||||
monitor_backup_files,
|
||||
file_attributes,
|
||||
force_reload));
|
||||
file_attributes));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1479,6 +1477,16 @@ nautilus_directory_file_monitor_remove (NautilusDirectory *directory,
|
|||
file_monitor_remove, (directory, client));
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_directory_force_reload (NautilusDirectory *directory)
|
||||
{
|
||||
g_return_if_fail (NAUTILUS_IS_DIRECTORY (directory));
|
||||
|
||||
NAUTILUS_CALL_VIRTUAL
|
||||
(NAUTILUS_DIRECTORY_CLASS, directory,
|
||||
force_reload, (directory));
|
||||
}
|
||||
|
||||
gboolean
|
||||
nautilus_directory_is_not_empty (NautilusDirectory *directory)
|
||||
{
|
||||
|
@ -1538,8 +1546,7 @@ nautilus_self_check_directory (void)
|
|||
|
||||
nautilus_directory_file_monitor_add
|
||||
(directory, &data_dummy,
|
||||
TRUE, TRUE,
|
||||
NULL, FALSE);
|
||||
TRUE, TRUE, NULL);
|
||||
|
||||
got_metadata_flag = FALSE;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
nautilus-directory.h: Nautilus directory model.
|
||||
|
||||
Copyright (C) 1999, 2000 Eazel, Inc.
|
||||
Copyright (C) 1999, 2000, 2001 Eazel, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
|
@ -123,10 +123,10 @@ typedef struct
|
|||
gconstpointer client,
|
||||
gboolean monitor_hidden_files,
|
||||
gboolean monitor_backup_files,
|
||||
GList *monitor_attributes,
|
||||
gboolean force_reload);
|
||||
GList *monitor_attributes);
|
||||
void (* file_monitor_remove) (NautilusDirectory *directory,
|
||||
gconstpointer client);
|
||||
void (* force_reload) (NautilusDirectory *directory);
|
||||
gboolean (* are_all_files_seen) (NautilusDirectory *directory);
|
||||
gboolean (* is_not_empty) (NautilusDirectory *directory);
|
||||
char * (* get_name_for_self_as_new_file) (NautilusDirectory *directory);
|
||||
|
@ -183,10 +183,10 @@ void nautilus_directory_file_monitor_add (NautilusDirector
|
|||
gconstpointer client,
|
||||
gboolean monitor_hidden_files,
|
||||
gboolean monitor_backup_files,
|
||||
GList *monitor_attributes,
|
||||
gboolean force_reload);
|
||||
GList *attributes);
|
||||
void nautilus_directory_file_monitor_remove (NautilusDirectory *directory,
|
||||
gconstpointer client);
|
||||
void nautilus_directory_force_reload (NautilusDirectory *directory);
|
||||
|
||||
/* Return true if the directory has information about all the files.
|
||||
* This will be false until the directory has been read at least once.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
nautilus-directory.c: Nautilus directory model.
|
||||
|
||||
Copyright (C) 1999, 2000 Eazel, Inc.
|
||||
Copyright (C) 1999, 2000, 2001 Eazel, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
|
@ -113,7 +113,7 @@ void nautilus_file_set_directory (NautilusFile
|
|||
gboolean nautilus_file_get_date (NautilusFile *file,
|
||||
NautilusDateType date_type,
|
||||
time_t *date);
|
||||
void nautilus_file_updated_deep_count_in_progress (NautilusFile *file);
|
||||
void nautilus_file_updated_deep_count_in_progress (NautilusFile *file);
|
||||
|
||||
/* Compare file's state with a fresh file info struct, return FALSE if
|
||||
* no change, update file and return TRUE if the file info contains
|
||||
|
@ -133,6 +133,7 @@ gboolean nautilus_file_should_get_top_left_text (NautilusFile
|
|||
*/
|
||||
void nautilus_file_invalidate_attributes_internal (NautilusFile *file,
|
||||
GList *file_attributes);
|
||||
GList * nautilus_file_get_all_attributes (void);
|
||||
|
||||
/* Recognizing special file names. */
|
||||
gboolean nautilus_file_name_matches_hidden_pattern (const char *name_or_relative_uri);
|
||||
|
|
|
@ -4470,26 +4470,36 @@ nautilus_file_invalidate_attributes (NautilusFile *file,
|
|||
nautilus_directory_async_state_changed (file->details->directory);
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_file_invalidate_all_attributes (NautilusFile *file)
|
||||
GList *
|
||||
nautilus_file_get_all_attributes (void)
|
||||
{
|
||||
GList *attributes;
|
||||
|
||||
attributes = g_list_prepend (NULL, NAUTILUS_FILE_ATTRIBUTE_ACTIVATION_URI);
|
||||
attributes = NULL;
|
||||
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_ACTIVATION_URI);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_CAPABILITIES);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_CUSTOM_ICON);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_DEEP_COUNTS);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_DIRECTORY_ITEM_COUNT);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_DIRECTORY_ITEM_MIME_TYPES);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_FILE_TYPE);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_IS_DIRECTORY);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_METADATA);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_TOP_LEFT_TEXT);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_IS_DIRECTORY);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_FILE_TYPE);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_DIRECTORY_ITEM_MIME_TYPES);
|
||||
attributes = g_list_prepend (attributes, NAUTILUS_FILE_ATTRIBUTE_METADATA);
|
||||
|
||||
nautilus_file_invalidate_attributes (file, attributes);
|
||||
|
||||
g_list_free (attributes);
|
||||
return attributes;
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_file_invalidate_all_attributes (NautilusFile *file)
|
||||
{
|
||||
GList *all_attributes;
|
||||
|
||||
all_attributes = nautilus_file_get_all_attributes ();
|
||||
nautilus_file_invalidate_attributes (file, all_attributes);
|
||||
g_list_free (all_attributes);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ typedef struct {
|
|||
gboolean monitor_hidden_files;
|
||||
gboolean monitor_backup_files;
|
||||
GList *monitor_attributes;
|
||||
gboolean force_reload;
|
||||
} MergedMonitor;
|
||||
|
||||
enum {
|
||||
|
@ -289,8 +288,7 @@ merged_file_monitor_add (NautilusDirectory *directory,
|
|||
gconstpointer client,
|
||||
gboolean monitor_hidden_files,
|
||||
gboolean monitor_backup_files,
|
||||
GList *file_attributes,
|
||||
gboolean force_reload)
|
||||
GList *file_attributes)
|
||||
{
|
||||
NautilusMergedDirectory *merged;
|
||||
MergedMonitor *monitor;
|
||||
|
@ -314,14 +312,13 @@ merged_file_monitor_add (NautilusDirectory *directory,
|
|||
monitor->monitor_hidden_files = monitor_hidden_files;
|
||||
monitor->monitor_backup_files = monitor_backup_files;
|
||||
monitor->monitor_attributes = nautilus_g_str_list_copy (file_attributes);
|
||||
monitor->force_reload = force_reload;
|
||||
|
||||
/* Call through to the real directory add calls. */
|
||||
for (node = merged->details->directories; node != NULL; node = node->next) {
|
||||
nautilus_directory_file_monitor_add
|
||||
(node->data, monitor,
|
||||
monitor_hidden_files, monitor_backup_files,
|
||||
file_attributes, force_reload);
|
||||
file_attributes);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -353,6 +350,20 @@ merged_file_monitor_remove (NautilusDirectory *directory,
|
|||
g_free (monitor);
|
||||
}
|
||||
|
||||
static void
|
||||
merged_force_reload (NautilusDirectory *directory)
|
||||
{
|
||||
NautilusMergedDirectory *merged;
|
||||
GList *node;
|
||||
|
||||
merged = NAUTILUS_MERGED_DIRECTORY (directory);
|
||||
|
||||
/* Call through to the real force_reload calls. */
|
||||
for (node = merged->details->directories; node != NULL; node = node->next) {
|
||||
nautilus_directory_force_reload (node->data);
|
||||
}
|
||||
}
|
||||
|
||||
/* Return true if any directory in the list does. */
|
||||
static gboolean
|
||||
merged_contains_file (NautilusDirectory *directory,
|
||||
|
@ -444,8 +455,7 @@ monitor_add_directory (gpointer key,
|
|||
(NAUTILUS_DIRECTORY (callback_data), monitor,
|
||||
monitor->monitor_hidden_files,
|
||||
monitor->monitor_backup_files,
|
||||
monitor->monitor_attributes,
|
||||
monitor->force_reload);
|
||||
monitor->monitor_attributes);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -603,6 +613,7 @@ nautilus_merged_directory_initialize_class (gpointer klass)
|
|||
directory_class->cancel_callback = merged_cancel_callback;
|
||||
directory_class->file_monitor_add = merged_file_monitor_add;
|
||||
directory_class->file_monitor_remove = merged_file_monitor_remove;
|
||||
directory_class->force_reload = merged_force_reload;
|
||||
directory_class->are_all_files_seen = merged_are_all_files_seen;
|
||||
directory_class->is_not_empty = merged_is_not_empty;
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ nautilus_trash_monitor_initialize (gpointer object, gpointer klass)
|
|||
|
||||
/* Make sure we get notified about changes */
|
||||
nautilus_directory_file_monitor_add
|
||||
(trash_directory, trash_monitor, TRUE, TRUE, attributes, FALSE);
|
||||
(trash_directory, trash_monitor, TRUE, TRUE, attributes);
|
||||
|
||||
g_list_free (attributes);
|
||||
|
||||
|
|
|
@ -104,17 +104,11 @@ vfs_file_monitor_add (NautilusDirectory *directory,
|
|||
gconstpointer client,
|
||||
gboolean monitor_hidden_files,
|
||||
gboolean monitor_backup_files,
|
||||
GList *file_attributes,
|
||||
gboolean force_reload)
|
||||
GList *file_attributes)
|
||||
{
|
||||
g_assert (NAUTILUS_IS_VFS_DIRECTORY (directory));
|
||||
g_assert (client != NULL);
|
||||
|
||||
if (force_reload) {
|
||||
nautilus_directory_force_reload (directory,
|
||||
file_attributes);
|
||||
}
|
||||
|
||||
nautilus_directory_monitor_add_internal
|
||||
(directory, NULL,
|
||||
client,
|
||||
|
@ -133,6 +127,19 @@ vfs_file_monitor_remove (NautilusDirectory *directory,
|
|||
nautilus_directory_monitor_remove_internal (directory, NULL, client);
|
||||
}
|
||||
|
||||
static void
|
||||
vfs_force_reload (NautilusDirectory *directory)
|
||||
{
|
||||
GList *all_attributes;
|
||||
|
||||
g_assert (NAUTILUS_IS_DIRECTORY (directory));
|
||||
|
||||
all_attributes = nautilus_file_get_all_attributes ();
|
||||
nautilus_directory_force_reload_internal (directory,
|
||||
all_attributes);
|
||||
g_list_free (all_attributes);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
vfs_are_all_files_seen (NautilusDirectory *directory)
|
||||
{
|
||||
|
@ -193,6 +200,7 @@ nautilus_vfs_directory_initialize_class (gpointer klass)
|
|||
directory_class->cancel_callback = vfs_cancel_callback;
|
||||
directory_class->file_monitor_add = vfs_file_monitor_add;
|
||||
directory_class->file_monitor_remove = vfs_file_monitor_remove;
|
||||
directory_class->force_reload = vfs_force_reload;
|
||||
directory_class->are_all_files_seen = vfs_are_all_files_seen;
|
||||
directory_class->is_not_empty = vfs_is_not_empty;
|
||||
}
|
||||
|
|
3
nautilus-installer/install-lib/.cvsignore
Normal file
3
nautilus-installer/install-lib/.cvsignore
Normal file
|
@ -0,0 +1,3 @@
|
|||
.deps
|
||||
Makefile
|
||||
Makefile.in
|
3
nautilus-installer/libtrilobite/.cvsignore
Normal file
3
nautilus-installer/libtrilobite/.cvsignore
Normal file
|
@ -0,0 +1,3 @@
|
|||
.deps
|
||||
Makefile
|
||||
Makefile.in
|
|
@ -137,7 +137,6 @@ struct FMDirectoryViewDetails
|
|||
GList *pending_files_changed;
|
||||
GList *pending_uris_selected;
|
||||
|
||||
gboolean force_reload;
|
||||
gboolean loading;
|
||||
gboolean menus_merged;
|
||||
gboolean menu_states_untrustworthy;
|
||||
|
@ -197,8 +196,7 @@ static void fm_directory_view_activate_file
|
|||
NautilusFile *file,
|
||||
WindowChoice choice);
|
||||
static void load_directory (FMDirectoryView *view,
|
||||
NautilusDirectory *directory,
|
||||
gboolean force_reload);
|
||||
NautilusDirectory *directory);
|
||||
static void fm_directory_view_merge_menus (FMDirectoryView *view);
|
||||
static void real_file_limit_reached (FMDirectoryView *view);
|
||||
static void real_load_error (FMDirectoryView *view,
|
||||
|
@ -1304,7 +1302,7 @@ load_location_callback (NautilusView *nautilus_view,
|
|||
NautilusDirectory *directory;
|
||||
|
||||
directory = nautilus_directory_get (location);
|
||||
load_directory (directory_view, directory, TRUE);
|
||||
load_directory (directory_view, directory);
|
||||
nautilus_directory_unref (directory);
|
||||
}
|
||||
|
||||
|
@ -3745,8 +3743,7 @@ file_changed_callback (NautilusFile *file, gpointer callback_data)
|
|||
**/
|
||||
static void
|
||||
load_directory (FMDirectoryView *view,
|
||||
NautilusDirectory *directory,
|
||||
gboolean force_reload)
|
||||
NautilusDirectory *directory)
|
||||
{
|
||||
NautilusDirectory *old_directory;
|
||||
NautilusFile *old_file;
|
||||
|
@ -3776,7 +3773,6 @@ load_directory (FMDirectoryView *view,
|
|||
nautilus_directory_get_corresponding_file (directory);
|
||||
nautilus_file_unref (old_file);
|
||||
|
||||
view->details->force_reload = force_reload;
|
||||
view->details->reported_load_error = FALSE;
|
||||
|
||||
/* FIXME bugzilla.eazel.com 5062: In theory, we also need to monitor metadata here (as
|
||||
|
@ -3866,9 +3862,7 @@ finish_loading (FMDirectoryView *view)
|
|||
view,
|
||||
view->details->show_hidden_files,
|
||||
view->details->show_backup_files,
|
||||
attributes,
|
||||
view->details->force_reload);
|
||||
view->details->force_reload = FALSE;
|
||||
attributes);
|
||||
|
||||
g_list_free (attributes);
|
||||
}
|
||||
|
@ -4251,8 +4245,7 @@ filtering_changed_callback (gpointer callback_data)
|
|||
/* Reload the current uri so that the filtering changes take place. */
|
||||
if (directory_view->details->model != NULL) {
|
||||
load_directory (directory_view,
|
||||
directory_view->details->model,
|
||||
FALSE);
|
||||
directory_view->details->model);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1297,6 +1297,9 @@ begin_location_change (NautilusWindow *window,
|
|||
NautilusLocationChangeType type,
|
||||
guint distance)
|
||||
{
|
||||
NautilusDirectory *directory;
|
||||
NautilusFile *file;
|
||||
|
||||
g_assert (NAUTILUS_IS_WINDOW (window));
|
||||
g_assert (location != NULL);
|
||||
g_assert (type == NAUTILUS_LOCATION_CHANGE_BACK
|
||||
|
@ -1311,17 +1314,24 @@ begin_location_change (NautilusWindow *window,
|
|||
window->details->location_change_type = type;
|
||||
window->details->location_change_distance = distance;
|
||||
|
||||
directory = nautilus_directory_get (location);
|
||||
|
||||
/* In all 4 cases, we want fresh information. */
|
||||
nautilus_directory_force_reload (directory);
|
||||
file = nautilus_directory_get_corresponding_file (directory);
|
||||
nautilus_file_invalidate_all_attributes (file);
|
||||
nautilus_file_unref (file);
|
||||
|
||||
/* We start monitoring files here so we get a single load of
|
||||
* the directory instead of multiple ones. The concept is that
|
||||
* our load of the directory is shared both with the possible
|
||||
* call_when_ready done by the nautilus_determine_initial_view
|
||||
* call and loads done by components (like the icon view).
|
||||
*/
|
||||
window->details->pending_location_as_directory =
|
||||
nautilus_directory_get (location);
|
||||
window->details->pending_location_as_directory = directory;
|
||||
nautilus_directory_file_monitor_add
|
||||
(window->details->pending_location_as_directory, window,
|
||||
TRUE, TRUE, NULL, FALSE);
|
||||
TRUE, TRUE, NULL);
|
||||
|
||||
window->details->determine_view_handle = nautilus_determine_initial_view
|
||||
(location,
|
||||
|
@ -1852,13 +1862,6 @@ nautilus_window_reload (NautilusWindow *window)
|
|||
{
|
||||
g_return_if_fail (NAUTILUS_IS_WINDOW (window));
|
||||
|
||||
if (window->details->viewed_file != NULL) {
|
||||
/* If we are reloading, invalidate all we know about the
|
||||
* file so we learn about new mime types, contents, etc.
|
||||
*/
|
||||
nautilus_file_invalidate_all_attributes (window->details->viewed_file);
|
||||
}
|
||||
|
||||
begin_location_change
|
||||
(window, window->details->location,
|
||||
NAUTILUS_LOCATION_CHANGE_RELOAD, 0);
|
||||
|
|
Loading…
Reference in a new issue