mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-25 02:36:07 +00:00
Non-asynchronous equivalent of `nautilus_directory_call_when_ready'.
* libnautilus-extensions/nautilus-directory.h, libnautilus-extensions/nautilus-directory.c: (nautilus_directory_wait_until_ready): Non-asynchronous equivalent of `nautilus_directory_call_when_ready'. However, it doesn't block the UI while waiting. (nautilus_directory_wait_until_ready_callback): Helper function for implementing the above. * libnautilus-extensions/nautilus-mime-actions.c: (nautilus_mime_get_default_action_type_for_uri, nautilus_mime_get_default_action_for_uri, nautilus_mime_get_default_application_for_uri, nautilus_mime_get_default_component_for_uri): Implemented with fully with proper metadata checking and interface querying, etc. (nautilus_mime_get_short_list_applications_for_uri, nautilus_mime_get_short_list_components_for_uri, nautilus_mime_get_all_applications_for_uri, nautilus_mime_get_all_components_for_uri): Adjusted to deal with the mime type checking function changing names. (OAF_ServerInfo__copy, extract_prefix_add_suffix, mime_type_get_supertype, uri_string_get_scheme), get_explicit_content_view_iids_from_metafile, make_oaf_query_for_explicit_content_view_iids, make_oaf_query_with_known_mime_type, make_oaf_query_with_uri_scheme_only, file_list_to_mime_type_hash_table, free_key, mime_type_hash_table_destroy, server_matches_content_requirements, nautilus_do_component_query): Oodles of helper functions, many cut & pasted from elswhere and only slightly modified. get_mime_type_from_uri: Removed `_hack' from the name. * libnautilus-extensions/nautilus-mime-actions.h: Added prototype for nautilus_mime_get_default_action_type_for_uri. * test/test-nautilus-mime-actions.c (main): Call gnome_init. * src/nautilus-applicable-views.c: Removed a stray comment that no longer applies.
This commit is contained in:
parent
331493e71b
commit
8b14e59ee7
|
@ -28,10 +28,10 @@
|
|||
#include <libgnomevfs/gnome-vfs.h>
|
||||
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
|
||||
#include <libnautilus-extensions/nautilus-mime-actions.h>
|
||||
#include <gnome.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
static void
|
||||
print_application (GnomeVFSMimeApplication *application)
|
||||
{
|
||||
|
@ -118,6 +118,8 @@ main (int argc, char **argv)
|
|||
g_thread_init (NULL);
|
||||
oaf_init (argc, argv);
|
||||
gnome_vfs_init ();
|
||||
gnome_init("test-nautilus-mime-actions", "0.0",
|
||||
argc, argv);
|
||||
|
||||
if (argc != 2) {
|
||||
fprintf (stderr, "Usage: %s uri\n", *argv);
|
||||
|
|
Loading…
Reference in a new issue