3
ครZฦ
  ใ               @   sJ   d dl mZ ddlT d dlmZ d dlZG dd dZG dd	 d	eZdS )
้    )ฺGtk้   )ฺ*)ฺTimedOperationNc               @   s   e Zd Zdd Zdd ZdS )ฺAuthConnFactoryc             C   s
   || _ d S )N)ฺparent)ฺselfr   ฉ r	   ๚8/usr/share/system-config-printer/troubleshoot/Welcome.pyฺ__init__   s    zAuthConnFactory.__init__c             C   s   t j| jddS )NT)ฺlock)ฺauthconnZ
Connectionr   )r   r	   r	   r
   ฺget_connection    s    zAuthConnFactory.get_connectionN)ฺ__name__ฺ
__module__ฺ__qualname__r   r   r	   r	   r	   r
   r      s   r   c               @   s$   e Zd Zdd Zdd Zdd ZdS )ฺWelcomec             C   sฬ   t j| |d tj }|jd |jd tj }|jdd |jtj	tj
j tjdtd d td d td	 d
}|jdd |jd |jd |j|ddd |j|ddd |j|| }d S )Nr   ้   r   z"<span weight="bold" size="larger">zTrouble-shooting Printingz	</span>

zThe next few screens will contain some questions about your problem with printing. Based on your answers a solution may be suggested.z

zClick 'Forward' to begin.)ZlabelTF)ฺQuestionr   r   ZHBoxZset_spacingZset_border_widthZImageZset_alignmentZset_from_stockZSTOCK_PRINTZIconSizeZDIALOGZLabelฺ_Zset_use_markupZset_line_wrapZ
pack_startZnew_page)r   ฺtroubleshooterZwelcomeZimageZintroZpager	   r	   r
   r   $   s     



zWelcome.__init__c             C   s2   | j j }t|}t|j|d| _|| jj dS )N)r   )Z!_authenticated_connection_factoryZ_authenticated_connection)r   Z
get_windowr   r   r   ฺopZrun)r   r   ฺfactoryr	   r	   r
   ฺcollect_answer;   s
    
zWelcome.collect_answerc             C   s   | j j  d S )N)r   Zcancel)r   r	   r	   r
   ฺcancel_operationD   s    zWelcome.cancel_operationN)r   r   r   r   r   r   r	   r	   r	   r
   r   #   s   	r   )	Zgi.repositoryr   ฺbaseZtimedopsr   r   r   r   r   r	   r	   r	   r
   ฺ<module>   s
   