diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-05-05 04:46:59 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-05-05 04:46:59 +0800 |
commit | 07b89016f77b35049b8f5c1099fb0ba827f4015a (patch) | |
tree | 2e394a107d3d0fabd13fb58405eab131a70986db /mail/em-folder-tree.c | |
parent | 7844d71521c917e28a0aa369f7881aeab9820604 (diff) | |
download | gsoc2013-evolution-07b89016f77b35049b8f5c1099fb0ba827f4015a.tar.gz gsoc2013-evolution-07b89016f77b35049b8f5c1099fb0ba827f4015a.tar.zst gsoc2013-evolution-07b89016f77b35049b8f5c1099fb0ba827f4015a.zip |
Fix for bug #55303, but ideally there would be a nicer way of doing this -
2004-05-04 Jeffrey Stedfast <fejj@ximian.com>
Fix for bug #55303, but ideally there would be a nicer way of
doing this - likely with some added ETree API but that's not
likely to happen anytime soon.
* em-folder-browser.c (scroll_idle_cb): Recall the saved scrollbar
position state and set it, then reconnect to the
message_list_scrolled signal.
(emfb_list_built): Calculate a default scrollbar position for
scroll_idle_cb to use if there's no saved state.
(emfb_set_folder): Disconnect from the message_list_scrolled
signal and the idle_scroll_id.
(emfb_list_scrolled): Save the scrollbar position state.
(emfb_destroy): Disconnect from list_scrolled_id and
idle_scroll_id.
svn path=/trunk/; revision=25794
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r-- | mail/em-folder-tree.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 714329327e..58d7bb1c44 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -46,6 +46,7 @@ #include <camel/camel-vtrash-folder.h> #include <camel/camel-stream-mem.h> #include <camel/camel-file-utils.h> +#include <camel/camel-stream-fs.h> #include "e-util/e-mktemp.h" #include "e-util/e-request.h" @@ -1404,6 +1405,7 @@ static gboolean tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guint time, EMFolderTree *emft) { struct _EMFolderTreePrivate *priv = emft->priv; + GtkTreeModel *model = (GtkTreeModel *) priv->model; GtkTreeViewDropPosition pos; GdkDragAction action = 0; GtkTreePath *path; @@ -1417,9 +1419,9 @@ tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guin if (priv->autoscroll_id == 0) priv->autoscroll_id = g_timeout_add (150, (GSourceFunc) tree_autoscroll, emft); - gtk_tree_model_get_iter (priv->model, &iter, path); + gtk_tree_model_get_iter (model, &iter, path); - if (gtk_tree_model_iter_has_child (priv->model, &iter) && !gtk_tree_view_row_expanded (priv->treeview, path)) { + if (gtk_tree_model_iter_has_child (model, &iter) && !gtk_tree_view_row_expanded (priv->treeview, path)) { if (priv->autoexpand_id != 0) { GtkTreePath *autoexpand_path; @@ -1427,7 +1429,7 @@ tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guin if (gtk_tree_path_compare (autoexpand_path, path) != 0) { /* row changed, restart timer */ gtk_tree_row_reference_free (priv->autoexpand_row); - priv->autoexpand_row = gtk_tree_row_reference_new (priv->model, path); + priv->autoexpand_row = gtk_tree_row_reference_new (model, path); g_source_remove (priv->autoexpand_id); priv->autoexpand_id = g_timeout_add (600, (GSourceFunc) tree_autoexpand, emft); } @@ -1435,7 +1437,7 @@ tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guin gtk_tree_path_free (autoexpand_path); } else { priv->autoexpand_id = g_timeout_add (600, (GSourceFunc) tree_autoexpand, emft); - priv->autoexpand_row = gtk_tree_row_reference_new (priv->model, path); + priv->autoexpand_row = gtk_tree_row_reference_new (model, path); } } else if (priv->autoexpand_id != 0) { gtk_tree_row_reference_free (priv->autoexpand_row); |