summaryrefslogtreecommitdiff
path: root/arch/common/printers.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/common/printers.h')
-rw-r--r--arch/common/printers.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/common/printers.h b/arch/common/printers.h
index 3daf28e6..43ddda0a 100644
--- a/arch/common/printers.h
+++ b/arch/common/printers.h
@@ -70,12 +70,16 @@ __scan_printers(void)
if (noprinters > 0) {
printer_list = g_strdup_printf("[Printers (CUPS)]\n");
for (i = 0; i < noprinters; i++) {
- printer_list = g_strconcat(printer_list, printers[i],
- g_str_equal(default_printer, printers[i]) ?
- "=<i>(Default)</i>\n" : "=\n",
- NULL);
+ printer_list = h_strdup_cprintf("\n$PRN%d$%s=%s\n",
+ printer_list,
+ i,
+ printers[i],
+ g_str_equal(default_printer, printers[i]) ?
+ "<i>(Default)</i>" : "");
g_free(printers[i]);
}
+
+ g_free(printers);
} else {
printer_list = g_strdup("[Printers]\n"
"No printers found=\n");