How detect a new blend file was loaded

Hi,

I need to detect if a new blend file was loaded to activate an operator.

I know I could check if the blend file name is equal, but it doesn’t work for me because maybe the user is loading the same file (old version).

What I need is to know if blender loaded a file to hide a button.

any idea?

You can use an app handler:
http://www.blender.org/api/blender_python_api_2_72_release/bpy.app.handlers.html#bpy.app.handlers.load_post

That’s what I need, Thanks!