Esempio n. 1
0
def CreateMetadataWebDialog(manager, file_path, application=None):
    if application is None:
        application = QtCore.QCoreApplication.instance()
    infos = manager.get_metadata_infos(file_path)
    api = WebMetadataApi(application, infos[2], infos[3])
    dialog = WebDialog(application, infos[0],
                    title=manager.get_appname(), token=infos[1], api=api)
    dialog.resize(METADATA_WEBVIEW_WIDTH, METADATA_WEBVIEW_HEIGHT)
    dialog.setWindowFlags(Qt.WindowStaysOnTopHint)
    return dialog
Esempio n. 2
0
 def _get_conflicts_dialog(self, engine):
     from nxdrive.wui.dialog import WebDialog
     from nxdrive.wui.conflicts import WebConflictsApi
     return WebDialog(
         self,
         'conflicts.html',
         api=WebConflictsApi(self, engine),
     )
Esempio n. 3
0
def CreateMetadataWebDialog(manager, file_path, application=None):
    if application is None:
        application = QtCore.QCoreApplication.instance()
    infos = manager.get_metadata_infos(file_path)
    api = WebMetadataApi(application, infos[2], infos[3])
    dialog = WebDialog(application,
                       infos[0],
                       title=manager.get_appname(),
                       token=infos[1],
                       api=api)
    dialog.resize(METADATA_WEBVIEW_WIDTH, METADATA_WEBVIEW_HEIGHT)
    dialog.setWindowFlags(Qt.WindowStaysOnTopHint)
    return dialog
Esempio n. 4
0
def CreateMetadataWebDialog(manager, file_path, application=None):
    if application is None:
        application = QtCore.QCoreApplication.instance()
    try:
        infos = manager.get_metadata_infos(file_path)
    except ValueError:
        values = dict()
        values['file'] = file_path
        dialog = WebModal(
            application,
            application.translate("METADATA_FILE_NOT_HANDLE", values))
        dialog.add_button("OK", application.translate("OK"))
        return dialog
    api = WebMetadataApi(application, infos[2], infos[3])
    dialog = WebDialog(application, page=None, title=manager.get_appname())
    dialog.set_token(infos[1])
    MetadataErrorHandler(dialog, api)
    dialog.load(infos[0], api=api)
    dialog.resize(METADATA_WEBVIEW_WIDTH, METADATA_WEBVIEW_HEIGHT)
    dialog.setWindowFlags(Qt.WindowStaysOnTopHint)
    return dialog
Esempio n. 5
0
 def show_dialog(self, url):
     from nxdrive.wui.dialog import WebDialog
     dialog = WebDialog(self, url)
     dialog.show()
Esempio n. 6
0
    def show_dialog(self, url):
        from nxdrive.wui.dialog import WebDialog

        dialog = WebDialog(self, url)
        dialog.show()