Back to index

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

List of all members.

Public Member Functions

def __init__
 This could be a LOT smarter.
def display
def connect_signals
def disconnect_signals
def can_click_forward
def collect_answer
def cancel_operation
def initial_vbox
 Helper functions.

Public Attributes

 buffer
 troubleshooter

Detailed Description

Definition at line 23 of file ErrorLogParse.py.


Constructor & Destructor Documentation

def troubleshoot.ErrorLogParse.ErrorLogParse.__init__ (   self,
  troubleshooter 
)

This could be a LOT smarter.

Definition at line 27 of file ErrorLogParse.py.

00027 
00028     def __init__ (self, troubleshooter):
00029         Question.__init__ (self, troubleshooter, "Error log parse")
00030         page = self.initial_vbox (_("Error log messages"),
00031                                   _("There are messages in the error log."))
00032         sw = gtk.ScrolledWindow ()
00033         textview = gtk.TextView ()
00034         textview.set_editable (False)
00035         sw.add (textview)
00036         page.pack_start (sw)
00037         self.buffer = textview.get_buffer ()
00038         troubleshooter.new_page (page, self)

Here is the call graph for this function:


Member Function Documentation

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 39 of file ErrorLogParse.py.

00039 
00040     def display (self):
00041         answers = self.troubleshooter.answers
00042         try:
00043             error_log = answers['error_log']
00044         except KeyError:
00045             return False
00046 
00047         display = False
00048         for line in error_log:
00049             if line[0] == 'E':
00050                 display = True
00051                 break
00052 
00053         if display:
00054             self.buffer.set_text (reduce (lambda x, y: x + '\n' + y, 
00055                                           error_log))
00056 
00057         return display
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 36 of file ErrorLogParse.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: