aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-window.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-12-02 10:17:34 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-12-02 10:17:34 +0800
commitac0442e31c68ce073e4156bbe47d63da8f7d2523 (patch)
tree937719987d7b438cd4db1b3f0326bde0a622e615 /shell/e-shell-window.c
parent9b2e5956080b08da3611996c7f12158fcfe3e06d (diff)
downloadgsoc2013-evolution-ac0442e31c68ce073e4156bbe47d63da8f7d2523.tar.gz
gsoc2013-evolution-ac0442e31c68ce073e4156bbe47d63da8f7d2523.tar.zst
gsoc2013-evolution-ac0442e31c68ce073e4156bbe47d63da8f7d2523.zip
Pass a label for the status bar control for now.
* gui/component/addressbook-component.c (impl_createControls): Pass a label for the status bar control for now. * gui/calendar-component.c (impl_createControls): Pass a label for the status bar control for now. * gui/tasks-component.c (impl_createControls): Pass a label for the status bar control for now. * mail-component.c (impl_createControls): Pass a label for the status bar control for now. * e-shell.c (struct _EShellPrivate): Remove member activity_handler. (setup_activity_interface): Remove. (e_shell_init): Don't call. (create_window): Don't attach the task bar to the activity handler. * e-shell-window.c (struct _ComponentView): New member statusbar_widget. (struct _EShellWindowPrivate): Remove member task_bar. (init_view): Get the status bar control from createControls and put it in the ComponentView struct. (setup_task_bar): New. (setup_statusbar_notebook): New. (switch_view): Switch the statusbar notebook too. (impl_dispose): Add missing GTK_OBJECT() cast. (e_shell_window_peek_task_bar): Remove. * Evolution-Component.idl (Component::createControls): New out arg "statusbar_control"; this way components can provide their own status bar. * e-activity-handler.c, e-activity-handler.h: Turn into a plain GObject; translate all the CORBA methods into plain C methods. * Makefile.am: Move e-activity-handler to libeshell instead of it being in the shell. svn path=/trunk/; revision=23555
Diffstat (limited to 'shell/e-shell-window.c')
-rw-r--r--shell/e-shell-window.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index cde68a42e6..e11908902f 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -30,7 +30,6 @@
#include "e-shell-window-commands.h"
#include "e-shell-marshal.h"
#include "e-sidebar.h"
-#include "e-task-bar.h"
#include "e-util/e-lang-utils.h"
@@ -72,6 +71,7 @@ struct _ComponentView {
GtkWidget *sidebar_widget;
GtkWidget *view_widget;
+ GtkWidget *statusbar_widget;
int notebook_page_num;
};
@@ -90,6 +90,7 @@ struct _EShellWindowPrivate {
/* Notebooks used to switch between components. */
GtkWidget *sidebar_notebook;
GtkWidget *view_notebook;
+ GtkWidget *statusbar_notebook;
/* Bonobo foo. */
BonoboUIComponent *ui_component;
@@ -105,7 +106,6 @@ struct _EShellWindowPrivate {
GtkWidget *offline_toggle;
GtkWidget *offline_toggle_image;
GtkWidget *menu_hint_label;
- GtkWidget *task_bar;
};
@@ -191,9 +191,11 @@ init_view (EShellWindow *window,
Bonobo_UIContainer container;
Bonobo_Control sidebar_control;
Bonobo_Control view_control;
+ Bonobo_Control statusbar_control;
CORBA_Environment ev;
int sidebar_notebook_page_num;
int view_notebook_page_num;
+ int statusbar_notebook_page_num;
g_assert (view->view_widget == NULL);
g_assert (view->sidebar_widget == NULL);
@@ -214,7 +216,7 @@ init_view (EShellWindow *window,
/* 2. Set up view. */
- GNOME_Evolution_Component_createControls (component_iface, &sidebar_control, &view_control, &ev);
+ GNOME_Evolution_Component_createControls (component_iface, &sidebar_control, &view_control, &statusbar_control, &ev);
if (BONOBO_EX (&ev)) {
g_warning ("Cannot create view for %s", view->component_id);
@@ -239,11 +241,17 @@ init_view (EShellWindow *window,
gtk_widget_show (view->view_widget);
bonobo_object_release_unref (view_control, NULL);
+ view->statusbar_widget = bonobo_widget_new_control_from_objref (statusbar_control, container);
+ gtk_widget_show (view->statusbar_widget);
+ bonobo_object_release_unref (statusbar_control, NULL);
+
gtk_notebook_append_page (GTK_NOTEBOOK (priv->sidebar_notebook), view->sidebar_widget, NULL);
gtk_notebook_append_page (GTK_NOTEBOOK (priv->view_notebook), view->view_widget, NULL);
+ gtk_notebook_append_page (GTK_NOTEBOOK (priv->statusbar_notebook), view->statusbar_widget, NULL);
sidebar_notebook_page_num = gtk_notebook_page_num (GTK_NOTEBOOK (priv->sidebar_notebook), view->sidebar_widget);
view_notebook_page_num = gtk_notebook_page_num (GTK_NOTEBOOK (priv->view_notebook), view->view_widget);
+ statusbar_notebook_page_num = gtk_notebook_page_num (GTK_NOTEBOOK (priv->view_notebook), view->statusbar_widget);
/* Since we always add a view page and a sidebar page at the same time... */
g_assert (sidebar_notebook_page_num == view_notebook_page_num);
@@ -254,6 +262,7 @@ init_view (EShellWindow *window,
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->view_notebook), view_notebook_page_num);
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->sidebar_notebook), view_notebook_page_num);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->statusbar_notebook), view_notebook_page_num);
if (priv->current_view != NULL)
component_view_deactivate (priv->current_view);
@@ -279,6 +288,7 @@ switch_view (EShellWindow *window, ComponentView *component_view)
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->view_notebook), component_view->notebook_page_num);
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->sidebar_notebook), component_view->notebook_page_num);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->statusbar_notebook), component_view->notebook_page_num);
}
gconf_client_set_string (gconf_client, "/apps/evolution/shell/view_defaults/component_id",
@@ -411,7 +421,7 @@ ui_engine_add_hint_callback (BonoboUIEngine *engine,
{
gtk_label_set_text (GTK_LABEL (window->priv->menu_hint_label), hint);
gtk_widget_show (window->priv->menu_hint_label);
- gtk_widget_hide (window->priv->task_bar);
+ gtk_widget_hide (window->priv->statusbar_notebook);
}
static void
@@ -419,7 +429,7 @@ ui_engine_remove_hint_callback (BonoboUIEngine *engine,
EShellWindow *window)
{
gtk_widget_hide (window->priv->menu_hint_label);
- gtk_widget_show (window->priv->task_bar);
+ gtk_widget_show (window->priv->statusbar_notebook);
}
@@ -494,18 +504,18 @@ setup_menu_hint_label (EShellWindow *window)
}
static void
-setup_task_bar (EShellWindow *window)
+setup_statusbar_notebook (EShellWindow *window)
{
EShellWindowPrivate *priv;
priv = window->priv;
- priv->task_bar = e_task_bar_new ();
-
- g_assert (priv->status_bar != NULL);
+ priv->statusbar_notebook = gtk_notebook_new ();
+ gtk_notebook_set_show_tabs (GTK_NOTEBOOK (priv->statusbar_notebook), FALSE);
+ gtk_notebook_set_show_border (GTK_NOTEBOOK (priv->statusbar_notebook), FALSE);
- gtk_box_pack_start (GTK_BOX (priv->status_bar), priv->task_bar, TRUE, TRUE, 0);
- gtk_widget_show (priv->task_bar);
+ gtk_box_pack_start (GTK_BOX (priv->status_bar), priv->statusbar_notebook, TRUE, TRUE, 0);
+ gtk_widget_show (priv->statusbar_notebook);
}
static void
@@ -521,7 +531,7 @@ setup_status_bar (EShellWindow *window)
setup_offline_toggle (window);
setup_menu_hint_label (window);
- setup_task_bar (window);
+ setup_statusbar_notebook (window);
ui_engine = bonobo_window_get_ui_engine (BONOBO_WINDOW (window));
@@ -598,7 +608,7 @@ impl_dispose (GObject *object)
}
if (priv->tooltips != NULL) {
- gtk_object_destroy (priv->tooltips);
+ gtk_object_destroy (GTK_OBJECT (priv->tooltips));
priv->tooltips = NULL;
}
@@ -782,14 +792,6 @@ e_shell_window_peek_bonobo_ui_component (EShellWindow *window)
return window->priv->ui_component;
}
-GtkWidget *
-e_shell_window_peek_task_bar (EShellWindow *window)
-{
- g_return_val_if_fail (E_IS_SHELL_WINDOW (window), NULL);
-
- return window->priv->task_bar;
-}
-
void
e_shell_window_save_defaults (EShellWindow *window)
{