dialog.show_message(msg, tab_index=tab_index) return False if app is None: log.debug("Launching Qt prompt to manage settings.") QtGui.QApplication([]) dialog = Dialog(sb_field_spec, proxy_field_spec, version, title="Nuxeo Drive - Settings", callback=validate) is_dialog_open = True try: dialog.exec_() except: dialog.reject() raise finally: is_dialog_open = False return dialog.accepted if __name__ == '__main__': from nxdrive.controller import Controller from nxdrive.controller import default_nuxeo_drive_folder ctl = Controller('/tmp') sb_settings = ServerBindingSettings( server_url='http://localhost:8080/nuxeo', username='******', local_folder=default_nuxeo_drive_folder()) proxy_settings = ProxySettings() version = ctl.get_version() print prompt_settings(ctl, sb_settings, proxy_settings, version)
def register_server(self): return prompt_authentication( self.controller, default_nuxeo_drive_folder(), app=self)
import pdb debugger = pdb from nxdrive.controller import Controller from nxdrive.daemon import daemonize from nxdrive.controller import default_nuxeo_drive_folder from nxdrive.logging_config import configure from nxdrive.logging_config import get_logger from nxdrive.protocol_handler import parse_protocol_url from nxdrive.protocol_handler import register_protocol_handlers from nxdrive.startup import register_startup from nxdrive.contextual_menu import register_contextual_menu from nxdrive import __version__ DEFAULT_NX_DRIVE_FOLDER = default_nuxeo_drive_folder() DEFAULT_DELAY = 5.0 DEFAULT_MAX_SYNC_STEP = 10 DEFAULT_HANDSHAKE_TIMEOUT = 60 DEFAULT_TIMEOUT = 20 DEFAULT_UPDATE_CHECK_DELAY = 3600 DEFAULT_MAX_ERRORS = 3 DEFAULT_UPDATE_SITE_URL = 'http://community.nuxeo.com/static/drive/' USAGE = """ndrive [command] If no command is provided, the graphical application is started along with a synchronization process. Possible commands: - console - start