diff options
author | Srinivasa Ragavan <sragavan@gnome.org> | 2010-07-20 00:21:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-07-26 09:30:01 +0800 |
commit | acd24acae600973b7aa2345d46c494a9c44244f8 (patch) | |
tree | b245e477fe53c366c632a74d84332d476b1863f3 /mail/e-mail-paned-view.c | |
parent | fa7a4af975007fe0c964f12e5138b869ba26faef (diff) | |
download | gsoc2013-evolution-acd24acae600973b7aa2345d46c494a9c44244f8.tar.gz gsoc2013-evolution-acd24acae600973b7aa2345d46c494a9c44244f8.tar.zst gsoc2013-evolution-acd24acae600973b7aa2345d46c494a9c44244f8.zip |
Add animations for selecting mail and search.
Diffstat (limited to 'mail/e-mail-paned-view.c')
-rw-r--r-- | mail/e-mail-paned-view.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c index 67268df399..57f0c00704 100644 --- a/mail/e-mail-paned-view.c +++ b/mail/e-mail-paned-view.c @@ -48,6 +48,11 @@ #include "message-list.h" #include "e-mail-reader-utils.h" +#if HAVE_CLUTTER +#include <clutter/clutter.h> +#include <mx/mx.h> +#include <clutter-gtk/clutter-gtk.h> +#endif #define E_SHELL_WINDOW_ACTION_GROUP_MAIL(window) \ E_SHELL_WINDOW_ACTION_GROUP ((window), "mail") @@ -57,6 +62,7 @@ struct _EMailPanedViewPrivate { GtkWidget *scrolled_window; GtkWidget *message_list; GtkWidget *search_bar; + GtkWidget *preview; EMFormatHTMLDisplay *formatter; GalViewInstance *view_instance; @@ -178,7 +184,9 @@ mail_paned_view_message_selected_cb (EMailPanedView *view, const gchar *folder_uri; const gchar *key; gchar *group_name; - +#if HAVE_CLUTTER + ClutterActor *actor = g_object_get_data ((GObject *)view->priv->preview, "actor"); +#endif folder_uri = message_list->folder_uri; /* This also gets triggered when selecting a store name on @@ -201,6 +209,17 @@ mail_paned_view_message_selected_cb (EMailPanedView *view, e_shell_view_set_state_dirty (shell_view); g_free (group_name); + +#if HAVE_CLUTTER + if (actor) { + clutter_actor_set_opacity (actor, 0); + clutter_actor_animate (actor, CLUTTER_EASE_OUT_SINE, 150, + "opacity", 255, + NULL); + } + +#endif + } static void @@ -632,6 +651,7 @@ mail_paned_view_constructed (GObject *object) gtk_widget_show (GTK_WIDGET (web_view)); widget = e_preview_pane_new (web_view); + priv->preview = widget; gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, FALSE); gtk_widget_show (widget); @@ -1114,3 +1134,9 @@ e_mail_paned_view_hide_message_list_pane (EMailPanedView *view, gtk_widget_hide (priv->scrolled_window); } + +GtkWidget * +e_mail_paned_view_get_preview (EMailPanedView *view) +{ + return view->priv->preview; +} |