N
0ĥ 7c       s     d  Z   	 k Z  y  k l Wn   e j
 o  k l n X d Z  d   Z  d   Z # d   Z G d   Z	 J d   Z
 d S(   sl  This file creates a GTK rc file to work with a widget tree created from
the XML output of GLADE.

It outputs both the style definitions, and links to the names of the widgets
that use it.  The style namesare of the form "PyGLADE_<name>_style".  Then
there is a number of "widget <path> style PyGLADE_<name>_style" lines that
bind the styles to particular widgets.
s   pyglade.style.errorc    sQ     t  t i t i |  d   \ } } }  d | d | d | d f Sd  S(   Ns   ,s   { %.3f, %.3f, %.3f }f255.0(   s   maps   strings   atois   splits   strs   rs   gs   b(   s   strs   rs   gs   bsE   /mit/gnome/arch/sun4x_56/lib/python1.5/site-packages/pyglade/style.pys   convert_colour s   *c    sÖ     | d | i }  | i d  o%  |  i d | d | i f  n  | i d  o  d  Sn  | i }  t |  t f   j o  | f } n   x& | d   r } ! t
 |  | |  q² Wd  S(   Ns   .s
   style_names%   widget "%s" style "PyGLADE_%s_style"
i   s   widgeti    (   s   parents   widgets   names   has_keys   fps   writes
   style_names   childrens   types   childs   output_widget_names(   s   fps   widgets   parents   childrens   childsE   /mit/gnome/arch/sun4x_56/lib/python1.5/site-packages/pyglade/style.pys   output_widget_names s   %  	c    s  # $ |  i d  o ' |  d }  n ( |  i d j o ) t d  n + |  i } , t |  t f   j o , | f } n - xx| d - rk} . d | i d } / | i
 d | f  0 | i d  o 1 | i
 d | i f  n 2 xó d	 d
 d d d f d 2 r× } 4 x d d d d f d 4 rp } 5 | d t i |  } 6 | i |  o= 7 t | |  } 8 | i
 d | t i |  | f  n q/W; d | } < | i |  o" = | i
 d | | | f  n qW? | i
 d  q W@ |  i d  o A d  Sn B |  i }	 C t |	  t f   j o C |	 f }	 n D x& |	 d D r }
 E t | |
 d  qcWd  S(   Ns   gtk-interfaces'   Not at the top node of the GLADE outputi    s   PyGLADE_s   _styles   style "%s"
{
s
   style_fonts     font = "%s"
s   NORMALs   ACTIVEs   PRELIGHTs   SELECTEDs   INSENSITIVEs   fgs   bgs   texts   bases   :s     %s[%s] = %s
s
   bg_pixmap:s     bg_pixmap[%s] = "%s"
s   }

s   widgets    (   s   trees   has_keys   tags   errors   styles   styless   types
   style_names   names   fps   writes
   style_fonts   states   colours   strings   lowers   keys   convert_colours   cstrs   uppers   widgets   childrens   childs   output_widget_names(   s   trees   fps   styless   styles   names   states   colours   keys   cstrs   childrens   childsE   /mit/gnome/arch/sun4x_56/lib/python1.5/site-packages/pyglade/style.pys   write_stream# sB     	 	 	.&  	c    s    G H t  |  t | d   d  S(   Ns   w(   s   write_streams   trees   opens   fname(   s   trees   fnamesE   /mit/gnome/arch/sun4x_56/lib/python1.5/site-packages/pyglade/style.pys   writeG s   c    s0   J K t    } L t |  |  M | i   Sd  S(   N(   s   StringIOs   fps   write_streams   trees   getvalue(   s   trees   fpsE   /mit/gnome/arch/sun4x_56/lib/python1.5/site-packages/pyglade/style.pys	   as_stringJ s   N(   s   __doc__s   strings	   cStringIOs   StringIOs   ImportErrors   errors   convert_colours   output_widget_namess   write_streams   writes	   as_string(    sE   /mit/gnome/arch/sun4x_56/lib/python1.5/site-packages/pyglade/style.pys   ? s   		$