3
Z                 @   s0   d dl Z d dlmZ ddlT G dd deZdS )    N)TimedOperation   )*c               @   s4   e Zd Zdd Zdd Zdd Zdd Zd	d
 ZdS )SchedulerNotRunningc             C   s2   t j| |d | jtdtd}|j||  d S )NzScheduler not running?zCUPS Service StoppedzThe CUPS print spooler does not appear to be running.  To correct this, choose System->Administration->Services from the main menu and look for the 'cups' service.)Question__init__Zinitial_vbox_Znew_page)selftroubleshooterZpage r   D/usr/share/system-config-printer/troubleshoot/SchedulerNotRunning.pyr      s    

zSchedulerNotRunning.__init__c             C   sn   i | _ | jj jddrdS | jj }d}yttj|d| _| jj }W n t	k
r^   d}Y nX || j d< |S )NZcups_queue_listedF)parentTZcups_connection_failure)
answersr
   getZ
get_windowr   cupsZ
ConnectionopZrunRuntimeError)r	   r   Zfailurecr   r   r   display$   s    



zSchedulerNotRunning.displayc             C   s   dS )NFr   )r	   r   r   r   can_click_forward7   s    z%SchedulerNotRunning.can_click_forwardc             C   s   | j S )N)r   )r	   r   r   r   collect_answer:   s    z"SchedulerNotRunning.collect_answerc             C   s   | j j  d S )N)r   Zcancel)r	   r   r   r   cancel_operation=   s    z$SchedulerNotRunning.cancel_operationN)__name__
__module____qualname__r   r   r   r   r   r   r   r   r   r      s
   
r   )r   Ztimedopsr   baser   r   r   r   r   r   <module>   s   