Bug 111086 - Print to print selected region only, unless no region selected
Summary: Print to print selected region only, unless no region selected
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-19 16:29 UTC by Nick Thompson
Modified: 2011-08-11 15:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Thompson 2005-08-19 16:29:52 UTC
Version:            (using KDE KDE 3.4.90)
Installed from:    Compiled From Sources
Compiler:          gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-42) 
OS:                Linux

Often it is useful to be able to print only a small part of a file. This is usually achieved by selecting the region and then printing. With no region selected the complete file should be printed as usual.
Comment 1 Anders Lund 2005-08-19 16:57:25 UTC
On Friday 19 August 2005 16:29, Nick Thompson wrote:
> Often it is useful to be able to print only a small part of a file. This is
> usually achieved by selecting the region and then printing. With no region
> selected the complete file should be printed as usual.


If you click the 'options >>' button in the printing dialog and then the 'text 
settings' tab, you will see that there is a checkbox labeled 'print selection 
only', which is checked pr default if you have a selection.
Comment 2 Nick Thompson 2005-08-19 18:42:40 UTC
Okay, I see the option, but it is not selected automatically when I have a 
region selected. If it was , that would be exactly what I'm after. But its a 
bit obscure, if I have to check it myself.

I'm using Kate in 3.5-alpha1.

> If you click the 'options >>' button in the printing dialog and then the
> 'text settings' tab, you will see that there is a checkbox labeled 'print
> selection only', which is checked pr default if you have a selection.

Comment 3 Anders Lund 2005-08-19 20:28:51 UTC
On Friday 19 August 2005 18:42, Nick Thompson wrote:
> Okay, I see the option, but it is not selected automatically when I have a
> region selected. If it was , that would be exactly what I'm after. But its
> a bit obscure, if I have to check it myself.


We'll have to look into why not then, that is how i designed it :)
Comment 4 Christoph Cullmann 2005-08-20 13:57:39 UTC
Uh, perhaps I have broken that, as in 3.5 the selection moved to the views, or?
Comment 5 Nick Thompson 2005-08-22 11:20:29 UTC
I had someone else try it in Kate 2.4 on KDE 3.4.0 - on the same OS. That 
print option is also not selected there when a selection region is active in 
Kate.

On Saturday 20 Aug 2005 12:57, Christoph Cullmann wrote:
> Uh, perhaps I have broken that, as in 3.5 the selection moved to the views,
> or?

Comment 6 John Layt 2008-12-07 19:13:30 UTC
In KDE4, selecting text causes the print range 'Selection' radio button to be enabled in the dialog and choosing this prints only the selected text, but I think the original request was that in the print dialog that the Selection radio button be defaulted to on if text is selected.  If desired, this can be achieved by adding:

if ( doc->activeView()->selection() ) printer.setPrintRange(QPrinter::Selection) 

just after creating the QPrinter but before creating the QPrintDialog in KatePrinter::print.

Don't have a KDE3 install to check behaviour under that.
Comment 7 Dominik Haumann 2011-08-11 15:57:04 UTC
Git commit dfe7c2b6353d9e6ebef5469818ca9b544b27ea44 by Dominik Haumann.
Committed on 11/08/2011 at 17:56.
Pushed by dhaumann into branch 'master'.

preselect selection if selection is around

BUG: 111086

M  +4    -2    part/utils/kateprinter.cpp

http://commits.kde.org/kate/dfe7c2b6353d9e6ebef5469818ca9b544b27ea44
Comment 8 Dominik Haumann 2011-08-11 15:57:37 UTC
Git commit 46ce935db99959694699d63e7a172c6e5856e4ab by Dominik Haumann.
Committed on 11/08/2011 at 17:56.
Pushed by dhaumann into branch 'KDE/4.7'.

preselect selection if selection is around

BUG: 111086

M  +4    -2    part/utils/kateprinter.cpp

http://commits.kde.org/kate/46ce935db99959694699d63e7a172c6e5856e4ab