Re: drag-and-drop multiple items from a TreeView
- From: muppet <scott asofyet org>
- To: Jeff 'japhy' Pinyan <japhy perlmonk org>
- Cc: GTK-Perl Mailing List <gtk-perl-list gnome org>
- Subject: Re: drag-and-drop multiple items from a TreeView
- Date: Mon, 28 Mar 2005 21:01:55 -0500
On Mar 27, 2005, at 6:58 PM, Jeff 'japhy' Pinyan wrote:
$l_tree->enable_model_drag_source(
['GDK_SHIFT_MASK', 'GDK_CONTROL_MASK', 'GDK_BUTTON1_MASK'],
'GDK_ACTION_MOVE',
$l_entry
);
$r_tree->enable_model_drag_dest('GDK_ACTION_MOVE', $l_entry);
The problem is not SELECTING multiple items (I have that taken care
of), the problem is the widget is not dragging the items when I hold
the left mouse button down when Shift or Control is pressed.
In fact, the GDK_*_MASK flags I'm passing don't appear to be doing
anything at all. I can replace them with just [], and the single-item
drag works...
the button mask is passed straight to gtk_drag_source_set(), which
stores them away for later use in the private helper function
gtk_drag_source_event_cb(), which uses the value to determine whether a
grab should start. this function only checks the button mask, and as
such, the shift-mask and control-mask are just ignored. for better or
worse, it seems to be on purpose. it is, after all, a button mask, and
not a modifier state mask.
using the simplelist.pl example set to reorderable, i can get drags to
start regardless of whether shift or control are pressed, but with
control the drop site doesn't move.
--
Without treatment, a common cold will last about seven days.
With treatment, it will last about a week.
-- conventional wisdom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]