EAccountsWindow

EAccountsWindow — Accounts Window

Functions

Properties

ESourceRegistry * registry Read / Write / Construct Only

Signals

gboolean add-source Action
gboolean delete-source Action
gboolean edit-source Action
void enabled-toggled Run Last
gboolean get-editing-flags Action
void populate-add-popup Run Last
void selection-changed Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkWindow
                        ╰── EAccountsWindow

Implemented Interfaces

EAccountsWindow implements AtkImplementorIface, GtkBuildable and EExtensible.

Includes

#include <e-util/e-util.h>

Description

EAccountsWindow shows all configured accounts in evolution-data-server and allows also create new, modify or remove existing accounts as well. It's extensible through EExtension, thus it can be taught how to work with particular account types as well.

Functions

e_accounts_window_new ()

GtkWidget *
e_accounts_window_new (ESourceRegistry *registry);

Creates a new EAccountsWindow instance.

Parameters

registry

an ESourceRegistry

 

Returns

an EAccountsWindow as a GtkWidget.

[transfer full]

Since: 3.26


e_accounts_window_get_registry ()

ESourceRegistry *
e_accounts_window_get_registry (EAccountsWindow *accounts_window);

Returns the ESourceRegistry passed to e_accounts_window_new().

Parameters

accounts_window

an EAccountsWindow

 

Returns

an ESourceRegistry.

[transfer none]

Since: 3.26


e_accounts_window_show_with_parent ()

void
e_accounts_window_show_with_parent (EAccountsWindow *accounts_window,
                                    GtkWindow *parent);

Shows the accounts_window on top of the parent , if not NULL.

Parameters

accounts_window

an EAccountsWindow

 

parent

a GtkWindow, parent to show the accounts_window on top of, or NULL.

[nullable]

Since: 3.26


e_accounts_window_ref_selected_source ()

ESource *
e_accounts_window_ref_selected_source (EAccountsWindow *accounts_window);

Parameters

accounts_window

an EAccountsWindow

 

Returns

Referenced selected ESource, which should be unreffed with g_object_unref(), when no longer needed, or NULL, when there is no source selected.

[nullable][transfer full]

Since: 3.26


e_accounts_window_select_source ()

void
e_accounts_window_select_source (EAccountsWindow *accounts_window,
                                 const gchar *uid);

Selects an ESource with the given uid . If no such is available in time of this call, then it is remembered and selected once it appears. The function doesn't change selection, when uid is NULL, but it unsets remembered UID from any previous call.

Parameters

accounts_window

an EAccountsWindow

 

uid

an ESource UID to select.

[nullable]

Since: 3.28


e_accounts_window_insert_to_add_popup ()

void
e_accounts_window_insert_to_add_popup (EAccountsWindow *accounts_window,
                                       GtkMenuShell *popup_menu,
                                       const gchar *kind,
                                       const gchar *label,
                                       const gchar *icon_name);

Adds a new item into the popup_menu , which will be labeled with label . Items added this way are executed with EAccountsWindow::add-source signal.

Special case "-" can be used for the label to add a separator. In that case the kind and the icon_name parameters are ignored.

Parameters

accounts_window

an EAccountsWindow

 

popup_menu

a GtkMenuShell

 

kind

item kind, or NULL, when label is "-".

[nullable]

label

item label, possibly with a mnemonic

 

icon_name

optional icon name to use for the menu item, or NULL.

[nullable]

Since: 3.26


e_accounts_window_get_button_box ()

GtkButtonBox *
e_accounts_window_get_button_box (EAccountsWindow *accounts_window);

Parameters

accounts_window

an EAccountsWindow

 

Returns

the button box of the main page, where action buttons are stored. It can be used to add other actions to it.

[transfer none]

Since: 3.26


e_accounts_window_add_page ()

gint
e_accounts_window_add_page (EAccountsWindow *accounts_window,
                            GtkWidget *content);

Adds a new hidden page to the account window with content content . The returned integer is the index of the added page, which can be used with e_accounts_window_activate_page() to make that page active.

Parameters

accounts_window

an EAccountsWindow

 

content

a GtkWidget, the page content

 

Returns

index of the added page, or -1 on error.

Since: 3.26


e_accounts_window_activate_page ()

void
e_accounts_window_activate_page (EAccountsWindow *accounts_window,
                                 gint page_index);

Activates certain page in the accounts_window . The page_index should be the one returned by e_accounts_window_add_page(). Using value out of bounds selects the main page, which shows listing of configured accounts.

Parameters

accounts_window

an EAccountsWindow

 

page_index

an index of the page to activate

 

Since: 3.26

Types and Values

enum ESourceEditingFlags

Members

E_SOURCE_EDITING_FLAG_NONE

   

E_SOURCE_EDITING_FLAG_CAN_ENABLE

   

E_SOURCE_EDITING_FLAG_CAN_EDIT

   

E_SOURCE_EDITING_FLAG_CAN_DELETE

   

struct EAccountsWindow

struct EAccountsWindow;

Contains only private data that should be read and manipulated using the functions below.

Since: 3.26

Property Details

The “registry” property

  “registry”                 ESourceRegistry *

The ESourceRegistry manages ESource instances.

Owner: EAccountsWindow

Flags: Read / Write / Construct Only

Since: 3.26

Signal Details

The “add-source” signal

gboolean
user_function (EAccountsWindow *kind,
               char            *Returns,
               gpointer         user_data)

Emitted to add (create) a new ESource of the given kind. The extensions can listen to this signal and can step in and add the source with the appropriate editing dialog. Such extension also returns TRUE, to stop signal emission. If the extension cannot work with the given kind , then it returns FALSE.

Currently known kinds are "collection", "mail", "book", "calendar", "memo-list" and "task-list". Extensions can add their own kinds with e_accounts_window_insert_to_add_popup() from EAccountsWindow::populate-add-popup signal.

Parameters

kind

a UTF-8 string of the kind of source to create

 

user_data

user data set when the signal handler was connected.

 

Returns

Whether the signal had been handled by any extension.

Flags: Action

Since: 3.26


The “delete-source” signal

gboolean
user_function (EAccountsWindow *source,
               ESource         *Returns,
               gpointer         user_data)

Emitted to delete the given source . The extensions listen to this signal and the one which also set “get-edit-flags” for this source will remove the source. It also returns TRUE, to stop signal emission. If the extension cannot work with the given source , then it returns FALSE.

Parameters

source

an ESource

 

user_data

user data set when the signal handler was connected.

 

Returns

Whether the signal had been handled by any extension.

Flags: Action

Since: 3.26


The “edit-source” signal

gboolean
user_function (EAccountsWindow *source,
               ESource         *Returns,
               gpointer         user_data)

Emitted to edit the given source . The extensions listen to this signal and the one which also set “get-edit-flags” for this source will open appropriate editing dialog. It also returns TRUE, to stop signal emission. If the extension cannot work with the given source , then it returns FALSE.

Parameters

source

an ESource

 

user_data

user data set when the signal handler was connected.

 

Returns

Whether the signal had been handled by any extension.

Flags: Action

Since: 3.26


The “enabled-toggled” signal

void
user_function (EAccountsWindow *source,
               ESource         *arg1,
               gpointer         user_data)

Emitted after source -s enable property had been toggled in the tree view.

Parameters

source

an ESource

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.26


The “get-editing-flags” signal

gboolean
user_function (EAccountsWindow *source,
               ESource         *out_flags,
               gpointer         Returns,
               gpointer         user_data)

Emitted to get editing flags for the given source . The extensions listen to this signal and the one which can handle this source sets out_flags appropriately. It also returns TRUE, to stop signal emission. If the extension cannot work with the given source , then it simply returns FALSE.

Parameters

source

an ESource

 

out_flags

bit-or of ESourceEditingFlags.

[out]

user_data

user data set when the signal handler was connected.

 

Returns

Whether the signal had been handled by any extension.

Flags: Action

Since: 3.26


The “populate-add-popup” signal

void
user_function (EAccountsWindow *popup_menu,
               GtkMenuShell    *arg1,
               gpointer         user_data)

Emitted before Add popup is shown. It is already populated with default source types. The signal listener can use e_accounts_window_insert_to_add_popup() to add items to it.

Parameters

popup_menu

a GtkMenuShell, the popup menu

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.26


The “selection-changed” signal

void
user_function (EAccountsWindow *source,
               ESource         *arg1,
               gpointer         user_data)

Emitted after selection in the account tree view change. The source is the selected ESource, but can be NULL, when the selected row has no associated ESource, or nothing is selected.

Parameters

source

an ESource, or NULL.

[nullable]

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.26