diff options
author | Srinivasa Ragavan <sragavan@gnome.org> | 2010-07-20 23:25:16 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-07-26 09:30:01 +0800 |
commit | 0d51f6658348f8a8c33326f5ad11dad76d6d1642 (patch) | |
tree | fcb4c62a9f4afb45e96b2f28f6ed3a5d26a9a60b /mail/e-mail-notebook-view.c | |
parent | 6b263851cac1e88e0c59fe6424da6f2f5d13e9f5 (diff) | |
download | gsoc2013-evolution-0d51f6658348f8a8c33326f5ad11dad76d6d1642.tar.gz gsoc2013-evolution-0d51f6658348f8a8c33326f5ad11dad76d6d1642.tar.zst gsoc2013-evolution-0d51f6658348f8a8c33326f5ad11dad76d6d1642.zip |
Make clutter mode even more appealing.
Diffstat (limited to 'mail/e-mail-notebook-view.c')
-rw-r--r-- | mail/e-mail-notebook-view.c | 39 |
1 files changed, 12 insertions, 27 deletions
diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c index 34ebd1d7b7..d5f3109b74 100644 --- a/mail/e-mail-notebook-view.c +++ b/mail/e-mail-notebook-view.c @@ -71,37 +71,18 @@ static EMailViewClass *parent_class; static GType mail_notebook_view_type; #if HAVE_CLUTTER -struct _anim_data { - EMailNotebookView *view; - int page; -}; - -static void -start_tab_switch_cb (ClutterAnimation *animation, - struct _anim_data *data) -{ - gtk_notebook_set_current_page (data->view->priv->book, data->page); - animation = clutter_actor_animate ((ClutterActor *)data->view->priv->actor, CLUTTER_EASE_IN_SINE, 150, - "opacity", 255, - NULL); - -} - - static void mnv_set_current_tab (EMailNotebookView *view, int page) { ClutterAnimation *animation; - struct _anim_data *data = g_new0 (struct _anim_data, 1); - - data->view = view; - data->page = page; - animation = clutter_actor_animate ((ClutterActor *)view->priv->actor, CLUTTER_EASE_OUT_SINE, 150, - "opacity", 0, + clutter_actor_set_opacity (view->priv->actor, 0); + gtk_notebook_set_current_page (view->priv->book, page); + animation = clutter_actor_animate ((ClutterActor *)view->priv->actor, CLUTTER_EASE_IN_SINE, 500, + "opacity", 255, NULL); - g_signal_connect_after (animation, "completed", G_CALLBACK(start_tab_switch_cb), data); + } #endif @@ -153,7 +134,6 @@ mnv_page_changed (GtkNotebook *book, GtkNotebookPage *page, EMFolderTree *tree; const char *uri = e_mail_reader_get_folder_uri (E_MAIL_READER(mview)); - g_object_get (sidebar, "folder-tree", &tree, NULL); if (uri) em_folder_tree_set_selected (tree, uri, FALSE); @@ -744,6 +724,7 @@ mail_netbook_view_open_mail (EMailView *view, const char *uid, EMailNotebookView EMailTab *tab; ClutterActor *clone; ClutterTimeline *timeline; + GtkWidget *mlist; e_mail_tab_set_active (e_mail_tab_picker_get_tab (priv->tab_picker, e_mail_tab_picker_get_current_tab (priv->tab_picker)), @@ -766,10 +747,11 @@ mail_netbook_view_open_mail (EMailView *view, const char *uid, EMailNotebookView camel_message_info_subject(info))); #if HAVE_CLUTTER + mlist = e_mail_reader_get_message_list (E_MAIL_READER(pane)); mnv_set_current_tab (nview, page); g_object_set_data ((GObject *)priv->current_view, "stage", priv->stage); - g_object_set_data ((GObject *)preview, "stage", priv->stage); - g_object_set_data ((GObject *)preview, "actor", priv->actor); + g_object_set_data ((GObject *)mlist, "stage", priv->stage); + g_object_set_data ((GObject *)mlist, "preview-actor", priv->actor); #else gtk_notebook_set_current_page (priv->book, page); #endif @@ -838,6 +820,9 @@ mail_notebook_view_set_folder (EMailReader *reader, new_view = g_hash_table_lookup (priv->views, folder_uri); if (new_view) { int curr = emnv_get_page_num (E_MAIL_NOTEBOOK_VIEW (reader), new_view); + + if (curr == e_mail_tab_picker_get_current_tab (priv->tab_picker)) + return; #if HAVE_CLUTTER EMailTab *tab; |