# HG changeset patch # User Erik Grinaker # Date 1106591477 0 # Node ID 9e1db933e6ed0ac4d0f0e7f40d04e0d427962d95 # Parent e4d0c973acab3646afa5ec16e06298511280dc95 fixed a dnd bug diff -r e4d0c973acab3646afa5ec16e06298511280dc95 -r 9e1db933e6ed0ac4d0f0e7f40d04e0d427962d95 ChangeLog --- a/ChangeLog Mon Jan 24 18:11:39 2005 +0000 +++ b/ChangeLog Mon Jan 24 18:31:17 2005 +0000 @@ -1,6 +1,6 @@ Revelation changelog ----------------[ xxxx-xx-xx : 0.4.0 ]--------------- +---------------[ 2005-01-24: 0.4.0-pre1 ]--------------- 2005-01-24 Erik Grinaker @@ -15,6 +15,8 @@ * fixed a couple of io unit tests + * fixed a treeview drag/drop bug + 2005-01-08 Erik Grinaker * wrote more ui module unit tests (yawn) diff -r e4d0c973acab3646afa5ec16e06298511280dc95 -r 9e1db933e6ed0ac4d0f0e7f40d04e0d427962d95 NEWS --- a/NEWS Mon Jan 24 18:11:39 2005 +0000 +++ b/NEWS Mon Jan 24 18:31:17 2005 +0000 @@ -1,5 +1,5 @@ -xxxx-xx-xx: Revelation 0.4.0 -============================ +2005-01-24: Revelation 0.4.0-pre1 +================================= New features: - port to gtk+ 2.4 (new file dialog, combobox etc) diff -r e4d0c973acab3646afa5ec16e06298511280dc95 -r 9e1db933e6ed0ac4d0f0e7f40d04e0d427962d95 configure.ac --- a/configure.ac Mon Jan 24 18:11:39 2005 +0000 +++ b/configure.ac Mon Jan 24 18:31:17 2005 +0000 @@ -1,7 +1,7 @@ dnl initialize autoconf/automake AC_PREREQ(2.53) AC_INIT(src/revelation.in) -AM_INIT_AUTOMAKE(revelation, 0.4.0) +AM_INIT_AUTOMAKE(revelation, 0.4.0-pre1) dnl some macros diff -r e4d0c973acab3646afa5ec16e06298511280dc95 -r 9e1db933e6ed0ac4d0f0e7f40d04e0d427962d95 src/revelation.in --- a/src/revelation.in Mon Jan 24 18:11:39 2005 +0000 +++ b/src/revelation.in Mon Jan 24 18:31:17 2005 +0000 @@ -445,13 +445,25 @@ destpath, pos = destrow destiter = self.entrystore.get_iter(destpath) + destpath = self.entrystore.get_path(destiter) - # avoid drop to descendants + # avoid drops to current iter or descentants for sourceiter in sourceiters: - if self.entrystore.is_ancestor(sourceiter, destiter) == True or self.entrystore.get_path(sourceiter) == self.entrystore.get_path(destiter): + sourcepath = self.entrystore.get_path(sourceiter) + + if self.entrystore.is_ancestor(sourceiter, destiter) == True or sourcepath == destpath: context.finish(False, False, time) return + elif pos in ( gtk.TREE_VIEW_DROP_INTO_OR_BEFORE, gtk.TREE_VIEW_DROP_BEFORE ) and sourcepath[:-1] == destpath[:-1] and sourcepath[-1] == destpath[-1] - 1: + context.finish(False, False, time) + return + + elif pos in ( gtk.TREE_VIEW_DROP_INTO_OR_AFTER, gtk.TREE_VIEW_DROP_AFTER ) and sourcepath[:-1] == destpath[:-1] and sourcepath[-1] == destpath[-1] + 1: + context.finish(False, False, time) + return + + # move the entries if pos in ( gtk.TREE_VIEW_DROP_INTO_OR_BEFORE, gtk.TREE_VIEW_DROP_INTO_OR_AFTER): parent = destiter