# \[PATCH\] Add row-draggable and row-drop-possible as signals

**URL:** <https://www.ruby-forum.com/t/patch-add-row-draggable-and-row-drop-possible-as-signals/65136>\
**Category:** Ruby-Gnome 2\
**Created:** [August 16, 2006, 2:11pm UTC](https://www.ruby-forum.com/t/patch-add-row-draggable-and-row-drop-possible-as-signals/65136 "2006-08-16T14:11:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philipp\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b77776/32.png) [@Philipp\_K](https://www.ruby-forum.com/u/Philipp_K)\
**Post date:** [August 16, 2006, 2:11pm UTC](https://www.ruby-forum.com/t/patch-add-row-draggable-and-row-drop-possible-as-signals/65136/1 "2006-08-16T14:11:05Z")

</div>

* * *

Using Tomcat but need to do more? Need to support web services,  
security?  
Get stuff done quickly with pre-integrated technology to make your job  
easier  
Download IBM WebSphere Application Server v.1.0.1 based on Apache  
Geronimo  
[http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642](http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642)

---

<div class="post-metadata">

**Author:** ![Philipp\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b77776/32.png) [@Philipp\_K](https://www.ruby-forum.com/u/Philipp_K)\
**Post date:** [August 16, 2006, 4:23pm UTC](https://www.ruby-forum.com/t/patch-add-row-draggable-and-row-drop-possible-as-signals/65136/2 "2006-08-16T16:23:29Z")

</div>

Hi,

Could you show us a (small but complete)sample for this patch ?

On Wed, 16 Aug 2006 14:09:21 +0200  
Philipp K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> The patch itself is as non-intrusive as possible, but the new files  
> rbgtktreedrag.{c,h} do not stick to your coding style, so this might  
> need some adaption on commit by those who know it by heart.
> 
> I would be grateful if this patch is accepted, so that I could see the  
> DND API usable in future releases.
> 
> Kind regards,  
> Philipp K.

## –

.:% Masao M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

Using Tomcat but need to do more? Need to support web services,  
security?  
Get stuff done quickly with pre-integrated technology to make your job  
easier  
Download IBM WebSphere Application Server v.1.0.1 based on Apache  
Geronimo  
[http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642](http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642)

---

<div class="post-metadata">

**Author:** ![Philipp\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b77776/32.png) [@Philipp\_K](https://www.ruby-forum.com/u/Philipp_K)\
**Post date:** [August 16, 2006, 6:51pm UTC](https://www.ruby-forum.com/t/patch-add-row-draggable-and-row-drop-possible-as-signals/65136/3 "2006-08-16T18:51:32Z")

</div>

On Wed, 2006-08-16 at 23:20 +0900, Masao M. wrote:

> Could you show us a (small but complete)sample for this patch ?

I attached it. However I see that I can’t avoid the second part of the  
patch I first cut out. Gtk (also the Gtkmm samples for DND) crashes when  
an ancestor is moved into a descendant. To check this one has to access  
the row\_drag\_data of a Gtk::SelectionData. This part of the API is not  
exposed. I updated the patch to pass the Gtk::TreeStore and the  
Gtk::TreePath received from the selection instead. (If this is not  
desired, and if the original API should be exposed, I attached a second  
patch adding the necessary calls to Gtk::SelectionData.)

Kind regards,  
Philipp K.

---

<div class="post-metadata">

**Author:** ![Philipp\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b77776/32.png) [@Philipp\_K](https://www.ruby-forum.com/u/Philipp_K)\
**Post date:** [August 17, 2006, 2:47pm UTC](https://www.ruby-forum.com/t/patch-add-row-draggable-and-row-drop-possible-as-signals/65136/4 "2006-08-17T14:47:15Z")

</div>

Hi,

Unfortunately, your patch doesn’t work.

% ruby dnddemo.rb  
ruby: symbol lookup error:  
/usr/lib/ruby/site\_ruby/1.8/i686-linux/gtk2.so: undefined symbol:  
rb\_dnd\_list\_store\_get\_type

What should I do?

On Wed, 16 Aug 2006 18:51:09 +0200  
Philipp K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> patch adding the necessary calls to Gtk::SelectionData.)
> 
> Kind regards,  
> Philipp K.

## –

.:% Masao M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

Using Tomcat but need to do more? Need to support web services,  
security?  
Get stuff done quickly with pre-integrated technology to make your job  
easier  
Download IBM WebSphere Application Server v.1.0.1 based on Apache  
Geronimo  
[http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642](http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642)

---

<div class="post-metadata">

**Author:** ![Philipp\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b77776/32.png) [@Philipp\_K](https://www.ruby-forum.com/u/Philipp_K)\
**Post date:** [August 17, 2006, 8:51pm UTC](https://www.ruby-forum.com/t/patch-add-row-draggable-and-row-drop-possible-as-signals/65136/5 "2006-08-17T20:51:07Z")

</div>

On Thu, 2006-08-17 at 21:45 +0900, Masao M. wrote:

> Unfortunately, your patch doesn’t work.  
> % ruby dnddemo.rb  
> ruby: symbol lookup error: /usr/lib/ruby/site\_ruby/1.8/i686-linux/gtk2.so: undefined symbol: rb\_dnd\_list\_store\_get\_type

That looks like the new file is not being picked up by the linker. Is it  
possible that you did not re-run extconf.rb?

Kind regards,  
Philipp K.

BTW: 20060816\_ruby-gnome2\_0.14.1\_fetch\_data\_from\_selection.diff does  
also contains the other patch, by accident.

* * *

Using Tomcat but need to do more? Need to support web services,  
security?  
Get stuff done quickly with pre-integrated technology to make your job  
easier  
Download IBM WebSphere Application Server v.1.0.1 based on Apache  
Geronimo  
[http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642](http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642)

---

<div class="post-metadata">

**Author:** ![Philipp\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b77776/32.png) [@Philipp\_K](https://www.ruby-forum.com/u/Philipp_K)\
**Post date:** [August 22, 2006, 5:34pm UTC](https://www.ruby-forum.com/t/patch-add-row-draggable-and-row-drop-possible-as-signals/65136/6 "2006-08-22T17:34:40Z")

</div>

Hi,

On Wed, 16 Aug 2006 14:09:21 +0200  
Philipp K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> The patch itself is as non-intrusive as possible, but the new files  
> rbgtktreedrag.{c,h} do not stick to your coding style, so this might  
> need some adaption on commit by those who know it by heart.
> 
> I would be grateful if this patch is accepted, so that I could see the  
> DND API usable in future releases.

I checked it. I’ll add the feature. But as you say, the coding style is  
defferent from ours. And it may be better both of signals are  
implemented to  
Gtk::TreeDragDest, Gtk::TreeDragSource, not Gtk::ListStore,  
Gtk::TreeStore.

Thanks.

–  
.:% Masao M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

Using Tomcat but need to do more? Need to support web services,  
security?  
Get stuff done quickly with pre-integrated technology to make your job  
easier  
Download IBM WebSphere Application Server v.1.0.1 based on Apache  
Geronimo  
[http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642](http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642)

---

<div class="post-metadata">

**Author:** ![Philipp\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b77776/32.png) [@Philipp\_K](https://www.ruby-forum.com/u/Philipp_K)\
**Post date:** [August 22, 2006, 6:26pm UTC](https://www.ruby-forum.com/t/patch-add-row-draggable-and-row-drop-possible-as-signals/65136/7 "2006-08-22T18:26:46Z")

</div>

On Wed, 2006-08-23 at 00:19 +0900, Masao M. wrote:

> I checked it. I’ll add the feature. But as you say, the coding style is  
> defferent from ours.

That should not be that hard to fix, it is not much code. The patch to  
the already existing files hopefully adhered to it, though.

> And it may be better both of signals are implemented to  
> Gtk::TreeDragDest, Gtk::TreeDragSource, not Gtk::ListStore, Gtk::TreeStore.

Well, yes, I wasn’t able to figure how to do that. The TreeDrag(Dest|  
Source) code looked at bit like dummy code. I think you need to derive  
anyway, to override vfuncs of an interface, and as there is no  
possibility to code a generic store directly from within Ruby this  
looked like the best way to me, but then I am not expirienced with this  
extension. It should be _documented_ for TreeDrag(Dest|Source), though.

Kind regards,  
Philipp K.

* * *

Using Tomcat but need to do more? Need to support web services,  
security?  
Get stuff done quickly with pre-integrated technology to make your job  
easier  
Download IBM WebSphere Application Server v.1.0.1 based on Apache  
Geronimo  
[http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642](http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642)
