diff options
| author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-06-30 14:32:22 +0000 | 
|---|---|---|
| committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-06-30 14:32:22 +0000 | 
| commit | 52b133d9d7fb007075f05b8289be517db6574fd3 (patch) | |
| tree | 606b15cae99fd3d4c0ccedac664408716c973113 /hardinfo2/arch/common | |
| parent | be25921dd3ee581b7b312baf6127f7b628ce186e (diff) | |
Plug memleaks. Cleanups.
Diffstat (limited to 'hardinfo2/arch/common')
| -rw-r--r-- | hardinfo2/arch/common/printers.h | 18 | 
1 files changed, 13 insertions, 5 deletions
| diff --git a/hardinfo2/arch/common/printers.h b/hardinfo2/arch/common/printers.h index 3daf28e6..7cf72384 100644 --- a/hardinfo2/arch/common/printers.h +++ b/hardinfo2/arch/common/printers.h @@ -68,14 +68,22 @@ __scan_printers(void)      }      if (noprinters > 0) { -	printer_list = g_strdup_printf("[Printers (CUPS)]\n"); +	printer_list = g_strdup_printf("[$ShellParam$]\n" +                                       "ViewType=1\n" +				       "[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 = g_strdup_printf("%s\n" +					   "$PRN%d$"  +                                           "%s=%s\n", +					   (char*)idle_free(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"); | 
