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
This commit is contained in:
parent
bdf14507a4
commit
2b0ffdac07
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
||||
2006-05-10 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
|
||||
|
||||
* gtk/paper_names.c: Correct #11 Envelope typo.
|
||||
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
||||
2006-05-10 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
|
||||
|
||||
* gtk/paper_names.c: Correct #11 Envelope typo.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user