
    HfX                     8    d dl mZ d dlZddl  G d de      Zy)    )GtkN   )*c                       e Zd Zd Zd Zd Zy)QueueNotEnabledc                 |   t         j                  | |d       t        j                         | _        t        j
                         }| j                  j                  d       | j                  j                  dd       |j                  | j                  ddd       |j                  d       |j                  ||        y )NzQueue not enabled?Tr   F   )Question__init__r   LabellabelVBoxset_line_wrapset_alignment
pack_startset_border_widthnew_page)selftroubleshootersolutions      @/usr/share/system-config-printer/troubleshoot/QueueNotEnabled.pyr   zQueueNotEnabled.__init__   s    41EFYY\
88;

  $'

  !Q'TZZq9!!2&40    c                    | j                   j                  }|d   sy|d   r|d   }n|d   }|d   t        j                  k7  }|ry|d   r|d   }|d	   }n|d	   }|rt	        d
      |z  }nt	        d      }dt	        d      z   dz   t	        d      |d   z  z   }|r|d|z   z  }|d   s(|dz  }|t	        d      z  }|dt	        t
              z   z  }| j                  j                  |       y)Ncups_queue_listedFis_cups_classcups_class_dictcups_printer_dictzprinter-statecups_printer_remoteremote_cups_queue_attributeszprinter-state-messagezThe reason given is: '%s'.zBThis may be due to the printer being disconnected or switched off.z"<span weight="bold" size="larger">zQueue Not Enabledz	</span>

zThe queue '%s' is not enabled.
cups_queue z

zuTo enable it, select the 'Enabled' checkbox in the 'Policies' tab for the printer in the printer administration tool.T)r   answerscupsIPP_PRINTER_STOPPED_TEXT_start_print_admin_toolr   
set_markup)r   r"   queueenabledattrsreasontexts          r   displayzQueueNotEnabled.display%   sC   &&..*+?#-.E/0E(D,D,DD():;E23F23F34v=F ' (F 5%&')6723%&&
 C&L D,-FNDA - . .D C!7888D

t$r   c                      y)NF )r   s    r   can_click_forwardz!QueueNotEnabled.can_click_forwardQ   s    r   N)__name__
__module____qualname__r   r-   r0   r/   r   r   r   r      s    1*Xr   r   )gi.repositoryr   r#   baser
   r   r/   r   r   <module>r6      s   ,   8h 8r   