Logo Search packages:      
Sourcecode: guidance-power-manager version File versions

def guidance-power-manager::PowerManager::_initConfigKeywords (   self  )  [private]

Define helper maps used with config file keywords. 

Definition at line 172 of file guidance-power-manager.py.

00172                                  :
        """ Define helper maps used with config file keywords. """
        # map action keyword to displayed name (l10n)
        self.act_name = {}
        self.act_name['nothing'] = i18n("Do nothing")
        self.act_name['blank'] = i18n("Blank screen")
        self.act_name['suspend'] = i18n("Suspend")
        self.act_name['hibernate'] = i18n("Hibernate")
        self.act_name['shutdown'] = i18n("Shutdown")

        # map action keyword to action methods
        self.act_call = {}
        self.act_call['nothing'] = None
        self.act_call['blank'] = self.blankScreen
        self.act_call['suspend'] = self.suspend
        self.act_call['hibernate'] = self.hibernate
        self.act_call['shutdown'] = self.shutdown

        # map action keyword to action icon used in notification window
        self.act_icon = {}
        self.act_icon['nothing'] = None
        self.act_icon['blank'] = None
        self.act_icon['suspend'] = SmallIcon("system-suspend")
        self.act_icon['hibernate'] = SmallIcon("system-suspend-hibernate")
        self.act_icon['shutdown'] = SmallIcon("system-shutdown")

        # map policy keyword to displayed name (l10n)
        self.freq_name = {}
        self.freq_name['dynamic'] = i18nc("CPU policy", "Dynamic")
        self.freq_name['powersave'] = i18nc("CPU policy", "Powersave")
        self.freq_name['performance'] = i18nc("CPU policy", "Performance")

        # map policy keyword to policy change methods
        self.freq_call = {}
        self.freq_call['dynamic'] = self.setCpuPolicyDynamic
        self.freq_call['powersave'] = self.setCpuPolicyPowersave
        self.freq_call['performance'] = self.setCpuPolicyPerformance

    def _initUI(self, parent):


Generated by  Doxygen 1.6.0   Back to index