You should not use a new JFrame, but git it the current jEdit view (jEdit.getCurrentView()).
Then you should use a localised message.
There is a methode GUIUtilities.confirm() that does just that.
I've just noticed that there is already an option in General > Printing for setting this.
So, is this a good idea to ask the user each time she prints, when there is a general option?
This is a rather late response but I took the original request to mean that they want a simple way to disable the header for individual print jobs. There is indeed an option in Utilities < Options < Printing this gives users the ability toggle the header. It just seems kind of out of the way and has to be re-selected if you want to print the header even if you close jEdit and come back to it later.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Point taken, but can you do better ?
Like, would it be crazy to implement our own page setup dialog, just like the ol' one, but with 'Print header' checkbox ? Or will it be definitely more trouble than usefulness ?
I've taken a different and not so abrasive approach this time around. The user can alter the header by changing the Job Name text field in the "Appearance" Tab in the print dialog. They are instructed similarly so there will be little to no confusion.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You should not use a new JFrame, but git it the current jEdit view (jEdit.getCurrentView()).
Then you should use a localised message.
There is a methode GUIUtilities.confirm() that does just that.
I've just noticed that there is already an option in General > Printing for setting this.
So, is this a good idea to ask the user each time she prints, when there is a general option?
The feature request is not clear about this:
http://jedit.org/trackers/Feature%20Requests/3525116.html
This is a rather late response but I took the original request to mean that they want a simple way to disable the header for individual print jobs. There is indeed an option in Utilities < Options < Printing this gives users the ability toggle the header. It just seems kind of out of the way and has to be re-selected if you want to print the header even if you close jEdit and come back to it later.
Point taken, but can you do better ?
Like, would it be crazy to implement our own page setup dialog, just like the ol' one, but with 'Print header' checkbox ? Or will it be definitely more trouble than usefulness ?
I've only skimmed through these:
http://docs.oracle.com/javase/tutorial/2d/printing/dialog.html
http://docs.oracle.com/javase/1.4.2/docs/guide/jps/spec/JPSTOC.fm.html
so I'll value other opininions...
Different Patch of BufferPrinter1_4 than was already up
The patch thinks I changed everything, I only altered a few lines.
I've taken a different and not so abrasive approach this time around. The user can alter the header by changing the Job Name text field in the "Appearance" Tab in the print dialog. They are instructed similarly so there will be little to no confusion.
clever idea: try to get around the limitations with what can be changed...
but it doesn't work for me on linux, openjdk 7: the job name text field is disabled.
Did I miss something ? See attached screenshot...
job name field is disabled in appearence tab
It works for Windows, which I'm working on, but one of my classmates is getting a similar issue to yours. We aren't quite sure what's going on either.
Any update on this one?
nope.
Patch is not ready for inclusion.
I think, this patch is obsolete now, since jEdit 5.4.0 has this capability implemented in it's own print dialog.
The print system has been completely rewritten and includes this feature.