aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-24 23:02:59 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:19 +0800
commit672132f8a0098b029cf999f79b605058ee8796d1 (patch)
tree2b7f595151b54577ae6b4d4ccc494efdc58b10a2 /shell
parent8decdbc4cb82c5cda0df7f5f251832f3e8f06e4f (diff)
downloadgsoc2013-evolution-672132f8a0098b029cf999f79b605058ee8796d1.tar
gsoc2013-evolution-672132f8a0098b029cf999f79b605058ee8796d1.tar.gz
gsoc2013-evolution-672132f8a0098b029cf999f79b605058ee8796d1.tar.bz2
gsoc2013-evolution-672132f8a0098b029cf999f79b605058ee8796d1.tar.lz
gsoc2013-evolution-672132f8a0098b029cf999f79b605058ee8796d1.tar.xz
gsoc2013-evolution-672132f8a0098b029cf999f79b605058ee8796d1.tar.zst
gsoc2013-evolution-672132f8a0098b029cf999f79b605058ee8796d1.zip
EMFolderTree: Add an EAlertSink property.
Now EMFolderTree has access to both an EShellBackend and an EAlertSink; everything it needs to build and submit EActivity instances.
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-sidebar.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c
index d99e66ac61..b72a210300 100644
--- a/shell/e-shell-sidebar.c
+++ b/shell/e-shell-sidebar.c
@@ -27,6 +27,7 @@
#include "e-shell-sidebar.h"
+#include <e-util/e-alert-sink.h>
#include <e-util/e-extensible.h>
#include <e-util/e-unicode.h>
#include <shell/e-shell-view.h>
@@ -50,11 +51,17 @@ enum {
PROP_SHELL_VIEW
};
+/* Forward Declarations */
+static void e_shell_sidebar_alert_sink_init
+ (EAlertSinkInterface *interface);
+
G_DEFINE_TYPE_WITH_CODE (
EShellSidebar,
e_shell_sidebar,
GTK_TYPE_BIN,
G_IMPLEMENT_INTERFACE (
+ E_TYPE_ALERT_SINK, e_shell_sidebar_alert_sink_init)
+ G_IMPLEMENT_INTERFACE (
E_TYPE_EXTENSIBLE, NULL))
static void
@@ -300,6 +307,25 @@ shell_sidebar_forall (GtkContainer *container,
}
static void
+shell_sidebar_submit_alert (EAlertSink *alert_sink,
+ EAlert *alert)
+{
+ EShellView *shell_view;
+ EShellContent *shell_content;
+ EShellSidebar *shell_sidebar;
+
+ /* EShellSidebar is a proxy alert sink. Forward the alert
+ * to the EShellContent widget for display to the user. */
+
+ shell_sidebar = E_SHELL_SIDEBAR (alert_sink);
+ shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
+ shell_content = e_shell_view_get_shell_content (shell_view);
+
+ alert_sink = E_ALERT_SINK (shell_content);
+ e_alert_sink_submit_alert (alert_sink, alert);
+}
+
+static void
e_shell_sidebar_class_init (EShellSidebarClass *class)
{
GObjectClass *object_class;
@@ -387,6 +413,12 @@ e_shell_sidebar_class_init (EShellSidebarClass *class)
}
static void
+e_shell_sidebar_alert_sink_init (EAlertSinkInterface *interface)
+{
+ interface->submit_alert = shell_sidebar_submit_alert;
+}
+
+static void
e_shell_sidebar_init (EShellSidebar *shell_sidebar)
{
GtkStyle *style;