def apply_theme(self): theme_filename = self.theme_filename _logger.info(_("Loading theme from '{}'").format(theme_filename)) theme = Theme.load(theme_filename) if not theme: _logger.error(_("Unable to read theme '{}'").format(theme_filename)) else: # Save to gsettings # Make sure gsettings is in sync with onboard (LP: 877601) self.theme = theme_filename theme.apply() # Fix theme not saved to gesettings when switching # system contrast themes. # Possible gsettings bug in Precise (wasn't in Oneiric). self.settings.apply()
def cb_theme_changed(self, theme_filename): # load and apply the theme theme = Theme.load(theme_filename) if theme: theme.apply()