diff options
author | Burt P <pburt0@gmail.com> | 2019-12-27 17:38:21 -0600 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2019-12-27 22:16:36 -0800 |
commit | 0cfc5366775331bcb7dad226551276ab31826d03 (patch) | |
tree | 3c928b2bc9786280e1a630f6392dc33973976865 /modules | |
parent | 8b2d0761660eff87a5d6cfc6eae2002961ba064a (diff) |
printers: use vendor flag for vendor fields
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/devices/printers.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/devices/printers.c b/modules/devices/printers.c index 15b720ba..aefeaed7 100644 --- a/modules/devices/printers.c +++ b/modules/devices/printers.c @@ -144,10 +144,11 @@ gchar *__cups_callback_boolean(gchar *value) const struct { char *key, *name; gchar *(*callback)(gchar *value); + gboolean maybe_vendor; } cups_fields[] = { { "Printer Information", NULL, NULL }, { "printer-info", "Destination Name", NULL }, - { "printer-make-and-model", "Make and Model", NULL }, + { "printer-make-and-model", "Make and Model", NULL, TRUE }, { "Capabilities", NULL, NULL }, { "printer-type", "#", __cups_callback_ptype }, @@ -244,8 +245,9 @@ scan_printers_do(void) } } - prn_moreinfo = h_strdup_cprintf("%s=%s\n", + prn_moreinfo = h_strdup_cprintf("%s%s=%s\n", prn_moreinfo, + cups_fields[j].maybe_vendor ? "$^$" : "", cups_fields[j].name, temp); |