Commit 8951bc41 authored by Marek Kašík's avatar Marek Kašík
Browse files

Printers: Use system-config-printer's GetBestDrivers method

If available, use DBus method GetBestDriver which determines the best PPD file
for the given printer. This method is available in system-config-printer
since version 1.3.5 (#654742).
parent 48dec984
......@@ -1388,12 +1388,9 @@ new_printer_add_button_cb (GtkButton *button,
else if (pp->devices[device_id].device_id)
{
/* Try whether CUPS has a driver for the new printer */
ppd_name = get_ppd_name (pp->devices[device_id].device_class,
pp->devices[device_id].device_id,
pp->devices[device_id].device_info,
pp->devices[device_id].device_make_and_model,
pp->devices[device_id].device_uri,
pp->devices[device_id].device_location);
ppd_name = get_ppd_name (pp->devices[device_id].device_id,
pp->devices[device_id].device_make_and_model,
pp->devices[device_id].device_uri);
if (ppd_name == NULL || ppd_name->ppd_match_level < PPD_EXACT_MATCH)
{
......@@ -1442,12 +1439,9 @@ new_printer_add_button_cb (GtkButton *button,
}
/* Search CUPS for driver */
ppd_name = get_ppd_name (pp->devices[device_id].device_class,
pp->devices[device_id].device_id,
pp->devices[device_id].device_info,
ppd_name = get_ppd_name (pp->devices[device_id].device_id,
pp->devices[device_id].device_make_and_model,
pp->devices[device_id].device_uri,
pp->devices[device_id].device_location);
pp->devices[device_id].device_uri);
g_free (device_ids);
}
......
This diff is collapsed.
......@@ -52,12 +52,9 @@ DBusGProxy *get_dbus_proxy (const gchar *name,
gchar *get_tag_value (const gchar *tag_string,
const gchar *tag_name);
PPDName *get_ppd_name (gchar *device_class,
gchar *device_id,
gchar *device_info,
PPDName *get_ppd_name (gchar *device_id,
gchar *device_make_and_model,
gchar *device_uri,
gchar *device_location);
gchar *device_uri);
char *get_dest_attr (const char *dest_name,
const char *attr);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment