
    Hf                     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)QueueRejectingJobsc                 x   t         j                  | |d       t        j                         }|j	                  d       |j                  d       t        j                  dt        d      z   dz         }|j                  dd       |j                  d       |j                  |d	d	d       t        j                         | _        | j                  j                  dd       | j                  j                  d       |j                  | j                  d	d	d       |j	                  d       |j                  ||        y )
NzQueue rejecting jobs?   z"<span weight="bold" size="larger">zQueue Rejecting Jobsz</span>)labelr   TF)Question__init__r   VBoxset_border_widthset_spacingLabel_set_alignmentset_use_markup
pack_startr
   set_line_wrapnew_page)selftroubleshootersolutionr
   s       C/usr/share/system-config-printer/troubleshoot/QueueRejectingJobs.pyr   zQueueRejectingJobs.__init__   s    41HI88;!!2&b!		 D34!57@!A BQ"d#UE5!4YY\


  !Q'

  $'TZZq9!!2&40    c                    | j                   j                  }|d   sy|d   r|d   }n|d   }|d   t        j                  z  }|sy|d   r|d   }|d	   }n|d	   }t	        d
      |d   z  }|r|dt	        d      |z  z   z  }|d   s&|dz  }|t	        d      dz   t	        t
              z   z  }| j                  j                  |       y)Ncups_queue_listedFis_cups_classcups_class_dictcups_printer_dictzprinter-typecups_printer_remoteremote_cups_queue_attributeszprinter-state-messagez!The queue '%s' is rejecting jobs.
cups_queue zThe reason given is: '%s'.z

zTo make the queue accept jobs, select the 'Accepting Jobs' checkbox in the 'Policies' tab for the printer in the printer administration tool.T)r   answerscupsCUPS_PRINTER_REJECTINGr   TEXT_start_print_admin_toolr
   set_text)r   r%   queue	rejectingattrsreasontexts          r   displayzQueueRejectingJobs.display-   s   %%--*+?#-.E/0E.)D,G,GG	():;E23F23F569NNC!89FBBBD,-FNDA   "%% ())D'EF FD
 	

T"r   c                      y)NF )r   s    r   can_click_forwardz$QueueRejectingJobs.can_click_forwardP   s    r   N)__name__
__module____qualname__r   r/   r2   r1   r   r   r   r      s    1$!Fr   r   )gi.repositoryr   r&   baser   r   r1   r   r   <module>r8      s   ,   7 7r   