3
¤”ÃZX  ã               @   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 )ÚQueueNotEnabledc             C   sf   t j| |dƒ tjƒ | _tjƒ }| jjdƒ | jjddƒ |j| jdddƒ |j	dƒ |j
|| ƒ d S )NzQueue not enabled?Tr   Fé   )ÚQuestionÚ__init__r   ZLabelÚlabelZVBoxZset_line_wrapZset_alignmentZ
pack_startZset_border_widthZnew_page)ÚselfÚtroubleshooterZsolution© r   ú@/usr/share/system-config-printer/troubleshoot/QueueNotEnabled.pyr      s    

zQueueNotEnabled.__init__c             C   sì   | j j}|d sdS |d r&|d }n|d }|d tjk}|rDdS |d r^|d }|d	 }n|d	 }|rxtd
ƒ| }ntdƒ}dtdƒ d tdƒ|d   }|r°|d| 7 }|d sÜ|d7 }|tdƒ7 }|dttƒ 7 }| jj|ƒ dS )NZcups_queue_listedFZis_cups_classZcups_class_dictZcups_printer_dictzprinter-stateZcups_printer_remoteZremote_cups_queue_attributeszprinter-state-messagezThe reason given is: '%s'.zBThis may be due to the printer being disconnected or switched off.z"<span weight="bold" size="larger">zQueue Not Enabledz	</span>

zThe queue '%s' is not enabled.Z
cups_queueú z

zuTo enable it, select the 'Enabled' checkbox in the 'Policies' tab for the printer in the printer administration tool.T)r   ÚanswersÚcupsZIPP_PRINTER_STOPPEDÚ_ZTEXT_start_print_admin_toolr	   Z
set_markup)r
   r   ZqueueÚenabledZattrsÚreasonÚtextr   r   r   Údisplay%   s6    

zQueueNotEnabled.displayc             C   s   dS )NFr   )r
   r   r   r   Úcan_click_forwardQ   s    z!QueueNotEnabled.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   