Ioan Gruffudd granted 3yr restraining order against ex wife