forked from AuroraMiddleware/gtk
printing: Set printer state correctly
Consider NULL printer state message as empty too. Printer state IPP_PRINTER_STOPPED can be considered as paused state. https://bugzilla.gnome.org/show_bug.cgi?id=743323
This commit is contained in:
parent
bc77408e3c
commit
c2aff4ab6e
@ -2482,7 +2482,7 @@ set_info_state_message (PrinterSetupInfo *info)
|
||||
{
|
||||
gint i;
|
||||
|
||||
if (info->state_msg && strlen (info->state_msg) == 0)
|
||||
if (info->state_msg == NULL || strlen (info->state_msg) == 0)
|
||||
{
|
||||
gchar *tmp_msg2 = NULL;
|
||||
if (info->is_paused && !info->is_accepting_jobs)
|
||||
@ -2751,7 +2751,10 @@ create_cups_printer_from_avahi_data (AvahiConnectionTestData *data)
|
||||
info->printer_uri = data->printer_uri;
|
||||
|
||||
if (data->got_printer_state)
|
||||
info->state = data->printer_state;
|
||||
{
|
||||
info->state = data->printer_state;
|
||||
info->is_paused = info->state == IPP_PRINTER_STOPPED;
|
||||
}
|
||||
|
||||
info->got_printer_type = data->got_printer_type;
|
||||
if (data->got_printer_type)
|
||||
|
Loading…
Reference in New Issue
Block a user