3
Z                 @   sd   d dl mZ d dlmZ dd Zd dlT dddd	d
ddgZedZG dd
 d
ZG dd deZ	dS )    )Gtk)gettextc             C   s   | S )N )xr   r   5/usr/share/system-config-printer/troubleshoot/base.py<lambda>   s    r   )*_Z
debugprintZget_debuggingZset_debuggingQuestionMultichoiceTEXT_start_print_admin_toolzUTo start this tool, select System->Administration->Print Settings from the main menu.c               @   sP   e Zd ZdddZdd Zdd Zdd	 Zd
d Zdd Zdd Z	dddZ
dS )r
   Nc                s   || _  r fdd| _d S )Nc                  s    S )Nr   r   )namer   r   r   *   s    z#Question.__init__.<locals>.<lambda>)troubleshooter__str__)selfr   r   r   )r   r   __init__'   s    zQuestion.__init__c             C   s   dS )zXReturns True if this page should be displayed, or False
        if it should be skipped.Tr   )r   r   r   r   display,   s    zQuestion.displayc             C   s   d S )Nr   )r   Zhandlerr   r   r   connect_signals1   s    zQuestion.connect_signalsc             C   s   d S )Nr   )r   r   r   r   disconnect_signals4   s    zQuestion.disconnect_signalsc             C   s   dS )NTr   )r   r   r   r   can_click_forward7   s    zQuestion.can_click_forwardc             C   s   i S )Nr   )r   r   r   r   collect_answer:   s    zQuestion.collect_answerc             C   s   d S )Nr   )r   r   r   r   cancel_operation=   s    zQuestion.cancel_operation c             C   sz   t j }|jd |jd |r.d| d }nd}||7 }t j|d}|jdd |jd |jd |j|ddd |S )	N   z"<span weight="bold" size="larger">z	</span>

r   )labelr   TF)	r   VBoxZset_border_widthset_spacingZLabelZset_alignmentZset_line_wrapZset_use_markup
pack_start)r   titletextZvboxsr   r   r   r   initial_vboxA   s    



zQuestion.initial_vbox)N)r   r   )__name__
__module____qualname__r   r   r   r   r   r   r   r!   r   r   r   r   r
   &   s   
c               @   s   e Zd ZdddZdd ZdS )r   Nc             C   s   t j| || | j||}tj }|jd |j|ddd || _g | _d }	xR|D ]J\}
}|	rntj	j
|	|
}	ntj	jg |
}	|j|	ddd | jj|	|f qRW |j||  d S )N   Fr   )r
   r   r!   r   r   r   r   question_tagwidgetsZRadioButtonZnew_with_label_from_widgetZnew_with_labelappendZnew_page)r   r   r&   Zquestion_titleZquestion_textchoicesr   ZpageZchoice_vboxbuttonZchoicetagr   r   r   r   R   s    
zMultichoice.__init__c             C   s*   x$| j D ]\}}|j r| j|iS qW d S )N)r'   Z
get_activer&   )r   r*   Z
answer_tagr   r   r   r   g   s    zMultichoice.collect_answer)N)r"   r#   r$   r   r   r   r   r   r   r   Q   s   
N)
Zgi.repositoryr   r   r	   ZN_debug__all__r   r
   r   r   r   r   r   <module>   s   +