ó
‹²,]c           @   s‚   d  Z  d d l j Z d d l m Z d d l m Z d d l m	 Z	 d d l
 m Z d d l m Z d e e	 f d	 „  ƒ  YZ d S(
   s%   Files and Directories Explorer PluginiÿÿÿÿN(   t   Signal(   t   _(   t   SpyderPluginMixin(   t   to_text_string(   t   ExplorerWidgett   Explorerc           B   sÚ   e  Z d  Z d Z e e ƒ Z e e ƒ Z e e ƒ Z e e ƒ Z	 e e e ƒ Z
 e e e ƒ Z e e ƒ Z e e ƒ Z e e ƒ Z d
 d „ Z d „  Z d „  Z d „  Z d „  Z d
 e d „ Z e d „ Z d	 „  Z RS(   s(   File and Directories Explorer DockWidgett   explorerc         C   s^   t  j |  d | d |  j d ƒ d |  j d ƒ d |  j d ƒ ƒt j |  | ƒ |  j ƒ  d  S(   Nt   parentt   name_filterst   show_allt   show_icontext(   R   t   __init__t
   get_optionR   t   initialize_plugin(   t   selfR   (    (    s6   lib/python2.7/site-packages/spyder/plugins/explorer.pyR   *   s    c         C   s
   t  d ƒ S(   s   Return widget titles   File explorer(   R   (   R   (    (    s6   lib/python2.7/site-packages/spyder/plugins/explorer.pyt   get_plugin_title5   s    c         C   s   |  j  S(   sq   
        Return the widget to give focus to when
        this plugin's dockwidget is raised on top-level
        (   t
   treewidget(   R   (    (    s6   lib/python2.7/site-packages/spyder/plugins/explorer.pyt   get_focus_widget9   s    c         C   s   g  S(   s*   Return a list of actions related to plugin(    (   R   (    (    s6   lib/python2.7/site-packages/spyder/plugins/explorer.pyt   get_plugin_actions@   s    c            s*  ˆ  j  j ˆ  ƒ ˆ  j j ˆ  j  j j ƒ ˆ  j j ˆ  j  j j ƒ ˆ  j j ˆ  j  j j ƒ ˆ  j j ˆ  j  j j ƒ ˆ  j	 j ˆ  j  j j	 ƒ ˆ  j  j j
 j ˆ  j ƒ ˆ  j j ˆ  j  j j ƒ ˆ  j  j j j ‡  f d †  ƒ ˆ  j
 j ‡  f d †  ƒ ˆ  j j ˆ  j  j ƒ ˆ  j j ‡  f d †  ƒ d S(   s'   Register plugin in Spyder's main windowc            s   ˆ  j  d |  d t ƒ S(   Nt   new_patht   force_current(   t   refresh_plugint   True(   t	   directory(   R   (    s6   lib/python2.7/site-packages/spyder/plugins/explorer.pyt   <lambda>Q   s   c            s   ˆ  j  j j |  d t d t ƒS(   Nt   refresh_explorert   refresh_console(   t   maint   workingdirectoryt   chdirt   FalseR   (   t   dirname(   R   (    s6   lib/python2.7/site-packages/spyder/plugins/explorer.pyR   T   s    c            s   ˆ  j  j j d |  ƒ S(   Nt   text(   R   t   editort   new(   t   t(   R   (    s6   lib/python2.7/site-packages/spyder/plugins/explorer.pyR   Z   t    N(   R   t   add_dockwidgett   editt   connectR!   t   loadt   removedt   removed_treet   renamedt   renamed_treet   open_dirR   t   create_moduleR"   R   t   set_explorer_cwdt   sig_open_filet	   open_filet   sig_new_file(   R   (    (   R   s6   lib/python2.7/site-packages/spyder/plugins/explorer.pyt   register_pluginD   s    	c         C   s*   |  j  j | ƒ |  j  j | d | ƒd S(   s   Refresh explorer widgetR   N(   R   t   update_historyt   refresh(   R   R   R   (    (    s6   lib/python2.7/site-packages/spyder/plugins/explorer.pyR   \   s    c         C   s   t  S(   s3   Perform actions before parent main window is closed(   R   (   R   t
   cancelable(    (    s6   lib/python2.7/site-packages/spyder/plugins/explorer.pyt   closing_plugina   s    c         C   s   |  j  j | ƒ d S(   s   Set working directoryN(   R   R   (   R   R   (    (    s6   lib/python2.7/site-packages/spyder/plugins/explorer.pyR   f   s    N(   t   __name__t
   __module__t   __doc__t   CONF_SECTIONR    t   strt   open_interpreterR&   R)   R*   R+   R,   R.   t   runR-   t   NoneR   R   R   R   R3   R   R   R   R7   R   (    (    (    s6   lib/python2.7/site-packages/spyder/plugins/explorer.pyR      s&   				(   R:   t   os.patht   patht   ospt   qtpy.QtCoreR    t   spyder.config.baseR   t   spyder.pluginsR   t   spyder.py3compatR   t   spyder.widgets.explorerR   R   (    (    (    s6   lib/python2.7/site-packages/spyder/plugins/explorer.pyt   <module>   s   