diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2006-04-30 21:27:04 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2006-04-30 21:27:04 (GMT) |
commit | ab8da3ce3810df8dc6a9df049031292ee03b4393 (patch) | |
tree | d3e131b903effd21e066d5f0db9ad58ee958214a /backend | |
parent | 1a02207a88fa4a86c585a93b6bc323b8a7488c33 (diff) |
Allow multiple selection of attachments
2006-04-29 Carlos Garcia Campos <carlosgc@gnome.org>
* backend/ev-attachment.c:
* shell/ev-attachment-bar.c:
* shell/ev-window.c:
Allow multiple selection of attachments
Diffstat (limited to 'backend')
-rw-r--r-- | backend/ev-attachment.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/backend/ev-attachment.c b/backend/ev-attachment.c index f0002f3..3314738 100644 --- a/backend/ev-attachment.c +++ b/backend/ev-attachment.c @@ -367,10 +367,14 @@ ev_attachment_open (EvAttachment *attachment, gboolean retval = FALSE; GnomeVFSMimeApplication *default_app = NULL; - if (!attachment->priv->app) + g_return_val_if_fail (EV_IS_ATTACHMENT (attachment), FALSE); + + if (!attachment->priv->app) { default_app = gnome_vfs_mime_get_default_application (attachment->priv->mime_type); + attachment->priv->app = default_app; + } - if (!default_app) { + if (!attachment->priv->app) { g_set_error (error, EV_ATTACHMENT_ERROR, 0, @@ -380,8 +384,6 @@ ev_attachment_open (EvAttachment *attachment, return FALSE; } - attachment->priv->app = default_app; - if (attachment->priv->tmp_uri && g_file_test (attachment->priv->tmp_uri, G_FILE_TEST_EXISTS)) { retval = ev_attachment_launch_app (attachment, error); |