Functions

buffer_tagger_connect (textview)

buffer_tagger_disconnect (textview)

buffer_tagger_update_tags (textview)

trust_prompt_describe_certificate_errors (flags)

trust_prompt_run_for_source (parent, source, certificate_pem, certificate_errors, error_text, allow_source_save, cancellable, callback, *user_data)

trust_prompt_run_for_source_finish (source, result, response)

trust_prompt_run_modal (parent, source_extension, source_display_name, host, certificate_pem, certificate_errors, error_text)

Details

EDataServerUI.buffer_tagger_connect(textview)
Parameters:

textview (Gtk.TextView) –

EDataServerUI.buffer_tagger_disconnect(textview)
Parameters:

textview (Gtk.TextView) –

EDataServerUI.buffer_tagger_update_tags(textview)
Parameters:

textview (Gtk.TextView) –

EDataServerUI.trust_prompt_describe_certificate_errors(flags)
Parameters:

flags (Gio.TlsCertificateFlags) – a Gio.TlsCertificateFlags to describe

Returns:

A newly allocated string with text description of flags. Free the returned pointer with GLib.free() when no longer needed.

Return type:

str

Converts flags into a localized text description of the set bits, one bit description per line. If no bit is set, then an empty string is returned.

New in version 3.16.

EDataServerUI.trust_prompt_run_for_source(parent, source, certificate_pem, certificate_errors, error_text, allow_source_save, cancellable, callback, *user_data)
Parameters:

Similar to EDataServerUI.trust_prompt_run_modal(), except it also manages all the necessary things around the source ‘s SSL/TLS trust properties when it also contains %E_SOURCE_EXTENSION_WEBDAV, thus the SSL/TLS trust on the WebDAV source is properly updated based on the user’s choice. The call is finished with EDataServerUI.trust_prompt_run_for_source_finish(), which also returns the user’s choice. The finish happens in the callback. This is necessary, because the source can be also saved.

The function fails, if the source doesn’t contain the EDataServer.SOURCE_EXTENSION_AUTHENTICATION.

Note: The dialog is not shown when the stored certificate trust in the WebDAV source matches the certificate_pem and the stored result is EDataServer.TrustPromptResponse.REJECT.

New in version 3.16.

EDataServerUI.trust_prompt_run_for_source_finish(source, result, response)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on error

Return type:

bool

Finishes the operation started with EDataServerUI.trust_prompt_run_for_source(). The response will contain a code of the user’s choice. The EDataServer.TrustPromptResponse.UNKNOWN is used, when the user cancelled the trust prompt dialog and no changes are made with the source.

If an error occurs, the function sets error and returns False.

New in version 3.16.

EDataServerUI.trust_prompt_run_modal(parent, source_extension, source_display_name, host, certificate_pem, certificate_errors, error_text)
Parameters:
  • parent (Gtk.Window) – A Gtk.Window to use as a parent for the trust prompt dialog

  • source_extension (str or None) – an EDataServer.Source extension, to identify a kind of the source; or None

  • source_display_name (str or None) – an EDataServer.Source display name, to identify what prompts; or None

  • host (str) – a host name to which the certificate belongs

  • certificate_pem (str) – a PEM-encoded certificate for which to show the trust prompt

  • certificate_errors (Gio.TlsCertificateFlags) – errors of the certificate_pem

  • error_text (str or None) – an optional error text to show in the dialog; can be None

Returns:

A code of the user’s choice. The EDataServer.TrustPromptResponse.UNKNOWN is returned, when the user cancelled the trust prompt dialog.

Return type:

EDataServer.TrustPromptResponse

Runs modal (doesn’t return until the dialog is closed) a trust prompt dialog, it is a prompt whether a user wants to accept or reject the certificate_pem for the host due to the certificate_errors errors.

The pair source_extension and source_display_name influences the trust prompt message. If both are set, then the message also contains which source failed to connect according to these two arguments.

The dialog can contain a custom error text, passed in as error_text. The error might be a detailed error string returned by the server. If set, it is prefixed with “Detailed error:” string.

New in version 3.16.