'Update main spyder window title based on projects.'

def update_window_title(self):

    title = self.base_title
    if (self.projects is not None):
        path = self.projects.get_active_project_path()
        if path:
            path = path.replace(get_home_dir(), '~')
            title = '{0}    -    {1}'.format(path, title)
    self.setWindowTitle(title)
