Back to index

system-config-printer  1.3.9+20120706
Public Member Functions | Public Attributes
troubleshoot.QueueRejectingJobs.QueueRejectingJobs Class Reference
Inheritance diagram for troubleshoot.QueueRejectingJobs.QueueRejectingJobs:
Inheritance graph
[legend]
Collaboration diagram for troubleshoot.QueueRejectingJobs.QueueRejectingJobs:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def display
def can_click_forward
def connect_signals
def disconnect_signals
def collect_answer
def cancel_operation
def initial_vbox
 Helper functions.

Public Attributes

 label
 troubleshooter

Detailed Description

Definition at line 24 of file QueueRejectingJobs.py.


Constructor & Destructor Documentation

Definition at line 25 of file QueueRejectingJobs.py.

00025 
00026     def __init__ (self, troubleshooter):
00027         Question.__init__ (self, troubleshooter, "Queue rejecting jobs?")
00028         solution = gtk.VBox ()
00029         solution.set_border_width (12)
00030         solution.set_spacing (12)
00031         label = gtk.Label ('<span weight="bold" size="larger">' +
00032                            _("Queue Rejecting Jobs") + '</span>')
00033         label.set_alignment (0, 0)
00034         label.set_use_markup (True)
00035         solution.pack_start (label, False, False, 0)
00036         self.label = gtk.Label ()
00037         self.label.set_alignment (0, 0)
00038         self.label.set_line_wrap (True)
00039         solution.pack_start (self.label, False, False, 0)
00040         solution.set_border_width (12)
00041 
00042         troubleshooter.new_page (solution, self)


Member Function Documentation

Reimplemented from troubleshoot.base.Question.

Definition at line 78 of file QueueRejectingJobs.py.

00078 
00079     def can_click_forward (self):
00080         return False
def troubleshoot.base.Question.cancel_operation (   self) [inherited]
def troubleshoot.base.Question.collect_answer (   self) [inherited]
def troubleshoot.base.Question.connect_signals (   self,
  handler 
) [inherited]
Returns True if this page should be displayed, or False
if it should be skipped.

Reimplemented from troubleshoot.base.Question.

Definition at line 43 of file QueueRejectingJobs.py.

00043 
00044     def display (self):
00045         answers = self.troubleshooter.answers
00046         if not answers['cups_queue_listed']:
00047             return False
00048 
00049         if answers['is_cups_class']:
00050             queue = answers['cups_class_dict']
00051         else:
00052             queue = answers['cups_printer_dict']
00053 
00054         rejecting = queue['printer-type'] & cups.CUPS_PRINTER_REJECTING
00055         if not rejecting:
00056             return False
00057 
00058         if answers['cups_printer_remote']:
00059             attrs = answers['remote_cups_queue_attributes']
00060             reason = attrs['printer-state-message']
00061         else:
00062             reason = queue['printer-state-message']
00063 
00064         text = (_("The queue '%s' is rejecting jobs.") % answers['cups_queue'])
00065 
00066         if reason:
00067             text += ' ' + _("The reason given is: '%s'.") % reason
00068 
00069         if not answers['cups_printer_remote']:
00070             text += "\n\n"
00071             text += _("To make the queue accept jobs, select the "
00072                       "'Accepting Jobs' checkbox in the 'Policies' "
00073                       "tab for the printer in the printer administration "
00074                       "tool.") + ' ' + _(TEXT_start_print_admin_tool)
00075 
00076         self.label.set_text (text)
00077         return True

def troubleshoot.base.Question.initial_vbox (   self,
  title = '',
  text = '' 
) [inherited]

Helper functions.

Definition at line 66 of file base.py.

00066 
00067     def initial_vbox (self, title='', text=''):
00068         vbox = gtk.VBox ()
00069         vbox.set_border_width (12)
00070         vbox.set_spacing (12)
00071         if title:
00072             s = '<span weight="bold" size="larger">' + title + '</span>\n\n'
00073         else:
00074             s = ''
00075         s += text
00076         label = gtk.Label (s)
00077         label.set_alignment (0, 0)
00078         label.set_line_wrap (True)
00079         label.set_use_markup (True)
00080         vbox.pack_start (label, False, False, 0)
00081         return vbox

Here is the caller graph for this function:


Member Data Documentation

Definition at line 35 of file QueueRejectingJobs.py.

Reimplemented in troubleshoot.CheckPrinterSanity.CheckPrinterSanity.

Definition at line 41 of file base.py.


The documentation for this class was generated from the following file: