
    Hf                     0    d dl mZ ddl  G d de      Zy)    )Gtk   )*c                   *    e Zd Zd Zd Zd Zd Zd Zy)Shrugc                    t         j                  | |d       | j                  t        d      t        d            }t        j
                  j                  t        d            }|j                  d       t	        j                         }|j                  |       t	        j                         }|j                  d       |j                  |       |j                  |ddd       |j                         | _        t	        j                         }|j!                  d       |j#                  d       |j%                  t        j&                  j(                         |j                  |ddd       t        j*                  j-                  t        j.                        | _        |j                  | j0                  ddd       |j3                  ||        y )	Nr   zSorry!zThere is no obvious solution to this problem.  Your answers have been collected together with other useful information.  If you would like to report a bug, please include this information.zDiagnostic Output (Advanced)FTr      )Question__init__initial_vbox_r   Expandernewset_expandedScrolledWindowaddTextViewset_editable
pack_start
get_bufferbuffer
HButtonBoxset_border_widthset_spacing
set_layoutButtonBoxStyleENDButtonnew_from_stock
STOCK_SAVEsavenew_page)selftroubleshooterpageexpanderswtextviewboxs          6/usr/share/system-config-printer/troubleshoot/Shrug.pyr   zShrug.__init__   sU   49  !H+"# %@ #AB <<##A&D$EFu%"b<<?u%
4q1)),nna **../eUA.JJ--s~~>			5%3t,    c                 j    | j                   j                  | j                  j                                y)NT)r   set_textr$   answers_as_textr#   s    r*   displayzShrug.display9   s&    d11AADEr+   c                 Z    | j                   j                  d| j                        | _        y )Nclicked)r!   connecton_save_clicked
save_sigid)r#   handlers     r*   connect_signalszShrug.connect_signals=   s     ))++Y8L8LMr+   c                 N    | j                   j                  | j                         y )N)r!   
disconnectr5   r/   s    r*   disconnect_signalszShrug.disconnect_signals@   s    		doo.r+   c                    	 | j                   j                         }t        j                  |t        j                  j
                        }|j                  t        j                  t        j                  j                  t        j                  t        j                  j                         |j                  d       |j                  d       |j                  t        j                  j                         |j                  d       |j!                         }|j#                          |t        j                  j                  k7  ry 	 t%        |j'                         d      }|j)                  | j*                  j-                  | j*                  j/                         | j*                  j1                         d             ~y # t2        $ r}t        j4                  |ddt        j6                  j8                  t        j:                  j<                  t?        d            }|jA                  t?        d	      d
z   |jB                  z          |j!                          |jE                          Y d }~kd }~ww xY w)NT)transient_foractionztroubleshoot.txtwF)startendinclude_hidden_charszError saving file)parentmodaldestroy_with_parentmessage_typebuttonstextz#There was an error saving the file:
)#r$   
get_windowr   FileChooserDialogFileChooserActionSAVEadd_buttonsSTOCK_CANCELResponseTypeCANCELr    OKset_do_overwrite_confirmationset_current_nameset_default_responseset_local_onlyrunhideopenget_filenamewriter   get_textget_start_iterget_end_iterIOErrorMessageDialogMessageTypeERRORButtonsTypeCLOSEr   format_secondary_textstrerrordestroy)r#   buttonrB   dialogresponsefeerrs           r*   r4   zShrug.on_save_clickedC   s   ((335F**&363H3H3M3MOF 0 0#2B2B2I2I #0@0@0C0CE00$7##%78'')9)9)<)<=!!4(zz}HKKN3++...&--0#6--T[[5O5O5R37;;3K3K3NDI . K L    ''/369oo6K6K141F1F./0C.D	F
 ))1 .9 ,:<@,A+,::,6 7 
s   A7F? ?	I1BI,,I1N)__name__
__module____qualname__r   r0   r7   r:   r4    r+   r*   r   r      s    ->N/#r+   r   N)gi.repositoryr   baser
   r   rp   r+   r*   <module>rs      s   ,  MH Mr+   