aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-11-19 17:43:17 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-11-19 17:43:17 +0800
commit1003ebf6196a0ad8e5de5441c44799a9d8e85a92 (patch)
tree495a6ad164e113fa9ed25becfb63d62995b3f3f9 /shell
parent8ca3936a98e1978eb4268af095162038dc4b9d48 (diff)
downloadgsoc2013-evolution-1003ebf6196a0ad8e5de5441c44799a9d8e85a92.tar.gz
gsoc2013-evolution-1003ebf6196a0ad8e5de5441c44799a9d8e85a92.tar.zst
gsoc2013-evolution-1003ebf6196a0ad8e5de5441c44799a9d8e85a92.zip
Destroy the tooltips instead of unreffing them.
* e-shell-window.c (impl_dispose): Destroy the tooltips instead of unreffing them. * e-shell.c (struct _EShellPrivate): New member activity_handler. (setup_activity_interface): New. (impl_dispose): Add a comment about why we must not unref activity_handler here. (create_window): Attach the task bar to the new window. * e-shell-window.c (e_shell_window_peek_task_bar): New. svn path=/trunk/; revision=23439
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog16
-rw-r--r--shell/Makefile.am2
-rw-r--r--shell/e-shell-window.c10
-rw-r--r--shell/e-shell-window.h1
-rw-r--r--shell/e-shell.c23
5 files changed, 51 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index ce8ff8dfce..0480780d3b 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,21 @@
2003-11-19 Ettore Perazzoli <ettore@ximian.com>
+ * e-shell-window.c (impl_dispose): Destroy the tooltips instead of
+ unreffing them.
+
+ * e-shell.c (struct _EShellPrivate): New member activity_handler.
+ (setup_activity_interface): New.
+ (impl_dispose): Add a comment about why we must not unref
+ activity_handler here.
+ (create_window): Attach the task bar to the new window.
+
+ * e-shell-window.c (e_shell_window_peek_task_bar): New.
+
+ * e-activity-handler.c: Add back.
+ * e-activity-handler.h: Add back.
+
+2003-11-19 Ettore Perazzoli <ettore@ximian.com>
+
* e-shell-window.c (struct _EShellWindowPrivate): New members
status_bar, offline_toggle, offline_toggle_image, menu_hint_label,
task_bar, tooltips.
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 729b1d2544..fcf102bac0 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -155,6 +155,8 @@ libeshell_la_LIBADD = \
evolution_SOURCES = \
$(SELECT_NAMES_IDL_GENERATED) \
$(DATASERVER_IDL_GENERATED) \
+ e-activity-handler.c \
+ e-activity-handler.h \
e-component-registry.c \
e-component-registry.h \
e-config-upgrade.c \
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index d2845fe8c3..cde68a42e6 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -598,7 +598,7 @@ impl_dispose (GObject *object)
}
if (priv->tooltips != NULL) {
- g_object_unref (priv->tooltips);
+ gtk_object_destroy (priv->tooltips);
priv->tooltips = NULL;
}
@@ -782,6 +782,14 @@ 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)
{
diff --git a/shell/e-shell-window.h b/shell/e-shell-window.h
index 01c231c329..f7431d5a68 100644
--- a/shell/e-shell-window.h
+++ b/shell/e-shell-window.h
@@ -64,6 +64,7 @@ const char *e_shell_window_peek_current_component_id (EShellWindow *shell);
EShell *e_shell_window_peek_shell (EShellWindow *window);
BonoboUIComponent *e_shell_window_peek_bonobo_ui_component (EShellWindow *window);
+GtkWidget *e_shell_window_peek_task_bar (EShellWindow *window);
void e_shell_window_save_defaults (EShellWindow *window);
void e_shell_window_show_settings (EShellWindow *window);
diff --git a/shell/e-shell.c b/shell/e-shell.c
index c6b2f782e3..84c4ddad85 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -28,6 +28,7 @@
#include "e-util/e-dialog-utils.h"
+#include "e-activity-handler.h"
#include "e-setup.h"
#include "e-shell-constants.h"
#include "e-shell-settings-dialog.h"
@@ -89,6 +90,9 @@ struct _EShellPrivate {
/* Settings Dialog */
GtkWidget *settings_dialog;
+
+ /* The handler for the ::Activity interface. */
+ EActivityHandler *activity_handler; /* <aggregate> */
/* Whether the shell is succesfully initialized. This is needed during
the start-up sequence, to avoid CORBA calls to do make wrong things
@@ -135,6 +139,18 @@ get_config_start_offline (void)
return value;
}
+/* Set up the ::Activity interface. */
+static void
+setup_activity_interface (EShell *shell)
+{
+ EActivityHandler *activity_handler;
+
+ activity_handler = e_activity_handler_new ();
+
+ bonobo_object_add_interface (BONOBO_OBJECT (shell), BONOBO_OBJECT (activity_handler));
+ shell->priv->activity_handler = activity_handler;
+}
+
/* Interactivity handling. */
@@ -333,6 +349,8 @@ create_window (EShell *shell,
g_signal_connect (window, "delete_event", G_CALLBACK (window_delete_event_cb), shell);
g_object_weak_ref (G_OBJECT (window), window_weak_notify, shell);
+ e_activity_handler_attach_task_bar (priv->activity_handler, E_TASK_BAR (e_shell_window_peek_task_bar (window)));
+
shell->priv->windows = g_list_prepend (shell->priv->windows, window);
g_signal_emit (shell, signals[NEW_WINDOW_CREATED], 0, window);
@@ -389,6 +407,9 @@ impl_dispose (GObject *object)
priv->settings_dialog = NULL;
}
+ /* No unreffing for this as it is aggregate. */
+ /* bonobo_object_unref (BONOBO_OBJECT (priv->activity_handler)); */
+
(* G_OBJECT_CLASS (parent_class)->dispose) (object);
}
@@ -473,6 +494,8 @@ e_shell_init (EShell *shell)
priv->user_creatable_items_handler = e_user_creatable_items_handler_new (priv->component_registry);
shell->priv = priv;
+
+ setup_activity_interface (shell);
}