Ok, I thought you meant the normal Geany file open, too easy then.
Well, it would be a more complete solution but I think it's unlikely that Workbench users use the normal Geany file open if they can also access the file over the sidebar. So I don't want to invest time on that.