aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-content.c1
-rw-r--r--shell/e-shell-content.h2
-rw-r--r--shell/e-shell-module.h2
-rw-r--r--shell/e-shell-sidebar.c8
-rw-r--r--shell/e-shell-sidebar.h2
-rw-r--r--shell/e-shell-taskbar.h2
-rw-r--r--shell/e-shell-view.c12
-rw-r--r--shell/e-shell-view.h21
-rw-r--r--shell/e-shell-window-actions.c24
-rw-r--r--shell/e-shell-window-private.c6
-rw-r--r--shell/e-shell-window.c40
-rw-r--r--shell/e-shell-window.h6
-rw-r--r--shell/e-shell.h4
13 files changed, 70 insertions, 60 deletions
diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c
index c16344ac15..e1871da412 100644
--- a/shell/e-shell-content.c
+++ b/shell/e-shell-content.c
@@ -96,7 +96,6 @@ action_search_execute_cb (GtkAction *action,
EShellView *shell_view;
EShellWindow *shell_window;
EIconEntry *icon_entry;
- GtkWidget *child;
GtkStateType visual_state;
const gchar *search_text;
diff --git a/shell/e-shell-content.h b/shell/e-shell-content.h
index 1763bf4b22..defeb0a403 100644
--- a/shell/e-shell-content.h
+++ b/shell/e-shell-content.h
@@ -21,7 +21,7 @@
#ifndef E_SHELL_CONTENT_H
#define E_SHELL_CONTENT_H
-#include <e-shell-common.h>
+#include <shell/e-shell-common.h>
#include <filter/filter-rule.h>
#include <filter/rule-context.h>
diff --git a/shell/e-shell-module.h b/shell/e-shell-module.h
index 40f2bbb4c9..b28b2f048a 100644
--- a/shell/e-shell-module.h
+++ b/shell/e-shell-module.h
@@ -21,7 +21,7 @@
#ifndef E_SHELL_MODULE_H
#define E_SHELL_MODULE_H
-#include <e-shell-common.h>
+#include <shell/e-shell-common.h>
#include <widgets/misc/e-activity.h>
/* Standard GObject macros */
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c
index 9d33024702..0ce80d9e54 100644
--- a/shell/e-shell-sidebar.c
+++ b/shell/e-shell-sidebar.c
@@ -203,6 +203,13 @@ shell_sidebar_finalize (GObject *object)
}
static void
+shell_sidebar_constructed (GObject *object)
+{
+ /* XXX This is here to let subclasses safely chain up.
+ * GObject does not define a constructed() method. */
+}
+
+static void
shell_sidebar_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
@@ -309,6 +316,7 @@ shell_sidebar_class_init (EShellSidebarClass *class)
object_class->get_property = shell_sidebar_get_property;
object_class->dispose = shell_sidebar_dispose;
object_class->finalize = shell_sidebar_finalize;
+ object_class->constructed = shell_sidebar_constructed;
widget_class = GTK_WIDGET_CLASS (class);
widget_class->size_request = shell_sidebar_size_request;
diff --git a/shell/e-shell-sidebar.h b/shell/e-shell-sidebar.h
index 9a27cba6b5..7bc26e965b 100644
--- a/shell/e-shell-sidebar.h
+++ b/shell/e-shell-sidebar.h
@@ -21,7 +21,7 @@
#ifndef E_SHELL_SIDEBAR_H
#define E_SHELL_SIDEBAR_H
-#include <e-shell-common.h>
+#include <shell/e-shell-common.h>
/* Standard GObject macros */
#define E_TYPE_SHELL_SIDEBAR \
diff --git a/shell/e-shell-taskbar.h b/shell/e-shell-taskbar.h
index 9aaac20018..466750dd77 100644
--- a/shell/e-shell-taskbar.h
+++ b/shell/e-shell-taskbar.h
@@ -21,7 +21,7 @@
#ifndef E_SHELL_TASKBAR_H
#define E_SHELL_TASKBAR_H
-#include <e-shell-common.h>
+#include <shell/e-shell-common.h>
/* Standard GObject macros */
#define E_TYPE_SHELL_TASKBAR \
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 2d1919b2a7..f2d7b0ec0c 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -579,28 +579,28 @@ e_shell_view_get_page_num (EShellView *shell_view)
return shell_view->priv->page_num;
}
-gpointer
+EShellContent *
e_shell_view_get_shell_content (EShellView *shell_view)
{
g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL);
- return shell_view->priv->shell_content;
+ return E_SHELL_CONTENT (shell_view->priv->shell_content);
}
-gpointer
+EShellSidebar *
e_shell_view_get_shell_sidebar (EShellView *shell_view)
{
g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL);
- return shell_view->priv->shell_sidebar;
+ return E_SHELL_SIDEBAR (shell_view->priv->shell_sidebar);
}
-gpointer
+EShellTaskbar *
e_shell_view_get_shell_taskbar (EShellView *shell_view)
{
g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL);
- return shell_view->priv->shell_taskbar;
+ return E_SHELL_TASKBAR (shell_view->priv->shell_taskbar);
}
void
diff --git a/shell/e-shell-view.h b/shell/e-shell-view.h
index 92382a9a49..5f12840c12 100644
--- a/shell/e-shell-view.h
+++ b/shell/e-shell-view.h
@@ -22,8 +22,11 @@
#ifndef E_SHELL_VIEW_H
#define E_SHELL_VIEW_H
-#include <e-shell-common.h>
-#include <e-shell-window.h>
+#include <shell/e-shell-common.h>
+#include <shell/e-shell-content.h>
+#include <shell/e-shell-sidebar.h>
+#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>
@@ -61,10 +64,13 @@ struct _EShellView {
struct _EShellViewClass {
GObjectClass parent_class;
- /* Initial GtkRadioAction values */
+ /* Initial switcher action values. */
const gchar *label;
const gchar *icon_name;
+ /* Path to the search entry popup menu. */
+ const gchar *search_options;
+
/* Subclasses should set this via the "class_data" field in
* the GTypeInfo they pass to g_type_module_register_type(). */
GTypeModule *type_module;
@@ -72,9 +78,6 @@ struct _EShellViewClass {
/* A unique instance is created for each subclass. */
GalViewCollection *view_collection;
- /* Path to the search entry popup menu. */
- const gchar *search_options_path;
-
/* Factory Methods */
GtkWidget * (*new_shell_content) (EShellView *shell_view);
GtkWidget * (*new_shell_sidebar) (EShellView *shell_view);
@@ -97,9 +100,9 @@ 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);
-gpointer e_shell_view_get_shell_content (EShellView *shell_view);
-gpointer e_shell_view_get_shell_sidebar (EShellView *shell_view);
-gpointer e_shell_view_get_shell_taskbar (EShellView *shell_view);
+EShellContent * e_shell_view_get_shell_content (EShellView *shell_view);
+EShellSidebar * e_shell_view_get_shell_sidebar (EShellView *shell_view);
+EShellTaskbar * e_shell_view_get_shell_taskbar (EShellView *shell_view);
EShellWindow * e_shell_view_get_shell_window (EShellView *shell_view);
void e_shell_view_changed (EShellView *shell_view);
diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c
index 5375774702..c03e60eecf 100644
--- a/shell/e-shell-window-actions.c
+++ b/shell/e-shell-window-actions.c
@@ -686,7 +686,7 @@ action_custom_rule_cb (GtkAction *action,
g_return_if_fail (rule != NULL);
view_name = e_shell_window_get_active_view (shell_window);
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
shell_content = e_shell_view_get_shell_content (shell_view);
rule = g_object_get_data (G_OBJECT (action), "rule");
@@ -735,7 +735,7 @@ action_gal_define_views_cb (GtkAction *action,
const gchar *view_name;
view_name = e_shell_window_get_active_view (shell_window);
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
view_collection = shell_view_class->view_collection;
g_return_if_fail (view_collection != NULL);
@@ -758,7 +758,7 @@ action_gal_view_cb (GtkRadioAction *action,
const gchar *view_id;
view_name = e_shell_window_get_active_view (shell_window);
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
view_id = g_object_get_data (G_OBJECT (current), "view-id");
e_shell_view_set_view_id (shell_view, view_id);
}
@@ -869,7 +869,7 @@ action_search_advanced_cb (GtkAction *action,
const gchar *view_name;
view_name = e_shell_window_get_active_view (shell_window);
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
shell_content = e_shell_view_get_shell_content (shell_view);
e_shell_content_run_advanced_search_dialog (shell_content);
@@ -885,7 +885,7 @@ action_search_clear_cb (GtkAction *action,
const gchar *view_name;
view_name = e_shell_window_get_active_view (shell_window);
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
shell_content = e_shell_view_get_shell_content (shell_view);
e_shell_content_set_search_rule (shell_content, NULL);
@@ -905,7 +905,7 @@ action_search_edit_cb (GtkAction *action,
const gchar *view_name;
view_name = e_shell_window_get_active_view (shell_window);
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
shell_content = e_shell_view_get_shell_content (shell_view);
e_shell_content_run_edit_searches_dialog (shell_content);
@@ -922,10 +922,10 @@ action_search_options_cb (GtkAction *action,
const gchar *widget_path;
view_name = e_shell_window_get_active_view (shell_window);
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
- widget_path = shell_view_class->search_options_path;
+ widget_path = shell_view_class->search_options;
e_shell_window_show_popup_menu (shell_window, widget_path, NULL);
}
@@ -938,7 +938,7 @@ action_search_save_cb (GtkAction *action,
const gchar *view_name;
view_name = e_shell_window_get_active_view (shell_window);
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
shell_content = e_shell_view_get_shell_content (shell_view);
e_shell_content_run_save_search_dialog (shell_content);
@@ -1777,7 +1777,7 @@ e_shell_window_update_view_menu (EShellWindow *shell_window)
ui_manager = e_shell_window_get_ui_manager (shell_window);
view_name = e_shell_window_get_active_view (shell_window);
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
view_collection = shell_view_class->view_collection;
view_id = e_shell_view_get_view_id (shell_view);
@@ -1880,7 +1880,7 @@ e_shell_window_update_search_menu (EShellWindow *shell_window)
ui_manager = e_shell_window_get_ui_manager (shell_window);
view_name = e_shell_window_get_active_view (shell_window);
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
shell_content = e_shell_view_get_shell_content (shell_view);
context = e_shell_content_get_search_context (shell_content);
shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
@@ -1892,7 +1892,7 @@ e_shell_window_update_search_menu (EShellWindow *shell_window)
gtk_action_set_sensitive (ACTION (SEARCH_CLEAR), sensitive);
gtk_action_set_sensitive (ACTION (SEARCH_SAVE), sensitive);
- sensitive = (shell_view_class->search_options_path != NULL);
+ sensitive = (shell_view_class->search_options != NULL);
gtk_action_set_sensitive (ACTION (SEARCH_OPTIONS), sensitive);
/* Add custom rules to the Search menu. */
diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c
index 782616cea4..79cdeb94a8 100644
--- a/shell/e-shell-window-private.c
+++ b/shell/e-shell-window-private.c
@@ -410,7 +410,7 @@ e_shell_window_switch_to_view (EShellWindow *shell_window,
GList *list;
gint page_num;
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
page_num = e_shell_view_get_page_num (shell_view);
g_return_if_fail (page_num >= 0);
@@ -448,7 +448,7 @@ e_shell_window_update_icon (EShellWindow *shell_window)
gchar *icon_name;
view_name = e_shell_window_get_active_view (shell_window);
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
action = e_shell_view_get_action (shell_view);
g_object_get (action, "icon-name", &icon_name, NULL);
@@ -465,7 +465,7 @@ e_shell_window_update_title (EShellWindow *shell_window)
gchar *window_title;
view_name = e_shell_window_get_active_view (shell_window);
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
view_title = e_shell_view_get_title (shell_view);
/* Translators: This is used for the main window title. */
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 422101d549..a316fd7680 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -347,7 +347,23 @@ e_shell_window_new (EShell *shell,
}
/**
- * e_shell_window_get_view:
+ * e_shell_window_get_shell:
+ * @shell_window: an #EShellWindow
+ *
+ * Returns the #EShell that was passed to e_shell_window_new().
+ *
+ * Returns: the #EShell
+ **/
+EShell *
+e_shell_window_get_shell (EShellWindow *shell_window)
+{
+ g_return_val_if_fail (E_IS_SHELL_WINDOW (shell_window), NULL);
+
+ return shell_window->priv->shell;
+}
+
+/**
+ * e_shell_window_get_shell_view:
* @shell_window: an #EShellWindow
* @view_name: name of a shell view
*
@@ -363,8 +379,8 @@ e_shell_window_new (EShell *shell,
* registered
**/
gpointer
-e_shell_window_get_view (EShellWindow *shell_window,
- const gchar *view_name)
+e_shell_window_get_shell_view (EShellWindow *shell_window,
+ const gchar *view_name)
{
GHashTable *loaded_views;
EShellView *shell_view;
@@ -410,22 +426,6 @@ e_shell_window_get_view (EShellWindow *shell_window,
}
/**
- * e_shell_window_get_shell:
- * @shell_window: an #EShellWindow
- *
- * Returns the #EShell that was passed to e_shell_window_new().
- *
- * Returns: the #EShell
- **/
-EShell *
-e_shell_window_get_shell (EShellWindow *shell_window)
-{
- g_return_val_if_fail (E_IS_SHELL_WINDOW (shell_window), NULL);
-
- return shell_window->priv->shell;
-}
-
-/**
* e_shell_window_get_ui_manager:
* @shell_window: an #EShellWindow
*
@@ -590,7 +590,7 @@ e_shell_window_set_active_view (EShellWindow *shell_window,
g_return_if_fail (E_IS_SHELL_WINDOW (shell_window));
g_return_if_fail (view_name != NULL);
- shell_view = e_shell_window_get_view (shell_window, view_name);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
g_return_if_fail (shell_view != NULL);
action = e_shell_view_get_action (shell_view);
diff --git a/shell/e-shell-window.h b/shell/e-shell-window.h
index bbc137dd07..caf403319b 100644
--- a/shell/e-shell-window.h
+++ b/shell/e-shell-window.h
@@ -24,7 +24,7 @@
#ifndef E_SHELL_WINDOW_H
#define E_SHELL_WINDOW_H
-#include <e-shell.h>
+#include <shell/e-shell.h>
/* Standard GObject macros */
#define E_TYPE_SHELL_WINDOW \
@@ -63,9 +63,9 @@ struct _EShellWindowClass {
GType e_shell_window_get_type (void);
GtkWidget * e_shell_window_new (EShell *shell,
gboolean safe_mode);
-gpointer e_shell_window_get_view (EShellWindow *shell_window,
- const gchar *view_name);
EShell * e_shell_window_get_shell (EShellWindow *shell_window);
+gpointer 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);
diff --git a/shell/e-shell.h b/shell/e-shell.h
index 1500c2bcb4..5b804b3f4a 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -23,8 +23,8 @@
#ifndef E_SHELL_H
#define E_SHELL_H
-#include <e-shell-common.h>
-#include <e-shell-module.h>
+#include <shell/e-shell-common.h>
+#include <shell/e-shell-module.h>
/* Standard GObject macros */
#define E_TYPE_SHELL \