summaryrefslogtreecommitdiff
path: root/src/nautilus-applicable-views.h
diff options
context:
space:
mode:
authorMaciej Stachowiak <mstachow@src.gnome.org>2000-04-28 14:00:12 +0000
committerMaciej Stachowiak <mstachow@src.gnome.org>2000-04-28 14:00:12 +0000
commit4003add34055354ea15e296afba0a39ccd3216b3 (patch)
tree362638df5661ee8ef1d0c807c4850e2973f7081e /src/nautilus-applicable-views.h
parent01e6824d16c8fad3e99f347ccd281a1112624608 (diff)
downloadnautilus-4003add34055354ea15e296afba0a39ccd3216b3.tar.gz
Achieved bugzilla tasks #701 and #108, plus did some refactoring
of the big hairy `got_file_info_callback' function. * src/ntl-uri-map.h: add a `files' member to the NautilusNavigationInfo struct, a GList of NautilusFiles it contains in case it is a directory. * src/ntl-uri-map.c (got_file_info_callback): Factored out some code into separate functions and simplified the control flow. For each potential component, test if it matches the content requirements before adding it to the list of available content view components. (make_oaf_query_with_known_mime_type, make_oaf_query_with_uri_scheme_only): New function; breaks out the logic of constructing an oaf query when the mime type is known and unknown repsectively from `got_file_info_callback'. (make_oaf_query_with_known_mime_type): Remove the hack to try to explicitly exclude the music view. (file_list_to_mime_type_hash_table): New utility function; takes a GList of NautilusFiles and returns a hash table which has an entry for each mime type that at least one of thse files has. This is so that we can susequently test if any of the files on the list has a particular mime type in constant time. (server_matches_content_requirements): New fucntion. Returns true if the server record does not require specific content mime types, or if it does and the passed hash table contains at least one of those. (nautilus_view_identifier_new_from_oaf_server_info): New helper function to create a NautilusViewIdentifier directly from an OAF_ServerInfo record. (got_metadata_callback): Initialize the `files' field of the navinfo struct to a copy of the file list that `nautilus_directory_call_when_ready' gave us; ref all the NautilusFiles in this copy. (nautilus_navigation_info_new): Ask for the mime types of files in the directory as well as for the metadata keys we need. (nautilus_navigation_info_cancel): Only try to cancel if the navinfo actually has a directory, to avoid segfaulting. (nautilus_navigation_info_free): Free the files list. Free both this and the directory if and only if they are not NULL.
Diffstat (limited to 'src/nautilus-applicable-views.h')
-rw-r--r--src/nautilus-applicable-views.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nautilus-applicable-views.h b/src/nautilus-applicable-views.h
index 89ede4e1f..baadbe7b7 100644
--- a/src/nautilus-applicable-views.h
+++ b/src/nautilus-applicable-views.h
@@ -61,6 +61,7 @@ struct NautilusNavigationInfo {
char *initial_content_iid; /* iid to use for content view that we're going to display */
GSList *content_identifiers; /* list of NautilusViewIdentifiers */
GSList *meta_iids; /* list of iid strings */
+ GList *files; /* NautilusFile's for files in the dir, if it is one. */
/* internal usage */
NautilusNavigationCallback callback;