mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 19:10:37 +00:00
Update front-end support for registering dnd types.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4407 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d0b2bf42c6
commit
a967db2efb
8 changed files with 240 additions and 126 deletions
|
@ -181,7 +181,12 @@ static Class responderClass;
|
|||
TEST_RELEASE(miniaturized_image);
|
||||
TEST_RELEASE(window_title);
|
||||
TEST_RELEASE(rectsBeingDrawn);
|
||||
[self unregisterDraggedTypes];
|
||||
|
||||
/*
|
||||
* FIXME This should not be necessary - the views should have removed
|
||||
* their drag types, so we should already have been removed.
|
||||
*/
|
||||
[GSCurrentContext() _removeDragTypes: nil fromWindow: [self windowNumber]];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -1464,17 +1469,17 @@ static Class responderClass;
|
|||
|
||||
- (void) registerForDraggedTypes: (NSArray*)newTypes
|
||||
{
|
||||
GSRegisterDragTypes(self, newTypes);
|
||||
_rFlags.has_draginfo = 1;
|
||||
/*
|
||||
* Ensure we have a content view and it's associated window view.
|
||||
*/
|
||||
if (content_view == nil)
|
||||
[self setContentView: nil];
|
||||
[[content_view superView] registerForDraggedTypes: newTypes];
|
||||
}
|
||||
|
||||
- (void) unregisterDraggedTypes
|
||||
{
|
||||
if (_rFlags.has_draginfo)
|
||||
{
|
||||
GSUnregisterDragTypes(self);
|
||||
_rFlags.has_draginfo = 0;
|
||||
}
|
||||
[[content_view superView] unregisterDraggedTypes];
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue