EDataServerUI.WebDAVDiscoverContent¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Grid (21), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Gtk.Grid (5), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Child Properties¶
- Inherited:
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class EDataServerUI.WebDAVDiscoverContent(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(credentials_prompter, source, base_url, supports_filter)¶
- Parameters:
credentials_prompter (
EDataServerUI.CredentialsPrompter
) – anEDataServerUI.CredentialsPrompter
to use to ask for credentialssource (
EDataServer.Source
orNone
) – optionalEDataServer.Source
to use for authentication, orNone
base_url (
str
orNone
) – optional base URL to use for discovery, orNone
supports_filter (
int
) – a bit-or ofEDataServer.WebDAVDiscoverSupports
, a filter to limit what source types will be shown in the dialog content; useEDataServer.WebDAVDiscoverSupports.NONE
to show all
- Returns:
- Return type:
Creates a new WebDAV discovery content, which is a
Gtk.Grid
containing necessary widgets to provide a UI interface for a user to search and select for available WebDAV (CalDAV or CardDAV) sources provided by the given server. Do not pack anything into this content, its content can be changed dynamically.New in version 3.18.
- get_base_url()¶
- Returns:
currently set base URL for the self.
- Return type:
Returns currently set base URL for the self. This is used to overwrite the one set on the
EDataServer.Source
from the creation time. The URL can be either a full URL, a path or even aNone
.New in version 3.18.
- get_multiselect()¶
- Returns:
whether multiselect is allowed for the self.
- Return type:
New in version 3.18.
- get_selected(index)¶
- Parameters:
index (
int
) – an index of the selected source; counts from 0- Returns:
True
, when a selected source of index index exists,False
otherwise.- out_href:
an output location for the URL of the selected source
- out_supports:
an output location of a bit-or of
EDataServer.WebDAVDiscoverSupports
, the set of source types this server source location supports- out_display_name:
an output location of the sources display name
- out_color:
an output location of the string representation of the color for the source, as set on the server
- out_order:
an output location of the preferred sorting order
- Return type:
(
bool
, out_href:str
, out_supports:int
, out_display_name:str
, out_color:str
, out_order:int
)
Returns information about selected source at index index. The function can be called multiple times, with the index starting at zero and as long as it doesn’t return
False
. If the self doesn’t have allowed multiselection, then the only valid index is 0.All the out_href, out_display_name and out_color are newly allocated strings, which should be freed with
GLib.free
(), when no longer needed.New in version 3.18.
- get_tree_selection()¶
- Returns:
inner #GtkTreeViewSelection
- Return type:
Returns inner #GtkTreeViewSelection. This is meant to be able to connect to its “changed” signal and update other parts of the parent widgets accordingly.
New in version 3.18.
- get_user_address()¶
- Returns:
currently selected user address. The returned string is newly allocated and should be freed with
GLib.free
() when no longer needed. If there are none addresses provided by the server, or no calendar sources were found, thenNone
is returned instead.- Return type:
Get currently selected user address in the self, if the server returned any. This value has meaning only with calendar sources.
New in version 3.18.
- refresh(display_name, cancellable, callback, *user_data)¶
- Parameters:
display_name (
str
orNone
) – optional display name to use for scratch sourcescancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
Asynchronously starts refresh of the self. This means to access the server and search it for available sources. The self shows a feedback and a Cancel button during the operation.
The display_name is used only if the self wasn’t created with an
EDataServer.Source
and it’s shown in the password prompts, if there are required any.When the operation is finished, callback will be called. You can then call
EDataServerUI.WebDAVDiscoverContent.refresh_finish
() to get the result of the operation.New in version 3.18.
- refresh_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes the operation started with
EDataServerUI.WebDAVDiscoverContent.refresh
(). If an error occurred, the function will set error and returnFalse
. There is availableEDataServerUI.WebDAVDiscoverContent.show_error
() for convenience, which shows the error within self and takes care of it when refreshing the content.New in version 3.18.
- set_base_url(base_url)¶
- Parameters:
base_url (
str
) – a base URL
Sets base URL for the self. This is used to overwrite the one set on the
EDataServer.Source
from the creation time. The URL can be either a full URL, a path or even aNone
.New in version 3.18.
- set_multiselect(multiselect)¶
- Parameters:
multiselect (
bool
) – whether multiselect is allowed
Sets whether the WebDAV discovery content allows multiselect.
New in version 3.18.
- show_error(error)¶
- Parameters:
error (
GLib.Error
) – aGLib.Error
to show in the UI, orNone
Shows the error within self, unless it’s a
Gio.IOErrorEnum.CANCELLED
, orNone
, which are safely ignored. The advantage of this function is that the error message is removed when the refresh operation is started.New in version 3.18.