GNOME Bugzilla – Bug 613191
Confusing message when Evince prepares Print Preview
Last modified: 2014-03-11 17:48:34 UTC
Created attachment 156400 [details] Yellow bar when preparing print preview Steps to reproduce: 1. Open some file in Evince 2. Go to File->Print... 3. Click "Print Preview" What happens: When Evince prepares the print preview, a yellow bar appears below the toolbar and it says _that the file is being printed_. What should happen: The yellow bar should say it's preparing the print preview, not actually priting the file. BTW. What is the proper name for this yellow bar thingy?
The color of the bar depends on the theme, but the issue is still present (Evince >3.10).
Hi, I am interested in this bug. Since i am a novice and this bug looks simple, I would like to resolve this bug. Can someone help me out with resolving this bug.
Created attachment 269996 [details] [review] changed message when building preview
Review of attachment 269996 [details] [review]: Thanks for the patch, but we actually need to check somehow whether we are printing or generating a preview to use a different message in each case. ::: libview/ev-print-operation.c @@ +349,3 @@ op->status = g_strdup (_("Finishing…")); } else { + op->status = g_strdup_printf (_("Preparing print preview: %d of %d…"), This is not correct, because this is also used when actually printing.
Created attachment 270173 [details] Tried to fix it but it's still not working. The problem seems to be in print_job_finished. If I call that function with true it shows in both cases "Building print preview". This function isn't supposed to set the status only to "Finishing" as it is called with the total number of pages?
Created attachment 270730 [details] [review] moved the print_preview member from EvPrintOperationExport to EvPrintOperation Any suggestions on how can I make this work, please?
Created attachment 270946 [details] [review] moved the print_preview member from EvPrintOperationExport to EvPrintOperation so it can be more easily accesed(not only from export), and made it change it's value using the preview signal.
Review of attachment 270946 [details] [review]: This looks much better, thanks! I still have a few minor comments. ::: libview/ev-print-operation.c @@ +352,3 @@ + op->status = g_strdup (_("Finishing…")); + } else { + op->status = g_strdup_printf (_("Building preview: %d of %d…"), What about Generating page %d of %d? or Generating preview: page %d of %d? @@ +855,3 @@ } + if (export->parent.print_preview) { Do not use parent member directly, use a cast instead. In this case you already have the cast, so you can simply do: if (op->print_preview) { @@ +1169,3 @@ } + export->parent.print_preview = (response == GTK_RESPONSE_APPLY); Same here, op->print_preview @@ +1971,3 @@ +ev_print_operation_print_preview (EvPrintOperationPrint *print) +{ + print->parent.print_preview = TRUE; Here you need the cast EV_PRINT_OPERATION (print)->print_preview = TRUE;
Created attachment 271471 [details] [review] Patch for correcting the print preview message.
Created attachment 271484 [details] [review] Fixed previous patch as adviced in it's review. Thanks
Comment on attachment 271484 [details] [review] Fixed previous patch as adviced in it's review. Thanks Pushed to git master thanks!