summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGene Z. Ragan <gzr@eazel.com>2000-09-11 21:56:36 +0000
committerGene Ragan <gzr@src.gnome.org>2000-09-11 21:56:36 +0000
commit9e1bc99dd19fc22382330d9591ac5bd3f759ccef (patch)
treee11b01f1b9c1b6189cf6c373b839b00ebde5e263 /src
parent471b996bc36431beb8683eace21a406a91f76cee (diff)
downloadnautilus-9e1bc99dd19fc22382330d9591ac5bd3f759ccef.tar.gz
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):
Diffstat (limited to 'src')
-rw-r--r--src/file-manager/fm-directory-view.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index efea1fe8e..03449e1ba 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -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);