Top | ![]() |
![]() |
![]() |
![]() |
const gchar *
e_shell_view_get_name (EShellView *shell_view
);
e_shell_view_get_name
is deprecated and should not be used in newly-written code.
Returns the view name for shell_view
, which is also the name of
the corresponding EShellBackend (see the name
field in EShellBackendInfo).
GtkAction *
e_shell_view_get_action (EShellView *shell_view
);
e_shell_view_get_action
is deprecated and should not be used in newly-written code.
Returns the switcher action for shell_view
.
An EShellWindow creates a GtkRadioAction for each registered subclass
of EShellView. This action gets passed to the EShellSwitcher, which
displays a button that proxies the action. The icon at the top of the
sidebar also proxies the action. When shell_view
is active, the
action's icon becomes the EShellWindow icon.
const gchar *
e_shell_view_get_title (EShellView *shell_view
);
e_shell_view_get_title
is deprecated and should not be used in newly-written code.
Returns the title for shell_view
. When shell_view
is active, the
shell view's title becomes the EShellWindow title.
void e_shell_view_set_title (EShellView *shell_view
,const gchar *title
);
e_shell_view_set_title
is deprecated and should not be used in newly-written code.
Sets the title for shell_view
. When shell_view
is active, the
shell view's title becomes the EShellWindow title.
const gchar *
e_shell_view_get_view_id (EShellView *shell_view
);
e_shell_view_get_view_id
is deprecated and should not be used in newly-written code.
Returns the ID of the currently selected GalView.
EShellView subclasses are responsible for keeping this property in sync with their GalViewInstance. EShellView itself just provides a place to store the view ID, and emits a “notify” signal when the property changes.
void e_shell_view_set_view_id (EShellView *shell_view
,const gchar *view_id
);
e_shell_view_set_view_id
is deprecated and should not be used in newly-written code.
Selects the GalView whose ID is equal to view_id
.
EShellView subclasses are responsible for keeping this property in sync with their GalViewInstance. EShellView itself just provides a place to store the view ID, and emits a “notify” signal when the property changes.
GalViewInstance * e_shell_view_new_view_instance (EShellView *shell_view
,const gchar *instance_id
);
e_shell_view_new_view_instance
is deprecated and should not be used in newly-written code.
Convenience function creates a new GalViewInstance from the
GalViewCollection in shell_view
's EShellViewClass.
GalViewInstance *
e_shell_view_get_view_instance (EShellView *shell_view
);
e_shell_view_get_view_instance
is deprecated and should not be used in newly-written code.
Returns the current GalViewInstance for shell_view
.
EShellView subclasses are responsible for creating and configuring a
GalViewInstance and handing it off so the shell_view
can monitor it
and perform common actions on it.
void e_shell_view_set_view_instance (EShellView *shell_view
,GalViewInstance *view_instance
);
e_shell_view_set_view_instance
is deprecated and should not be used in newly-written code.
Sets the current GalViewInstance for shell_view
.
EShellView subclasses are responsible for creating and configuring a
GalViewInstance and handing it off so the shell_view
can monitor it
and perform common actions on it.
gboolean
e_shell_view_is_active (EShellView *shell_view
);
e_shell_view_is_active
is deprecated and should not be used in newly-written code.
Returns TRUE
if shell_view
is active. That is, if it's currently
visible in its EShellWindow. An EShellWindow can only display one
shell view at a time.
Technically this just checks the “active” property of
the shell view's switcher action. See e_shell_view_get_action()
.
gint
e_shell_view_get_page_num (EShellView *shell_view
);
e_shell_view_get_page_num
is deprecated and should not be used in newly-written code.
This function is only interesting to EShellWindow. It returns the
GtkNotebook page number for shell_view
. The rest of the application
should have no need for this.
void e_shell_view_set_page_num (EShellView *shell_view
,gint page_num
);
e_shell_view_set_page_num
is deprecated and should not be used in newly-written code.
This function is only interesting to EShellWindow. It sets the
GtkNotebook page number for shell_view
. The rest of the application
must never call this because it could mess up shell view switching.
GtkWidget *
e_shell_view_get_searchbar (EShellView *shell_view
);
e_shell_view_get_searchbar
is deprecated and should not be used in newly-written code.
Returns the searchbar widget for shell_view
.
gchar *
e_shell_view_get_search_name (EShellView *shell_view
);
e_shell_view_get_search_name
is deprecated and should not be used in newly-written code.
Returns a newly-allocated string containing a suitable name for the
current search criteria. This is used as the suggested name in the
Save Search dialog. Free the returned string with g_free()
.
EFilterRule *
e_shell_view_get_search_rule (EShellView *shell_view
);
e_shell_view_get_search_rule
is deprecated and should not be used in newly-written code.
Returns the search criteria used to generate the current search results.
void e_shell_view_set_search_rule (EShellView *shell_view
,EFilterRule *search_rule
);
e_shell_view_set_search_rule
is deprecated and should not be used in newly-written code.
Sets the search criteria used to generate the current search results.
Note that this will not trigger a search. e_shell_view_execute_search()
must be called explicitly.
gchar *
e_shell_view_get_search_query (EShellView *shell_view
);
e_shell_view_get_search_query
is deprecated and should not be used in newly-written code.
Converts the “search-rule” property to a newly-allocated
S-expression string. If the “search-rule” property is NULL
the function returns NULL
.
GtkSizeGroup *
e_shell_view_get_size_group (EShellView *shell_view
);
e_shell_view_get_size_group
is deprecated and should not be used in newly-written code.
Returns a GtkSizeGroup that EShellContent and EShellSidebar use to keep the search bar and sidebar banner vertically aligned. The rest of the application should have no need for this.
Note, this is only available during EShellView construction.
EShellBackend *
e_shell_view_get_shell_backend (EShellView *shell_view
);
e_shell_view_get_shell_backend
is deprecated and should not be used in newly-written code.
Returns the corresponding EShellBackend for shell_view
.
EShellContent *
e_shell_view_get_shell_content (EShellView *shell_view
);
e_shell_view_get_shell_content
is deprecated and should not be used in newly-written code.
Returns the EShellContent instance for shell_view
.
By default, EShellView creates a plain EShellContent during
initialization. But EShellView subclasses can override the
new_shell_content
factory method
in EShellViewClass to create a custom EShellContent.
EShellSidebar *
e_shell_view_get_shell_sidebar (EShellView *shell_view
);
e_shell_view_get_shell_sidebar
is deprecated and should not be used in newly-written code.
Returns the EShellSidebar instance for shell_view
.
By default, EShellView creates a plain EShellSidebar during
initialization. But EShellView subclasses can override the
new_shell_sidebar
factory method
in EShellViewClass to create a custom EShellSidebar.
EShellTaskbar *
e_shell_view_get_shell_taskbar (EShellView *shell_view
);
e_shell_view_get_shell_taskbar
is deprecated and should not be used in newly-written code.
Returns the EShellTaskbar instance for shell_view
.
By default, EShellView creates a plain EShellTaskbar during
initialization. But EShellView subclasses can override the
new_shell_taskbar
factory method
in EShellViewClass to create a custom EShellTaskbar.
EShellWindow *
e_shell_view_get_shell_window (EShellView *shell_view
);
e_shell_view_get_shell_window
is deprecated and should not be used in newly-written code.
Returns the EShellWindow to which shell_view
belongs.
GKeyFile *
e_shell_view_get_state_key_file (EShellView *shell_view
);
e_shell_view_get_state_key_file
is deprecated and should not be used in newly-written code.
Returns the GKeyFile holding widget state data for shell_view
.
void
e_shell_view_set_state_dirty (EShellView *shell_view
);
e_shell_view_set_state_dirty
is deprecated and should not be used in newly-written code.
Marks the widget state data as modified (or "dirty") and schedules it to be saved to disk after a short delay. The delay caps the frequency of saving to disk.
void
e_shell_view_clear_search (EShellView *shell_view
);
e_shell_view_clear_search
is deprecated and should not be used in newly-written code.
Emits the “clear-search” signal.
The default method sets the “search-rule” property to
NULL
and then emits the “execute-search” signal.
void e_shell_view_custom_search (EShellView *shell_view
,EFilterRule *custom_rule
);
e_shell_view_custom_search
is deprecated and should not be used in newly-written code.
Emits the “custom-search” signal to indicate an advanced or saved search is about to be executed.
The default method sets the “search-rule” property to
custom_rule
and then emits the “execute-search” signal.
void
e_shell_view_execute_search (EShellView *shell_view
);
e_shell_view_execute_search
is deprecated and should not be used in newly-written code.
Emits the “execute-search” signal.
EShellView subclasses should implement the
execute_search
method in EShellViewClass
to execute a search based on the current search conditions.
void
e_shell_view_block_execute_search (EShellView *shell_view
);
e_shell_view_block_execute_search
is deprecated and should not be used in newly-written code.
Blocks e_shell_view_execute_search()
in a way it does nothing.
Pair function for this is e_shell_view_unblock_execute_search()
.
void
e_shell_view_unblock_execute_search (EShellView *shell_view
);
e_shell_view_unblock_execute_search
is deprecated and should not be used in newly-written code.
Unblocks previously blocked e_shell_view_execute_search()
with
function e_shell_view_block_execute_search()
.
gboolean
e_shell_view_is_execute_search_blocked
(EShellView *shell_view
);
e_shell_view_is_execute_search_blocked
is deprecated and should not be used in newly-written code.
Returns whether e_shell_view_execute_search()
is blocked as a result
of previous e_shell_view_block_execute_search()
calls.
void
e_shell_view_update_actions (EShellView *shell_view
);
e_shell_view_update_actions
is deprecated and should not be used in newly-written code.
Emits the “update-actions” signal.
EShellView subclasses should implement the
update_actions
method in EShellViewClass
to update the various GtkActions based on the current
EShellSidebar and EShellContent selections. The
“update-actions” signal is typically emitted just before
showing a popup menu or just after the user selects an item in the
shell view.
void
e_shell_view_update_actions_in_idle (EShellView *shell_view
);
e_shell_view_update_actions_in_idle
is deprecated and should not be used in newly-written code.
Schedules e_shell_view_update_actions()
call on idle.
Since: 3.10
GtkWidget * e_shell_view_show_popup_menu (EShellView *shell_view
,const gchar *widget_path
,GdkEvent *button_event
);
e_shell_view_show_popup_menu
is deprecated and should not be used in newly-written code.
Displays a context-sensitive (or "popup") menu that is described in
the UI definition loaded into shell_view
's user interface
manager. The menu will be shown at the current mouse cursor position.
The “update-actions” signal is emitted just prior to
showing the menu to give shell_view
and any plugins that extend
shell_view
a chance to update the menu's actions.
shell_view |
an EShellView |
|
widget_path |
path in the UI definition |
|
button_event |
a GdkEvent, or |
void e_shell_view_write_source (EShellView *shell_view
,ESource *source
);
e_shell_view_write_source
is deprecated and should not be used in newly-written code.
Submits the current contents of source
to the D-Bus service to be
written to disk and broadcast to other clients.
This function does not block: shell_view
will dispatch the operation
asynchronously and handle any errors.
void e_shell_view_remove_source (EShellView *shell_view
,ESource *source
);
e_shell_view_remove_source
is deprecated and should not be used in newly-written code.
Requests the D-Bus service to delete the key files for source
and all of
its descendants and broadcast their removal to all clients.
This function does not block: shell_view
will dispatch the operation
asynchronously and handle any errors.
void e_shell_view_remote_delete_source (EShellView *shell_view
,ESource *source
);
e_shell_view_remote_delete_source
is deprecated and should not be used in newly-written code.
Deletes the resource represented by source
from a remote server.
The source
must be “remote-deletable”. This will also delete
the key file for source
and broadcast its removal to all clients,
similar to e_shell_view_remove_source()
.
This function does not block; shell_view
will dispatch the operation
asynchronously and handle any errors.
EActivity * e_shell_view_submit_thread_job (EShellView *shell_view
,const gchar *description
,const gchar *alert_ident
,const gchar *alert_arg_0
,EAlertSinkThreadJobFunc func
,gpointer user_data
,GDestroyNotify free_user_data
);
e_shell_view_submit_thread_job
is deprecated and should not be used in newly-written code.
Runs the func
in a dedicated thread. Any error is propagated to UI.
The cancellable passed into the func
is a CamelOperation, thus
the caller can overwrite progress and description message on it.
shell_view |
an EShellView instance |
|
description |
user-friendly description of the job, to be shown in UI |
|
alert_ident |
in case of an error, this alert identificator is used for EAlert construction |
|
alert_arg_0 |
in case of an error, use this string as the first argument to the EAlert construction; the second argument is the actual error message; can be NULL, in which case only the error message is passed to the EAlert construction. |
[allow-none] |
func |
function to be run in a dedicated thread |
|
user_data |
custom data passed into |
[allow-none] |
free_user_data |
function to be called on |
[allow-none] |
struct EShellView { GObject parent; EShellViewPrivate *priv; };
EShellView
is deprecated and should not be used in newly-written code.
Contains only private data that should be read and manipulated using the functions below.
struct EShellViewClass { GObjectClass parent_class; /* Initial switcher action values. */ const gchar *label; const gchar *icon_name; /* Base name of the UI definition file. */ const gchar *ui_definition; /* GtkUIManager identifier for use with EPluginUI. * Usually "org.gnome.evolution.$(VIEW_NAME)". */ const gchar *ui_manager_id; /* Search context. Subclasses may override the type. * A unique instance is created for each subclass. */ GType search_context_type; ERuleContext *search_context; /* Widget path to the search options popup menu. */ const gchar *search_options; /* Base name of the search rule definition file. */ const gchar *search_rules; /* A unique instance is created for each subclass. */ GalViewCollection *view_collection; /* This is set by the corresponding EShellBackend. */ EShellBackend *shell_backend; /* Factory Methods */ GtkWidget * (*new_shell_content) (EShellView *shell_view); GtkWidget * (*new_shell_sidebar) (EShellView *shell_view); GtkWidget * (*new_shell_taskbar) (EShellView *shell_view); GtkWidget * (*new_shell_searchbar) (EShellView *shell_view); /* Create, configure and pack a search bar widget. */ GtkWidget * (*construct_searchbar) (EShellView *shell_view); gchar * (*get_search_name) (EShellView *shell_view); /* Signals */ void (*toggled) (EShellView *shell_view); void (*clear_search) (EShellView *shell_view); void (*custom_search) (EShellView *shell_view, EFilterRule *custom_rule); void (*execute_search) (EShellView *shell_view); void (*update_actions) (EShellView *shell_view); };
EShellViewClass
is deprecated and should not be used in newly-written code.
EShellViewClass contains a number of important settings for subclasses.
The initial value for the switcher action's
“label” property. See
|
||
The initial value for the switcher action's
“icon-name” property. See
|
||
Base name of the UI definintion file to add when the shell view is activated. |
||
The GtkUIManager ID for EPluginUI. Plugins should use to this ID in their "eplug" files to add menu and toolbar items to the shell view. |
||
GType of the search context, which should be an instance of ERuleContextClass or a custom subclass. |
||
A unique |
||
Widget path in the UI definition to the search options popup menu. The menu gets shown when the user clicks the "find" icon in the search entry. |
||
Base name of the XML file containing predefined
search rules for this shell view. The XML files
are usually named something like |
||
A unique GalViewCollection instance is created for each subclass and shared across all instances of that subclass. That much is done automatically for subclasses, but subclasses are still responsible for adding the appropriate GalView factories to the view collection. |
||
EShellBackend * |
The corresponding EShellBackend for the shell view. |
|
Factory method for the shell view's EShellContent.
See |
||
Factory method for the shell view's EShellSidebar.
See |
||
Factory method for the shell view's EShellTaskbar.
See |
||
Factory method for the shell view's EShellSearchbar.
See |
||
Class method to create, configure and pack a search bar widget. The search bar differs in normal shell mode versus "express" mode. |
||
Class method to obtain a suitable name for the current search criteria. Subclasses should rarely need to override the default behavior. |
||
Class method for the “toggled” signal. Subclasses should rarely need to override the default behavior. |
||
Class method for the “clear-search”
signal. The default method sets the
“search-rule” to |
||
Class method for the “custom-search” signal. This is emitted prior to executing an advanced or saved search. The default method sets the “search-rule” property and then emits the “execute-search” signal. |
||
Class method for the “execute-search” signal. There is no default behavior; subclasses should override this. |
||
Class method for the “update-actions” signal. There is no default behavior; subclasses should override this. |