U++ framework
Do not panic. Ask here before giving up.

Home » U++ TheIDE » U++ TheIDE: CodeEditor, Assist++, Topic++ » Please bring back drag'n'drop copy
Please bring back drag'n'drop copy [message #21095] Sun, 03 May 2009 19:45 Go to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

TheIDE has nice behaviour to copy text: select text, pressing Ctrl, drag'n'drop text to destination, and it is copied.
But since one of the latest builds this feature is broken: text is no more moved (to be copied) while pressing Ctrl first. To copy, one should select text, then start dragging, then press Ctrl, then drop text,- a proccess is much less intuitive. Please bring default copying behaviour back.
Re: Please bring back drag'n'drop copy [message #21104 is a reply to message #21095] Sun, 03 May 2009 22:49 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
OS?

Svn Head works in Win32.

1071 works in PCBSD (no time to check head).

Svn Head works in Ubuntu...

Mirek
Re: Please bring back drag'n'drop copy [message #21105 is a reply to message #21104] Sun, 03 May 2009 23:13 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

WinXP SP2
Re: Please bring back drag'n'drop copy [message #21106 is a reply to message #21105] Sun, 03 May 2009 23:55 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello Mindtraveller

I have WinXP SP3 and it seems to work:

Select-Drag-Drop: moves
Select-Drag-Drop (with Ctrl in any time): copies

Best regards
Koldo

P.D.: I did not know about that option before your post!


Best regards
Iñaki
Re: Please bring back drag'n'drop copy [message #21111 is a reply to message #21106] Mon, 04 May 2009 08:24 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Strange. I`ve just checked again with Ctrl pressing BEFORE dragging - and it didn`t work!

P.S. It looks like TheIDE has vast sea of comfortable features less documented. For example, I`ve just discovered Shift+Tab - a wonderful thing to align blocks! As always U++ along with TheIDE is full of surprises Very Happy
Re: Please bring back drag'n'drop copy [message #21114 is a reply to message #21111] Mon, 04 May 2009 09:38 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello Mindtraveller

Double click so all the line is highlighted and select again to drag and drop.

Does it work?

Best regards
Koldo


Best regards
Iñaki
Re: Please bring back drag'n'drop copy [message #21116 is a reply to message #21114] Mon, 04 May 2009 09:57 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Double clicking the line with text doesn`t make this line selected (which TheIDE build are you using?) - for me it works only for empty line.

My config is: TheIDE 902r186, Windows XP Professional SP2.
Re: Please bring back drag'n'drop copy [message #21117 is a reply to message #21111] Mon, 04 May 2009 10:03 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Mon, 04 May 2009 02:24

Strange. I`ve just checked again with Ctrl pressing BEFORE dragging - and it didn`t work!



Strange. Maybe the file is somehow specific?

Quote:


P.S. It looks like TheIDE has vast sea of comfortable features less documented. For example, I`ve just discovered Shift+Tab - a wonderful thing to align blocks! As always U++ along with TheIDE is full of surprises Very Happy


Actually, this one is documented... Smile

http://www.ultimatepp.org/app$ide$Keys$en-us.html

Anyway, I guess there is time to write some "tips" document of TheIDE.

Mirek
Re: Please bring back drag'n'drop copy [message #21118 is a reply to message #21116] Mon, 04 May 2009 10:05 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Mon, 04 May 2009 03:57

Double clicking the line with text doesn`t make this line selected (which TheIDE build are you using?) - for me it works only for empty line.



Tripple-clicking does.

Quote:


My config is: TheIDE 902r186, Windows XP Professional SP2.



Well, "902r186" is no longer relevant - we are not updating "version.h" in svn at the moment (but it is something to consider).

If you are building from svn, please use svn revision number as reference.

Releases replace version.h with this svn rev number.

Mirek
Re: Please bring back drag'n'drop copy [message #21144 is a reply to message #21118] Tue, 05 May 2009 09:35 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

luzr wrote on Mon, 04 May 2009 12:05

Well, "902r186" is no longer relevant - we are not updating "version.h" in svn at the moment (but it is something to consider).

If you are building from svn, please use svn revision number as reference.
Then it would be good to write SVN version number in About dialog (instead of deprecated ***r***) to avoid any confusion in future.

[Updated on: Tue, 05 May 2009 09:36]

Report message to a moderator

Re: Please bring back drag'n'drop copy [message #21207 is a reply to message #21144] Sat, 09 May 2009 17:28 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Tue, 05 May 2009 03:35

luzr wrote on Mon, 04 May 2009 12:05

Well, "902r186" is no longer relevant - we are not updating "version.h" in svn at the moment (but it is something to consider).

If you are building from svn, please use svn revision number as reference.
Then it would be good to write SVN version number in About dialog (instead of deprecated ***r***) to avoid any confusion in future.



I guess you are right.

I hoped for some automated solution.... Any suggestions? Smile

Mirek

[Updated on: Sat, 09 May 2009 17:35]

Report message to a moderator

Re: Please bring back drag'n'drop copy [message #21209 is a reply to message #21095] Sat, 09 May 2009 20:34 Go to previous messageGo to next message
kodos is currently offline  kodos
Messages: 111
Registered: March 2008
Experienced Member
Not a solution, but I hope a link with the right informations Wink
http://subversion.tigris.org/faq.html#version-value-in-sourc e
Re: Please bring back drag'n'drop copy [message #21214 is a reply to message #21209] Sat, 09 May 2009 22:40 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Solution could be straightforward: SVN server could generate some file (like version.h with single line like "define UPP_REVISION 1153") which could be included into U++ and used.
This link proposes simple solution, but I don`t kknow if it can be applied to server: http://blog.taragana.com/index.php/archive/how-to-add-revisi on-number-id-automatically-to-subversion-files-in-two-simple -steps/
Re: Please bring back drag'n'drop copy [message #21225 is a reply to message #21214] Sun, 10 May 2009 11:38 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Sat, 09 May 2009 16:40

Solution could be straightforward: SVN server could generate some file (like version.h with single line like "define UPP_REVISION 1153") which could be included into U++ and used.
This link proposes simple solution, but I don`t kknow if it can be applied to server: http://blog.taragana.com/index.php/archive/how-to-add-revisi on-number-id-automatically-to-subversion-files-in-two-simple -steps/


Sure, this what we use for releases.

Anyway, with svn itself the situation is a little bit more complex. I could do what you propose, BUT it would mean that each commit to svn would generate another revision just for the sake of fixing version.h (to commit changed version.h).

Another option is to add svnversion support to theide compile process.

I have to say neither option looks good enough for me now. Besides, is it so much hard to run svnversion on your trunk copy before posting a message here? Smile

(In any case, you should always check with svn head to find out whether the bug was not fixed meanwhile).

Anyway, back to the topic. Does DnD work for you now or not?

Mirek
Re: Please bring back drag'n'drop copy [message #21229 is a reply to message #21225] Sun, 10 May 2009 12:48 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

No, it doesn`t.
Re: Please bring back drag'n'drop copy [message #21231 is a reply to message #21229] Sun, 10 May 2009 13:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
OK. May I ask for some tests?

- DnD in some non-U++ app first, e.g. wordpad

- DnD in U++ editfields (E.g. in find dialog)

- DnD from theide to wordpad

- DnD from wordpad to theide

(For me, all of above works just fine..)

Mirek
Re: Please bring back drag'n'drop copy [message #21232 is a reply to message #21231] Sun, 10 May 2009 13:18 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Ehm, now carefully rereading the first post, I see that maybe the problem is when you (can) press "Ctrl", is that correct?

Mirek
Re: Please bring back drag'n'drop copy [message #21235 is a reply to message #21232] Sun, 10 May 2009 14:04 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Thank you for rereading initial post. I`ll detail what I mean.

Simple "moving" text works fine in any test case. The problem is specifically with cloning text. How do I used to clone text, by steps:
1. Select text
2. Hold Ctrl
3. Drag selected text (click + move)
4. Release Ctrl
5. Release left mouse button
The problem appeared in step (3), where in previous versions it was semi-transparent text with "+" sign at mouse cursor. Recently, at this step neither transparent text nor "+" is displayed. But the mouse cursor itself is changed as if I was dragging text (it is almost the same, but U++ DnD cursor has slightly more opaque shadow than native Windows` one).

Talking about the latest SVN version, after careful tests, I found following:
a) Cloning words/phrases became OK in all situations. The problem is with cloning with all the line selected (or a number of lines selected).
b) When I clone the line (after triple click or Shift+Down or mouse select - no difference), sometimes now it is cloned OK (previous version didn`t clone all the time). But sometimes (with about 50% probability) it fails to work the way I described above. And now failure is accompanied by interesting effect: at stage (4), when I release Ctrl, semitransparent text and "+" sign is appeared but disappeared after small period or after I move mouse button.

So, your tests:
1. OK
2. OK (!)
3. "sometimes fails" which is described above.
4. OK

I`ve uploaded video with DnD problem. Please notice rwo things in video:
1) each time I drag text, I press Ctrl first
2) Correct DnD mouse cursor is displayed highly minimized (a capture program bug).
http://www.youtube.com/watch?v=8wE27NHHa30
Re: Please bring back drag'n'drop copy [message #21236 is a reply to message #21235] Sun, 10 May 2009 17:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Sun, 10 May 2009 08:04

Thank you for rereading initial post. I`ll detail what I mean.

Simple "moving" text works fine in any test case. The problem is specifically with cloning text. How do I used to clone text, by steps:
1. Select text
2. Hold Ctrl
3. Drag selected text (click + move)
4. Release Ctrl
5. Release left mouse button



Well, if you do this in this sequence, releasing Ctrl before left mouse button, it would not (and should not) work in any "conforming" Win32 app: operation is finished by releasing mouse button and actual Ctrl status at this point is what is relevant.

Quote:


The problem appeared in step (3), where in previous versions it was semi-transparent text with "+" sign at mouse cursor. Recently, at this step neither transparent text nor "+" is displayed. But the mouse cursor itself is changed as if I was dragging text (it is almost the same, but U++ DnD cursor has slightly more opaque shadow than native Windows` one).



Is in it possible that something has changed in your Win32 setup?

This almost sounds like visual glitch, like that mouse cursor is not correctly defined or composed or something...

Quote:


Talking about the latest SVN version, after careful tests, I found following:
a) Cloning words/phrases became OK in all situations. The problem is with cloning with all the line selected (or a number of lines selected).
b) When I clone the line (after triple click or Shift+Down or mouse select - no difference), sometimes now it is cloned OK (previous version didn`t clone all the time). But sometimes (with about 50% probability) it fails to work the way I described above. And now failure is accompanied by interesting effect: at stage (4), when I release Ctrl, semitransparent text and "+" sign is appeared but disappeared after small period or after I move mouse button.



Correctly as with correct mouse shape?

Quote:


1) each time I drag text, I press Ctrl first



Well, as I explained above, [+] there is only visual quide. It should change on pressing/releasing Ctrl. Operation is defined n mouse release.

Mirek
Re: Please bring back drag'n'drop copy [message #21237 is a reply to message #21235] Sun, 10 May 2009 17:44 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Sun, 10 May 2009 08:04


2) Correct DnD mouse cursor is displayed highly minimized (a capture program bug).
http://www.youtube.com/watch?v=8wE27NHHa30



Hm, there is obvious visual artifact there instead of correct cursor image!

What is your visual setup? (Videocard etc...)

Mirek
Re: Please bring back drag'n'drop copy [message #21238 is a reply to message #21237] Sun, 10 May 2009 17:48 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Mirek, there are no visual artifacts, this is a capture program bug. It minimizes complex cursor and it looks bad on video, but on screen it is displayed correctly.
Re: Please bring back drag'n'drop copy [message #21239 is a reply to message #21238] Sun, 10 May 2009 18:23 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Sun, 10 May 2009 11:48

Mirek, there are no visual artifacts, this is a capture program bug. It minimizes complex cursor and it looks bad on video, but on screen it is displayed correctly.


So what is that garbage instead of text moved?

Mirek
Re: Please bring back drag'n'drop copy [message #21240 is a reply to message #21236] Sun, 10 May 2009 18:26 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

luzr wrote on Sun, 10 May 2009 19:41

1. Well, if you do this in this sequence, releasing Ctrl before left mouse button, it would not (and should not) work in any "conforming" Win32 app: operation is finished by releasing mouse button and actual Ctrl status at this point is what is relevant.

Actually I tried both ways (release Ctrl -> release mouse, release mouse -> release Ctrl) and the result was the same. Actually problems begin before this: as I`ve written above, pushing Ctrl then dragging text, doesn`t always lead to start of cloning process (you could see this on video).
Re: Please bring back drag'n'drop copy [message #21241 is a reply to message #21240] Sun, 10 May 2009 18:33 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Well, first of all, I am missing correct visual feedback. That makes it a bit confusing Smile

Therefore I wanted to resolve that first, if only to see when you press Ctrl (then I should see [+]). There is no sign of [+] never, so I suspect something is wrong with Icon....

Mirek
Re: Please bring back drag'n'drop copy [message #21242 is a reply to message #21241] Sun, 10 May 2009 19:04 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

http://www.youtube.com/watch?v=nY82enBpAnA
each time I press Ctrl before start dragging. And releasing Ctrl sometimes after / sometimes befor mouse button released - to test both cases.
Re: Please bring back drag'n'drop copy [message #21244 is a reply to message #21242] Sun, 10 May 2009 19:31 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
OK, I almost apologize to ask... Smile

If you press Ctrl after you start the drag, everything is OK?

If you press Ctrl before you start the drag, the result is move or copy or nothing?

If you do not press Ctrl, move is performed?

Mirek
Re: Please bring back drag'n'drop copy [message #21249 is a reply to message #21244] Sun, 10 May 2009 21:21 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

1. Yes.
2. Yes (it looks like the result is somehow connected with lag, because sometimes it passes lag before anything changed - you`ve seen that on video).
3. Yes.
Re: Please bring back drag'n'drop copy [message #21253 is a reply to message #21249] Sun, 10 May 2009 22:50 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Sun, 10 May 2009 15:21

1. Yes.
2. Yes (it looks like the result is somehow connected with lag, because sometimes it passes lag before anything changed - you`ve seen that on video).
3. Yes.


Does repley 2. mean that the result is random ?

Mirek
Re: Please bring back drag'n'drop copy [message #21257 is a reply to message #21253] Sun, 10 May 2009 23:21 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Definitely, yes.
Re: Please bring back drag'n'drop copy [message #21265 is a reply to message #21257] Mon, 11 May 2009 11:59 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
I am sorry, I have to ask again:)

Without Ctrl, result is 100% predictable and it is move.

With Ctrl, result is random.

(I just cannot believe that... Smile

Anyway, some DUMPs:

void UDropTarget::DnD(POINTL pl, bool drop, DWORD *effect, DWORD keys)
{
	dword e = *effect;
        LOG("DnD " << e == DROPEFFECT_COPY);
	*effect = DROPEFFECT_NONE;
	if(!ctrl)
		return;
	PasteClip d;
	d.dt = this;
	d.paste = drop;
	d.accepted = false;
	d.allowed = 0;
	d.action = 0;
	if(e & DROPEFFECT_COPY) {
		d.allowed = DND_COPY;
		d.action = DND_COPY;
	}
	if(e & DROPEFFECT_MOVE) {
		d.allowed |= DND_MOVE;
		if(Ctrl::GetDragAndDropSource())
			d.action = DND_MOVE;
	}
	if((keys & MK_CONTROL) && (d.allowed & DND_COPY))
		d.action = DND_COPY;
	if((keys & (MK_ALT|MK_SHIFT)) && (d.allowed & DND_MOVE))
		d.action = DND_MOVE;
	ctrl->DnD(Point(pl.x, pl.y), d);
        DDUMP(d.action);
	if(d.IsAccepted()) {
		if(d.action == DND_MOVE)
			*effect = DROPEFFECT_MOVE;
		if(d.action == DND_COPY)
			*effect = DROPEFFECT_COPY;
	}
}

STDMETHODIMP UDropSource::GiveFeedback(DWORD dwEffect)
{
LOG("GiveFeedback " << (dwEffect & DROPEFFECT_COPY) == DROPEFFECT_COPY);
	Image m = IsNull(move) ? copy : move;
	if((dwEffect & DROPEFFECT_COPY) == DROPEFFECT_COPY) {
		if(!IsNull(copy)) m = copy;
	}
	else
	if((dwEffect & DROPEFFECT_MOVE) == DROPEFFECT_MOVE) {
		if(!IsNull(move)) m = move;
	}
	else
		m = no;
	Ctrl::OverrideCursor(m);
	Ctrl::SetMouseCursor(m);
	return S_OK;
}


Try with Ctrl pushed....

Mirek
Re: Please bring back drag'n'drop copy [message #21266 is a reply to message #21265] Mon, 11 May 2009 12:41 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

And again Very Happy
> Without Ctrl, result is 100% predictable and it is move
YES!

>With Ctrl, result is random
Ctrl->drag = YES! (You`ve seen that on video, what a shame it doesn`t indicate pressed keys)
drag->Ctrl = WORKS 100%
So the problem is with initial period when Ctrl is ALREADY pressed before dragging start.

Your patch doesn`t compile (I patched Win32DnD.cpp):

> LOG("DnD " << e == DROPEFFECT_COPY);
error C2678: binary '==' : no operator found which takes a left-hand operand of type 'Upp::Stream' (or there is
no acceptable conversion)


> STDMETHODIMP UDropSource::GiveFeedback(DWORD dwEffect)
error C2027: use of undefined type 'Upp::UDropSource'

> LOG("GiveFeedback " << (dwEffect & DROPEFFECT_COPY) == DROPEFFECT_COPY);
error C2678: binary '==' : no operator found which takes a left-hand operand of type 'Upp::Stream' (or there is
no acceptable conversion)

... (about 5 more errors, please try to compile it)

[Updated on: Mon, 11 May 2009 12:43]

Report message to a moderator

Re: Please bring back drag'n'drop copy [message #21268 is a reply to message #21266] Mon, 11 May 2009 12:57 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Mon, 11 May 2009 06:41

And again Very Happy
> Without Ctrl, result is 100% predictable and it is move
YES!

>With Ctrl, result is random
Ctrl->drag = YES! (You`ve seen that on video, what a shame it doesn`t indicate pressed keys)
drag->Ctrl = WORKS 100%
So the problem is with initial period when Ctrl is ALREADY pressed before dragging start.

Your patch doesn`t compile (I patched Win32DnD.cpp):

> LOG("DnD " << e == DROPEFFECT_COPY);
error C2678: binary '==' : no operator found which takes a left-hand operand of type 'Upp::Stream' (or there is
no acceptable conversion)


> STDMETHODIMP UDropSource::GiveFeedback(DWORD dwEffect)
error C2027: use of undefined type 'Upp::UDropSource'

> LOG("GiveFeedback " << (dwEffect & DROPEFFECT_COPY) == DROPEFFECT_COPY);
error C2678: binary '==' : no operator found which takes a left-hand operand of type 'Upp::Stream' (or there is
no acceptable conversion)

... (about 5 more errors, please try to compile it)


Ah, sorry, put parenthesis around == operators please...

void UDropTarget::DnD(POINTL pl, bool drop, DWORD *effect, DWORD keys)
{
	dword e = *effect;
        LOG("DnD " << (e == DROPEFFECT_COPY));
	*effect = DROPEFFECT_NONE;
	if(!ctrl)
		return;
	PasteClip d;
	d.dt = this;
	d.paste = drop;
	d.accepted = false;
	d.allowed = 0;
	d.action = 0;
	if(e & DROPEFFECT_COPY) {
		d.allowed = DND_COPY;
		d.action = DND_COPY;
	}
	if(e & DROPEFFECT_MOVE) {
		d.allowed |= DND_MOVE;
		if(Ctrl::GetDragAndDropSource())
			d.action = DND_MOVE;
	}
        DDUMP(keys & MK_CONTROL);
	if((keys & MK_CONTROL) && (d.allowed & DND_COPY))
		d.action = DND_COPY;
	if((keys & (MK_ALT|MK_SHIFT)) && (d.allowed & DND_MOVE))
		d.action = DND_MOVE;
	ctrl->DnD(Point(pl.x, pl.y), d);
        DDUMP(d.action);
	if(d.IsAccepted()) {
		if(d.action == DND_MOVE)
			*effect = DROPEFFECT_MOVE;
		if(d.action == DND_COPY)
			*effect = DROPEFFECT_COPY;
	}
}

STDMETHODIMP UDropSource::GiveFeedback(DWORD dwEffect)
{
LOG("GiveFeedback " << ((dwEffect & DROPEFFECT_COPY) == DROPEFFECT_COPY));
	Image m = IsNull(move) ? copy : move;
	if((dwEffect & DROPEFFECT_COPY) == DROPEFFECT_COPY) {
		if(!IsNull(copy)) m = copy;
	}
	else
	if((dwEffect & DROPEFFECT_MOVE) == DROPEFFECT_MOVE) {
		if(!IsNull(move)) m = move;
	}
	else
		m = no;
	Ctrl::OverrideCursor(m);
	Ctrl::SetMouseCursor(m);
	return S_OK;
}
Re: Please bring back drag'n'drop copy [message #21285 is a reply to message #21268] Mon, 11 May 2009 18:24 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Sorry. I forgot to comment. Patch still doesn`t compile. Does it on your system?
Re: Please bring back drag'n'drop copy [message #21300 is a reply to message #21285] Tue, 12 May 2009 10:11 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Mon, 11 May 2009 12:24

Sorry. I forgot to comment. Patch still doesn`t compile. Does it on your system?


I have incorporated all logs into svn as optional. All you now need to do is to uncomment:

#define LLOG(x) LOG(x)

at the beginning of file.

I am interested in LOG of single DnD action that goes wrong.

(Of course, as soon as you have time, I understand your current constraints).

Mirek
Re: Please bring back drag'n'drop copy [message #21306 is a reply to message #21300] Tue, 12 May 2009 15:07 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Latest SVN build fixed that too.
Thank you!
Re: Please bring back drag'n'drop copy [message #21308 is a reply to message #21306] Tue, 12 May 2009 15:11 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Tue, 12 May 2009 09:07

Latest SVN build fixed that too.
Thank you!


Ehm you mean DnD now works as expected?

That would be weird... I have not done anything with it.

The only explanation is that it is somehow time-dependent, some weird sort of race condition is going on...

Mirek
Re: Please bring back drag'n'drop copy [message #21309 is a reply to message #21308] Tue, 12 May 2009 15:52 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Yes, the problem disappeared. IMO it was somehow connected with lag. So, no lag = no problem.
Re: Please bring back drag'n'drop copy [message #21313 is a reply to message #21309] Tue, 12 May 2009 16:59 Go to previous message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Tue, 12 May 2009 09:52

Yes, the problem disappeared. IMO it was somehow connected with lag. So, no lag = no problem.


I guess I will try to add some BIG artificial lag where it was, maybe it will reveal something interesting about DnD..

Mirek
Previous Topic: TheIDE help keyword search calls Firefox
Next Topic: Naviagot bar: 1 issue, 1 suggestion
Goto Forum:
  


Current Time: Sat Apr 25 14:33:14 GMT+2 2026

Total time taken to generate the page: 0.01001 seconds