diff options
author | Simon Rettberg | 2014-02-07 01:48:59 +0100 |
---|---|---|
committer | Simon Rettberg | 2014-02-07 01:48:59 +0100 |
commit | 8ae112083bbe26848f41d09c95559acb96b3ccb0 (patch) | |
tree | c9e4408acff35a608e41540e221c4232fb1384a6 /src/maingui | |
parent | Lots of changes: Two binaries (selection/pw auth), qmake -> cmake, gitignore,... (diff) | |
download | printergui-8ae112083bbe26848f41d09c95559acb96b3ccb0.tar.gz printergui-8ae112083bbe26848f41d09c95559acb96b3ccb0.tar.xz printergui-8ae112083bbe26848f41d09c95559acb96b3ccb0.zip |
Getting there, slowly:
- Check if the backend is invoked as a result of the printergui sending a printjob
If not, just relay to the real backend and appear transparent
If yes, copy environment from the printergui (X access etc) and show the
username/password dialog.
- Drop privileges whereever neccessary (when invoking backend, when showing GUI)
TODO: Use pipe to send user/pass to backend from the GUI. Make OK and Cancel
in the GUI work.
Diffstat (limited to 'src/maingui')
-rw-r--r-- | src/maingui/printergui.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/maingui/printergui.cpp b/src/maingui/printergui.cpp index 3744ffc..90d4731 100644 --- a/src/maingui/printergui.cpp +++ b/src/maingui/printergui.cpp @@ -214,11 +214,13 @@ void PrinterGui::on_buttonPrint_clicked() } cupsSetUser(this->user); + char jobtitle[100]; + snprintf(jobtitle, 100, "gui-%d", (int)getpid()); // Drucken if( 0 == cupsPrintFile(dest->name, file, - NULL, + jobtitle, dest->num_options, dest->options)) { QMessageBox::critical(this, "CUPS Fehler", cupsLastErrorString()); |