1998-12-12 Owen Taylor <otaylor@gtk.org>

* gtkdtree.c (gtk_dtree_destroy): Remove timer upon
	destruction to be safe. (Should this, and
	dtree->timer_id itself be in gscreen.c instead?)

	* gscreen.c (panel_tree_drag_leave): Change == to !=
	so that timeouts are properly removed.
This commit is contained in:
Owen Taylor 1998-12-12 19:29:38 +00:00
parent 67851d9331
commit 5344eb2d94
3 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,12 @@
1998-12-12 Owen Taylor <otaylor@gtk.org>
* gtkdtree.c (gtk_dtree_destroy): Remove timer upon
destruction to be safe. (Should this, and
dtree->timer_id itself be in gscreen.c instead?)
* gscreen.c (panel_tree_drag_leave): Change == to !=
so that timeouts are properly removed.
1998-12-11 Matt Wilson <msw@redhat.com>
* gscreen.c: The solid lines in the tree are kinda harsh. Replace

View File

@ -1579,6 +1579,7 @@ panel_tree_drag_motion (GtkWidget *widget, GdkDragContext *ctx, int x, int y, gu
dtree->drag_motion_y = y;
if (panel_tree_scrolling_is_desirable (panel, x, y)){
dtree->timer_id = gtk_timeout_add (60, panel_tree_scroll, data);
return TRUE;
}
@ -1587,7 +1588,6 @@ panel_tree_drag_motion (GtkWidget *widget, GdkDragContext *ctx, int x, int y, gu
GTK_CLIST (widget), x, y, &row, &col);
dtree->timer_id = gtk_timeout_add (200, tree_drag_open_directory, data);
return TRUE;
}
@ -1602,8 +1602,7 @@ panel_tree_drag_leave (GtkWidget *widget, GdkDragContext *ctx, int x, int y, gui
{
GtkDTree *dtree = GTK_DTREE (widget);
printf ("Got drag_leave\n");
if (dtree->timer_id == -1){
if (dtree->timer_id != -1){
gtk_timeout_remove (dtree->timer_id);
dtree->timer_id = -1;
}

View File

@ -377,6 +377,9 @@ gtk_dtree_destroy (GtkObject *object)
gdk_bitmap_unref (dtree->bitmap_open);
gdk_bitmap_unref (dtree->bitmap_close);
if (dtree->timer_id)
gtk_timeout_remove (dtree->timer_id);
(GTK_OBJECT_CLASS (parent_class))->destroy (object);
}