mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
Fixed bug 818, clicking on .doc and .pdf crashes Nautilus
2000-09-11 Gene Z. Ragan <gzr@eazel.com> Fixed bug 818, clicking on .doc and .pdf crashes Nautilus This was a bug where the action would be to open the document in an application but the application returned would be NULL due to some inconsistancy in the mime database. We now check for this case and default to the componet view if this situation arises. * src/file-manager/fm-directory-view.c: (activate_callback):
This commit is contained in:
parent
471b996bc3
commit
9e1bc99dd1
2 changed files with 24 additions and 2 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2000-09-11 Gene Z. Ragan <gzr@eazel.com>
|
||||
|
||||
Fixed bug 818, clicking on .doc and .pdf crashes Nautilus
|
||||
|
||||
This was a bug where the action would be to open the document
|
||||
in an application but the application returned would be NULL
|
||||
due to some inconsistancy in the mime database. We now check
|
||||
for this case and default to the componet view if this
|
||||
situation arises.
|
||||
|
||||
* src/file-manager/fm-directory-view.c: (activate_callback):
|
||||
|
||||
2000-09-11 John Sullivan <sullivan@eazel.com>
|
||||
|
||||
Fixed bug 2938 (Shouldn't open a zillion Properties windows
|
||||
|
|
|
@ -3485,10 +3485,16 @@ activate_callback (NautilusFile *file, gpointer callback_data)
|
|||
|
||||
if (!performed_special_handling) {
|
||||
action_type = nautilus_mime_get_default_action_type_for_uri (uri);
|
||||
|
||||
/* We need to check for the case of having GNOME_VFS_MIME_ACTION_TYPE_APPLICATION as the action
|
||||
* but having a NULL application returned. */
|
||||
application = nautilus_mime_get_default_application_for_uri (uri);
|
||||
if (action_type == GNOME_VFS_MIME_ACTION_TYPE_APPLICATION && application == NULL) {
|
||||
action_type = GNOME_VFS_MIME_ACTION_TYPE_COMPONENT;
|
||||
}
|
||||
|
||||
if (action_type == GNOME_VFS_MIME_ACTION_TYPE_APPLICATION) {
|
||||
application = nautilus_mime_get_default_application_for_uri (uri);
|
||||
fm_directory_view_launch_application (application, uri, view);
|
||||
gnome_vfs_mime_application_free (application);
|
||||
} else {
|
||||
/* If the action type is unspecified, treat it like
|
||||
* the component case. This is most likely to happen
|
||||
|
@ -3502,6 +3508,10 @@ activate_callback (NautilusFile *file, gpointer callback_data)
|
|||
fm_directory_view_switch_location
|
||||
(view, uri, parameters->use_new_window);
|
||||
}
|
||||
|
||||
if (application != NULL) {
|
||||
gnome_vfs_mime_application_free (application);
|
||||
}
|
||||
}
|
||||
|
||||
g_free (uri);
|
||||
|
|
Loading…
Reference in a new issue