예제 #1
0
    def __init__(self):
        TweakPage.__init__(self)

        box = TablePack(_("Advanced Power Management Settings"), [
                [WidgetFactory.create("GconfCheckButton", 
                                      label = _('Enable "Hibernation"'), 
                                      key = "can_hibernate")],
                [WidgetFactory.create("GconfCheckButton", 
                                      label = _('Enable "Suspend"'), 
                                      key = "can_suspend")],
                [WidgetFactory.create("GconfCheckButton", 
                                      label = _('Show "CPU frequency control option" in Power Management Preferences'), 
                                      key = "cpufreq_show")],
                [WidgetFactory.create("GconfCheckButton", 
                                      label = _("Disable Network Manager when asleep"), 
                                      key = "network_sleep")],
                [WidgetFactory.create("GconfCheckButton", 
                                      label = _('Enable "Lock screen" when "Blank Screen" activates'), 
                                      key = "blank_screen")],
                [gtk.Label(_('Display "Power Manager" panel item')), 
                    WidgetFactory.create("GconfComboBox", 
                                         key = "icon_policy", 
                                         texts = [_("Never display"), _("When charging"), _("Always display")], 
                                         values = ["never", "charge", "always"])],
        ]) 
        self.pack_start(box, False, False, 0)

        if module_check.get_gnome_version() < 24:
            cpu_policy_text = [_("Normal"), _("On Demand"), _("Power Save"), _("Performance")]
            cpu_policy_value = ["nothing", "ondemand", "powersave", "performance"]
            box = TablePack(_("CPU Policy"), [
                    [gtk.Label(_("The Performance value when on AC power")), 
                        WidgetFactory.create("GconfScale", 
                                             key = "performance_ac", 
                                             min = 0, 
                                             max = 100, 
                                             digits = 0)],
                    [gtk.Label(_("The Performance value when on battery power")), 
                        WidgetFactory.create("GconfScale", 
                                             key = "performance_battery", 
                                             min = 0, 
                                             max = 100, 
                                             digits = 0)],
                    [gtk.Label(_("The CPU frequency policy when on AC power")), 
                        WidgetFactory.create("GconfComboBox", 
                                             key = "policy_ac", 
                                             texts = cpu_policy_text, 
                                             values = cpu_policy_value)],
                    [gtk.Label(_("The CPU frequency policy when on battery power")), 
                        WidgetFactory.create("GconfComboBox", 
                                             key = "policy_battery", 
                                             texts = cpu_policy_text, 
                                             values = cpu_policy_value)],
            ])
                
            self.pack_start(box, False, False, 0)
예제 #2
0
    hbox = gtk.HBox(False, 0)
    vbox.pack_start(hbox, False, False, 0)
        
    return vbox

from computer import Computer
from session import Session
from autostart import AutoStart
from icons import Icon
if module_check.has_right_compiz():
    from compiz import Compiz
else:
    Compiz = Notice

if module_check.get_gnome_version() >= 20:
    from userdir import UserDir
    from templates import Templates
else:
    UserDir = Notice
    Templates = Notice

if module_check.is_ubuntu():
    from installer import Installer
    from cleaner import PackageCleaner
else:
    Installer = Notice
    PackageCleaner = Notice

if module_check.is_supported_ubuntu():
    from sourceeditor import SourceEditor