GTK: implement file drag and drop

Still doesn't work on multiple rows.

Also see #14
This commit is contained in:
2016-04-18 00:51:45 +02:00
parent 7f538f4fae
commit 8b8c9a669f
3 changed files with 68 additions and 26 deletions

View File

@@ -156,6 +156,13 @@ createTreeView = do
tvs <- treeViewGetSelection treeView
treeSelectionSetMode tvs SelectionMultiple
-- set drag and drop
tl <- targetListNew
atom <- atomNew ("HSFM" :: String)
targetListAdd tl atom [TargetSameApp] 0
treeViewEnableModelDragDest treeView tl [ActionCopy]
treeViewEnableModelDragSource treeView [Button1] tl [ActionCopy]
-- create final tree model columns
renderTxt <- cellRendererTextNew
renderPix <- cellRendererPixbufNew