Home » U++ Library support » RichText,QTF,RTF... » Possible Bug with Printing under linux (Possible Bug with Printing under linux)
Possible Bug with Printing under linux [message #44649] |
Tue, 05 May 2015 12:32  |
woffleys
Messages: 9 Registered: December 2014
|
Promising Member |
|
|
Hi everyone,
every time I try to print using the uword demo, it will only use the first printer in the list, which is not my default printer or the one i chose.
* /home/kris/upp.out/examples/GCC.Debug.Debug_Full.Gui.Shared/ UWord 05.05.2015 10:59:41, user: kris
05.05.2015 10:59:41 PDF (inital printer)
05.05.2015 10:59:45 RICOH_Aficio_MP_C3000 (selected printer)
05.05.2015 10:59:45 -d PDF -o media=A4,1Tray -o number-up=1 -n 1 (lp options)
does anyone have any idea which files I would need to check to fix this?
|
|
|
|
|
Re: Possible Bug with Printing under linux [message #44652 is a reply to message #44651] |
Wed, 06 May 2015 00:12   |
 |
Klugier
Messages: 1099 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello,
Maybe the error is in dlg.IsCanceled() expression. Shouldn't it returns false if dialog is canceled. I mean (PrinterJob.cpp line 378):
if(dodlg) {
dlg.Run();
if(dlg.IsCanceled()) // instead of if(!dlg.IsCanceled)
return false;
}
Simpler, we want to skip processing when user push cancel button.
I think we want to remove first element of string in this situation:
if(p.StartsWith(" ")){ p = p.Mid(1); }
so,
// Do we really want to remove first empty space? Can you post what dose "lpstat -d" return on your system.
if(p.StartsWith(" "))
p.Remove(0);
P.S. 1
I will make test of this code later. Firstly I will need to create more printers on my Linyx machine If I can do it virtually.
P.S. 2
I attached modify PrinterJob.cpp file.
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Wed, 06 May 2015 00:12] Report message to a moderator
|
|
|
|
Re: Possible Bug with Printing under linux [message #44656 is a reply to message #44653] |
Thu, 07 May 2015 00:47   |
 |
Klugier
Messages: 1099 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello,
I fixed problems with PrinterJob. Can you check and let me know if everything works well. I drew on your solution, so many thanks.
P.S.
I modified "CtrlLib/CtrlUtil.h", because we need to add "dlgSuccess" variable to PrinterJob.
P.S. 2
If you know how to use .diff with u++ you can use it instead of replacing files.
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Thu, 07 May 2015 00:55] Report message to a moderator
|
|
|
Re: Possible Bug with Printing under linux [message #44660 is a reply to message #44656] |
Fri, 08 May 2015 23:13   |
 |
Klugier
Messages: 1099 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello one more time 
It can be written even smarter. We don't need argument in "Execute0" private method, because we are calling it only once.
I have enclosed zip with necessary files for testing.
P.S.
Woffleys please let me know if everything is OK in my patch.
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Fri, 08 May 2015 23:13] Report message to a moderator
|
|
|
|
|
Re: Possible Bug with Printing under linux [message #44673 is a reply to message #44667] |
Wed, 13 May 2015 22:47   |
 |
Klugier
Messages: 1099 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello Woffleys,
woffleys wrote on Tue, 12 May 2015 16:58
The PrinterLayout (in Ctrl.lay) has paper and slot droplists the wrong way around.
This change makes sense. Even "lpoptions --help" suggest yours order.
Final .diff is waiting for deployment to Upp trunk. However, firstly Mirek should accept this patch. I will give you link to the Upp bugtrack with bug discussed in this topic: http://www.ultimatepp.org/redmine/issues/1054. If status will change to "Accept" it means that patch is on the trunk.
Sincerely and thanks for co-op,
Klugier
U++ - one framework to rule them all.
[Updated on: Wed, 13 May 2015 22:54] Report message to a moderator
|
|
|
|
Re: Possible Bug with Printing under linux [message #44759 is a reply to message #44675] |
Wed, 17 June 2015 23:07  |
 |
Klugier
Messages: 1099 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello Woffleys,
The patch is presenttly on the trunk, so it will be avaliable in next upp releases.
P.S.
You can write to Mirek if you want to be on contributors list.
Sincerely,
Klugier
U++ - one framework to rule them all.
|
|
|
Goto Forum:
Current Time: Sat Apr 26 19:39:05 CEST 2025
Total time taken to generate the page: 0.01264 seconds
|