diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2006-05-10 00:42:23 +0000 |
---|---|---|
committer | John Palmieri <johnp@src.gnome.org> | 2006-05-10 00:42:23 +0000 |
commit | 2b0ffdac075935bba833acb2c077165865688875 (patch) | |
tree | 6e2bbafb84aeb44019585a1d887bc2827ca9ad1b /modules | |
parent | bdf14507a4a021ce3661ee8fbdd96c4b55578f8d (diff) | |
download | gdk-pixbuf-2b0ffdac075935bba833acb2c077165865688875.tar.gz |
make the _CUPS_MAP_ATTR_STR macro not dup the string so we don't leak
2006-05-10 John (J5) Palmieri <johnp@redhat.com>
* modules/printbackends/cups/gtkprintbackendcups.c:
make the _CUPS_MAP_ATTR_STR macro not dup the string so we don't
leak
Diffstat (limited to 'modules')
-rw-r--r-- | modules/printbackends/cups/gtkprintbackendcups.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index 81819300d..ed4d95a7a 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -58,7 +58,7 @@ typedef struct _GtkPrintBackendCupsClass GtkPrintBackendCupsClass; #define _CUPS_MAX_CHUNK_SIZE 8192 #define _CUPS_MAP_ATTR_INT(attr, v, a) {if (!g_ascii_strcasecmp (attr->name, (a))) v = attr->values[0].integer;} -#define _CUPS_MAP_ATTR_STR(attr, v, a) {if (!g_ascii_strcasecmp (attr->name, (a))) v = g_strdup (attr->values[0].string.text);} +#define _CUPS_MAP_ATTR_STR(attr, v, a) {if (!g_ascii_strcasecmp (attr->name, (a))) v = attr->values[0].string.text;} static GType print_backend_cups_type = 0; @@ -632,7 +632,7 @@ cups_request_printer_info_cb (GtkPrintBackendCups *backend, /* TODO: determine printer type and use correct icon */ gtk_printer_set_icon_name (printer, "printer"); - + state_msg = ""; loc = ""; desc = ""; @@ -649,9 +649,6 @@ cups_request_printer_info_cb (GtkPrintBackendCups *backend, _CUPS_MAP_ATTR_INT (attr, job_count, "queued-job-count"); } - /* if we got a member_printer_uri then this printer is part of a class - so use member_printer_uri, else user printer_uri */ - status_changed = gtk_printer_set_job_count (printer, job_count); status_changed |= gtk_printer_set_location (printer, loc); |