
    Hf|                     8    d dl Z d dlmZ ddl  G d de      Zy)    N)TimedOperation   )*c                   *    e Zd Zd Zd Zd Zd Zd Zy)NetworkCUPSPrinterSharedc                     t         j                  | |d       | j                  t        d      t        d            }|j	                  ||        y )NzQueue not shared?zQueue Not Sharedz-The CUPS printer on the server is not shared.)Question__init__initial_vbox_new_page)selftroubleshooterpages      I/usr/share/system-config-printer/troubleshoot/NetworkCUPSPrinterShared.pyr
   z!NetworkCUPSPrinterShared.__init__   sL    41DE  !$6"7"# %. #/0 	t,    c                 &   i | _         | j                  j                   }d|v r	|d   dk(  ry| j                  j                         }d|vrd|v rd|v sy	 |d   }t        t        j
                  d|i|      | _        | j                  j                         }t        |j                  |d   f|      | _        | j                  j                         }|| j                   d<   n|d   }d	|v r|d	   sy
y# t        $ r Y yt        j                  $ r Y yw xY w)Nremote_cups_queue_listedFremote_cups_queue_attributesremote_server_try_connectremote_cups_queuehost)kwargsparent)argsr   zprinter-is-sharedT)answersr   
get_windowr   cups
ConnectionoprungetPrinterAttributesRuntimeErrorIPPError)r   r   r   r   cattrs         r   displayz NetworkCUPSPrinterShared.display!   s*   %%--&'1./58$$//2)8/7:'72:;($//28$179 GGKKN(!*@*@078K0L/N179 ww{{~ <@DLL789:D$&+,   == s   A=C0 0	D;DDc                      y)NF r   s    r   can_click_forwardz*NetworkCUPSPrinterShared.can_click_forwardH   s    r   c                     | j                   S N)r   r*   s    r   collect_answerz'NetworkCUPSPrinterShared.collect_answerK   s    ||r   c                 8    | j                   j                          y r-   )r    cancelr*   s    r   cancel_operationz)NetworkCUPSPrinterShared.cancel_operationN   s    r   N)__name__
__module____qualname__r
   r'   r+   r.   r1   r)   r   r   r   r      s    -%Nr   r   )r   timedopsr   baser	   r   r)   r   r   <module>r7      s   ,  # 6x 6r   