Back to index

system-config-printer  1.3.9+20120706
Public Member Functions
gui.GtkGUI Class Reference
Inheritance diagram for gui.GtkGUI:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def getWidgets

Detailed Description

Definition at line 31 of file gui.py.


Member Function Documentation

def gui.GtkGUI.getWidgets (   self,
  widgets,
  domain = None 
)

Definition at line 32 of file gui.py.

00032 
00033     def getWidgets(self, widgets, domain=None):
00034         ui_dir = os.environ.get ("SYSTEM_CONFIG_PRINTER_UI",
00035                                  os.path.join (pkgdata, "ui"))
00036         for xmlfile, names in widgets.iteritems ():
00037             bld = gtk.Builder ()
00038 
00039             if domain:
00040                 bld.set_translation_domain (domain)
00041 
00042             bld.add_from_file (os.path.join (ui_dir, xmlfile + ".ui"))
00043             for name in names:
00044                 widget = bld.get_object(name)
00045                 if widget is None:
00046                     raise ValueError, "Widget '%s' not found" % name
00047                 setattr(self, name, widget)
00048 
00049             try:
00050                 win = widget.get_top_level()
00051             except AttributeError:
00052                 win = None
00053             
00054             if win != None:
00055                 gtk.Window.set_focus_on_map(widget.get_top_level (),
00056                                             self.focus_on_map)
00057                 widget.show()
00058 
00059             bld.connect_signals (self)

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