
    cc	                     :    d dl mZ  G d dej                        Zy)    )Gtkc                   6     e Zd Zd Z fdZddZd Zd Z xZS )DrMessageDialogc                    t        |   dd|d| | j                  d       | j                  dd       d| _        | j                         j                         d   j                          |j                         dk  r?| j                         j                  t        j                  j                         d| _        y d| _        y )	NT)modaltransient_fori^  r   i  F )super__init__set_resizableset_default_size_min_action_indexget_message_areaget_childrendestroyget_allocated_widthget_action_areaset_orientationr   OrientationVERTICALshould_wrap)selfwindowkwargs	__class__s      8/usr/lib/python3/dist-packages/drawing/message_dialog.pyr   zDrMessageDialog.__init__   s    '>V>v>TR $ &&(+335!C'))#//*B*BC4 4    c                     | j                   dz   | _         | j                  || j                         }||j                         j                  |       |r|j	                          | j                   S )zjAdd a button (with the specified style) to the message dialog and
		returns the corresponding response id.   )r   
add_buttonget_style_context	add_classgrab_default)r   labelstyle
is_defaultbtns        r   
set_actionzDrMessageDialog.set_action)   se      11A5$t556#
$$U+			r   c                     t        j                  || j                        }| j                         j	                  |       | j                         j                          y )N)r%   wrap)r   Labelr   r   addshow_all)r   stringr%   s      r   
add_stringzDrMessageDialog.add_string4   sD    
))&t'7'7
8%e$""$r   c                 ~    | j                         j                  |       | j                         j                          y )N)get_content_arear-   r.   )r   widgets     r   
add_widgetzDrMessageDialog.add_widget9   s.    f%""$r   )F)	__name__
__module____qualname____gtype_name__r   r)   r0   r4   __classcell__)r   s   @r   r   r      s    #$	 %
%r   r   N)gi.repositoryr   MessageDialogr   r
   r   r   <module>r<      s   $ '%c'' '%r   