20 QToolButton, |
20 QToolButton, |
21 QWidget, |
21 QWidget, |
22 ) |
22 ) |
23 |
23 |
24 from eric7.EricGui import EricPixmapCache |
24 from eric7.EricGui import EricPixmapCache |
25 from eric7.RemoteServerInterface import EricServerFileDialog |
25 |
26 from eric7.SystemUtilities import FileSystemUtilities |
26 try: |
|
27 # These are only available if used with eric-ide |
|
28 # (https://eric-ide.python-projects.org) |
|
29 from eric7.RemoteServerInterface import EricServerFileDialog |
|
30 from eric7.SystemUtilities import FileSystemUtilities |
|
31 HAS_REMOTE_SERVER_SUPPORT = True |
|
32 except ImportError: |
|
33 HAS_REMOTE_SERVER_SUPPORT = False |
27 |
34 |
28 from . import EricFileDialog |
35 from . import EricFileDialog |
29 from .EricApplication import ericApp |
36 from .EricApplication import ericApp |
30 from .EricCompleters import EricDirCompleter, EricFileCompleter |
37 from .EricCompleters import EricDirCompleter, EricFileCompleter |
31 |
38 |
196 Public method to set the remote mode of the path picker. |
203 Public method to set the remote mode of the path picker. |
197 |
204 |
198 @param remote flag indicating the remote mode |
205 @param remote flag indicating the remote mode |
199 @type bool |
206 @type bool |
200 """ |
207 """ |
201 self.__remote = remote |
208 self.__remote = remote and HAS_REMOTE_SERVER_SUPPORT |
202 if remote: |
209 if self.__remote: |
203 self.__remotefsInterface = ( |
210 self.__remotefsInterface = ( |
204 ericApp().getObject("EricServer").getServiceInterface("FileSystem") |
211 ericApp().getObject("EricServer").getServiceInterface("FileSystem") |
205 ) |
212 ) |
206 else: |
213 else: |
207 self.__remotefsInterface = None |
214 self.__remotefsInterface = None |