| Evolution Shell Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
#include <shell/e-shell-window.h>
EShellWindow;
GtkWidget * e_shell_window_new (EShell *shell,
gboolean safe_mode);
EShell * e_shell_window_get_shell (EShellWindow *shell_window);
struct _EShellView * e_shell_window_get_shell_view (EShellWindow *shell_window,
const gchar *view_name);
GtkUIManager * e_shell_window_get_ui_manager (EShellWindow *shell_window);
GtkAction * e_shell_window_get_action (EShellWindow *shell_window,
const gchar *action_name);
GtkActionGroup * e_shell_window_get_action_group (EShellWindow *shell_window,
const gchar *group_name);
GtkWidget * e_shell_window_get_managed_widget (EShellWindow *shell_window,
const gchar *widget_path);
const gchar * e_shell_window_get_active_view (EShellWindow *shell_window);
void e_shell_window_set_active_view (EShellWindow *shell_window,
const gchar *view_name);
gboolean e_shell_window_get_safe_mode (EShellWindow *shell_window);
void e_shell_window_set_safe_mode (EShellWindow *shell_window,
gboolean safe_mode);
void e_shell_window_register_new_item_actions
(EShellWindow *shell_window,
const gchar *module_name,
const GtkActionEntry *entries,
guint n_entries);
void e_shell_window_register_new_source_actions
(EShellWindow *shell_window,
const gchar *module_name,
const GtkActionEntry *entries,
guint n_entries);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----EShellWindow
"active-view" gchar* : Read / Write "safe-mode" gboolean : Read / Write / Construct "shell" EShell* : Read / Write / Construct Only
typedef struct _EShellWindow EShellWindow;
Contains only private data that should be read and manipulated using the functions below.
GtkWidget * e_shell_window_new (EShell *shell, gboolean safe_mode);
Returns a new EShellWindow.
It's up to the various EShellView's to define exactly what "safe mode" means, but the EShell usually puts the initial EShellWindow into "safe mode" if detects the previous Evolution session crashed.
The initial view for the window is determined by GConf key
/apps/evolution/shell/view_defaults/component_id.
Or, if the GConf key is not set or can't be read, the first view
in the switcher is used.
|
an EShell |
|
whether to initialize the window to "safe mode" |
Returns : |
a new EShellWindow |
EShell * e_shell_window_get_shell (EShellWindow *shell_window);
Returns the EShell that was passed to e_shell_window_new().
|
an EShellWindow |
Returns : |
the EShell |
struct _EShellView * e_shell_window_get_shell_view (EShellWindow *shell_window, const gchar *view_name);
Returns the EShellView named view_name (see the
name field in EShellModuleInfo). This
will also instantiate the EShellView the first time it's requested.
To reduce resource consumption, Evolution tries to delay instantiating
shell views until the user switches to them. So in general, only the
active view name, as returned by e_shell_window_get_active_view(),
should be requested.
|
an EShellWindow |
|
name of a shell view |
Returns : |
the requested EShellView, or NULL if no such view is
registered
|
GtkUIManager * e_shell_window_get_ui_manager (EShellWindow *shell_window);
Returns shell_window's user interface manager, which
manages the window's menus and toolbars via GtkActions.
This is the mechanism by which shell views and plugins can extend
Evolution's menus and toolbars.
|
an EShellWindow |
Returns : |
the GtkUIManager for shell_window
|
GtkAction * e_shell_window_get_action (EShellWindow *shell_window, const gchar *action_name);
Returns the GtkAction named action_name in shell_window's
user interface manager, or NULL if no such action exists.
|
an EShellWindow |
|
the name of an action |
Returns : |
the GtkAction named action_name
|
GtkActionGroup * e_shell_window_get_action_group (EShellWindow *shell_window, const gchar *group_name);
Returns the GtkActionGroup named group_name in
shell_window's user interface manager, or NULL if no
such action group exists.
|
an EShellWindow |
|
the name of an action group |
Returns : |
the GtkActionGroup named group_name
|
GtkWidget * e_shell_window_get_managed_widget (EShellWindow *shell_window, const gchar *widget_path);
Looks up a widget in shell_window's user interface manager by
following a path. See gtk_ui_manager_get_widget() for more information
about paths.
|
an EShellWindow |
|
path in the UI definintion |
Returns : |
the widget found by following the path, or NULL if no widget
was found
|
const gchar * e_shell_window_get_active_view (EShellWindow *shell_window);
Returns the name of the active EShellView.
|
an EShellWindow |
Returns : |
the name of the active view |
void e_shell_window_set_active_view (EShellWindow *shell_window, const gchar *view_name);
Switches shell_window to the EShellView named view_name, causing
the entire content of shell_window to change. This is typically
called as a result of the user clicking one of the switcher buttons.
The name of the newly activated shell view is also written to GConf key
/apps/evolution/shell/view_defaults/component_id.
This makes the active shell view persistent across Evolution sessions.
It also causes new shell windows created within the current Evolution
session to open to the most recently selected shell view.
|
an EShellWindow |
|
the name of the shell view to switch to |
gboolean e_shell_window_get_safe_mode (EShellWindow *shell_window);
Returns TRUE if shell_window is in "safe mode".
It's up to the various EShellView's to define exactly
what "safe mode" means. The shell_window simply manages the
"safe mode" state.
|
an EShellWindow |
Returns : |
TRUE if shell_window is in "safe mode"
|
void e_shell_window_set_safe_mode (EShellWindow *shell_window, gboolean safe_mode);
If TRUE, puts shell_window into "safe mode".
It's up to the various EShellView's to define exactly
what "safe mode" means. The shell_window simply manages the
"safe mode" state.
|
an EShellWindow |
|
whether to put shell_window into "safe mode"
|
void e_shell_window_register_new_item_actions
(EShellWindow *shell_window,
const gchar *module_name,
const GtkActionEntry *entries,
guint n_entries);
Registers a list of GtkActions to appear in
shell_window's "New" menu and toolbar button. This
function should be called from an EShellModule's
"window-created" signal handler. The EShellModule calling
this function should pass its own name for the module_name argument
(i.e. the name field from its own
EShellModuleInfo).
The registered GtkActions should be for creating individual items such as an email message or a calendar appointment.
|
an EShellWindow |
|
name of an EShellModule |
|
an array of GtkActionEntrys |
|
number of elements in the array |
void e_shell_window_register_new_source_actions
(EShellWindow *shell_window,
const gchar *module_name,
const GtkActionEntry *entries,
guint n_entries);
Registers a list of GtkActions to appear in
shell_window's "New" menu and toolbar button. This
function should be called from an EShellModule's
"window-created" signal handler. The EShellModule calling
this function should pass its own name for the module_name argument
(i.e. the name field from its own
EShellModuleInfo).
The registered GtkActions should be for creating item containers such as an email folder or a calendar.
|
an EShellWindow |
|
name of an EShellModule |
|
an array of GtkActionEntrys |
|
number of elements in the array |
"active-view" property"active-view" gchar* : Read / Write
Name of the active EShellView.
Default value: NULL
"safe-mode" property"safe-mode" gboolean : Read / Write / Construct
Whether the shell window is in safe mode.
Default value: FALSE