'If there\'s no window, create one and present it (show it to user).
If there\'s a window, just present it. Also add the log handler
and the notifier to the application'

def do_activate(self):

    if (not self.window):
        self.window = AppWindow(self.sidebar, self.ws_sidebar, self.hosts_sidebar, self.terminal, self.console_log, self.statusbar, application=self, title=('Faraday    ' + str(CONF.getVersion())))
    self.window.set_icon(self.icon)
    self.window.present()
    self.loghandler = GUIHandler()
    model.guiapi.setMainApp(self)
    addHandler(self.loghandler)
    self.loghandler.registerGUIOutput(self.window)
    notifier = model.log.getNotifier()
    notifier.widget = self.window
    model.guiapi.notification_center.registerWidget(self.window)
    if (self.serverIO.server_info() is None):
        self.lost_db_connection(handle_connection_lost=self.handle_connection_lost, connect_to_a_different_couch=self.force_change_couch_url)
    workspace_argument_set = self.open_workspace_from_args()
    if (not workspace_argument_set):
        self.open_last_workspace()
