diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-24 23:02:59 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-24 23:02:59 +0800 |
commit | ff9fcffeca2bdc37a91e0c2f0cb51f871a3cd7a1 (patch) | |
tree | 2383ff114db06ca92b9b477af849d417e2e6a761 /shell | |
parent | c6d8a030399f9e3d9f38798e99cdeecaf2d5fbbb (diff) | |
download | gsoc2013-evolution-ff9fcffeca2bdc37a91e0c2f0cb51f871a3cd7a1.tar gsoc2013-evolution-ff9fcffeca2bdc37a91e0c2f0cb51f871a3cd7a1.tar.gz gsoc2013-evolution-ff9fcffeca2bdc37a91e0c2f0cb51f871a3cd7a1.tar.bz2 gsoc2013-evolution-ff9fcffeca2bdc37a91e0c2f0cb51f871a3cd7a1.tar.lz gsoc2013-evolution-ff9fcffeca2bdc37a91e0c2f0cb51f871a3cd7a1.tar.xz gsoc2013-evolution-ff9fcffeca2bdc37a91e0c2f0cb51f871a3cd7a1.tar.zst gsoc2013-evolution-ff9fcffeca2bdc37a91e0c2f0cb51f871a3cd7a1.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.c | 32 |
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; |