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 613191 - Confusing message when Evince prepares Print Preview
Confusing message when Evince prepares Print Preview
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: printing
3.10.x
Other Linux
: Normal minor
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-17 20:48 UTC by Tomasz Chrzczonowicz
Modified: 2014-03-11 17:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Yellow bar when preparing print preview (521.85 KB, image/png)
2010-03-17 20:48 UTC, Tomasz Chrzczonowicz
  Details
changed message when building preview (682 bytes, patch)
2014-02-22 17:20 UTC, Bogdan Petcu
needs-work Details | Review
Tried to fix it but it's still not working. (3.22 KB, text/plain)
2014-02-24 19:06 UTC, Bogdan Petcu
  Details
moved the print_preview member from EvPrintOperationExport to EvPrintOperation (3.15 KB, patch)
2014-03-02 22:22 UTC, Bogdan Petcu
none 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. (3.30 KB, patch)
2014-03-04 20:39 UTC, Bogdan Petcu
needs-work Details | Review
Patch for correcting the print preview message. (4.18 KB, patch)
2014-03-10 19:35 UTC, Pooja Ahuja
none Details | Review
Fixed previous patch as adviced in it's review. Thanks (3.30 KB, patch)
2014-03-10 22:06 UTC, Bogdan Petcu
committed Details | Review

Description Tomasz Chrzczonowicz 2010-03-17 20:48:16 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?
Comment 1 Germán Poo-Caamaño 2013-11-01 22:07:49 UTC
The color of the bar depends on the theme, but the issue is still present (Evince >3.10).
Comment 2 Amol Pol 2013-11-23 08:56:29 UTC
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.
Comment 3 Bogdan Petcu 2014-02-22 17:20:09 UTC
Created attachment 269996 [details] [review]
changed message when building preview
Comment 4 Carlos Garcia Campos 2014-02-23 10:57:24 UTC
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.
Comment 5 Bogdan Petcu 2014-02-24 19:06:24 UTC
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?
Comment 6 Bogdan Petcu 2014-03-02 22:22:09 UTC
Created attachment 270730 [details] [review]
moved the print_preview member from EvPrintOperationExport to EvPrintOperation

Any suggestions on how can I make this work, please?
Comment 7 Bogdan Petcu 2014-03-04 20:39:54 UTC
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.
Comment 8 Carlos Garcia Campos 2014-03-10 18:45:32 UTC
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;
Comment 9 Pooja Ahuja 2014-03-10 19:35:37 UTC
Created attachment 271471 [details] [review]
Patch for correcting the print preview message.
Comment 10 Bogdan Petcu 2014-03-10 22:06:47 UTC
Created attachment 271484 [details] [review]
Fixed previous patch as adviced in it's review. Thanks
Comment 11 Carlos Garcia Campos 2014-03-11 17:48:23 UTC
Comment on attachment 271484 [details] [review]
Fixed previous patch as adviced in it's review. Thanks

Pushed to git master thanks!