GTK: clear the Statusbar before pushing to it

Since we only show the most recent operationBuffer we only want
one item on the stack.
This commit is contained in:
Julian Ospald 2015-12-28 03:20:29 +01:00
parent c28eb1976a
commit ccc2f6f331
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020

View File

@ -244,6 +244,7 @@ moveInit :: [Row] -> MyGUI -> MyView -> IO ()
moveInit [row] mygui myview = do
writeTVarIO (operationBuffer myview) (FMove . MP1 $ row)
let sbmsg = "Move buffer: " ++ fullPath row
popStatusbar mygui
void $ pushStatusBar mygui sbmsg
moveInit _ _ _ = withErrorDialog
. throw $ InvalidOperation
@ -258,6 +259,7 @@ copyInit :: [Row] -> MyGUI -> MyView -> IO ()
copyInit [row] mygui myview = do
writeTVarIO (operationBuffer myview) (FCopy . CP1 $ row)
let sbmsg = "Copy buffer: " ++ fullPath row
popStatusbar mygui
void $ pushStatusBar mygui sbmsg
copyInit _ _ _ = withErrorDialog
. throw $ InvalidOperation