'Apply settings changed in \'Preferences\' dialog box'

def apply_settings(self):

    qapp = QApplication.instance()
    if (is_gtk_desktop() and ('GTK+' in QStyleFactory.keys())):
        try:
            qapp.setStyle('gtk+')
        except:
            pass
    else:
        qapp.setStyle(CONF.get('main', 'windows_style', self.default_style))
    default = self.DOCKOPTIONS
    if CONF.get('main', 'vertical_tabs'):
        default = (default | QMainWindow.VerticalTabs)
    if CONF.get('main', 'animated_docks'):
        default = (default | QMainWindow.AnimatedDocks)
    self.setDockOptions(default)
    self.apply_panes_settings()
    self.apply_statusbar_settings()
