Re: GTK TreeView control in Windows (DND issue)
- From: Dieter Verfaillie <dieterv optionexplicit be>
- To: John Emmas <johne53 tiscali co uk>
- Cc: gtk-list gnome org
- Subject: Re: GTK TreeView control in Windows (DND issue)
- Date: Fri, 23 Sep 2011 11:55:40 +0200
Hi John,
Thanks for having another look at this!
On Fri, 23 Sep 2011 10:20:37 +0100, John Emmas wrote:
Just a final footnote to this issue (hopefully):-
I noticed pbor's comment in bugzilla about the inelegant use of
'dest_window' so I checked our mods and realised that we'd probably
reverted too much of the function. In fact, only the first 10 lines
or so need to be reverted. The remainder can be left in its 2.20
state. In fact, it's quite important to do it this way, since (in
the
more recent gdk library) the decision to use OLE2 style DnD is
dependent on a runtime condition, rather than the previous compile
time preprocessor directive. By reverting the entire function we'd
effectively undone that decision for this particular function. My
function in its entirety is shown below.
I'll have to point out that the current proposed patch on bug #616544
[1]
is more subtle than you think in that it is not a plain revert. It
already
does the right thing for the wip OLE2 DnD codepath :)
The dw vs dest_window remark by pbor was more a stylistic nitpicking
about assigning the result of gdk_win32_handle_table_lookup () to
*dest_window and then setting *dest_window again (in the patched
version)
for each branch of the if-else condition immediately following.
Compare:
## the original proposed patch ##
*dest_window = gdk_win32_handle_table_lookup (a.result);
if (*dest_window)
{
*dest_window = gdk_window_get_toplevel (dw);
g_object_ref (*dest_window);
}
else
*dest_window = gdk_window_foreign_new_for_display
(_gdk_display, a.result);
## the current proposed patch ##
dw = gdk_win32_handle_table_lookup (a.result);
if (dw)
{
*dest_window = gdk_window_get_toplevel (dw);
g_object_ref (*dest_window);
}
else
*dest_window = gdk_window_foreign_new_for_display
(_gdk_display, a.result);
##
Currently I don't have a
bugzilla account but I'll create one and transfer this comment over
to
bugzilla if that's more convenient.
For future discussion and patch review, doing it on bz might be a good
idea. You can always ping me on irc.gnome.org (aka gimpnet) too ;)
mvg,
Dieter
[1] https://bugzilla.gnome.org/attachment.cgi?id=196999
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]