Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 200640 Details for
Bug 280833
app-text/epdfview-0.1.8 version bump
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Show "Encrypted file" dialog only when file is exist and it is really encrypted
epdfview-0.1.7-proper-error-handling.patch (text/plain), 2.62 KB, created by
Arseny Solokha
on 2009-08-08 23:16:53 UTC
(
hide
)
Description:
Show "Encrypted file" dialog only when file is exist and it is really encrypted
Filename:
MIME Type:
Creator:
Arseny Solokha
Created:
2009-08-08 23:16:53 UTC
Size:
2.62 KB
patch
obsolete
>diff -ruN epdfview-0.1.7.orig/src/IDocument.cxx epdfview-0.1.7/src/IDocument.cxx >--- epdfview-0.1.7.orig/src/IDocument.cxx 2009-03-01 04:00:35.000000000 +0700 >+++ epdfview-0.1.7/src/IDocument.cxx 2009-08-09 06:05:02.928595779 +0800 >@@ -82,7 +82,7 @@ > errorMessage = g_strdup (_("No error.")); > break; > case DocumentErrorOpenFile: >- errorMessage = g_strdup (_("File not found.")); >+ errorMessage = g_strdup (_("Cannot open or load file.")); > break; > case DocumentErrorBadCatalog: > errorMessage = g_strdup (_("Couldn't read the page catalog.")); >diff -ruN epdfview-0.1.7.orig/src/PDFDocument.cxx epdfview-0.1.7/src/PDFDocument.cxx >--- epdfview-0.1.7.orig/src/PDFDocument.cxx 2009-03-01 04:00:35.000000000 +0700 >+++ epdfview-0.1.7/src/PDFDocument.cxx 2009-08-09 06:03:14.845564665 +0800 >@@ -246,27 +246,27 @@ > // Check if the document couldn't be opened successfully and why. > if ( NULL == newDocument ) > { >- // Poppler's glib wrapper passes the Poppler error code unless the >- // error is that the file is encrypted. We want to set our own >- // error code in this case. > DocumentError errorCode = DocumentErrorNone; >- if ( POPPLER_ERROR == loadError->domain ) >- { >- errorCode = DocumentErrorEncrypted; >- } >- else >- { >- // OK, the glib's wrapper don't pass the error code directly >- // from Poppler. Instead returns G_FILE_ERROR_FAILED and a >- // non translated string. >- // Maybe I'm wrong (very probable) but that's a wrong way. >- // So I'm reading the error code from the error string... >- sscanf (loadError->message, "Failed to load document (error %d)", >- (gint *)&errorCode); >- } >- g_error_free (loadError); >- // Get our error message. >- gchar *errorMessage = IDocument::getErrorMessage (errorCode); >+ gchar *errorMessage = 0; >+ >+ // Obtain error code from Poppler. >+ switch ( loadError->code ) >+ { >+ case POPPLER_ERROR_OPEN_FILE: >+ case POPPLER_ERROR_INVALID: >+ errorCode = DocumentErrorOpenFile; >+ break; >+ case POPPLER_ERROR_BAD_CATALOG: >+ errorCode = DocumentErrorBadCatalog; >+ break; >+ case POPPLER_ERROR_DAMAGED: >+ errorCode = DocumentErrorDamaged; >+ break; >+ case POPPLER_ERROR_ENCRYPTED: >+ errorCode = DocumentErrorEncrypted; >+ break; >+ } >+ errorMessage = IDocument::getErrorMessage (errorCode); > g_set_error (error, > EPDFVIEW_DOCUMENT_ERROR, errorCode, > _("Failed to load document '%s'.\n%s\n"),
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 280833
:
200636
|
200638
|
200640