After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 529129 - Unhelpful messages when opening files
Unhelpful messages when opening files
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 541695 549894 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-04-20 22:01 UTC by JB Lallement
Modified: 2008-08-30 06:57 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Patch against libdocument/ev-document-factory.c (1.71 KB, patch)
2008-04-20 22:05 UTC, JB Lallement
committed Details | Review

Description JB Lallement 2008-04-20 22:01:00 UTC
Please describe the problem:
When there is a pb opening a file (non existent file, no read access, ...) you get a generic message "Unable to open document / Unknown MIME Type" which has nothing to do with the error.

When you open a file which format is unsupported the error message is not informative enough.

For instance when you try to open a MSWord document you get "Unhandled MIME type: "application/x-ole-storage"" 

This kind of message doesn't mean a lot to my granny.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 JB Lallement 2008-04-20 22:05:31 UTC
Created attachment 109602 [details] [review]
Patch against libdocument/ev-document-factory.c

Changes in this patch:
- More user friendly message when opening an unsupported file type
- Print GIO error when a problem occurs during opening of a file
Comment 2 Nickolay V. Shmyrev 2008-04-23 21:45:19 UTC
Applied, thanks a lot!
Comment 3 Carlos Garcia Campos 2008-04-24 08:52:54 UTC
Comment on attachment 109602 [details] [review]
Patch against libdocument/ev-document-factory.c

>--- libdocument/ev-document-factory.c	2008-04-20 23:21:45.000000000 +0200
>+++ libdocument/ev-document-factory.c.new	2008-04-20 23:21:24.000000000 +0200

>@@ -191,9 +187,9 @@
> 		g_set_error (error,
> 			     EV_DOCUMENT_ERROR,	
> 			     0,
>-			     _("Unhandled MIME type: “%s”"), mime_type);
>+			     _("%s (%s) is not a supported file type and cannot be opened"), g_content_type_get_description(mime_type),mime_type);

Note that g_content_type_get_description returns a new allocated string, so you are leaking that string here. I've just fixed it in svn. 

> 		g_free (mime_type);
>-		
>+
> 		return NULL;
> 	}
> 

What dou you think about using only the mime description? I think mime-type might be a bit cryptic for the user.
Comment 4 Nickolay V. Shmyrev 2008-07-08 22:22:50 UTC
*** Bug 541695 has been marked as a duplicate of this bug. ***
Comment 5 Nickolay V. Shmyrev 2008-08-30 06:57:21 UTC
*** Bug 549894 has been marked as a duplicate of this bug. ***