diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-02 02:58:37 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-02 02:58:37 +0800 |
commit | e52986f4225cbe8496043da74ca250521d244705 (patch) | |
tree | b77ea07323e7ae339410012e672e643c1502eb91 /shell | |
parent | c6795be3a8b7b17ced9e99e17db9ac6cbed6e018 (diff) | |
download | gsoc2013-evolution-e52986f4225cbe8496043da74ca250521d244705.tar.gz gsoc2013-evolution-e52986f4225cbe8496043da74ca250521d244705.tar.zst gsoc2013-evolution-e52986f4225cbe8496043da74ca250521d244705.zip |
Add more EShell API documentation.
svn path=/branches/kill-bonobo/; revision=36533
Diffstat (limited to 'shell')
-rw-r--r-- | shell/e-shell-sidebar.c | 76 | ||||
-rw-r--r-- | shell/e-shell-taskbar.c | 52 | ||||
-rw-r--r-- | shell/e-shell-view.c | 252 | ||||
-rw-r--r-- | shell/e-shell-view.h | 46 | ||||
-rw-r--r-- | shell/test/e-test-shell-view.c | 4 |
5 files changed, 411 insertions, 19 deletions
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c index 6694eacd96..db77ceb168 100644 --- a/shell/e-shell-sidebar.c +++ b/shell/e-shell-sidebar.c @@ -331,6 +331,11 @@ shell_sidebar_class_init (EShellSidebarClass *class) container_class->remove = shell_sidebar_remove; container_class->forall = shell_sidebar_forall; + /** + * EShellTaskbar:primary-text + * + * The primary text is displayed in bold at the top of the sidebar. + **/ g_object_class_install_property ( object_class, PROP_PRIMARY_TEXT, @@ -341,6 +346,12 @@ shell_sidebar_class_init (EShellSidebarClass *class) NULL, G_PARAM_READWRITE)); + /** + * EShellTaskbar:secondary-text + * + * The secondary text is displayed in a smaller font at the top of + * the sidebar. + **/ g_object_class_install_property ( object_class, PROP_SECONDARY_TEXT, @@ -351,6 +362,11 @@ shell_sidebar_class_init (EShellSidebarClass *class) NULL, G_PARAM_READWRITE)); + /** + * EShellSidebar:shell-view + * + * The #EShellView to which the sidebar widget belongs. + **/ g_object_class_install_property ( object_class, PROP_SHELL_VIEW, @@ -411,6 +427,12 @@ e_shell_sidebar_get_type (void) return type; } +/** + * e_shell_sidebar_new: + * @shell_view: an #EShellView + * + * Creates a new #EShellSidebar instance belonging to @shell_view. + **/ GtkWidget * e_shell_sidebar_new (EShellView *shell_view) { @@ -421,6 +443,14 @@ e_shell_sidebar_new (EShellView *shell_view) "shell-view", shell_view, NULL); } +/** + * e_shell_sidebar_get_shell_view: + * @shell_sidebar: an #EShellSidebar + * + * Returns the #EShellView that was passed to e_shell_sidebar_new(). + * + * Returns: the #EShellView to which @shell_sidebar belongs + **/ EShellView * e_shell_sidebar_get_shell_view (EShellSidebar *shell_sidebar) { @@ -429,6 +459,18 @@ e_shell_sidebar_get_shell_view (EShellSidebar *shell_sidebar) return E_SHELL_VIEW (shell_sidebar->priv->shell_view); } +/** + * e_shell_sidebar_get_primary_text: + * @shell_sidebar: an #EShellSidebar + * + * Returns the primary text for @shell_sidebar. + * + * The primary text is displayed in bold at the top of the sidebar. It + * defaults to the shell view's label (as seen on the switcher button), + * but typically shows the name of the selected item in the sidebar. + * + * Returns: the primary text for @shell_sidebar + **/ const gchar * e_shell_sidebar_get_primary_text (EShellSidebar *shell_sidebar) { @@ -437,6 +479,16 @@ e_shell_sidebar_get_primary_text (EShellSidebar *shell_sidebar) return shell_sidebar->priv->primary_text; } +/** + * e_shell_sidebar_set_primary_text: + * @shell_sidebar: an #EShellSidebar + * + * Sets the primary text for @shell_sidebar. + * + * The primary text is displayed in bold at the top of the sidebar. It + * defaults to the shell view's label (as seen on the switcher button), + * but typically shows the name of the selected item in the sidebar. + **/ void e_shell_sidebar_set_primary_text (EShellSidebar *shell_sidebar, const gchar *primary_text) @@ -461,6 +513,19 @@ e_shell_sidebar_set_primary_text (EShellSidebar *shell_sidebar, g_object_notify (G_OBJECT (shell_sidebar), "primary-text"); } +/** + * e_shell_sidebar_get_secondary_text: + * @shell_sidebar: an #EShellSidebar + * + * Returns the secondary text for @shell_sidebar. + * + * The secondary text is displayed in a smaller font at the top of the + * sidebar. It typically shows information about the contents of the + * selected sidebar item, such as total number of items, number of + * selected items, etc. + * + * Returns: the secondary text for @shell_sidebar + **/ const gchar * e_shell_sidebar_get_secondary_text (EShellSidebar *shell_sidebar) { @@ -469,6 +534,17 @@ e_shell_sidebar_get_secondary_text (EShellSidebar *shell_sidebar) return shell_sidebar->priv->secondary_text; } +/** + * e_shell_sidebar_set_secondary_text: + * @shell_sidebar: an #EShellSidebar + * + * Sets the secondary text for @shell_sidebar. + * + * The secondary text is displayed in a smaller font at the top of the + * sidebar. It typically shows information about the contents of the + * selected sidebar item, such as total number of items, number of + * selected items, etc. + **/ void e_shell_sidebar_set_secondary_text (EShellSidebar *shell_sidebar, const gchar *secondary_text) diff --git a/shell/e-shell-taskbar.c b/shell/e-shell-taskbar.c index 24ce2c9994..3f66a89132 100644 --- a/shell/e-shell-taskbar.c +++ b/shell/e-shell-taskbar.c @@ -225,6 +225,11 @@ shell_taskbar_class_init (EShellTaskbarClass *class) object_class->finalize = shell_taskbar_finalize; object_class->constructed = shell_taskbar_constructed; + /** + * EShellTaskbar:message + * + * The message to display in the taskbar. + **/ g_object_class_install_property ( object_class, PROP_MESSAGE, @@ -236,6 +241,11 @@ shell_taskbar_class_init (EShellTaskbarClass *class) G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + /** + * EShellTaskbar:shell-view + * + * The #EShellView to which the taskbar widget belongs. + **/ g_object_class_install_property ( object_class, PROP_SHELL_VIEW, @@ -311,6 +321,14 @@ e_shell_taskbar_get_type (void) return type; } +/** + * e_shell_taskbar_new: + * @shell_view: an #EShellView + * + * Creates a new #EShellTaskbar instance belonging to @shell_view. + * + * Returns: a new #EShellTaskbar instance + **/ GtkWidget * e_shell_taskbar_new (EShellView *shell_view) { @@ -320,6 +338,14 @@ e_shell_taskbar_new (EShellView *shell_view) E_TYPE_SHELL_TASKBAR, "shell-view", shell_view, NULL); } +/** + * e_shell_taskbar_get_shell_view: + * @shell_taskbar: an #EShellTaskbar + * + * Returns the #EShellView that was passed to e_shell_taskbar_new(). + * + * Returns: the #EShellView to which @shell_taskbar belongs + **/ EShellView * e_shell_taskbar_get_shell_view (EShellTaskbar *shell_taskbar) { @@ -328,6 +354,16 @@ e_shell_taskbar_get_shell_view (EShellTaskbar *shell_taskbar) return shell_taskbar->priv->shell_view; } +/** + * e_shell_taskbar_get_message: + * @shell_taskbar: an #EShellTaskbar + * + * Returns the message currently shown in the taskbar, or an empty string + * if no message is shown. Taskbar messages are used primarily for menu + * tooltips. + * + * Returns: the current taskbar message + **/ const gchar * e_shell_taskbar_get_message (EShellTaskbar *shell_taskbar) { @@ -340,6 +376,15 @@ e_shell_taskbar_get_message (EShellTaskbar *shell_taskbar) return gtk_label_get_text (GTK_LABEL (label)); } +/** + * e_shell_taskbar_set_message: + * @shell_taskbar: an #EShellTaskbar + * @message: the message to show + * + * Shows a message in the taskbar. If @message is %NULL or an empty string, + * the taskbar message is cleared. Taskbar messages are used primarily for + * menu tooltips. + **/ void e_shell_taskbar_set_message (EShellTaskbar *shell_taskbar, const gchar *message) @@ -359,6 +404,13 @@ e_shell_taskbar_set_message (EShellTaskbar *shell_taskbar, g_object_notify (G_OBJECT (shell_taskbar), "message"); } +/** + * e_shell_taskbar_unset_message: + * @shell_taskbar: an #EShellTaskbar + * + * This is equivalent to passing a %NULL message to + * e_shell_taskbar_set_message(). + **/ void e_shell_taskbar_unset_message (EShellTaskbar *shell_taskbar) { diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 9273376f2d..a10fb635cb 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -374,6 +374,11 @@ shell_view_class_init (EShellViewClass *class) class->toggled = shell_view_toggled; + /** + * EShellView:action: + * + * The #GtkRadioAction registered with #EShellSwitcher. + **/ g_object_class_install_property ( object_class, PROP_ACTION, @@ -385,6 +390,11 @@ shell_view_class_init (EShellViewClass *class) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + /** + * EShellView:page-num + * + * The #GtkNotebook page number of the shell view. + **/ g_object_class_install_property ( object_class, PROP_PAGE_NUM, @@ -398,6 +408,12 @@ shell_view_class_init (EShellViewClass *class) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + /** + * EShellView:title + * + * The title of the shell view. Also serves as the #EShellWindow + * title when the shell view is active. + **/ g_object_class_install_property ( object_class, PROP_TITLE, @@ -408,6 +424,12 @@ shell_view_class_init (EShellViewClass *class) NULL, G_PARAM_READWRITE)); + /** + * EShellView:shell-content + * + * The content widget appears in an #EShellWindow<!-- -->'s + * right pane. + **/ g_object_class_install_property ( object_class, PROP_SHELL_CONTENT, @@ -419,6 +441,12 @@ shell_view_class_init (EShellViewClass *class) E_TYPE_SHELL_CONTENT, G_PARAM_READABLE)); + /** + * EShellView:shell-sidebar + * + * The sidebar widget appears in an #EShellWindow<!-- -->'s + * left pane. + **/ g_object_class_install_property ( object_class, PROP_SHELL_SIDEBAR, @@ -430,6 +458,11 @@ shell_view_class_init (EShellViewClass *class) E_TYPE_SHELL_SIDEBAR, G_PARAM_READABLE)); + /** + * EShellView:shell-taskbar + * + * The taskbar widget appears at the bottom of an #EShellWindow. + **/ g_object_class_install_property ( object_class, PROP_SHELL_TASKBAR, @@ -441,6 +474,11 @@ shell_view_class_init (EShellViewClass *class) E_TYPE_SHELL_TASKBAR, G_PARAM_READABLE)); + /** + * EShellView:shell-window + * + * The #EShellWindow to which the shell view belongs. + **/ g_object_class_install_property ( object_class, PROP_SHELL_WINDOW, @@ -452,6 +490,11 @@ shell_view_class_init (EShellViewClass *class) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + /** + * EShellView:view-id + * + * The current #GalView ID. + **/ g_object_class_install_property ( object_class, PROP_VIEW_ID, @@ -462,6 +505,20 @@ shell_view_class_init (EShellViewClass *class) NULL, G_PARAM_READWRITE)); + /** + * EShellView::toggled + * @shell_view: the #EShellView which emitted the signal + * + * Emitted when @shell_view is activated or deactivated. + * Use e_shell_view_is_active() to find out which event has + * occurred. The shell view being deactivated is always + * notified before the shell view being activated. + * + * By default, #EShellView adds the UI definition file + * given in the <structfield>ui_definition</structfield> + * field of #EShellViewClass on activation, and removes the + * UI definition on deactivation. + **/ signals[TOGGLED] = g_signal_new ( "toggled", G_OBJECT_CLASS_TYPE (object_class), @@ -471,6 +528,18 @@ shell_view_class_init (EShellViewClass *class) g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + /** + * EShellView::update-actions + * @shell_view: the #EShellView which emitted the signal + * + * #EShellView subclasses should override the + * <structfield>update_actions</structfield> method in + * #EShellViewClass to update sensitivities, labels, or any + * other aspect of the #GtkAction<!-- -->s they have registered. + * + * Plugins can also connect to this signal to be notified + * when to update their own #GtkAction<!-- -->s. + **/ signals[UPDATE_ACTIONS] = g_signal_new ( "update-actions", G_OBJECT_CLASS_TYPE (object_class), @@ -523,6 +592,16 @@ e_shell_view_get_type (void) return type; } +/** + * e_shell_view_get_name: + * @shell_view: an #EShellView + * + * Returns the view name for @shell_view, which is also the name of + * the corresponding #EShellModule (see the <structfield>name</structfield> + * field in #EShellModuleInfo). + * + * Returns: the view name for @shell_view + **/ const gchar * e_shell_view_get_name (EShellView *shell_view) { @@ -537,6 +616,20 @@ e_shell_view_get_name (EShellView *shell_view) return g_object_get_data (G_OBJECT (action), "view-name"); } +/** + * e_shell_view_get_action: + * @shell_view: an #EShellView + * + * Returns the switcher action for @shell_view. + * + * An #EShellWindow creates a #GtkRadioAction for each #EShellView class + * it instantiates. 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. + * + * Returns: the switcher action for @shell_view + **/ GtkAction * e_shell_view_get_action (EShellView *shell_view) { @@ -545,6 +638,15 @@ e_shell_view_get_action (EShellView *shell_view) return shell_view->priv->action; } +/** + * e_shell_view_get_title: + * @shell_view: an #EShellView + * + * Returns the title for @shell_view. When @shell_view is active, the + * shell view's title becomes the #EShellWindow title. + * + * Returns: the title for @shell_view + **/ const gchar * e_shell_view_get_title (EShellView *shell_view) { @@ -553,6 +655,14 @@ e_shell_view_get_title (EShellView *shell_view) return shell_view->priv->title; } +/** + * e_shell_view_set_title: + * @shell_view: an #EShellView + * @title: a title for @shell_view + * + * Sets 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) @@ -571,6 +681,19 @@ e_shell_view_set_title (EShellView *shell_view, g_object_notify (G_OBJECT (shell_view), "title"); } +/** + * e_shell_view_get_view_id: + * @shell_view: an #EShellView + * + * 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 #GObject::notify signal + * when the property changes. + * + * Returns: the ID of the current #GalView + **/ const gchar * e_shell_view_get_view_id (EShellView *shell_view) { @@ -579,6 +702,18 @@ e_shell_view_get_view_id (EShellView *shell_view) return shell_view->priv->view_id; } +/** + * e_shell_view_set_view_id: + * @shell_view: an #EShellView + * @view_id: a #GalView ID + * + * 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 #GObject::notify signal + * when the property changes. + **/ void e_shell_view_set_view_id (EShellView *shell_view, const gchar *view_id) @@ -594,6 +729,14 @@ e_shell_view_set_view_id (EShellView *shell_view, g_object_notify (G_OBJECT (shell_view), "view-id"); } +/** + * e_shell_view_get_shell_window: + * @shell_view: an #EShellView + * + * Returns the #EShellWindow to which @shell_view belongs. + * + * Returns: the #EShellWindow to which @shell_view belongs + **/ EShellWindow * e_shell_view_get_shell_window (EShellView *shell_view) { @@ -602,6 +745,14 @@ e_shell_view_get_shell_window (EShellView *shell_view) return E_SHELL_WINDOW (shell_view->priv->shell_window); } +/** + * e_shell_view_get_shell_module: + * @shell_view: an #EShellView + * + * Returns the corresponding #EShellModule for @shell_view. + * + * Returns: the corresponding #EShellModule for @shell_view + **/ EShellModule * e_shell_view_get_shell_module (EShellView *shell_view) { @@ -611,13 +762,26 @@ e_shell_view_get_shell_module (EShellView *shell_view) /* Calling this function during the shell view's instance * initialization function will return the wrong result, - * so catch that and emit a warning. */ + * so watch for that and emit a warning. */ shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view); g_return_val_if_fail (E_IS_SHELL_VIEW_CLASS (shell_view_class), NULL); return E_SHELL_MODULE (shell_view_class->type_module); } +/** + * e_shell_view_is_active: + * @shell_view: an #EShellView + * + * 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 #GtkToggleAction:active property of + * the shell view's switcher action. See e_shell_view_get_action(). + * + * Returns: %TRUE if @shell_view is active + **/ gboolean e_shell_view_is_active (EShellView *shell_view) { @@ -630,19 +794,16 @@ e_shell_view_is_active (EShellView *shell_view) return gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); } -void -e_shell_view_add_activity (EShellView *shell_view, - EActivity *activity) -{ - EShellModule *shell_module; - - g_return_if_fail (E_IS_SHELL_VIEW (shell_view)); - g_return_if_fail (E_IS_ACTIVITY (activity)); - - shell_module = e_shell_view_get_shell_module (shell_view); - e_shell_module_add_activity (shell_module, activity); -} - +/** + * e_shell_view_get_page_num: + * @shell_view: an #EShellView + * + * 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. + * + * Returns: the notebook page number for @shell_view + **/ gint e_shell_view_get_page_num (EShellView *shell_view) { @@ -651,6 +812,16 @@ e_shell_view_get_page_num (EShellView *shell_view) return shell_view->priv->page_num; } +/** + * e_shell_view_get_size_group: + * @shell_view: an #EShellView + * + * 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. + * + * Returns: a #GtkSizeGroup for internal use + **/ GtkSizeGroup * e_shell_view_get_size_group (EShellView *shell_view) { @@ -659,6 +830,19 @@ e_shell_view_get_size_group (EShellView *shell_view) return shell_view->priv->size_group; } +/** + * e_shell_view_get_shell_content: + * @shell_view: an #EShellView + * + * Returns the #EShellContent instance for @shell_view. + * + * By default, #EShellView creates a plain #EShellContent during + * initialization. But #EShellView subclasses can override the + * <structfield>new_shell_content</structfield> factory method + * in #EShellViewClass to create a custom #EShellContent. + * + * Returns: the #EShellContent instance for @shell_view + **/ EShellContent * e_shell_view_get_shell_content (EShellView *shell_view) { @@ -667,6 +851,19 @@ e_shell_view_get_shell_content (EShellView *shell_view) return E_SHELL_CONTENT (shell_view->priv->shell_content); } +/** + * e_shell_view_get_shell_sidebar: + * @shell_view: an #EShellView + * + * Returns the #EShellSidebar instance for @shell_view. + * + * By default, #EShellView creates a plain #EShellSidebar during + * initialization. But #EShellView subclasses can override the + * <structfield>new_shell_sidebar</structfield> factory method + * in #EShellViewClass to create a custom #EShellSidebar. + * + * Returns: the #EShellSidebar instance for @shell_view + **/ EShellSidebar * e_shell_view_get_shell_sidebar (EShellView *shell_view) { @@ -675,6 +872,19 @@ e_shell_view_get_shell_sidebar (EShellView *shell_view) return E_SHELL_SIDEBAR (shell_view->priv->shell_sidebar); } +/** + * e_shell_view_get_shell_taskbar: + * @shell_view: an #EShellView + * + * Returns the #EShellTaskbar instance for @shell_view. + * + * By default, #EShellView creates a plain #EShellTaskbar during + * initialization. But #EShellView subclasses can override the + * <structfield>new_shell_taskbar</structfield> factory method + * in #EShellViewClass to create a custom #EShellTaskbar. + * + * Returns: the #EShellTaskbar instance for @shell_view + **/ EShellTaskbar * e_shell_view_get_shell_taskbar (EShellView *shell_view) { @@ -683,6 +893,20 @@ e_shell_view_get_shell_taskbar (EShellView *shell_view) return E_SHELL_TASKBAR (shell_view->priv->shell_taskbar); } +/** + * e_shell_view_update_actions: + * @shell_view: an #EShellView + * + * Emits the #EShellView::update-actions signal. + * + * #EShellView subclasses should implement the + * <structfield>update_actions</structfield> method in #EShellViewClass + * to update the various #GtkAction<!-- -->s based on the current + * #EShellSidebar and #EShellContent selections. The + * #EShellView::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 (EShellView *shell_view) { diff --git a/shell/e-shell-view.h b/shell/e-shell-view.h index f9f027d0bb..34d001d0d4 100644 --- a/shell/e-shell-view.h +++ b/shell/e-shell-view.h @@ -35,7 +35,6 @@ #include <shell/e-shell-taskbar.h> #include <shell/e-shell-window.h> -#include <widgets/misc/e-activity.h> #include <widgets/menus/gal-view-collection.h> /* Standard GObject macros */ @@ -74,6 +73,47 @@ struct _EShellView { EShellViewPrivate *priv; }; +/** + * EShellViewClass: + * @parent_class: The parent class structure. + * @label: The initial value for the switcher action's + * #GtkAction:label property. See + * e_shell_view_get_action(). + * @icon_name: The initial value for the switcher action's + * #GtkAction:icon-name property. See + * e_shell_view_get_action(). + * @ui_definition: Base name of the UI definintion file to add + * when the shell view is activated. + * @search_options: 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. + * @type_module: The corresponding #GTypeModule for this shell + * view. Subclasses are responsible for setting + * this. An easy way do so is to pass it to the + * shell view's #GClassInitFunc via the + * <structfield>class_data</structfield> field in + * #GTypeInfo. + * @view_collection: 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. + * @new_shell_content: Factory method for the shell view's #EShellContent. + * See e_shell_view_get_shell_content(). + * @new_shell_sidebar: Factory method for the shell view's #EShellSidebar. + * See e_shell_view_get_shell_sidebar(). + * @new_shell_taskbar: Factory method for the shell view's #EShellTaskbar. + * See e_shell_view_get_shell_taskbar(). + * @toggled: Class method for the #EShellView::toggled signal. + * Subclasses should rarely need to override the + * default behavior. + * @update_actions: Class method for the #EShellView::update_actions + * signal. There is no default behavior; subclasses + * should override this. + * + * #EShellViewClass contains a number of important settings for subclasses. + **/ struct _EShellViewClass { GObjectClass parent_class; @@ -84,7 +124,7 @@ struct _EShellViewClass { /* Base name of the UI definition file. */ const gchar *ui_definition; - /* Widget path to the search entry popup menu. */ + /* Widget path to the search options popup menu. */ const gchar *search_options; /* Subclasses should set this via the "class_data" field in @@ -114,8 +154,6 @@ const gchar * e_shell_view_get_view_id (EShellView *shell_view); void e_shell_view_set_view_id (EShellView *shell_view, const gchar *view_id); gboolean e_shell_view_is_active (EShellView *shell_view); -void e_shell_view_add_activity (EShellView *shell_view, - EActivity *activity); gint e_shell_view_get_page_num (EShellView *shell_view); GtkSizeGroup * e_shell_view_get_size_group (EShellView *shell_view); EShellContent * e_shell_view_get_shell_content (EShellView *shell_view); diff --git a/shell/test/e-test-shell-view.c b/shell/test/e-test-shell-view.c index 7701849cc2..d243906af7 100644 --- a/shell/test/e-test-shell-view.c +++ b/shell/test/e-test-shell-view.c @@ -70,6 +70,7 @@ test_shell_view_constructed (GObject *object) ETestShellViewPrivate *priv; EShellContent *shell_content; EShellSidebar *shell_sidebar; + EShellModule *shell_module; EShellView *shell_view; EActivity *activity; GtkWidget *widget; @@ -80,6 +81,7 @@ test_shell_view_constructed (GObject *object) priv = E_TEST_SHELL_VIEW_GET_PRIVATE (object); shell_view = E_SHELL_VIEW (object); + shell_module = e_shell_view_get_shell_module (shell_view); shell_content = e_shell_view_get_shell_content (shell_view); shell_sidebar = e_shell_view_get_shell_sidebar (shell_view); @@ -93,7 +95,7 @@ test_shell_view_constructed (GObject *object) activity = e_activity_new ("Test Activity"); e_activity_set_cancellable (activity, TRUE); - e_shell_view_add_activity (shell_view, activity); + e_shell_module_add_activity (shell_module, activity); priv->activity = activity; } |