wxDragLink for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -155,6 +155,8 @@ static gboolean target_drag_motion( GtkWidget *WXUNUSED(widget),
|
|||||||
wxDragResult result;
|
wxDragResult result;
|
||||||
if ( context->suggested_action == GDK_ACTION_COPY )
|
if ( context->suggested_action == GDK_ACTION_COPY )
|
||||||
result = wxDragCopy;
|
result = wxDragCopy;
|
||||||
|
else if ( context->suggested_action == GDK_ACTION_LINK )
|
||||||
|
result = wxDragLink;
|
||||||
else
|
else
|
||||||
result = wxDragMove;
|
result = wxDragMove;
|
||||||
|
|
||||||
@@ -175,6 +177,8 @@ static gboolean target_drag_motion( GtkWidget *WXUNUSED(widget),
|
|||||||
GdkDragAction action;
|
GdkDragAction action;
|
||||||
if (result == wxDragCopy)
|
if (result == wxDragCopy)
|
||||||
action = GDK_ACTION_COPY;
|
action = GDK_ACTION_COPY;
|
||||||
|
else if (result == wxDragLink)
|
||||||
|
action = GDK_ACTION_LINK;
|
||||||
else
|
else
|
||||||
action = GDK_ACTION_MOVE;
|
action = GDK_ACTION_MOVE;
|
||||||
|
|
||||||
@@ -325,6 +329,8 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget),
|
|||||||
wxDragResult result;
|
wxDragResult result;
|
||||||
if ( context->suggested_action == GDK_ACTION_COPY )
|
if ( context->suggested_action == GDK_ACTION_COPY )
|
||||||
result = wxDragCopy;
|
result = wxDragCopy;
|
||||||
|
else if ( context->suggested_action == GDK_ACTION_LINK )
|
||||||
|
result = wxDragLink;
|
||||||
else
|
else
|
||||||
result = wxDragMove;
|
result = wxDragMove;
|
||||||
|
|
||||||
@@ -621,6 +627,7 @@ gtk_dnd_window_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigur
|
|||||||
|
|
||||||
wxDragResult action = wxDragNone;
|
wxDragResult action = wxDragNone;
|
||||||
if (source->m_dragContext->action == GDK_ACTION_COPY) action = wxDragCopy;
|
if (source->m_dragContext->action == GDK_ACTION_COPY) action = wxDragCopy;
|
||||||
|
if (source->m_dragContext->action == GDK_ACTION_LINK) action = wxDragLink;
|
||||||
if (source->m_dragContext->action == GDK_ACTION_MOVE) action = wxDragMove;
|
if (source->m_dragContext->action == GDK_ACTION_MOVE) action = wxDragMove;
|
||||||
|
|
||||||
source->GiveFeedback( action );
|
source->GiveFeedback( action );
|
||||||
@@ -817,6 +824,8 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove )
|
|||||||
|
|
||||||
if (context->action == GDK_ACTION_COPY)
|
if (context->action == GDK_ACTION_COPY)
|
||||||
m_retValue = wxDragCopy;
|
m_retValue = wxDragCopy;
|
||||||
|
if (context->action == GDK_ACTION_LINK)
|
||||||
|
m_retValue = wxDragLink;
|
||||||
if (context->action == GDK_ACTION_MOVE)
|
if (context->action == GDK_ACTION_MOVE)
|
||||||
m_retValue = wxDragMove;
|
m_retValue = wxDragMove;
|
||||||
}
|
}
|
||||||
|
@@ -155,6 +155,8 @@ static gboolean target_drag_motion( GtkWidget *WXUNUSED(widget),
|
|||||||
wxDragResult result;
|
wxDragResult result;
|
||||||
if ( context->suggested_action == GDK_ACTION_COPY )
|
if ( context->suggested_action == GDK_ACTION_COPY )
|
||||||
result = wxDragCopy;
|
result = wxDragCopy;
|
||||||
|
else if ( context->suggested_action == GDK_ACTION_LINK )
|
||||||
|
result = wxDragLink;
|
||||||
else
|
else
|
||||||
result = wxDragMove;
|
result = wxDragMove;
|
||||||
|
|
||||||
@@ -175,6 +177,8 @@ static gboolean target_drag_motion( GtkWidget *WXUNUSED(widget),
|
|||||||
GdkDragAction action;
|
GdkDragAction action;
|
||||||
if (result == wxDragCopy)
|
if (result == wxDragCopy)
|
||||||
action = GDK_ACTION_COPY;
|
action = GDK_ACTION_COPY;
|
||||||
|
else if (result == wxDragLink)
|
||||||
|
action = GDK_ACTION_LINK;
|
||||||
else
|
else
|
||||||
action = GDK_ACTION_MOVE;
|
action = GDK_ACTION_MOVE;
|
||||||
|
|
||||||
@@ -325,6 +329,8 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget),
|
|||||||
wxDragResult result;
|
wxDragResult result;
|
||||||
if ( context->suggested_action == GDK_ACTION_COPY )
|
if ( context->suggested_action == GDK_ACTION_COPY )
|
||||||
result = wxDragCopy;
|
result = wxDragCopy;
|
||||||
|
else if ( context->suggested_action == GDK_ACTION_LINK )
|
||||||
|
result = wxDragLink;
|
||||||
else
|
else
|
||||||
result = wxDragMove;
|
result = wxDragMove;
|
||||||
|
|
||||||
@@ -621,6 +627,7 @@ gtk_dnd_window_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigur
|
|||||||
|
|
||||||
wxDragResult action = wxDragNone;
|
wxDragResult action = wxDragNone;
|
||||||
if (source->m_dragContext->action == GDK_ACTION_COPY) action = wxDragCopy;
|
if (source->m_dragContext->action == GDK_ACTION_COPY) action = wxDragCopy;
|
||||||
|
if (source->m_dragContext->action == GDK_ACTION_LINK) action = wxDragLink;
|
||||||
if (source->m_dragContext->action == GDK_ACTION_MOVE) action = wxDragMove;
|
if (source->m_dragContext->action == GDK_ACTION_MOVE) action = wxDragMove;
|
||||||
|
|
||||||
source->GiveFeedback( action );
|
source->GiveFeedback( action );
|
||||||
@@ -817,6 +824,8 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove )
|
|||||||
|
|
||||||
if (context->action == GDK_ACTION_COPY)
|
if (context->action == GDK_ACTION_COPY)
|
||||||
m_retValue = wxDragCopy;
|
m_retValue = wxDragCopy;
|
||||||
|
if (context->action == GDK_ACTION_LINK)
|
||||||
|
m_retValue = wxDragLink;
|
||||||
if (context->action == GDK_ACTION_MOVE)
|
if (context->action == GDK_ACTION_MOVE)
|
||||||
m_retValue = wxDragMove;
|
m_retValue = wxDragMove;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user