GNOME Bugzilla – Bug 517735
Unhandled MIME type: "text/plain" error when print previewing a "null" selection
Last modified: 2009-04-04 21:35:32 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:
Confirmed.
Still occurs with 2.24.1.
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.
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 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 :-)
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; + }
Applied, thanks a lot!