'Update recent file menu'

def update_recent_file_menu(self):

    recent_files = []
    for fname in self.recent_files:
        if ((not self.is_file_opened(fname)) and osp.isfile(fname)):
            recent_files.append(fname)
    self.recent_file_menu.clear()
    if recent_files:
        for fname in recent_files:
            action = create_action(self, fname, icon=ima.icon('FileIcon'), triggered=self.load)
            action.setData(to_qvariant(fname))
            self.recent_file_menu.addAction(action)
    self.clear_recent_action.setEnabled((len(recent_files) > 0))
    add_actions(self.recent_file_menu, (None, self.max_recent_action, self.clear_recent_action))
