mò
¤<úCc           @   s†   d  Z  d Z d k l Z d k l Z l Z d k l Z l	 Z	 d k
 l Z d e f d „  ƒ  YZ e e ƒ d e	 f d	 „  ƒ  YZ d
 S(   s   0.7pres   Dan Loda <danloda@gmail.com>(   s   WorkingTree(   s   Commands   register_command(   s   NotVersionedErrors   BzrCommandError(   s   Optiont   cmd_gannotatec        
   B   st   t  Z d  Z d g Z e d d d ƒe d d d ƒe d d e d	 d
 d d ƒg Z d d g Z e e d d „ Z	 RS(   sV   GTK+ annotate.
    
    Browse changes to FILENAME line by line in a GTK+ window.
    t   filenamet   allt   helps   show annotations on all linest   plains    don't highlight annotation linest   linet   typet   argnamet   linenos   jump to specified line numbert   gblamet   gpraisei   c            s-  d  k  }	 |	 i d ƒ y d  k ‰  Wn2 t j
 o& } t | ƒ d j o
 t ‚ qX n Xd k l } d k	 l
 } t i | ƒ \ }
 } |
 i | ƒ } | d  j o t | ƒ ‚ n | | | ƒ } | i d ‡  d †  ƒ | i | d ƒ | | ƒ } | i ƒ  | i |
 i | ƒ | i | ƒ ˆ  i ƒ  d  S(   Ns   2.0s   could not open display(   s   GAnnotateWindow(   s   GAnnotateConfigt   destroyc            s
   ˆ  i ƒ  S(   N(   t   gtkt	   main_quit(   t   w(   R   (    t2   /home/jelmer/.bazaar/plugins/gannotate/__init__.pyt   <lambda>>   s    s    - gannotate(   t   pygtkt   requireR   t   RuntimeErrort   et   strt   NoDisplayErrort	   gannotatet   GAnnotateWindowt   configt   GAnnotateConfigt   WorkingTreet   open_containingR   t   working_treet   patht   path2idt   file_idt   Nonet   NotVersionedErrorR   R   t   windowt   connectt	   set_titlet   showt   annotatet   brancht   jump_to_lineR   t   main(   t   selfR   R   R   R   R   R   R   R   R   R   R#   R   R   R    (    (   R   R   t   run)   s*    	
(
   t   __name__t
   __module__t   __doc__t
   takes_argst   Optiont   intt   takes_optionst   aliasest   FalseR,   (    (    (    R   R       s    	0R   c           B   s   t  Z d  Z d „  Z RS(   s#   gtk could not find a proper displayc         C   s   d S(   Ns"   No DISPLAY. gannotate is disabled.(    (   R+   (    (    R   t   __str__N   s    (   R-   R.   R/   R6   (    (    (    R   R   K   s    N(   t   __version__t
   __author__t   bzrlib.workingtreeR   t   bzrlib.commandst   Commandt   register_commandt   bzrlib.errorsR"   t   BzrCommandErrort   bzrlib.optionR1   R    R   (
   R<   R    R1   R   R8   R   R;   R"   R>   R7   (    (    R   t   ?   s   .
