³ò
u×Gc           @   s*   d  d k  l Z d e f d „  ƒ  YZ d S(   iÿÿÿÿ(   t   CheckButtont   SpellCheckButtonc           B   s>   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   st   t  i |  ƒ |  i | | ƒ |  i ƒ  |  i i d |  i ƒ |  i d |  i ƒ |  _	 |  i
 i d |  i ƒ |  _ d  S(   Ns   /apps/scribes/spell_checkt   toggledt   destroy(   R    t   __init__t"   _SpellCheckButton__init_attributest!   _SpellCheckButton__set_propertiest   _SpellCheckButton__clientt
   notify_addt$   _SpellCheckButton__check_spelling_cbt   connectt   _SpellCheckButton__toggled_cbt   _SpellCheckButton__signal_id_1t   _SpellCheckButton__managert   _SpellCheckButton__destroy_cbt   _SpellCheckButton__signal_id_2(   t   selft   managert   editor(    (    s'   plugins/Preferences/SpellCheckButton.pyR   )   s    

c         C   s2   | |  _  | |  _ | i |  _ d  |  _ |  _ d  S(   N(   t   _SpellCheckButton__editorR   t   gconf_clientR   t   NoneR   R   (   R   R   R   (    (    s'   plugins/Preferences/SpellCheckButton.pyt   __init_attributes:   s
    
		c         C   s¬   t  } |  i i d ƒ } d d k l } | | ƒ o |  i i d ƒ } n |  i | ƒ d d k l } |  i	 | ƒ |  i
 t ƒ d d k l } |  i i i |  | ƒ d  S(   Ns   /apps/scribes/spell_checkiÿÿÿÿ(   t   truth(   t   msg0022(   t   spell_check_button_tip(   t   FalseR   t   gett   operatorR   t   get_boolt
   set_activet   i18nR   t	   set_labelt   set_use_underlinet   Truet   SCRIBES.tooltipsR   R   t   tipt   set_tip(   R   t   check_spellingt   valueR   R   R   (    (    s'   plugins/Preferences/SpellCheckButton.pyt   __set_propertiesJ   s    c   
      C   sî   t  } |  i i d ƒ } d d k l } | | ƒ o |  i i d ƒ } n | oQ |  i ƒ  t  j o |  i t ƒ n d d k	 l
 } |  i i i | d d ƒ nH |  i ƒ  o |  i t  ƒ n d d k	 l }	 |  i i i |	 d d ƒ d  S(   Ns   /apps/scribes/spell_checkiÿÿÿÿ(   R   (   t   msg0023t   succeedi   (   t   msg0024(   R   R   R   R   R   R   t
   get_activeR   R"   R   R)   R   t   feedbackt   update_status_messageR+   (
   R   t   clientt   cnxn_idt   entryt   dataR&   R'   R   R)   R+   (    (    s'   plugins/Preferences/SpellCheckButton.pyt   __check_spelling_cb^   s    c         C   s…   |  i  ƒ  } | o4 |  i i d ƒ t j o |  i i d t ƒ qq n+ |  i i d ƒ o |  i i d t ƒ n |  i i d ƒ t S(   Ns   /apps/scribes/spell_check(   R,   R   R   R   t   set_boolR"   t   notify(   R   t   buttonR&   (    (    s'   plugins/Preferences/SpellCheckButton.pyt   __toggled_cbv   s    c         C   sF   |  i  i |  i |  ƒ |  i  i |  i |  i ƒ |  i ƒ  ~  d  }  d  S(   N(   R   t   disconnect_signalR   R   R   R   R   (   R   R   (    (    s'   plugins/Preferences/SpellCheckButton.pyt   __destroy_cb   s    

(   t   __name__t
   __module__R   R   R   R	   R   R   (    (    (    s'   plugins/Preferences/SpellCheckButton.pyR   "   s   					N(   t   gtkR    R   (    (    (    s'   plugins/Preferences/SpellCheckButton.pys   <module>    s   