Commit 69fd708
authored
Always query current CUPS default printer (#33)
When asked for the default printer, always
query and return the current CUPS default
printer instead of whatever was the default
last time this was done, to take into account
that the CUPS default printer can change while
the backend is running.
Sample steps (without this commit in place)
to reproduce an incorrect default
printer being returned with cpdb-text-frontend
from cpdb-libs, when the PDF printer is initially
set as default:
Run cpdb-text-frontend:
$ cpdb-text-frontend
Query for the default printer
> get-default-printer
PDF#CUPS
Now, switch the CUPS user default printer
to another one:
$ lpoptions -d somedummy
In the running cpdb-text-frontend instance,
query the default printer again:
> get-default-printer
PDF#CUPS
-> The outdated/previous default printer was returned.
With this commit in place, the new default
printer is now returned as expected:
> get-default-printer
somedummy#CUPS
(This addresses part of issue 3) from comment [1] on
the pending change to update CPDB support in LibreOffice.)
[1] https://gerrit.libreoffice.org/c/core/+/169617/comments/3ef76e40_4f120b661 parent 3c3fc98 commit 69fd708
1 file changed
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 49 | | |
56 | 50 | | |
57 | 51 | | |
| |||
62 | 56 | | |
63 | 57 | | |
64 | 58 | | |
| 59 | + | |
65 | 60 | | |
66 | 61 | | |
67 | 62 | | |
| |||
76 | 71 | | |
77 | 72 | | |
78 | 73 | | |
| 74 | + | |
79 | 75 | | |
80 | 76 | | |
81 | 77 | | |
82 | 78 | | |
83 | 79 | | |
84 | 80 | | |
| 81 | + | |
85 | 82 | | |
86 | 83 | | |
87 | 84 | | |
| |||
0 commit comments