Archive

Archive for February, 2007

Drag and drop with sorted tree models (2)

February 8th, 2007 svillar No comments

After the previous post, I improved a little bit the drag and drop example. This time, I added another three view at the right. Now you can drag a row in the right tree view to a node of the left tree view.

Another improvements is the support of multiple actions, I mean, the drag & drop can now move a row (as in the first version) or copy it (just press the Control key before dropping a row). It’s easy to see the different behaviours if you drag and drop nodes of the left tree view. On the other hand if you drag a row of the right tree view to a node of the left one, the row of the left will be removed except if you perform a copy (pressing Control button).

You can download it here.

Enjoy.

Categories: Hacking Tags:

Drag and drop with sorted tree models

February 7th, 2007 svillar No comments

I’ve recently been adding drag and drop support to a widget that is basically a GtkTreeView with an associated GtkTreeModelSort. The gtk+ drag and drop API is weird, there are just few samples and is not very well documented.

Furthermore, the GtkTreeView has its own drag and drop functions so my mind was a mess.Then after some study I finally got an idea about all this stuff and decided to code a sample where to test the things I learned. This example is available here for you.

Hope this could help somebody.

BTW, I changed the look of my blog, I like this kind of changes so don’t expect this to be the last one

Categories: Hacking Tags:

Bad Behavior has blocked 27 access attempts in the last 7 days.