GTK: make tabs reorderable and scrollable

This commit is contained in:
2016-05-10 02:16:03 +02:00
parent 8739ccc55f
commit 274aabe1f3
2 changed files with 10 additions and 1 deletions

View File

@@ -37,6 +37,10 @@ import Control.Exception
try
, SomeException
)
import Control.Monad
(
forM_
)
import qualified Data.ByteString as BS
import Data.Foldable
(
@@ -89,8 +93,12 @@ import System.Posix.FilePath
newTab :: MyGUI -> IO FMView -> Path Abs -> IO MyView
newTab mygui iofmv path = do
myview <- createMyView mygui iofmv
_ <- notebookAppendPage (notebook mygui) (viewBox myview)
i <- notebookAppendPage (notebook mygui) (viewBox myview)
(maybe (P.fromAbs path) P.fromRel $ P.basename path)
mpage <- notebookGetNthPage (notebook mygui) i
forM_ mpage $ \page -> notebookSetTabReorderable (notebook mygui)
page
True
refreshView mygui myview (Just path)
return myview