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 109063 - Print Preview should open a new window in which to preview
Print Preview should open a new window in which to preview
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Printing
unspecified
Other Linux
: Normal enhancement
: Future
Assigned To: Epiphany Maintainers
Marco Pesenti Gritti
: 309820 (view as bug list)
Depends on: 609021
Blocks:
 
 
Reported: 2003-03-24 04:39 UTC by Dave Bordoley [Not Reading Bug Mail]
Modified: 2010-03-15 18:58 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Add labels to the printpreview toolbar button(s) (1.19 KB, patch)
2007-09-09 11:05 UTC, Cyril Brulebois
none Details | Review
Printpreview patch update (1.34 KB, patch)
2007-09-09 21:41 UTC, Cyril Brulebois
committed Details | Review

Description Dave Bordoley [Not Reading Bug Mail] 2003-03-24 04:39:59 UTC
Print Preview should be moved into the file menu (not in the print dialog).
This will make the item more easily accessible etc. Also chsoing print
preview should open a new window in which to preview. The current behavior
is somewhat bizzarre.
Comment 1 Marco Pesenti Gritti 2003-03-26 11:13:20 UTC
startrek future :/
Comment 2 Johan (not receiving bugmail) Dahlin 2003-04-09 00:41:46 UTC
What does the HIG say about Print preview?
Comment 3 Marco Pesenti Gritti 2003-04-09 08:44:26 UTC
I think the HIG suggest more or less what Dave was saying. The problem
is that I dont think it's possible to implement it with current
mozilla api.
Comment 4 Dave Bordoley [Not Reading Bug Mail] 2003-04-09 18:12:21 UTC
/me thought about this a little....

No idea if this is even possible, but can we make print preview a 
toggle menu entry in the file or view menu (the proper menu isn't 
clear to me in this case, though generally the hig recommends file), 
and keep the menubar when in print preview mode (perhaps just disable 
some menu items)? Not as good as opening in a new window, but light 
years ahead of what we have now :/
Comment 5 Marco Pesenti Gritti 2003-04-09 18:14:30 UTC
Yeah that can be done. The idea is nice, what worries me is that it's
very unusual :/
Comment 6 Dave Bordoley [Not Reading Bug Mail] 2003-04-09 18:24:48 UTC
Yeah its unusuall, but at least clearer than what we got now. Don't 
get me wrong I'd still prefer poping up a new window, but i'm being 
realistic here :)
Comment 7 Dave Bordoley [Not Reading Bug Mail] 2003-05-23 18:59:16 UTC
this is actually pretty easy to do, the only issue is that i think the
print_dialog code in embed will need to be refactored.
Comment 8 Marco Pesenti Gritti 2003-05-24 07:20:23 UTC
One problem could be that mozilla need the page loading to be finished
before ppv works. Not sure how that would interact with cloning.
Comment 9 Christian Persch 2003-11-17 12:11:12 UTC
Assigning to new "Printing" component.
Comment 10 spark 2003-12-09 14:44:49 UTC
Changing summary to reflect chpe's printing reorganisation.
Comment 11 Christian Persch 2004-10-13 10:55:54 UTC
Mass reassigning of Epiphany bugs to epiphany-maint@b.g.o
Comment 12 Lionel Dricot 2005-04-12 21:50:08 UTC
IMHO, there's somes problems with the current behaviour :

1) You cannot print from the print preview (! he !)
2) You don't want to click on "Close" because you think "Hey, I don't want to
close all my epiphany window !"

Open a new window is not very good, I would prefer a new tab, not very sure, but
it can be discuted.

For now, I think a temporary solution would be :

- add a "print" icon
- rename the "close" button to "back to browser" or something like that.  It
would help a lot new users.
Comment 13 Mikel Ward 2005-11-04 12:16:05 UTC
I am always amazed when clicking the print preview's window close button also
closes the page I was previously viewing.

If the print preview is not in a separate window, the very least that I would
hope for is to make it obvious how to return to the normal screen rendering of
the page.  For me, the more natural button for this purpose would actually be
the back button.
Comment 14 Reinout van Schouwen 2005-12-29 13:10:00 UTC
*** Bug 309820 has been marked as a duplicate of this bug. ***
Comment 15 Reinout van Schouwen 2005-12-29 13:14:44 UTC
From bug 309820: 

Once evince is an official part of the GNOME desktop, we should use it as the
primary print preview interface.

This may be dependent on Mozilla using cairo as print back-end.
Comment 16 Christian Persch 2005-12-30 21:13:43 UTC
.
Comment 17 Reinout van Schouwen 2006-01-06 15:44:09 UTC
See also http://live.gnome.org/Epiphany_2fFeatureDesign_2fPrintPreviewDoneRight
Comment 18 Cyril Brulebois 2007-09-07 03:20:16 UTC
OK, summarizing:

Comment#0: [Done] Under “File” now.

Comment#12:
  1) is still to be addressed (printing from the preview)
  2) is almost addressed (the button tooltip is “Close the print preview”).

I'm thinking that we could either use toolbar preferences (“Text below icons”, “Icons only”, and the like), or force the display of at least the text of the “Close the print preview”, so that no-one gets confused about the action one is about to trigger. Thoughts?
Comment 19 Christian Persch 2007-09-07 22:02:07 UTC
1) and the "do ppv in new window" itself are impossible currently due to gecko backend limitations.

Forcing the close toolbar button to show its text is fine with me (I think you need to set the "is-important" (and maybe the "short-label") properties on toolbar items.
Comment 20 Cyril Brulebois 2007-09-09 11:05:46 UTC
Created attachment 95207 [details] [review]
Add labels to the printpreview toolbar button(s)

It is also possible to only show the text for the Close icon, by replacing GTK_TOOLBAR_BOTH with GTK_TOOLBAR_BOTH_HORIZ; I have no preferences, and I'm not the maintainer. ;-)

One could also think of using the *_get_widget() function to avoid having to use action+action_group, but then, the set of interesting properties (“is-important”, “short-label”) is no longer available.
Comment 21 Cyril Brulebois 2007-09-09 11:07:32 UTC
I forgot to mention that one could think of using a shorter label (as you actually proposed), like “Close preview”, which would maybe make more acceptable the idea of putting all labels, using GTK_TOOLBAR_BOTH. That might be an unneeded burden for translators, though.
Comment 22 Christian Persch 2007-09-09 13:07:25 UTC
Thanks for the patch!

+	action_group = t->priv->action_group;
+	action = gtk_action_group_get_action (action_group, "PPVClose");

No need for a local variable you just use once; just use t->priv->action_group directly.

+	g_object_set (G_OBJECT (action),

This cast is unnecessary.

+	widget = gtk_ui_manager_get_widget (t->priv->manager,
+					    "/PPViewToolbar");
+	gtk_toolbar_set_style (GTK_TOOLBAR (widget), GTK_TOOLBAR_BOTH);

I don't think we should force BOTH here since that mode is ugly; and it conflicts with the user's choice in the Appearance capplet.
If the mode is already BOTH, BOTH_HORIZ or TEXT_ONLY, everything is fine.
In case the mode is icons-only we could force BOTH_HORIZ but not BOTH.
Comment 23 Cyril Brulebois 2007-09-09 21:41:10 UTC
Created attachment 95230 [details] [review]
Printpreview patch update

Fixed first items. And adapted the toolbar style as you wished. (I've no Appearance applet to test it thoroughly, though.)
Comment 24 Christian Persch 2007-09-09 21:50:52 UTC
Thanks! oktc, trunk only.

In gnome 2.18 it's in the Menu&Toolbars control centre applet.
Comment 25 Cosimo Cecchi 2007-09-09 22:40:30 UTC
Committed to r7363.
Should we close this bug?
Comment 26 Christian Persch 2007-09-10 19:09:03 UTC
No, let's keep it open since the original problem from comment 0 isn't fixed. It depends on gecko changes though.
Comment 27 Sam Morris 2010-03-15 13:56:36 UTC
This appears to be resolved in 2.29.92:

 * print preview is in the file menu
 * print preview appears in a separate window
Comment 28 Gustavo Noronha (kov) 2010-03-15 18:58:38 UTC
Indeed. Thanks Sam!