PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Drag Drop between 2 filtered GtkIconViews (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Drag Drop between 2 filtered GtkIconViews
#103
wim stockman (User)
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Drag Drop between 2 filtered GtkIconViews 8 Months, 3 Weeks ago Karma: 0  
Hello everybody,

I have a filterd GtkIconview which I created
with the GtkTreeFilterModel it works fine
but when I drag from it to an other GtkIconview wich has also a GtkTreeFilterModel on it
I get a warning that I have to override the default
drag_data_received with an explaination to connect the
drag_data_received and call g_signal_stop_emission_by_name

but my program does what it has to do.

Does somebody know what to do about it?
Thank you
 
  The administrator has disabled public write access.
#104
kksou (Admin)
Admin
Posts: 391
graph
User Online Now Click here to see the profile of this user
Re:Drag Drop between 2 filtered GtkIconViews 8 Months, 3 Weeks ago Karma: 8  
Hi Wim,

Please take a look at this first.
http://www.kksou.com/php-gtk2/util/temp1.php

Will give a more complete sample code later.

Regards,
/kksou

note: the example only allows
- dragging from left to right
- append (and not insert)
 
 
Last Edit: 2008/03/05 16:15 By kksou.
  The administrator has disabled public write access.
#105
wim stockman (User)
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Re:Drag Drop between 2 filtered GtkIconViews 8 Months, 3 Weeks ago Karma: 0  
Hello Kksou, Thank you for your reply but the model you use is the standard one for GtkIconView and then I also don't get that issue.
I 'll post here both my models so you can see what I'm talking about.

$this->_model = new GtkListStore(Gtk::TYPE_LONG, //ADOBEID [0]
Gtk::TYPE_LONG, //ADOBECATEGORIEID [1]
Gtk::TYPE_STRING, // NAME [2]
Gtk::TYPE_STRING, // FULLPATH [3]
GdkPixbuf::gtype, //THUMBNAIL [4]
Gtk::TYPE_BOOLEAN); // MODELFILTER[5]

and the second :

$this->_model = new GtkListStore(Gtk::TYPE_LONG, //ID [0]
Gtk::TYPE_STRING, // NAME [1]
Gtk::TYPE_STRING, // FULLPATH [2]
Gtk::TYPE_LONG, //ADOBEID [3]
Gtk::TYPE_LONG, //SECTIONID [4]
GdkPixbuf::gtype, //THUMBNAIL [5]
Gtk::TYPE_BOOLEAN); //MODELFILTER[6]

Thank You

Wim Stockman
 
  The administrator has disabled public write access.
#106
kksou (Admin)
Admin
Posts: 391
graph
User Online Now Click here to see the profile of this user
Re:Drag Drop between 2 filtered GtkIconViews 8 Months, 2 Weeks ago Karma: 8  
Hi Wim,

1. Would you want to elaborate a bit more what do you mean by "the model used is the standard one for GtkIconView"?

I'm not aware of any standard model for GtkIconView. In GtkIconView, one can use any model, and then specify the thumnail with set_pixbuf_column($colnum) and the text labels with set_text_column($colnum).

2. I've used your model with GtkTreeModelFilter and come out with the following sample code: http://www.kksou.com/php-gtk2/util/temp2.php
Is this what you have in mind?

Regards,
/kksou
 
 
Last Edit: 2008/03/05 16:34 By kksou.
  The administrator has disabled public write access.
#107
wim stockman (User)
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Re:Drag Drop between 2 filtered GtkIconViews 8 Months, 2 Weeks ago Karma: 0  
Hello Kksou ,

I released it on http://php-gtk.eu/apps/pictaorga

Thank You for helping me out!
 
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2008. kksou.com. All Rights Reserved