Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search in forums












SourceForge.net Logo



Home » U++ Library support » U++ Library : Other (not classified elsewhere) » PrinterDlg changes defaultprinter on Linux
PrinterDlg changes defaultprinter on Linux [message #47577] Tue, 31 January 2017 16:55
Alboni is currently offline  Alboni
Messages: 156
Registered: January 2012
Location: France
Experienced Member
I am looking at this code in PrinterJob.cpp (CtrlLib)
void PrinterDlg::SyncPrinterOptions()
{
	Vector<String> l = Split(System("lpoptions -d " + String(~printer) + " -l"), '\n');
	paper.Disable();
	paper.Clear();
	slot.Disable();
	slot.Clear();
	for(int i = 0; i < l.GetCount(); i++) {
		FillOpt(l[i], "pagesize", paper, true);
		FillOpt(l[i], "inputslot", slot, false);
	}
}

and I think that "lpoptions -d " should be "lpoptions -p " to avoid changing the default printer for all programs of that user, but then it stops working.

[Updated on: Sat, 04 February 2017 19:55]

Report message to a moderator

Previous Topic: IdeCalc -- ERROR: void.sin(): (0,15): 'sin' is not a lambda
Goto Forum:
  


Current Time: Sun Feb 26 18:22:07 CET 2017

Total time taken to generate the page: 0.00343 seconds