nautilus/test/test-nautilus-mime-actions.c

220 lines
5.4 KiB
C
Raw Normal View History

/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* test-mime.c - Test for the mime handler detection features of the GNOME
Virtual File System Library
Copyright (C) 2000 Eazel
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Maciej Stachowiak <mjs@eazel.com>
*/
Worked on getting rid of wait_until_ready. * libnautilus-extensions/nautilus-directory.c: Got rid of include of nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-file.c: Got rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.c: (wait_until_ready_callback), (nautilus_mime_actions_wait_for_full_file_attributes): Reimplemented so the wait is in here so we can get rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.h: Moved nautilus_mime_actions_wait_for_full_file_attributes into nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-program-chooser.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-program-choosing.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-wait-until-ready.h: Removed nautilsu_file_wait_until_ready and added nautilus_mime_actions_wait_for_full_file_attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view): Get rid of code that waits for attributes, because the code guarantees they will already be read at this point. (fm_directory_view_destroy): Stop monitoring the file for the open with menu. (files_changed_callback): Update the menus whenever a file changes or our knowledge about it changes. (create_open_with_gtk_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (reset_bonobo_open_with_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (activate_callback): Remove the hack to work around the wait_until_ready calls. Also remove the wait_until_ready in here because we now request all the attributes we will be needing in the call_when_ready call (that already existed). (fm_directory_view_activate_file): Request all the attributes needed for determining MIME actions. (monitor_file_for_open_with): New function to monitor the stuff we need to know for the Open with menu. * test/test-nautilus-mime-actions-set.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * test/test-nautilus-mime-actions.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * po/ui-extract.pl: Checked in new version from Kenneth. * po/update.pl: Kenneth wanted me to update the license.
2000-11-08 01:11:33 +00:00
#include <config.h>
Worked on getting rid of wait_until_ready. * libnautilus-extensions/nautilus-directory.c: Got rid of include of nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-file.c: Got rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.c: (wait_until_ready_callback), (nautilus_mime_actions_wait_for_full_file_attributes): Reimplemented so the wait is in here so we can get rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.h: Moved nautilus_mime_actions_wait_for_full_file_attributes into nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-program-chooser.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-program-choosing.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-wait-until-ready.h: Removed nautilsu_file_wait_until_ready and added nautilus_mime_actions_wait_for_full_file_attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view): Get rid of code that waits for attributes, because the code guarantees they will already be read at this point. (fm_directory_view_destroy): Stop monitoring the file for the open with menu. (files_changed_callback): Update the menus whenever a file changes or our knowledge about it changes. (create_open_with_gtk_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (reset_bonobo_open_with_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (activate_callback): Remove the hack to work around the wait_until_ready calls. Also remove the wait_until_ready in here because we now request all the attributes we will be needing in the call_when_ready call (that already existed). (fm_directory_view_activate_file): Request all the attributes needed for determining MIME actions. (monitor_file_for_open_with): New function to monitor the stuff we need to know for the Open with menu. * test/test-nautilus-mime-actions-set.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * test/test-nautilus-mime-actions.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * po/ui-extract.pl: Checked in new version from Kenneth. * po/update.pl: Kenneth wanted me to update the license.
2000-11-08 01:11:33 +00:00
#include <gnome.h>
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
Worked on getting rid of wait_until_ready. * libnautilus-extensions/nautilus-directory.c: Got rid of include of nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-file.c: Got rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.c: (wait_until_ready_callback), (nautilus_mime_actions_wait_for_full_file_attributes): Reimplemented so the wait is in here so we can get rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.h: Moved nautilus_mime_actions_wait_for_full_file_attributes into nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-program-chooser.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-program-choosing.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-wait-until-ready.h: Removed nautilsu_file_wait_until_ready and added nautilus_mime_actions_wait_for_full_file_attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view): Get rid of code that waits for attributes, because the code guarantees they will already be read at this point. (fm_directory_view_destroy): Stop monitoring the file for the open with menu. (files_changed_callback): Update the menus whenever a file changes or our knowledge about it changes. (create_open_with_gtk_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (reset_bonobo_open_with_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (activate_callback): Remove the hack to work around the wait_until_ready calls. Also remove the wait_until_ready in here because we now request all the attributes we will be needing in the call_when_ready call (that already existed). (fm_directory_view_activate_file): Request all the attributes needed for determining MIME actions. (monitor_file_for_open_with): New function to monitor the stuff we need to know for the Open with menu. * test/test-nautilus-mime-actions-set.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * test/test-nautilus-mime-actions.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * po/ui-extract.pl: Checked in new version from Kenneth. * po/update.pl: Kenneth wanted me to update the license.
2000-11-08 01:11:33 +00:00
#include <libgnomevfs/gnome-vfs.h>
#include <libnautilus-extensions/nautilus-mime-actions.h>
#include <stdio.h>
Worked on getting rid of wait_until_ready. * libnautilus-extensions/nautilus-directory.c: Got rid of include of nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-file.c: Got rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.c: (wait_until_ready_callback), (nautilus_mime_actions_wait_for_full_file_attributes): Reimplemented so the wait is in here so we can get rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.h: Moved nautilus_mime_actions_wait_for_full_file_attributes into nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-program-chooser.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-program-choosing.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-wait-until-ready.h: Removed nautilsu_file_wait_until_ready and added nautilus_mime_actions_wait_for_full_file_attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view): Get rid of code that waits for attributes, because the code guarantees they will already be read at this point. (fm_directory_view_destroy): Stop monitoring the file for the open with menu. (files_changed_callback): Update the menus whenever a file changes or our knowledge about it changes. (create_open_with_gtk_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (reset_bonobo_open_with_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (activate_callback): Remove the hack to work around the wait_until_ready calls. Also remove the wait_until_ready in here because we now request all the attributes we will be needing in the call_when_ready call (that already existed). (fm_directory_view_activate_file): Request all the attributes needed for determining MIME actions. (monitor_file_for_open_with): New function to monitor the stuff we need to know for the Open with menu. * test/test-nautilus-mime-actions-set.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * test/test-nautilus-mime-actions.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * po/ui-extract.pl: Checked in new version from Kenneth. * po/update.pl: Kenneth wanted me to update the license.
2000-11-08 01:11:33 +00:00
static gboolean ready = FALSE;
static void
append_comma_and_scheme (gpointer scheme,
gpointer user_data)
{
char **string;
string = (char **) user_data;
if (strlen (*string) > 0) {
*string = g_strconcat (*string, ", ", scheme, NULL);
}
else {
*string = g_strdup (scheme);
}
}
static char *
format_supported_uri_schemes_for_display (GList *supported_uri_schemes)
{
char *string;
string = g_strdup ("");
g_list_foreach (supported_uri_schemes,
append_comma_and_scheme,
&string);
return string;
}
static void
print_application (GnomeVFSMimeApplication *application)
{
if (application == NULL) {
puts ("(none)");
} else {
printf ("name: %s\ncommand: %s\ncan_open_multiple_files: %s\nexpects_uris: %s\nsupported_uri_schemes: %s\nrequires_terminal: %s\n",
application->name, application->command,
(application->can_open_multiple_files ? "TRUE" : "FALSE"),
(application->expects_uris ? "TRUE" : "FALSE"),
format_supported_uri_schemes_for_display (application->supported_uri_schemes),
(application->requires_terminal ? "TRUE" : "FALSE"));
}
}
static void
print_component (OAF_ServerInfo *component)
{
if (component == NULL) {
puts ("(none)");
} else {
printf ("iid: %s\n", component->iid);
}
}
static void
print_action (GnomeVFSMimeAction *action)
{
if (action == NULL) {
puts ("(none)");
} else {
Worked on getting rid of wait_until_ready. * libnautilus-extensions/nautilus-directory.c: Got rid of include of nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-file.c: Got rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.c: (wait_until_ready_callback), (nautilus_mime_actions_wait_for_full_file_attributes): Reimplemented so the wait is in here so we can get rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.h: Moved nautilus_mime_actions_wait_for_full_file_attributes into nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-program-chooser.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-program-choosing.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-wait-until-ready.h: Removed nautilsu_file_wait_until_ready and added nautilus_mime_actions_wait_for_full_file_attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view): Get rid of code that waits for attributes, because the code guarantees they will already be read at this point. (fm_directory_view_destroy): Stop monitoring the file for the open with menu. (files_changed_callback): Update the menus whenever a file changes or our knowledge about it changes. (create_open_with_gtk_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (reset_bonobo_open_with_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (activate_callback): Remove the hack to work around the wait_until_ready calls. Also remove the wait_until_ready in here because we now request all the attributes we will be needing in the call_when_ready call (that already existed). (fm_directory_view_activate_file): Request all the attributes needed for determining MIME actions. (monitor_file_for_open_with): New function to monitor the stuff we need to know for the Open with menu. * test/test-nautilus-mime-actions-set.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * test/test-nautilus-mime-actions.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * po/ui-extract.pl: Checked in new version from Kenneth. * po/update.pl: Kenneth wanted me to update the license.
2000-11-08 01:11:33 +00:00
if (action->action_type == GNOME_VFS_MIME_ACTION_TYPE_APPLICATION) {
puts ("type: application");
print_application (action->action.application);
} else {
puts ("type: component");
print_component (action->action.component);
}
}
}
static void
print_component_list (GList *components)
{
Worked on getting rid of wait_until_ready. * libnautilus-extensions/nautilus-directory.c: Got rid of include of nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-file.c: Got rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.c: (wait_until_ready_callback), (nautilus_mime_actions_wait_for_full_file_attributes): Reimplemented so the wait is in here so we can get rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.h: Moved nautilus_mime_actions_wait_for_full_file_attributes into nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-program-chooser.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-program-choosing.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-wait-until-ready.h: Removed nautilsu_file_wait_until_ready and added nautilus_mime_actions_wait_for_full_file_attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view): Get rid of code that waits for attributes, because the code guarantees they will already be read at this point. (fm_directory_view_destroy): Stop monitoring the file for the open with menu. (files_changed_callback): Update the menus whenever a file changes or our knowledge about it changes. (create_open_with_gtk_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (reset_bonobo_open_with_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (activate_callback): Remove the hack to work around the wait_until_ready calls. Also remove the wait_until_ready in here because we now request all the attributes we will be needing in the call_when_ready call (that already existed). (fm_directory_view_activate_file): Request all the attributes needed for determining MIME actions. (monitor_file_for_open_with): New function to monitor the stuff we need to know for the Open with menu. * test/test-nautilus-mime-actions-set.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * test/test-nautilus-mime-actions.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * po/ui-extract.pl: Checked in new version from Kenneth. * po/update.pl: Kenneth wanted me to update the license.
2000-11-08 01:11:33 +00:00
GList *p;
if (components == NULL) {
puts ("(none)");
} else {
for (p = components; p != NULL; p = p->next) {
print_component (p->data);
puts ("------");
}
}
}
static void
print_application_list (GList *applications)
{
Worked on getting rid of wait_until_ready. * libnautilus-extensions/nautilus-directory.c: Got rid of include of nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-file.c: Got rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.c: (wait_until_ready_callback), (nautilus_mime_actions_wait_for_full_file_attributes): Reimplemented so the wait is in here so we can get rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.h: Moved nautilus_mime_actions_wait_for_full_file_attributes into nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-program-chooser.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-program-choosing.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-wait-until-ready.h: Removed nautilsu_file_wait_until_ready and added nautilus_mime_actions_wait_for_full_file_attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view): Get rid of code that waits for attributes, because the code guarantees they will already be read at this point. (fm_directory_view_destroy): Stop monitoring the file for the open with menu. (files_changed_callback): Update the menus whenever a file changes or our knowledge about it changes. (create_open_with_gtk_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (reset_bonobo_open_with_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (activate_callback): Remove the hack to work around the wait_until_ready calls. Also remove the wait_until_ready in here because we now request all the attributes we will be needing in the call_when_ready call (that already existed). (fm_directory_view_activate_file): Request all the attributes needed for determining MIME actions. (monitor_file_for_open_with): New function to monitor the stuff we need to know for the Open with menu. * test/test-nautilus-mime-actions-set.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * test/test-nautilus-mime-actions.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * po/ui-extract.pl: Checked in new version from Kenneth. * po/update.pl: Kenneth wanted me to update the license.
2000-11-08 01:11:33 +00:00
GList *p;
if (applications == NULL) {
puts ("(none)");
} else {
for (p = applications; p != NULL; p = p->next) {
print_application (p->data);
puts ("------");
}
}
}
Worked on getting rid of wait_until_ready. * libnautilus-extensions/nautilus-directory.c: Got rid of include of nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-file.c: Got rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.c: (wait_until_ready_callback), (nautilus_mime_actions_wait_for_full_file_attributes): Reimplemented so the wait is in here so we can get rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.h: Moved nautilus_mime_actions_wait_for_full_file_attributes into nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-program-chooser.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-program-choosing.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-wait-until-ready.h: Removed nautilsu_file_wait_until_ready and added nautilus_mime_actions_wait_for_full_file_attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view): Get rid of code that waits for attributes, because the code guarantees they will already be read at this point. (fm_directory_view_destroy): Stop monitoring the file for the open with menu. (files_changed_callback): Update the menus whenever a file changes or our knowledge about it changes. (create_open_with_gtk_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (reset_bonobo_open_with_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (activate_callback): Remove the hack to work around the wait_until_ready calls. Also remove the wait_until_ready in here because we now request all the attributes we will be needing in the call_when_ready call (that already existed). (fm_directory_view_activate_file): Request all the attributes needed for determining MIME actions. (monitor_file_for_open_with): New function to monitor the stuff we need to know for the Open with menu. * test/test-nautilus-mime-actions-set.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * test/test-nautilus-mime-actions.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * po/ui-extract.pl: Checked in new version from Kenneth. * po/update.pl: Kenneth wanted me to update the license.
2000-11-08 01:11:33 +00:00
static void
ready_callback (NautilusFile *file,
gpointer callback_data)
{
ready = TRUE;
}
int
main (int argc, char **argv)
{
const char *uri;
GnomeVFSMimeApplication *default_application;
OAF_ServerInfo *default_component;
GnomeVFSMimeAction *default_action;
GList *all_components;
GList *all_applications;
GList *short_list_components;
GList *short_list_applications;
Rename NAUTILUS_FILE_ATTRIBUTE_FAST_MIME_TYPE to * libnautilus-extensions/nautilus-file-attributes.h: Rename NAUTILUS_FILE_ATTRIBUTE_FAST_MIME_TYPE to NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE; add NAUTILUS_FILE_ATTRIBUTE_SLOW_MIME_TYPE, for now just a synonym for NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE. * libnautilus-extensions/nautilus-directory-async.c: (set_up_request_by_file_attributes): Handle the new file attributes. * libnautilus-extensions/nautilus-directory.h: move nautilus_directory_wait_until_ready call to nautilus-wait-until-ready.h * libnautilus-extensions/nautilus-directory.c: (nautilus_self_check_directory): Include nautilus-wait-until-ready.h, use new attributes. * libnautilus-extensions/nautilus-wait-until-ready.h: New header for the deprecated wait_until_ready calls. * libnautilus-extensions/nautilus-file.c: (nautilus_file_wait_until_ready): file equivalent of nautilus_directory_wait_until_ready; temporary to help me refactor. (file_wait_until_ready_callback): helper function. * libnautilus-extensions/Makefile.am: Add nautilus-wait-until-ready.h * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_required_file_attributes): Use new attribute for mime type. * libnautilus-extensions/nautilus-mime-actions.h, 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_internal), (nautilus_mime_get_default_application_for_uri), (nautilus_mime_is_default_application_for_uri_user_chosen), (nautilus_mime_get_default_component_for_uri_internal), (nautilus_mime_get_default_component_for_uri), (nautilus_mime_is_default_component_for_uri_user_chosen), (nautilus_mime_get_short_list_applications_for_uri), (nautilus_mime_get_short_list_components_for_uri), (nautilus_mime_get_short_list_methods_for_uri), (nautilus_mime_get_all_applications_for_uri), (nautilus_mime_has_any_applications_for_uri), (nautilus_mime_get_all_components_for_uri), (nautilus_mime_has_any_components_for_uri), (nautilus_mime_set_default_action_type_for_uri), (nautilus_mime_set_default_application_for_uri), (nautilus_mime_set_default_component_for_uri), (nautilus_mime_set_short_list_applications_for_uri), (nautilus_mime_set_short_list_components_for_uri), (nautilus_mime_add_application_to_short_list_for_uri), (nautilus_mime_remove_application_from_short_list_for_uri), (nautilus_mime_add_component_to_short_list_for_uri), (nautilus_mime_remove_component_from_short_list_for_uri), (nautilus_mime_extend_all_applications_for_uri), (nautilus_mime_remove_from_all_applications_for_uri): All these functions now take a NautilusDirectory and a NautilusFile, rather than a URI. (gnome_vfs_mime_application_has_id), (gnome_vfs_mime_id_matches_application), (gnome_vfs_mime_application_has_id_not_in_list), (string_not_in_list), (extract_prefix_add_suffix), (make_oaf_query_with_known_mime_type), (make_oaf_query_with_uri_scheme_only), (free_key), (server_matches_content_requirements), (nautilus_do_component_query), (str_list_difference), (strv_concat): Reformatted. (get_mime_type_from_file): Changed from get_mime_type_from_uri; uses nautilus_file_wait_until_ready instead of synchronous I/O. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list), (is_application_default_for_uri), (is_component_default_for_uri), (is_component_in_short_list_for_uri), (is_application_in_short_list_for_uri), (program_file_pair_is_default_for_file), (add_to_short_list_for_file), (remove_from_short_list_for_file), (remove_default_for_item), (set_default_for_item): * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): * libnautilus-extensions/nautilus-wait-until-ready.h: * src/file-manager/fm-directory-view.c: (switch_location_and_view), (create_open_with_gtk_menu), (reset_bonobo_open_with_menu), (activate_callback): * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new), (nautilus_navigation_info_free): * src/nautilus-applicable-views.h: * src/nautilus-sidebar.c: (nautilus_sidebar_update_buttons): * src/nautilus-theme-selector.c: (add_theme_to_icons): * src/nautilus-window.c: (nautilus_window_switch_views), (nautilus_window_load_content_view_menu): * test/test-nautilus-mime-actions-set.c: (main): * test/test-nautilus-mime-actions.c: (main): Deal with above API changes.
2000-09-27 22:00:49 +00:00
NautilusFile *file;
Worked on getting rid of wait_until_ready. * libnautilus-extensions/nautilus-directory.c: Got rid of include of nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-file.c: Got rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.c: (wait_until_ready_callback), (nautilus_mime_actions_wait_for_full_file_attributes): Reimplemented so the wait is in here so we can get rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.h: Moved nautilus_mime_actions_wait_for_full_file_attributes into nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-program-chooser.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-program-choosing.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-wait-until-ready.h: Removed nautilsu_file_wait_until_ready and added nautilus_mime_actions_wait_for_full_file_attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view): Get rid of code that waits for attributes, because the code guarantees they will already be read at this point. (fm_directory_view_destroy): Stop monitoring the file for the open with menu. (files_changed_callback): Update the menus whenever a file changes or our knowledge about it changes. (create_open_with_gtk_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (reset_bonobo_open_with_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (activate_callback): Remove the hack to work around the wait_until_ready calls. Also remove the wait_until_ready in here because we now request all the attributes we will be needing in the call_when_ready call (that already existed). (fm_directory_view_activate_file): Request all the attributes needed for determining MIME actions. (monitor_file_for_open_with): New function to monitor the stuff we need to know for the Open with menu. * test/test-nautilus-mime-actions-set.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * test/test-nautilus-mime-actions.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * po/ui-extract.pl: Checked in new version from Kenneth. * po/update.pl: Kenneth wanted me to update the license.
2000-11-08 01:11:33 +00:00
GList *attributes;
g_thread_init (NULL);
gnome_vfs_init ();
reviewed by: Darin Adler <darin@eazel.com> and Robey Pointer <robey@eazel.com> Fix bugs 5528 (oaf command-line options show up in main program section, not a separate section) and 5510 (descriptions of OAF-specific options in --help are not translated). To do this I had to change the way the oaf popt options are processed in all the places that do so. * components/adapter/main.c: (main): * components/hardware/main.c: (main): * components/help/hyperbola-main.c: (main): * components/image-viewer/Nautilus_View_image.oaf.in: * components/image-viewer/nautilus-image-view.c: (init_server_factory): * components/loser/content/main.c: (main): * components/loser/sidebar/main.c: (main): * components/mozilla/main.c: (main): * components/music/main.c: (main): * components/notes/nautilus-notes.c: (main): * components/rpmview/main.c: (main): * components/services/install/command-line/eazel-alt-install-corba. c: (main): * components/services/install/nautilus-view/main.c: (main): * components/services/login/nautilus-view/main.c: (main): * components/services/summary/nautilus-view/main.c: (main): * components/services/time/command-line/main.c: (main): * components/services/time/nautilus-view/main.c: (main): * components/services/trilobite/libtrilobite/trilobite-core-utils.c : (trilobite_init): * components/shell/shell.c: * components/text/Nautilus_View_text.oaf.in: * components/text/main.c: (main): * components/throbber/main.c: (main): * components/tree/main.c: (main): * libnautilus/nautilus-view-standard-main.c: (nautilus_view_standard_main_multi): * src/Nautilus_shell.oaf.in: * src/nautilus-main.c: (main): * test/test-nautilus-mime-actions-set.c: (main): * test/test-nautilus-mime-actions.c: (main): Register oaf options with gnomelib_register_popt_options and move oaf_init call to before gnome_init to fix the aforementioned bugs.
2001-02-02 03:52:20 +00:00
gnomelib_register_popt_table (oaf_popt_options, oaf_get_popt_table_name ());
oaf_init (argc, argv);
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.
2000-06-01 12:11:54 +00:00
gnome_init("test-nautilus-mime-actions", "0.0",
argc, argv);
if (argc != 2) {
fprintf (stderr, "Usage: %s uri\n", *argv);
return 1;
}
uri = argv[1];
Rename NAUTILUS_FILE_ATTRIBUTE_FAST_MIME_TYPE to * libnautilus-extensions/nautilus-file-attributes.h: Rename NAUTILUS_FILE_ATTRIBUTE_FAST_MIME_TYPE to NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE; add NAUTILUS_FILE_ATTRIBUTE_SLOW_MIME_TYPE, for now just a synonym for NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE. * libnautilus-extensions/nautilus-directory-async.c: (set_up_request_by_file_attributes): Handle the new file attributes. * libnautilus-extensions/nautilus-directory.h: move nautilus_directory_wait_until_ready call to nautilus-wait-until-ready.h * libnautilus-extensions/nautilus-directory.c: (nautilus_self_check_directory): Include nautilus-wait-until-ready.h, use new attributes. * libnautilus-extensions/nautilus-wait-until-ready.h: New header for the deprecated wait_until_ready calls. * libnautilus-extensions/nautilus-file.c: (nautilus_file_wait_until_ready): file equivalent of nautilus_directory_wait_until_ready; temporary to help me refactor. (file_wait_until_ready_callback): helper function. * libnautilus-extensions/Makefile.am: Add nautilus-wait-until-ready.h * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_required_file_attributes): Use new attribute for mime type. * libnautilus-extensions/nautilus-mime-actions.h, 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_internal), (nautilus_mime_get_default_application_for_uri), (nautilus_mime_is_default_application_for_uri_user_chosen), (nautilus_mime_get_default_component_for_uri_internal), (nautilus_mime_get_default_component_for_uri), (nautilus_mime_is_default_component_for_uri_user_chosen), (nautilus_mime_get_short_list_applications_for_uri), (nautilus_mime_get_short_list_components_for_uri), (nautilus_mime_get_short_list_methods_for_uri), (nautilus_mime_get_all_applications_for_uri), (nautilus_mime_has_any_applications_for_uri), (nautilus_mime_get_all_components_for_uri), (nautilus_mime_has_any_components_for_uri), (nautilus_mime_set_default_action_type_for_uri), (nautilus_mime_set_default_application_for_uri), (nautilus_mime_set_default_component_for_uri), (nautilus_mime_set_short_list_applications_for_uri), (nautilus_mime_set_short_list_components_for_uri), (nautilus_mime_add_application_to_short_list_for_uri), (nautilus_mime_remove_application_from_short_list_for_uri), (nautilus_mime_add_component_to_short_list_for_uri), (nautilus_mime_remove_component_from_short_list_for_uri), (nautilus_mime_extend_all_applications_for_uri), (nautilus_mime_remove_from_all_applications_for_uri): All these functions now take a NautilusDirectory and a NautilusFile, rather than a URI. (gnome_vfs_mime_application_has_id), (gnome_vfs_mime_id_matches_application), (gnome_vfs_mime_application_has_id_not_in_list), (string_not_in_list), (extract_prefix_add_suffix), (make_oaf_query_with_known_mime_type), (make_oaf_query_with_uri_scheme_only), (free_key), (server_matches_content_requirements), (nautilus_do_component_query), (str_list_difference), (strv_concat): Reformatted. (get_mime_type_from_file): Changed from get_mime_type_from_uri; uses nautilus_file_wait_until_ready instead of synchronous I/O. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list), (is_application_default_for_uri), (is_component_default_for_uri), (is_component_in_short_list_for_uri), (is_application_in_short_list_for_uri), (program_file_pair_is_default_for_file), (add_to_short_list_for_file), (remove_from_short_list_for_file), (remove_default_for_item), (set_default_for_item): * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): * libnautilus-extensions/nautilus-wait-until-ready.h: * src/file-manager/fm-directory-view.c: (switch_location_and_view), (create_open_with_gtk_menu), (reset_bonobo_open_with_menu), (activate_callback): * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new), (nautilus_navigation_info_free): * src/nautilus-applicable-views.h: * src/nautilus-sidebar.c: (nautilus_sidebar_update_buttons): * src/nautilus-theme-selector.c: (add_theme_to_icons): * src/nautilus-window.c: (nautilus_window_switch_views), (nautilus_window_load_content_view_menu): * test/test-nautilus-mime-actions-set.c: (main): * test/test-nautilus-mime-actions.c: (main): Deal with above API changes.
2000-09-27 22:00:49 +00:00
file = nautilus_file_get (uri);
Fixed bugzilla.eazel.com bugs 2222, 3177, 3468, 3650, 3788 (some vestiges of wait_until_ready remain in the farther reaches of the UI). * libnautilus-extensions/nautilus-mime-actions.h, libnautilus-extensions/nautilus-mime-actions.c (nautilus_mime_actions_check_if_required_attributes_ready, nautilus_mime_actions_get_required_file_attributes, nautilus_mime_actions_wait_for_required_file_attributes): New functions to help with monitoring or waiting for required attributes for the nautilus mime API. (nautilus_mime_get_default_action_type_for_file, nautilus_mime_get_default_action_for_file, nautilus_mime_get_default_application_for_file_internal, nautilus_mime_get_default_application_for_file, nautilus_mime_is_default_application_for_file_user_chosen, nautilus_mime_get_default_component_for_file_internal, nautilus_mime_get_default_component_for_file, nautilus_mime_is_default_component_for_file_user_chosen, nautilus_mime_get_short_list_applications_for_file, nautilus_mime_get_short_list_components_for_file, nautilus_mime_get_short_list_methods_for_file, nautilus_mime_get_all_applications_for_file, nautilus_mime_has_any_applications_for_file, nautilus_mime_get_all_components_for_file, nautilus_mime_has_any_components_for_file, nautilus_mime_set_default_action_type_for_file, nautilus_mime_set_default_application_for_file, nautilus_mime_set_default_component_for_file, nautilus_mime_set_short_list_applications_for_file, nautilus_mime_set_short_list_components_for_file, nautilus_mime_add_application_to_short_list_for_file, nautilus_mime_remove_application_from_short_list_for_file, nautilus_mime_add_component_to_short_list_for_file, nautilus_mime_remove_component_from_short_list_for_file, nautilus_mime_extend_all_applications_for_file, nautilus_mime_remove_from_all_applications_for_file, mime_type_get_supertype): Don't `nautilus_file_wait_until_ready' for the required attributes; instead assert (Well, return_if_fail) that they are available using `nautilus_file_check_if_ready'. Also, use `nautilus_file_get_uri_scheme' where possible. * libnautilus-extensions/nautilus-directory-async.c (mime_list_callback): Correct some coding mistakes. * libnautilus-extensions/nautilus-wait-until-ready.h, libnautilus-extensions/nautilus-directory.c: Remove `nautilus_directory_wait_until_ready'. * libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-file.c (nautilus_file_get_uri_scheme): new convenience function. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list, is_application_default_for_file, is_component_default_for_file, is_component_in_short_list_for_file, is_application_in_short_list_for_file, program_file_pair_is_default_for_file, program_file_pair_is_in_short_list_for_file, add_to_short_list_for_file, remove_from_short_list_for_file, remove_default_for_item, set_default_for_item): wait_until_ready for required file attributes. * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): wait_until_ready for required file attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view, create_open_with_gtk_menu, reset_bonobo_open_with_menu, activate_callback): Wait for the right file attributes. * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-sidebar.c: (nautilus_sidebar_destroy, nautilus_sidebar_update_buttons, nautilus_sidebar_update_all), nautilus_sidebar_set_uri): Monitor the file the sidebar is displaying, and update when it's attributes change. * src/nautilus-window-manage-views.c (nautilus_window_set_content_view): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-window.c: (nautilus_window_destroy, view_menu_choose_view_callback, view_menu_vfs_method_callback, nautilus_window_real_load_content_view_menu, nautilus_window_load_content_view_menu): Wait for the right attributes. (no wait_until_ready in this chain). * test/test-nautilus-mime-actions-set.c (main): Wait for the right attributes. * test/test-nautilus-mime-actions.c (main): Wait for the right attributes.
2000-10-18 21:57:19 +00:00
Worked on getting rid of wait_until_ready. * libnautilus-extensions/nautilus-directory.c: Got rid of include of nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-file.c: Got rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.c: (wait_until_ready_callback), (nautilus_mime_actions_wait_for_full_file_attributes): Reimplemented so the wait is in here so we can get rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.h: Moved nautilus_mime_actions_wait_for_full_file_attributes into nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-program-chooser.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-program-choosing.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-wait-until-ready.h: Removed nautilsu_file_wait_until_ready and added nautilus_mime_actions_wait_for_full_file_attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view): Get rid of code that waits for attributes, because the code guarantees they will already be read at this point. (fm_directory_view_destroy): Stop monitoring the file for the open with menu. (files_changed_callback): Update the menus whenever a file changes or our knowledge about it changes. (create_open_with_gtk_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (reset_bonobo_open_with_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (activate_callback): Remove the hack to work around the wait_until_ready calls. Also remove the wait_until_ready in here because we now request all the attributes we will be needing in the call_when_ready call (that already existed). (fm_directory_view_activate_file): Request all the attributes needed for determining MIME actions. (monitor_file_for_open_with): New function to monitor the stuff we need to know for the Open with menu. * test/test-nautilus-mime-actions-set.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * test/test-nautilus-mime-actions.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * po/ui-extract.pl: Checked in new version from Kenneth. * po/update.pl: Kenneth wanted me to update the license.
2000-11-08 01:11:33 +00:00
attributes = nautilus_mime_actions_get_full_file_attributes ();
nautilus_file_call_when_ready (file, attributes, ready_callback, NULL);
g_list_free (attributes);
while (!ready) {
gtk_main_iteration ();
}
Fixed bugzilla.eazel.com bugs 2222, 3177, 3468, 3650, 3788 (some vestiges of wait_until_ready remain in the farther reaches of the UI). * libnautilus-extensions/nautilus-mime-actions.h, libnautilus-extensions/nautilus-mime-actions.c (nautilus_mime_actions_check_if_required_attributes_ready, nautilus_mime_actions_get_required_file_attributes, nautilus_mime_actions_wait_for_required_file_attributes): New functions to help with monitoring or waiting for required attributes for the nautilus mime API. (nautilus_mime_get_default_action_type_for_file, nautilus_mime_get_default_action_for_file, nautilus_mime_get_default_application_for_file_internal, nautilus_mime_get_default_application_for_file, nautilus_mime_is_default_application_for_file_user_chosen, nautilus_mime_get_default_component_for_file_internal, nautilus_mime_get_default_component_for_file, nautilus_mime_is_default_component_for_file_user_chosen, nautilus_mime_get_short_list_applications_for_file, nautilus_mime_get_short_list_components_for_file, nautilus_mime_get_short_list_methods_for_file, nautilus_mime_get_all_applications_for_file, nautilus_mime_has_any_applications_for_file, nautilus_mime_get_all_components_for_file, nautilus_mime_has_any_components_for_file, nautilus_mime_set_default_action_type_for_file, nautilus_mime_set_default_application_for_file, nautilus_mime_set_default_component_for_file, nautilus_mime_set_short_list_applications_for_file, nautilus_mime_set_short_list_components_for_file, nautilus_mime_add_application_to_short_list_for_file, nautilus_mime_remove_application_from_short_list_for_file, nautilus_mime_add_component_to_short_list_for_file, nautilus_mime_remove_component_from_short_list_for_file, nautilus_mime_extend_all_applications_for_file, nautilus_mime_remove_from_all_applications_for_file, mime_type_get_supertype): Don't `nautilus_file_wait_until_ready' for the required attributes; instead assert (Well, return_if_fail) that they are available using `nautilus_file_check_if_ready'. Also, use `nautilus_file_get_uri_scheme' where possible. * libnautilus-extensions/nautilus-directory-async.c (mime_list_callback): Correct some coding mistakes. * libnautilus-extensions/nautilus-wait-until-ready.h, libnautilus-extensions/nautilus-directory.c: Remove `nautilus_directory_wait_until_ready'. * libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-file.c (nautilus_file_get_uri_scheme): new convenience function. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list, is_application_default_for_file, is_component_default_for_file, is_component_in_short_list_for_file, is_application_in_short_list_for_file, program_file_pair_is_default_for_file, program_file_pair_is_in_short_list_for_file, add_to_short_list_for_file, remove_from_short_list_for_file, remove_default_for_item, set_default_for_item): wait_until_ready for required file attributes. * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): wait_until_ready for required file attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view, create_open_with_gtk_menu, reset_bonobo_open_with_menu, activate_callback): Wait for the right file attributes. * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-sidebar.c: (nautilus_sidebar_destroy, nautilus_sidebar_update_buttons, nautilus_sidebar_update_all), nautilus_sidebar_set_uri): Monitor the file the sidebar is displaying, and update when it's attributes change. * src/nautilus-window-manage-views.c (nautilus_window_set_content_view): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-window.c: (nautilus_window_destroy, view_menu_choose_view_callback, view_menu_vfs_method_callback, nautilus_window_real_load_content_view_menu, nautilus_window_load_content_view_menu): Wait for the right attributes. (no wait_until_ready in this chain). * test/test-nautilus-mime-actions-set.c (main): Wait for the right attributes. * test/test-nautilus-mime-actions.c (main): Wait for the right attributes.
2000-10-18 21:57:19 +00:00
default_action = nautilus_mime_get_default_action_for_file (file);
puts ("Default Action");
print_action (default_action);
puts ("");
Fixed bugzilla.eazel.com bugs 2222, 3177, 3468, 3650, 3788 (some vestiges of wait_until_ready remain in the farther reaches of the UI). * libnautilus-extensions/nautilus-mime-actions.h, libnautilus-extensions/nautilus-mime-actions.c (nautilus_mime_actions_check_if_required_attributes_ready, nautilus_mime_actions_get_required_file_attributes, nautilus_mime_actions_wait_for_required_file_attributes): New functions to help with monitoring or waiting for required attributes for the nautilus mime API. (nautilus_mime_get_default_action_type_for_file, nautilus_mime_get_default_action_for_file, nautilus_mime_get_default_application_for_file_internal, nautilus_mime_get_default_application_for_file, nautilus_mime_is_default_application_for_file_user_chosen, nautilus_mime_get_default_component_for_file_internal, nautilus_mime_get_default_component_for_file, nautilus_mime_is_default_component_for_file_user_chosen, nautilus_mime_get_short_list_applications_for_file, nautilus_mime_get_short_list_components_for_file, nautilus_mime_get_short_list_methods_for_file, nautilus_mime_get_all_applications_for_file, nautilus_mime_has_any_applications_for_file, nautilus_mime_get_all_components_for_file, nautilus_mime_has_any_components_for_file, nautilus_mime_set_default_action_type_for_file, nautilus_mime_set_default_application_for_file, nautilus_mime_set_default_component_for_file, nautilus_mime_set_short_list_applications_for_file, nautilus_mime_set_short_list_components_for_file, nautilus_mime_add_application_to_short_list_for_file, nautilus_mime_remove_application_from_short_list_for_file, nautilus_mime_add_component_to_short_list_for_file, nautilus_mime_remove_component_from_short_list_for_file, nautilus_mime_extend_all_applications_for_file, nautilus_mime_remove_from_all_applications_for_file, mime_type_get_supertype): Don't `nautilus_file_wait_until_ready' for the required attributes; instead assert (Well, return_if_fail) that they are available using `nautilus_file_check_if_ready'. Also, use `nautilus_file_get_uri_scheme' where possible. * libnautilus-extensions/nautilus-directory-async.c (mime_list_callback): Correct some coding mistakes. * libnautilus-extensions/nautilus-wait-until-ready.h, libnautilus-extensions/nautilus-directory.c: Remove `nautilus_directory_wait_until_ready'. * libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-file.c (nautilus_file_get_uri_scheme): new convenience function. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list, is_application_default_for_file, is_component_default_for_file, is_component_in_short_list_for_file, is_application_in_short_list_for_file, program_file_pair_is_default_for_file, program_file_pair_is_in_short_list_for_file, add_to_short_list_for_file, remove_from_short_list_for_file, remove_default_for_item, set_default_for_item): wait_until_ready for required file attributes. * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): wait_until_ready for required file attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view, create_open_with_gtk_menu, reset_bonobo_open_with_menu, activate_callback): Wait for the right file attributes. * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-sidebar.c: (nautilus_sidebar_destroy, nautilus_sidebar_update_buttons, nautilus_sidebar_update_all), nautilus_sidebar_set_uri): Monitor the file the sidebar is displaying, and update when it's attributes change. * src/nautilus-window-manage-views.c (nautilus_window_set_content_view): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-window.c: (nautilus_window_destroy, view_menu_choose_view_callback, view_menu_vfs_method_callback, nautilus_window_real_load_content_view_menu, nautilus_window_load_content_view_menu): Wait for the right attributes. (no wait_until_ready in this chain). * test/test-nautilus-mime-actions-set.c (main): Wait for the right attributes. * test/test-nautilus-mime-actions.c (main): Wait for the right attributes.
2000-10-18 21:57:19 +00:00
default_application = nautilus_mime_get_default_application_for_file (file);
puts("Default Application");
print_application (default_application);
puts ("");
Fixed bugzilla.eazel.com bugs 2222, 3177, 3468, 3650, 3788 (some vestiges of wait_until_ready remain in the farther reaches of the UI). * libnautilus-extensions/nautilus-mime-actions.h, libnautilus-extensions/nautilus-mime-actions.c (nautilus_mime_actions_check_if_required_attributes_ready, nautilus_mime_actions_get_required_file_attributes, nautilus_mime_actions_wait_for_required_file_attributes): New functions to help with monitoring or waiting for required attributes for the nautilus mime API. (nautilus_mime_get_default_action_type_for_file, nautilus_mime_get_default_action_for_file, nautilus_mime_get_default_application_for_file_internal, nautilus_mime_get_default_application_for_file, nautilus_mime_is_default_application_for_file_user_chosen, nautilus_mime_get_default_component_for_file_internal, nautilus_mime_get_default_component_for_file, nautilus_mime_is_default_component_for_file_user_chosen, nautilus_mime_get_short_list_applications_for_file, nautilus_mime_get_short_list_components_for_file, nautilus_mime_get_short_list_methods_for_file, nautilus_mime_get_all_applications_for_file, nautilus_mime_has_any_applications_for_file, nautilus_mime_get_all_components_for_file, nautilus_mime_has_any_components_for_file, nautilus_mime_set_default_action_type_for_file, nautilus_mime_set_default_application_for_file, nautilus_mime_set_default_component_for_file, nautilus_mime_set_short_list_applications_for_file, nautilus_mime_set_short_list_components_for_file, nautilus_mime_add_application_to_short_list_for_file, nautilus_mime_remove_application_from_short_list_for_file, nautilus_mime_add_component_to_short_list_for_file, nautilus_mime_remove_component_from_short_list_for_file, nautilus_mime_extend_all_applications_for_file, nautilus_mime_remove_from_all_applications_for_file, mime_type_get_supertype): Don't `nautilus_file_wait_until_ready' for the required attributes; instead assert (Well, return_if_fail) that they are available using `nautilus_file_check_if_ready'. Also, use `nautilus_file_get_uri_scheme' where possible. * libnautilus-extensions/nautilus-directory-async.c (mime_list_callback): Correct some coding mistakes. * libnautilus-extensions/nautilus-wait-until-ready.h, libnautilus-extensions/nautilus-directory.c: Remove `nautilus_directory_wait_until_ready'. * libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-file.c (nautilus_file_get_uri_scheme): new convenience function. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list, is_application_default_for_file, is_component_default_for_file, is_component_in_short_list_for_file, is_application_in_short_list_for_file, program_file_pair_is_default_for_file, program_file_pair_is_in_short_list_for_file, add_to_short_list_for_file, remove_from_short_list_for_file, remove_default_for_item, set_default_for_item): wait_until_ready for required file attributes. * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): wait_until_ready for required file attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view, create_open_with_gtk_menu, reset_bonobo_open_with_menu, activate_callback): Wait for the right file attributes. * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-sidebar.c: (nautilus_sidebar_destroy, nautilus_sidebar_update_buttons, nautilus_sidebar_update_all), nautilus_sidebar_set_uri): Monitor the file the sidebar is displaying, and update when it's attributes change. * src/nautilus-window-manage-views.c (nautilus_window_set_content_view): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-window.c: (nautilus_window_destroy, view_menu_choose_view_callback, view_menu_vfs_method_callback, nautilus_window_real_load_content_view_menu, nautilus_window_load_content_view_menu): Wait for the right attributes. (no wait_until_ready in this chain). * test/test-nautilus-mime-actions-set.c (main): Wait for the right attributes. * test/test-nautilus-mime-actions.c (main): Wait for the right attributes.
2000-10-18 21:57:19 +00:00
default_component = nautilus_mime_get_default_component_for_file (file);
puts("Default Component");
print_component (default_component);
puts ("");
Fixed bugzilla.eazel.com bugs 2222, 3177, 3468, 3650, 3788 (some vestiges of wait_until_ready remain in the farther reaches of the UI). * libnautilus-extensions/nautilus-mime-actions.h, libnautilus-extensions/nautilus-mime-actions.c (nautilus_mime_actions_check_if_required_attributes_ready, nautilus_mime_actions_get_required_file_attributes, nautilus_mime_actions_wait_for_required_file_attributes): New functions to help with monitoring or waiting for required attributes for the nautilus mime API. (nautilus_mime_get_default_action_type_for_file, nautilus_mime_get_default_action_for_file, nautilus_mime_get_default_application_for_file_internal, nautilus_mime_get_default_application_for_file, nautilus_mime_is_default_application_for_file_user_chosen, nautilus_mime_get_default_component_for_file_internal, nautilus_mime_get_default_component_for_file, nautilus_mime_is_default_component_for_file_user_chosen, nautilus_mime_get_short_list_applications_for_file, nautilus_mime_get_short_list_components_for_file, nautilus_mime_get_short_list_methods_for_file, nautilus_mime_get_all_applications_for_file, nautilus_mime_has_any_applications_for_file, nautilus_mime_get_all_components_for_file, nautilus_mime_has_any_components_for_file, nautilus_mime_set_default_action_type_for_file, nautilus_mime_set_default_application_for_file, nautilus_mime_set_default_component_for_file, nautilus_mime_set_short_list_applications_for_file, nautilus_mime_set_short_list_components_for_file, nautilus_mime_add_application_to_short_list_for_file, nautilus_mime_remove_application_from_short_list_for_file, nautilus_mime_add_component_to_short_list_for_file, nautilus_mime_remove_component_from_short_list_for_file, nautilus_mime_extend_all_applications_for_file, nautilus_mime_remove_from_all_applications_for_file, mime_type_get_supertype): Don't `nautilus_file_wait_until_ready' for the required attributes; instead assert (Well, return_if_fail) that they are available using `nautilus_file_check_if_ready'. Also, use `nautilus_file_get_uri_scheme' where possible. * libnautilus-extensions/nautilus-directory-async.c (mime_list_callback): Correct some coding mistakes. * libnautilus-extensions/nautilus-wait-until-ready.h, libnautilus-extensions/nautilus-directory.c: Remove `nautilus_directory_wait_until_ready'. * libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-file.c (nautilus_file_get_uri_scheme): new convenience function. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list, is_application_default_for_file, is_component_default_for_file, is_component_in_short_list_for_file, is_application_in_short_list_for_file, program_file_pair_is_default_for_file, program_file_pair_is_in_short_list_for_file, add_to_short_list_for_file, remove_from_short_list_for_file, remove_default_for_item, set_default_for_item): wait_until_ready for required file attributes. * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): wait_until_ready for required file attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view, create_open_with_gtk_menu, reset_bonobo_open_with_menu, activate_callback): Wait for the right file attributes. * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-sidebar.c: (nautilus_sidebar_destroy, nautilus_sidebar_update_buttons, nautilus_sidebar_update_all), nautilus_sidebar_set_uri): Monitor the file the sidebar is displaying, and update when it's attributes change. * src/nautilus-window-manage-views.c (nautilus_window_set_content_view): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-window.c: (nautilus_window_destroy, view_menu_choose_view_callback, view_menu_vfs_method_callback, nautilus_window_real_load_content_view_menu, nautilus_window_load_content_view_menu): Wait for the right attributes. (no wait_until_ready in this chain). * test/test-nautilus-mime-actions-set.c (main): Wait for the right attributes. * test/test-nautilus-mime-actions.c (main): Wait for the right attributes.
2000-10-18 21:57:19 +00:00
short_list_applications = nautilus_mime_get_short_list_applications_for_file (file);
puts("Short List Applications");
print_application_list (short_list_applications);
puts ("");
Fixed bugzilla.eazel.com bugs 2222, 3177, 3468, 3650, 3788 (some vestiges of wait_until_ready remain in the farther reaches of the UI). * libnautilus-extensions/nautilus-mime-actions.h, libnautilus-extensions/nautilus-mime-actions.c (nautilus_mime_actions_check_if_required_attributes_ready, nautilus_mime_actions_get_required_file_attributes, nautilus_mime_actions_wait_for_required_file_attributes): New functions to help with monitoring or waiting for required attributes for the nautilus mime API. (nautilus_mime_get_default_action_type_for_file, nautilus_mime_get_default_action_for_file, nautilus_mime_get_default_application_for_file_internal, nautilus_mime_get_default_application_for_file, nautilus_mime_is_default_application_for_file_user_chosen, nautilus_mime_get_default_component_for_file_internal, nautilus_mime_get_default_component_for_file, nautilus_mime_is_default_component_for_file_user_chosen, nautilus_mime_get_short_list_applications_for_file, nautilus_mime_get_short_list_components_for_file, nautilus_mime_get_short_list_methods_for_file, nautilus_mime_get_all_applications_for_file, nautilus_mime_has_any_applications_for_file, nautilus_mime_get_all_components_for_file, nautilus_mime_has_any_components_for_file, nautilus_mime_set_default_action_type_for_file, nautilus_mime_set_default_application_for_file, nautilus_mime_set_default_component_for_file, nautilus_mime_set_short_list_applications_for_file, nautilus_mime_set_short_list_components_for_file, nautilus_mime_add_application_to_short_list_for_file, nautilus_mime_remove_application_from_short_list_for_file, nautilus_mime_add_component_to_short_list_for_file, nautilus_mime_remove_component_from_short_list_for_file, nautilus_mime_extend_all_applications_for_file, nautilus_mime_remove_from_all_applications_for_file, mime_type_get_supertype): Don't `nautilus_file_wait_until_ready' for the required attributes; instead assert (Well, return_if_fail) that they are available using `nautilus_file_check_if_ready'. Also, use `nautilus_file_get_uri_scheme' where possible. * libnautilus-extensions/nautilus-directory-async.c (mime_list_callback): Correct some coding mistakes. * libnautilus-extensions/nautilus-wait-until-ready.h, libnautilus-extensions/nautilus-directory.c: Remove `nautilus_directory_wait_until_ready'. * libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-file.c (nautilus_file_get_uri_scheme): new convenience function. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list, is_application_default_for_file, is_component_default_for_file, is_component_in_short_list_for_file, is_application_in_short_list_for_file, program_file_pair_is_default_for_file, program_file_pair_is_in_short_list_for_file, add_to_short_list_for_file, remove_from_short_list_for_file, remove_default_for_item, set_default_for_item): wait_until_ready for required file attributes. * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): wait_until_ready for required file attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view, create_open_with_gtk_menu, reset_bonobo_open_with_menu, activate_callback): Wait for the right file attributes. * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-sidebar.c: (nautilus_sidebar_destroy, nautilus_sidebar_update_buttons, nautilus_sidebar_update_all), nautilus_sidebar_set_uri): Monitor the file the sidebar is displaying, and update when it's attributes change. * src/nautilus-window-manage-views.c (nautilus_window_set_content_view): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-window.c: (nautilus_window_destroy, view_menu_choose_view_callback, view_menu_vfs_method_callback, nautilus_window_real_load_content_view_menu, nautilus_window_load_content_view_menu): Wait for the right attributes. (no wait_until_ready in this chain). * test/test-nautilus-mime-actions-set.c (main): Wait for the right attributes. * test/test-nautilus-mime-actions.c (main): Wait for the right attributes.
2000-10-18 21:57:19 +00:00
short_list_components = nautilus_mime_get_short_list_components_for_file (file);
puts("Short List Components");
print_component_list (short_list_components);
puts ("");
Fixed bugzilla.eazel.com bugs 2222, 3177, 3468, 3650, 3788 (some vestiges of wait_until_ready remain in the farther reaches of the UI). * libnautilus-extensions/nautilus-mime-actions.h, libnautilus-extensions/nautilus-mime-actions.c (nautilus_mime_actions_check_if_required_attributes_ready, nautilus_mime_actions_get_required_file_attributes, nautilus_mime_actions_wait_for_required_file_attributes): New functions to help with monitoring or waiting for required attributes for the nautilus mime API. (nautilus_mime_get_default_action_type_for_file, nautilus_mime_get_default_action_for_file, nautilus_mime_get_default_application_for_file_internal, nautilus_mime_get_default_application_for_file, nautilus_mime_is_default_application_for_file_user_chosen, nautilus_mime_get_default_component_for_file_internal, nautilus_mime_get_default_component_for_file, nautilus_mime_is_default_component_for_file_user_chosen, nautilus_mime_get_short_list_applications_for_file, nautilus_mime_get_short_list_components_for_file, nautilus_mime_get_short_list_methods_for_file, nautilus_mime_get_all_applications_for_file, nautilus_mime_has_any_applications_for_file, nautilus_mime_get_all_components_for_file, nautilus_mime_has_any_components_for_file, nautilus_mime_set_default_action_type_for_file, nautilus_mime_set_default_application_for_file, nautilus_mime_set_default_component_for_file, nautilus_mime_set_short_list_applications_for_file, nautilus_mime_set_short_list_components_for_file, nautilus_mime_add_application_to_short_list_for_file, nautilus_mime_remove_application_from_short_list_for_file, nautilus_mime_add_component_to_short_list_for_file, nautilus_mime_remove_component_from_short_list_for_file, nautilus_mime_extend_all_applications_for_file, nautilus_mime_remove_from_all_applications_for_file, mime_type_get_supertype): Don't `nautilus_file_wait_until_ready' for the required attributes; instead assert (Well, return_if_fail) that they are available using `nautilus_file_check_if_ready'. Also, use `nautilus_file_get_uri_scheme' where possible. * libnautilus-extensions/nautilus-directory-async.c (mime_list_callback): Correct some coding mistakes. * libnautilus-extensions/nautilus-wait-until-ready.h, libnautilus-extensions/nautilus-directory.c: Remove `nautilus_directory_wait_until_ready'. * libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-file.c (nautilus_file_get_uri_scheme): new convenience function. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list, is_application_default_for_file, is_component_default_for_file, is_component_in_short_list_for_file, is_application_in_short_list_for_file, program_file_pair_is_default_for_file, program_file_pair_is_in_short_list_for_file, add_to_short_list_for_file, remove_from_short_list_for_file, remove_default_for_item, set_default_for_item): wait_until_ready for required file attributes. * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): wait_until_ready for required file attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view, create_open_with_gtk_menu, reset_bonobo_open_with_menu, activate_callback): Wait for the right file attributes. * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-sidebar.c: (nautilus_sidebar_destroy, nautilus_sidebar_update_buttons, nautilus_sidebar_update_all), nautilus_sidebar_set_uri): Monitor the file the sidebar is displaying, and update when it's attributes change. * src/nautilus-window-manage-views.c (nautilus_window_set_content_view): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-window.c: (nautilus_window_destroy, view_menu_choose_view_callback, view_menu_vfs_method_callback, nautilus_window_real_load_content_view_menu, nautilus_window_load_content_view_menu): Wait for the right attributes. (no wait_until_ready in this chain). * test/test-nautilus-mime-actions-set.c (main): Wait for the right attributes. * test/test-nautilus-mime-actions.c (main): Wait for the right attributes.
2000-10-18 21:57:19 +00:00
all_applications = nautilus_mime_get_all_applications_for_file (file);
puts("All Applications");
print_application_list (all_applications);
puts ("");
Fixed bugzilla.eazel.com bugs 2222, 3177, 3468, 3650, 3788 (some vestiges of wait_until_ready remain in the farther reaches of the UI). * libnautilus-extensions/nautilus-mime-actions.h, libnautilus-extensions/nautilus-mime-actions.c (nautilus_mime_actions_check_if_required_attributes_ready, nautilus_mime_actions_get_required_file_attributes, nautilus_mime_actions_wait_for_required_file_attributes): New functions to help with monitoring or waiting for required attributes for the nautilus mime API. (nautilus_mime_get_default_action_type_for_file, nautilus_mime_get_default_action_for_file, nautilus_mime_get_default_application_for_file_internal, nautilus_mime_get_default_application_for_file, nautilus_mime_is_default_application_for_file_user_chosen, nautilus_mime_get_default_component_for_file_internal, nautilus_mime_get_default_component_for_file, nautilus_mime_is_default_component_for_file_user_chosen, nautilus_mime_get_short_list_applications_for_file, nautilus_mime_get_short_list_components_for_file, nautilus_mime_get_short_list_methods_for_file, nautilus_mime_get_all_applications_for_file, nautilus_mime_has_any_applications_for_file, nautilus_mime_get_all_components_for_file, nautilus_mime_has_any_components_for_file, nautilus_mime_set_default_action_type_for_file, nautilus_mime_set_default_application_for_file, nautilus_mime_set_default_component_for_file, nautilus_mime_set_short_list_applications_for_file, nautilus_mime_set_short_list_components_for_file, nautilus_mime_add_application_to_short_list_for_file, nautilus_mime_remove_application_from_short_list_for_file, nautilus_mime_add_component_to_short_list_for_file, nautilus_mime_remove_component_from_short_list_for_file, nautilus_mime_extend_all_applications_for_file, nautilus_mime_remove_from_all_applications_for_file, mime_type_get_supertype): Don't `nautilus_file_wait_until_ready' for the required attributes; instead assert (Well, return_if_fail) that they are available using `nautilus_file_check_if_ready'. Also, use `nautilus_file_get_uri_scheme' where possible. * libnautilus-extensions/nautilus-directory-async.c (mime_list_callback): Correct some coding mistakes. * libnautilus-extensions/nautilus-wait-until-ready.h, libnautilus-extensions/nautilus-directory.c: Remove `nautilus_directory_wait_until_ready'. * libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-file.c (nautilus_file_get_uri_scheme): new convenience function. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list, is_application_default_for_file, is_component_default_for_file, is_component_in_short_list_for_file, is_application_in_short_list_for_file, program_file_pair_is_default_for_file, program_file_pair_is_in_short_list_for_file, add_to_short_list_for_file, remove_from_short_list_for_file, remove_default_for_item, set_default_for_item): wait_until_ready for required file attributes. * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): wait_until_ready for required file attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view, create_open_with_gtk_menu, reset_bonobo_open_with_menu, activate_callback): Wait for the right file attributes. * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-sidebar.c: (nautilus_sidebar_destroy, nautilus_sidebar_update_buttons, nautilus_sidebar_update_all), nautilus_sidebar_set_uri): Monitor the file the sidebar is displaying, and update when it's attributes change. * src/nautilus-window-manage-views.c (nautilus_window_set_content_view): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-window.c: (nautilus_window_destroy, view_menu_choose_view_callback, view_menu_vfs_method_callback, nautilus_window_real_load_content_view_menu, nautilus_window_load_content_view_menu): Wait for the right attributes. (no wait_until_ready in this chain). * test/test-nautilus-mime-actions-set.c (main): Wait for the right attributes. * test/test-nautilus-mime-actions.c (main): Wait for the right attributes.
2000-10-18 21:57:19 +00:00
all_components = nautilus_mime_get_all_components_for_file (file);
puts("All Components");
print_component_list (all_components);
puts ("");
return 0;
}