Re: GTK3 DND-Function don't except files
Sutou Kouhei <[email protected]> Sun, 29 Sep 2019 07:41:18 +0900 (JST)
| Newsgroups | gmane.comp.lang.ruby.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, Could you show runnable script instead of snippet? Thanks, -- kou In <[email protected]> "GTK3 DND-Function don't except files" on Sat, 28 Sep 2019 08:58:21 +0200, ulli bei Unity <[email protected]> wrote: > > Hi, > > up to now I worked with the following dnd function. It worked very > well, I could drop files and http-adresses from browser. > > Now I changed to Linux mint 19.2, dnd with files will not work > anymore. > > Unfortunately the dnd function aren't well described. > > UH > > > def create_drop_space cb > cb.drag_dest_set( Gtk::DestDefaults::ALL, [['text/plain', 0, 0]], > Gdk::DragAction::COPY) > cb.signal_connect('drag_data_received') do |w, context, x, y, > data, info, time| > #Encoding.default_internal > type=data.text[0..4] # what is dropped ? > path=data.text[0..data.text.length] # length of dropped > aS=data.data > kwords=cb.active_iter[0].split(',') > save_dnd_data data, kwords > end > > end > Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>