3
Z                 @   s0   d dl mZ d dlZddlT G dd deZdS )    )GtkN   )*c               @   s$   e Zd Zdd Zdd Zdd ZdS )QueueRejectingJobsc             C   s   t j| |d tj }|jd |jd tjdtd d d}|jdd |j	d |j
|d	d	d tj | _| jjdd | jjd |j
| jd	d	d |jd |j||  d S )
NzQueue rejecting jobs?   z"<span weight="bold" size="larger">zQueue Rejecting Jobsz</span>)labelr   TF)Question__init__r   ZVBoxZset_border_widthZset_spacingZLabel_Zset_alignmentZset_use_markupZ
pack_startr   Zset_line_wrapZnew_page)selftroubleshooterZsolutionr    r   C/usr/share/system-config-printer/troubleshoot/QueueRejectingJobs.pyr	      s    




zQueueRejectingJobs.__init__c             C   s   | j j}|d sdS |d r&|d }n|d }|d tj@ }|sDdS |d r^|d }|d	 }n|d	 }td
|d  }|r|dtd|  7 }|d s|d7 }|tdd tt 7 }| jj| dS )NZcups_queue_listedFZis_cups_classZcups_class_dictZcups_printer_dictzprinter-typeZcups_printer_remoteZremote_cups_queue_attributeszprinter-state-messagez!The queue '%s' is rejecting jobs.Z
cups_queue zThe reason given is: '%s'.z

zTo make the queue accept jobs, select the 'Accepting Jobs' checkbox in the 'Policies' tab for the printer in the printer administration tool.T)r   answerscupsZCUPS_PRINTER_REJECTINGr
   ZTEXT_start_print_admin_toolr   Zset_text)r   r   ZqueueZ	rejectingZattrsreasontextr   r   r   display-   s,    

zQueueRejectingJobs.displayc             C   s   dS )NFr   )r   r   r   r   can_click_forwardP   s    z$QueueRejectingJobs.can_click_forwardN)__name__
__module____qualname__r	   r   r   r   r   r   r   r      s   #r   )Zgi.repositoryr   r   baser   r   r   r   r   r   <module>   s   