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 517735 - Unhandled MIME type: "text/plain" error when print previewing a "null" selection
Unhandled MIME type: "text/plain" error when print previewing a "null" selection
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: printing
2.24.x
Other All
: Normal minor
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-02-20 19:41 UTC by Miguel
Modified: 2009-04-04 21:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Temptative patch for bug 517735 (1.50 KB, patch)
2009-03-01 09:33 UTC, Juanjo Marín
none Details | Review
added gtk_message_dialog. Only showed when there is a total null selection. If there is at least a non-null selection, the message won't be showed. (2.50 KB, patch)
2009-04-03 19:58 UTC, Juanjo Marín
none Details | Review
Correct coding style. (2.61 KB, patch)
2009-04-04 01:00 UTC, Juanjo Marín
committed Details | Review

Description Miguel 2008-02-20 19:41:02 UTC
The message - Unhandled MIME type: "text/plain" - appears when print previewing an impossible selection, such as:

Print
General - Range: 1 (page 1)
Page Setup - Only print: Even pages

This is, in my opinion, a very unhelpful error message. Because I didn't realize I had "even pages" selected, I spent some time trying to understand why the print preview would not work.

I suggest warning the user of the impossible print selection, or that it produces a "null" print.

Other information:
Comment 1 Carlos Garcia Campos 2008-03-18 18:43:14 UTC
Confirmed. 
Comment 2 Teppo Turtiainen 2008-12-27 17:00:16 UTC
Still occurs with 2.24.1.
Comment 3 Juanjo Marín 2009-03-01 09:33:44 UTC
Created attachment 129774 [details] [review]
Temptative patch for bug 517735

This is my quick and dirty patch for this bug. Sorry for the quality, I'm not very proficient at programming :-). I add a g_warning, but I suppose I have to change it for a windows alert, like the one on the section 3.4.5 on the HIG book. Any advise/suggestion for this patch will be appreciated (text for the message, widget to choose, mistakes, etc).

We are now in string freeze, but I think we should add a string, but maybe it better do it another way or wait for the next cycle.
Comment 4 Juanjo Marín 2009-04-03 19:58:03 UTC
Created attachment 132029 [details] [review]
added gtk_message_dialog. Only showed when there is a total null selection. If there is at least a non-null selection, the message won't be showed.

Please, review and apply :-)
Comment 5 Juanjo Marín 2009-04-03 19:59:53 UTC
Comment on attachment 132029 [details] [review]
added gtk_message_dialog. Only showed when there is a total null selection. If there is at least a non-null selection, the message won't be showed.

Please, review and apply :-)
Comment 6 Juanjo Marín 2009-04-04 01:00:43 UTC
Created attachment 132051 [details] [review]
Correct coding style. 

+	if (null_flag && !n_pages_to_print) return FALSE;
+	export->n_ranges = num_of_correct_ranges;
+	export->n_pages_to_print = n_pages_to_print;
+	return TRUE;

for 


+	if (null_flag && !n_pages_to_print) 
+		return FALSE;
+	else {
+		export->n_ranges = num_of_correct_ranges;
+		export->n_pages_to_print = n_pages_to_print;
+		return TRUE;
+	}
Comment 7 Nickolay V. Shmyrev 2009-04-04 21:35:32 UTC
Applied, thanks a lot!