Back to index

system-config-printer  1.3.9+20120706
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes
scp-dbus-service.ConfigPrintingNewPrinterDialog Class Reference
Collaboration diagram for scp-dbus-service.ConfigPrintingNewPrinterDialog:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __del__
def NewPrinterFromDevice
def ChangePPD
def DialogCanceled
def PrinterAdded
def PrinterModified
def on_dialog_canceled
def on_printer_added
def on_printer_modified
def remove_handles

Public Attributes

 dialog
 handles
 xid
 name
 device_id
 ppd
 device_uri

Static Public Attributes

string in_signature = 'uss'
string signature = ''

Private Member Functions

def _change_ppd_got_ppd
def _change_ppd_with_dev
def _do_change_ppd

Private Attributes

 _ppdcache
 _cupsconn

Detailed Description

Definition at line 252 of file scp-dbus-service.py.


Constructor & Destructor Documentation

def scp-dbus-service.ConfigPrintingNewPrinterDialog.__init__ (   self,
  bus,
  path,
  cupsconn 
)

Definition at line 253 of file scp-dbus-service.py.

00253 
00254     def __init__ (self, bus, path, cupsconn):
00255         bus_name = dbus.service.BusName (CONFIG_BUS, bus=bus)
00256         dbus.service.Object.__init__ (self, bus_name, path)
00257         self.dialog = newprinter.NewPrinterGUI()
00258         self.dialog.NewPrinterWindow.set_modal (False)
00259         self.handles = [self.dialog.connect ('dialog-canceled',
00260                                              self.on_dialog_canceled),
00261                         self.dialog.connect ('printer-added',
00262                                              self.on_printer_added),
00263                         self.dialog.connect ('printer-modified',
00264                                              self.on_printer_modified)]
00265         self._ppdcache = ppdcache.PPDCache ()
00266         self._cupsconn = cupsconn
00267         debugprint ("+%s" % self)

def scp-dbus-service.ConfigPrintingNewPrinterDialog.__del__ (   self)

Definition at line 268 of file scp-dbus-service.py.

00268 
00269     def __del__ (self):
00270         debugprint ("-%s" % self)


Member Function Documentation

def scp-dbus-service.ConfigPrintingNewPrinterDialog._change_ppd_got_ppd (   self,
  name,
  ppd,
  exc 
) [private]

Definition at line 287 of file scp-dbus-service.py.

00287 
00288     def _change_ppd_got_ppd(self, name, ppd, exc):
00289         # Got PPD; now find device URI.
00290         self.ppd = ppd
00291         self._cupsconn.getPrinters (reply_handler=self._change_ppd_with_dev,
00292                                     error_handler=self._do_change_ppd)

def scp-dbus-service.ConfigPrintingNewPrinterDialog._change_ppd_with_dev (   self,
  conn,
  result 
) [private]

Definition at line 293 of file scp-dbus-service.py.

00293 
00294     def _change_ppd_with_dev (self, conn, result):
00295         self.device_uri = result.get (self.name, {}).get ('device-uri', None)
00296         self._do_change_ppd (conn)

def scp-dbus-service.ConfigPrintingNewPrinterDialog._do_change_ppd (   self,
  conn,
  exc = None 
) [private]

Definition at line 297 of file scp-dbus-service.py.

00297 
00298     def _do_change_ppd(self, conn, exc=None):
00299         self.dialog.init ('ppd', device_uri=self.device_uri, name=self.name,
00300                           ppd=self.ppd, devid=self.device_id, xid=self.xid)

def scp-dbus-service.ConfigPrintingNewPrinterDialog.ChangePPD (   self,
  xid,
  name,
  device_id 
)

Definition at line 280 of file scp-dbus-service.py.

00280 
00281     def ChangePPD(self, xid, name, device_id):
00282         g_killtimer.add_hold ()
00283         self.xid = xid
00284         self.name = name
00285         self.device_id = device_id
00286         self._ppdcache.fetch_ppd (name, self._change_ppd_got_ppd)

def scp-dbus-service.ConfigPrintingNewPrinterDialog.DialogCanceled (   self)

Definition at line 303 of file scp-dbus-service.py.

00303 
00304     def DialogCanceled(self):
00305         pass

def scp-dbus-service.ConfigPrintingNewPrinterDialog.NewPrinterFromDevice (   self,
  xid,
  device_uri,
  device_id 
)

Definition at line 273 of file scp-dbus-service.py.

00273 
00274     def NewPrinterFromDevice(self, xid, device_uri, device_id):
00275         g_killtimer.add_hold ()
00276         self.dialog.init ('printer_with_uri', device_uri=device_uri,
00277                           devid=device_id, xid=xid)

def scp-dbus-service.ConfigPrintingNewPrinterDialog.on_dialog_canceled (   self,
  obj 
)

Definition at line 316 of file scp-dbus-service.py.

00316 
00317     def on_dialog_canceled(self, obj):
00318         g_killtimer.remove_hold ()
00319         self.DialogCanceled ()
00320         self.remove_handles ()
00321         self.remove_from_connection ()

Here is the call graph for this function:

def scp-dbus-service.ConfigPrintingNewPrinterDialog.on_printer_added (   self,
  obj,
  name 
)

Definition at line 322 of file scp-dbus-service.py.

00322 
00323     def on_printer_added(self, obj, name):
00324         g_killtimer.remove_hold ()
00325         self.PrinterAdded (name)
00326         self.remove_handles ()
00327         self.remove_from_connection ()

Here is the call graph for this function:

def scp-dbus-service.ConfigPrintingNewPrinterDialog.on_printer_modified (   self,
  obj,
  name,
  ppd_has_changed 
)

Definition at line 328 of file scp-dbus-service.py.

00328 
00329     def on_printer_modified(self, obj, name, ppd_has_changed):
00330         g_killtimer.remove_hold ()
00331         self.PrinterModifed (name, ppd_has_changed)
00332         self.remove_handles ()
00333         self.remove_from_connection ()

Here is the call graph for this function:

def scp-dbus-service.ConfigPrintingNewPrinterDialog.PrinterAdded (   self,
  name 
)

Definition at line 308 of file scp-dbus-service.py.

00308 
00309     def PrinterAdded(self, name):
00310         pass

Here is the caller graph for this function:

def scp-dbus-service.ConfigPrintingNewPrinterDialog.PrinterModified (   self,
  name,
  ppd_has_changed 
)

Definition at line 313 of file scp-dbus-service.py.

00313 
00314     def PrinterModified(self, name, ppd_has_changed):
00315         pass

def scp-dbus-service.ConfigPrintingNewPrinterDialog.remove_handles (   self)

Definition at line 334 of file scp-dbus-service.py.

00334 
00335     def remove_handles (self):
00336         for handle in self.handles:
00337             self.dialog.disconnect (handle)

Here is the caller graph for this function:


Member Data Documentation

scp-dbus-service.ConfigPrintingNewPrinterDialog._cupsconn [private]

Definition at line 265 of file scp-dbus-service.py.

scp-dbus-service.ConfigPrintingNewPrinterDialog._ppdcache [private]

Definition at line 264 of file scp-dbus-service.py.

scp-dbus-service.ConfigPrintingNewPrinterDialog.device_id

Definition at line 284 of file scp-dbus-service.py.

scp-dbus-service.ConfigPrintingNewPrinterDialog.device_uri

Definition at line 294 of file scp-dbus-service.py.

scp-dbus-service.ConfigPrintingNewPrinterDialog.dialog

Definition at line 256 of file scp-dbus-service.py.

scp-dbus-service.ConfigPrintingNewPrinterDialog.handles

Definition at line 258 of file scp-dbus-service.py.

string scp-dbus-service.ConfigPrintingNewPrinterDialog.in_signature = 'uss' [static]

Definition at line 272 of file scp-dbus-service.py.

scp-dbus-service.ConfigPrintingNewPrinterDialog.name

Definition at line 283 of file scp-dbus-service.py.

scp-dbus-service.ConfigPrintingNewPrinterDialog.ppd

Definition at line 289 of file scp-dbus-service.py.

string scp-dbus-service.ConfigPrintingNewPrinterDialog.signature = '' [static]

Definition at line 302 of file scp-dbus-service.py.

scp-dbus-service.ConfigPrintingNewPrinterDialog.xid

Definition at line 282 of file scp-dbus-service.py.


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