Re: DND in TreeView

2009-03-30 Thread Murray Cumming
On Tue, 2009-03-31 at 08:37 +0800, Deng Xiyue wrote: > On Mon, Mar 30, 2009 at 10:06:41AM -0400, Paul Davis wrote: > > On Sat, Mar 28, 2009 at 11:08 PM, Deng Xiyue wrote: > > > > > > > > > OTOH, the docs is not quite clear about how to handle DND in TreeView,

Re: DND in TreeView

2009-03-30 Thread Deng Xiyue
On Mon, Mar 30, 2009 at 10:06:41AM -0400, Paul Davis wrote: > On Sat, Mar 28, 2009 at 11:08 PM, Deng Xiyue wrote: > > > > > > OTOH, the docs is not quite clear about how to handle DND in TreeView, > > and I supposed such operation is quite common which merits an ex

Re: DND in TreeView

2009-03-30 Thread Paul Davis
On Sat, Mar 28, 2009 at 11:08 PM, Deng Xiyue wrote: > > > OTOH, the docs is not quite clear about how to handle DND in TreeView, > and I supposed such operation is quite common which merits an example. > The existing DND examples in TreeView is about how to use TreeView as a >

Re: DND in TreeView

2009-03-28 Thread Deng Xiyue
e to do what you should be doing. > OTOH, the docs is not quite clear about how to handle DND in TreeView, and I supposed such operation is quite common which merits an example. The existing DND examples in TreeView is about how to use TreeView as a general DND source or destination, which doe

Re: DND in TreeView

2009-03-28 Thread José Alburquerque
On Sat, 2009-03-28 at 13:38 +0800, Deng Xiyue wrote: > Sorry again for the delay of my reply. > > Thanks a lot for the patch. It makes it clear that in both scenario the > delete signal is indeed emitted, but yields an invalid iterator, so my > code doesn't work. I also found I can use 'path[0]' t

Re: DND in TreeView

2009-03-27 Thread Deng Xiyue
On Wed, Mar 25, 2009 at 02:18:04PM -0400, José Alburquerque wrote: > On Wed, 2009-03-25 at 13:02 +0800, Deng Xiyue wrote: > > So, with the given test program, what I'm experiencing is: > > > > 1. If I drag the last row in a TreeView to other place within the same > > TreeView, no delete signal is

Re: DND in TreeView

2009-03-25 Thread José Alburquerque
On Wed, 2009-03-25 at 14:18 -0400, José Alburquerque wrote: > The patch I've attached exemplifies how to do that. > You'll probably have to make adjustment to the row numbers based on > whether an insertion or a deletion has taken place (I'm not sure). It's a reversed patch (sorry). I hope you ca

Re: DND in TreeView

2009-03-25 Thread José Alburquerque
On Wed, 2009-03-25 at 13:02 +0800, Deng Xiyue wrote: > So, with the given test program, what I'm experiencing is: > > 1. If I drag the last row in a TreeView to other place within the same > TreeView, no delete signal is emitted, only insert signal got signaled. > > 2. If I drag any row (that is

Re: DND in TreeView

2009-03-24 Thread Deng Xiyue
row of a DND to perform the expected action. > > Still I'd like to know whether it is the supposed way to handle DND in > > TreeView. > > I think the error is in the code inside the signal handlers because the > modified code I sent you outputs the statements I inserted

Re: DND in TreeView

2009-03-24 Thread José Alburquerque
ed. > Still I'd like to know whether it is the supposed way to handle DND in > TreeView. I think the error is in the code inside the signal handlers because the modified code I sent you outputs the statements I inserted when *any* row is moved anywhere in the treeview (this is true a

Re: DND in TreeView

2009-03-24 Thread Deng Xiyue
dlers so you can confirm. > Maybe something you're trying do is not quite working the way you > expect. Maybe ensure that the methods you're calling do what they're > supposed to and that your logic is right. HTH. > I've refined the testcase with output from both inse

Re: DND in TreeView

2009-03-19 Thread Deng Xiyue
José Alburquerque writes: > On Fri, 2009-03-20 at 07:48 +0800, Deng Xiyue wrote: >> José Alburquerque writes: >> >> > On Fri, 2009-03-20 at 00:17 +0800, Deng Xiyue wrote: >> >> Sorry for the delay in preparing a testcase for being busy in the past >> >> weeks. The test program is based on one

Re: DND in TreeView

2009-03-19 Thread José Alburquerque
On Fri, 2009-03-20 at 07:48 +0800, Deng Xiyue wrote: > José Alburquerque writes: > > > On Fri, 2009-03-20 at 00:17 +0800, Deng Xiyue wrote: > >> Sorry for the delay in preparing a testcase for being busy in the past > >> weeks. The test program is based on one of the examples with callbacks > >

Re: DND in TreeView

2009-03-19 Thread Deng Xiyue
José Alburquerque writes: > On Fri, 2009-03-20 at 00:17 +0800, Deng Xiyue wrote: >> Sorry for the delay in preparing a testcase for being busy in the past >> weeks. The test program is based on one of the examples with callbacks >> connected to the aforementioned signals, cout the deleted and in

Re: DND in TreeView

2009-03-19 Thread José Alburquerque
On Fri, 2009-03-20 at 00:17 +0800, Deng Xiyue wrote: > Sorry for the delay in preparing a testcase for being busy in the past > weeks. The test program is based on one of the examples with callbacks > connected to the aforementioned signals, cout the deleted and inserted > rows to stdout. By DND

Re: DND in TreeView

2009-03-19 Thread Deng Xiyue
Jonathon Jongsma writes: > Deng Xiyue wrote: >> Deng Xiyue writes: >> >>> Hi gtkmm maintainers: >>> >>> I'm having some problem on handling DND in a TreeView. I tried to >>> handle DND with signals in Gtk::TreeModel: >>> Gtk::TreeModel::signal_row_deleted() and >>> Gtk::TreeModel::signal_row_in

Re: DND in TreeView

2009-03-08 Thread Jonathon Jongsma
Deng Xiyue wrote: Deng Xiyue writes: Hi gtkmm maintainers: I'm having some problem on handling DND in a TreeView. I tried to handle DND with signals in Gtk::TreeModel: Gtk::TreeModel::signal_row_deleted() and Gtk::TreeModel::signal_row_inserted(). In most cases they work well, except on the

Re: DND in TreeView

2009-03-07 Thread Deng Xiyue
Deng Xiyue writes: > Hi gtkmm maintainers: > > I'm having some problem on handling DND in a TreeView. I tried to > handle DND with signals in Gtk::TreeModel: > Gtk::TreeModel::signal_row_deleted() and > Gtk::TreeModel::signal_row_inserted(). In most cases they work well, > except on the last ro

DND in TreeView

2009-03-05 Thread Deng Xiyue
Hi gtkmm maintainers: I'm having some problem on handling DND in a TreeView. I tried to handle DND with signals in Gtk::TreeModel: Gtk::TreeModel::signal_row_deleted() and Gtk::TreeModel::signal_row_inserted(). In most cases they work well, except on the last row: when dragging the last row away