~mmcg069/software-center/bug848845

« back to all changes in this revision

Viewing changes to softwarecenter/view/widgets/mkit_themes.py

merged from  lp:~gary-lasker/software-center/buy-something

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import logging
24
24
 
 
25
THEME_MESSAGE_DISPLAYED = False
25
26
 
26
27
class ColorArray:
27
28
 
611
612
                "Radiance": Radiance}
612
613
 
613
614
    def retrieve(self, theme_name):
 
615
        # To keep the messages to a minimum
 
616
        global THEME_MESSAGE_DISPLAYED
 
617
        
614
618
        if self.REGISTRY.has_key(theme_name):
615
 
            logging.debug("Styling hints found for %s..." % theme_name)
 
619
            if not THEME_MESSAGE_DISPLAYED:
 
620
                logging.debug("Styling hints found for %s..." % theme_name)
 
621
                THEME_MESSAGE_DISPLAYED = True
616
622
            return self.REGISTRY[theme_name]()
617
623
 
618
 
        logging.warn("No styling hints for %s were found... using Human hints." % theme_name)
 
624
        if not THEME_MESSAGE_DISPLAYED:
 
625
            logging.warn("No styling hints for %s were found... using Human hints." % theme_name)
 
626
            THEME_MESSAGE_DISPLAYED = True
619
627
        from mkit_themes import Clearlooks
620
628
        return Clearlooks()
621
629