ó
Ñ%�Tc           @   sV   d  Z  d d l Z d d l m Z e a d a d „  Z d „  Z	 d „  Z
 d „  Z d S(   s?   Display a pop-up that informs the user about RCrane's citationsiÿÿÿÿN(   t
   addSettingc          C   s@  t  r
 d St j d d t j t j Bƒ }  |  j t ƒ |  j d t	 ƒ t j
 ƒ  } | j d d d d d ƒ | j ƒ  |  j j | t t d	 ƒ |  j j t j ƒ t j d
 ƒ } | j ƒ  |  j j | t t d ƒ | a t j d t j ƒ } | j d t |  ƒ | j ƒ  |  j j | t t d ƒ |  j ƒ  |  j ƒ  d S(   s�  Creates and displays a popup informing the user about RCrane's citations.
    
    ARGUMENTS:
        None
    RETURNS:
        None
    EFFECTS:
        creates and displays the citation dialog
    NOTE:
        This function returns either:
            a) immediately, if the user has already checked the "Don't show this again" option
            or b) after the user has closed the dialog
    Nt   RCranet   delete_eventsD     RCrane partially automates the RNA model building process.  All  
sE     publications resulting from the use of RCrane must acknowledge:  

sA     Keating KS and Pyle AM. Semiautomated model building for RNA  
sT     	crystallography using a directed rotameric approach. <span style='italic'>Proc  
sK     	Natl Acad USA</span>, <span weight='bold'>107</span> (2010) 8177-8182.  i   s   Don't show this againi    t   _OKt   clicked(   t   __dontShowAgaint   gtkt   Dialogt   Nonet   DIALOG_MODALt   DIALOG_NO_SEPARATORt   set_resizablet   Falset   connectt   __citationPopupCloseWint   Labelt
   set_markupt   showt   vboxt
   pack_startt   Truet   action_areat
   set_layoutt   BUTTONBOX_EDGEt   CheckButtont   __dontShowAgainButtont   Buttont   STOCK_OKt   __citationPopupOKt   show_allt   pack_endt   runt   destroy(   t
   citeDialogt	   citeLabelt   dontShowAgainButtont   okButton(    (    s[   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/python2.7/site-packages/coot/rcrane/citationPopup.pyt   createCitationPopup   s,    



c         C   s   t  | |  ƒ d S(   s  Respond to the user closing the citation pop-up window
    
    ARUGMENTS:
        window - the pop-up window object
        widget - the widget used to close the window
    NOTES:
        This function simply calls __citationPopupOK with a reversed argument list
    N(   R   (   t   windowt   widget(    (    s[   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/python2.7/site-packages/coot/rcrane/citationPopup.pyR   L   s    
c         C   s3   t  j ƒ  r t a t d ƒ n  d a  | j ƒ  d S(   s›   Respond to the user clicking OK
    
    ARGUMENTS:
        widget - the OK button
        window - the pop-up window object
    RETURNS:
        None
    s   rcrane.dontShowCitationPopup()N(   R   t
   get_activeR   R   R    R   R    (   R'   R&   (    (    s[   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/python2.7/site-packages/coot/rcrane/citationPopup.pyR   Y   s
    c           C   s
   t  a d S(   sË   Set the flag so that the citation pop-up is not shown
    
    ARGUMENTS:
        None
    RETURNS:
        None
    NOTES:
        This function is intended to be called in the RCrane settings file
    N(   R   R   (    (    (    s[   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/python2.7/site-packages/coot/rcrane/citationPopup.pyt   dontShowPopupw   s    (   t   __doc__R   t   settingsR    R   R   R   R   R%   R   R   R)   (    (    (    s[   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/python2.7/site-packages/coot/rcrane/citationPopup.pyt   <module>   s   	3		