Esempio n. 1
0
 def set_lock_enabled(self, value):
     if self.desktop == "mate":
         gsettings.set('org.mate.screensaver',
             None,
             'lock-enabled',
             'boolean', value)
     else:
         gsettings.set('org.gnome.desktop.screensaver',
             None,
             'lock-enabled',
             'boolean', value)
Esempio n. 2
0
 def set_show_desktop_icons(self, flag):
     if self.desktop == "mate":
         return gsettings.set('org.mate.background',
             None,
             'show-desktop-icons',
             'boolean', flag)
     else:
         return gsettings.set('org.gnome.desktop.background',
             None,
             'show-desktop-icons',
             'boolean', flag)
Esempio n. 3
0
 def set_show_homefolder(self, flag):
     if self.desktop == "mate":
         return gsettings.set('org.mate.caja.desktop',
             None,
             'home-icon-visible',
             'boolean', flag)
     else:
         return gsettings.set('org.gnome.nautilus.desktop',
             None,
             'home-icon-visible',
             'boolean', flag)
Esempio n. 4
0
 def set_touchpad_enable(self, flag):
     if self.desktop == "mate":
         return gsettings.set('org.mate.peripherals-touchpad',
             None,
             'touchpad-enabled',
             'boolean', flag)
     else:
         return gsettings.set('org.gnome.settings-daemon.peripherals.touchpad',
             None,
             'touchpad-enabled',
             'boolean', flag)
Esempio n. 5
0
 def set_titlebar_right(self, value):
     if self.desktop == "mate":
         return gsettings.set('org.mate.Marco.general',
             None,
             'action-right-click-titlebar',
             'string', value)
     else:
         return gsettings.set('org.gnome.desktop.wm.preferences',
             None,
             'action-right-click-titlebar',
             'string', value)
Esempio n. 6
0
 def set_prompt_autorun_programs(self, flag):
     if self.desktop == "mate":
         return gsettings.set('org.mate.media-handling',
             None,
             'autorun-never',
             'boolean', flag)
     else:
         return gsettings.set('org.gnome.desktop.media-handling',
             None,
             'autorun-never',
             'boolean', flag)
Esempio n. 7
0
 def set_thumbnail_cache_size(self, size):
     if self.desktop == "mate":
         return gsettings.set('org.mate.thumbnail-cache',
             None,
             'maximum-size',
             'int', size)
     else:
         return gsettings.set('org.gnome.desktop.thumbnail-cache',
             None,
             'maximum-size',
             'int', size)
Esempio n. 8
0
 def set_window_title_font(self, font):
     if self.desktop == "mate":
         return gsettings.set('org.mate.Marco.general',
             None,
             'titlebar-font',
             'string', font)
     else:
         return gsettings.set('org.gnome.desktop.wm.preferences',
             None,
             'titlebar-font',
             'string', font)
Esempio n. 9
0
 def set_antialiasing(self,value):
     if self.desktop == "mate":
         return gsettings.set('org.mate.font-rendering',
             None,
             'antialiasing',
             'string', value)
     else:
         return gsettings.set('org.gnome.settings-daemon.plugins.xsettings',
             None,
             'antialiasing',
             'string', value)
Esempio n. 10
0
 def set_desktop_font(self, font):
     if self.desktop == "mate":
         return gsettings.set('org.mate.caja.desktop',
             None,
             'font',
             'string', font)
     else:
         return gsettings.set('org.gnome.nautilus.desktop',
             None,
             'font',
             'string', font)
Esempio n. 11
0
 def set_monospace_font(self, font):
     if self.desktop == "mate":
         return gsettings.set('org.mate.interface',
             None,
             'monospace-font-name',
             'string', font)
     else:
         return gsettings.set('org.gnome.desktop.interface',
             None,
             'monospace-font-name',
             'string', font)
Esempio n. 12
0
 def set_current_critical_low(self, value):
     if self.desktop == "mate":
         gsettings.set('org.mate.power-manager',
             None,
             'action-critical-battery',
             'string', value)
     else:
         gsettings.set('org.gnome.settings-daemon.plugins.power',
             None,
             'critical-battery-action',
             'string', value)
Esempio n. 13
0
 def set_current_lid_ac(self, value):
     if self.desktop == "mate":
         gsettings.set('org.mate.power-manager',
             None,
             'button-lid-ac',
             'string', value)
     else:
         gsettings.set('org.gnome.settings-daemon.plugins.power',
             None,
             'lid-close-ac-action',
             'string', value)
Esempio n. 14
0
 def set_current_sleep_timeout_ac(self, value):
     if self.desktop == "mate":
         gsettings.set('org.mate.power-manager',
             None,
             'sleep-computer-ac',
             'int', value)
     else:
         gsettings.set('org.gnome.settings-daemon.plugins.power',
             None,
             'sleep-inactive-ac-timeout',
             'int', value)
Esempio n. 15
0
 def set_input_feedback_sounds_enable(self, flag):
     if self.desktop == "mate":
         return gsettings.set('org.mate.sound',
             None,
             'input-feedback-sounds',
             'boolean', flag)
     else:
         return gsettings.set('org.gnome.desktop.sound',
             None,
             'input-feedback-sounds',
             'boolean', flag)
Esempio n. 16
0
 def set_current_lock_delay(self, value):
     if self.desktop == "mate":
         gsettings.set('org.mate.screensaver',
             None,
             'lock-delay',
             'int', value)
     else:
         gsettings.set('org.gnome.desktop.screensaver',
             None,
             'lock-delay',
             'uint', value)
Esempio n. 17
0
 def set_current_idle_delay(self, value):
     if self.desktop == "mate":
         gsettings.set('org.mate.session',
             None,
             'idle-delay',
             'int', value)
     else:
         gsettings.set('org.gnome.desktop.session',
             None,
             'idle-delay',
             'uint', value)
Esempio n. 18
0
 def set_touchscrolling_use_horizontal(self, flag):
     if self.desktop == "mate":
         return gsettings.set('org.mate.peripherals-touchpad',
             None,
             'horiz-scroll-enabled',
             'boolean', flag)
     else:
         return gsettings.set('org.gnome.settings-daemon.peripherals.touchpad',
             None,
             'horiz-scroll-enabled',
             'boolean', flag)
Esempio n. 19
0
 def set_thumbnail_icon_size(self, size):
     if self.desktop == "mate":
         return gsettings.set('org.mate.caja.icon-view',
             None,
             'thumbnail-size',
             'int', size)
     else:
         return gsettings.set('org.gnome.nautilus.icon-view',
             None,
             'thumbnail-size',
             'int', size)
Esempio n. 20
0
 def set_show_devices(self, flag):
     if self.desktop == "mate":
         return gsettings.set('org.mate.caja.desktop',
             None,
             'volumes-visible',
             'boolean', flag)
     else:
         return gsettings.set('org.gnome.nautilus.desktop',
             None,
             'volumes-visible',
             'boolean', flag)
Esempio n. 21
0
 def set_sound_event_enable(self, flag):
     if self.desktop == "mate":
         return gsettings.set('org.mate.sound',
             None,
             'event-sounds',
             'boolean', flag)
     else:
         return gsettings.set('org.gnome.desktop.sound',
             None,
             'event-sounds',
             'boolean', flag)
Esempio n. 22
0
 def set_auto_mount_media(self, flag):
     if self.desktop == "mate":
         return gsettings.set('org.mate.media-handling',
             None,
             'automount',
             'boolean', flag)
     else:
         return gsettings.set('org.gnome.desktop.media-handling',
             None,
             'automount',
             'boolean', flag)
Esempio n. 23
0
 def set_touchscrolling_mode_twofinger(self):
     # kobe1510
     if self.wily:
         return gsettings.set('org.gnome.desktop.peripherals.touchpad',
             None,
             'scroll-method',
             'string', 'two-finger-scrolling')
     else:
         return gsettings.set('org.gnome.settings-daemon.peripherals.touchpad',
             None,
             'scroll-method',
             'string', 'two-finger-scrolling')
Esempio n. 24
0
 def set_location_replace_pathbar(self, flag):
     #gstheme = gsettings.get_schema('org.gnome.desktop.sound')
     #gstheme.set_string('theme-name',theme)
     if self.desktop == "mate":
         return gsettings.set('org.mate.caja.preferences',
             None,
             'always-use-location-entry',
             'boolean', flag)
     else:
         return gsettings.set('org.gnome.nautilus.preferences',
             None,
             'always-use-location-entry',
             'boolean', flag)
Esempio n. 25
0
 def set_mate_panel_autohide(self, position, flag):
     if position == "top":
         return gsettings.set('org.mate.panel.toplevel',
             '/org/mate/panel/toplevels/top/',
             'auto-hide',
             'boolean', flag)
     elif position == "bottom":
         return gsettings.set('org.mate.panel.toplevel',
             '/org/mate/panel/toplevels/bottom/',
             'auto-hide',
             'boolean', flag)
     else:
         return False
Esempio n. 26
0
 def set_mate_panel_icon_size(self, position, size):
     if position == "top":
         return gsettings.set('org.mate.panel.toplevel',
             '/org/mate/panel/toplevels/top/',
             'size',
             'int', size)
     elif position == "bottom":
         return gsettings.set('org.mate.panel.toplevel',
             '/org/mate/panel/toplevels/bottom/',
             'size',
             'int', size)
     else:
         return False
Esempio n. 27
0
 def set_default_schema_value(self, schema, key, type):
     #fp = open("/tmp/default.txt", "w")
     #print >> fp, "--------------"
     #fp.close()
     default_value = self.get_default_schema_value(schema, key)
     if default_value is not None:
         gsettings.set(schema, None, key, type, default_value)
         if schema == "org.gnome.desktop.wm.preferences" and key == "button-layout":
             if default_value == 'close,maximize,minimize:' or default_value == 'close,minimize,maximize:':
                 self.sysdaemon.change_titlebar_position('left')
             elif default_value == ':minimize,maximize,close':
                 self.sysdaemon.change_titlebar_position('right')
     else:
         raise NotImplemented
Esempio n. 28
0
 def set_default_schema_value(self, schema, key, type):
     default_value = self.get_default_schema_value(schema, key)
     if (default_value in (None, '') and schema == 'org.gnome.nautilus.desktop' and key == 'font'):
         default_value = 'Ubuntu 11'
     if default_value is not None:
         return gsettings.set(schema, None, key, type, default_value)
     else:
         raise NotImplemented
Esempio n. 29
0
    def set_time_format(self, format):
#        if self.desktop == "mate":
#            return gsettings.set('org.mate.panel',
#                '/org/mate/panel/objects/clock/prefs/',
#                'format',
#                'string', format)
#        else:
        return gsettings.set('com.canonical.indicator.datetime',
            None,
            'time-format',
            'string', format)
Esempio n. 30
0
    def setconf(self, conf_id):
        conf_schema = self.conf.get(conf_id, 'schema')
        conf_path = self.conf.get(conf_id, 'path')
        if conf_path == 'None':
            conf_path = None
        conf_key = self.conf.get(conf_id, 'key')
        conf_type = self.conf.get(conf_id, 'type')
        if conf_type == 'boolean' :
            conf_value = self.conf.getboolean(conf_id, 'value')
        elif conf_type == 'int' :
            conf_value = self.conf.getint(conf_id, 'value')
        elif conf_type == 'double' or conf_type == 'float' :
            conf_value = self.conf.getfloat(conf_id, 'value')
        else :
            conf_value = self.conf.get(conf_id, 'value')
        #gsettings.set(conf_schema, conf_path, conf_key, conf_type, conf_value)

        if conf_id == 'window_button':
            value = gsettings.get('org.gnome.desktop.wm.preferences',
                        None, 'button-layout', 'string')
            left_list = ['close,minimize,maximize:', 'close,maximize,minimize:']
            right_list = [':minimize,maximize,close', ':maximize,minimize,close']
            if value in left_list and conf_value in right_list:
                    gsettings.set(conf_schema, conf_path, conf_key, conf_type, conf_value)
                    self.sysdaemon.download_cloud_conf_signal('window_button')
            elif value in right_list and conf_value in left_list:
                    gsettings.set(conf_schema, conf_path, conf_key, conf_type, conf_value)
                    self.sysdaemon.download_cloud_conf_signal('window_button')
        else:
            value = gsettings.get(conf_schema, conf_path, conf_key, conf_type)
            if value != conf_value:
                gsettings.set(conf_schema, conf_path, conf_key, conf_type, conf_value)
                self.sysdaemon.download_cloud_conf_signal(conf_id)
Esempio n. 31
0
 def set_desktop_font(self, font):
     return gsettings.set('org.gnome.nautilus.desktop', None, 'font',
                          'string', font)
Esempio n. 32
0
 def set_monospace_font(self, font):
     return gsettings.set('org.gnome.desktop.interface', None,
                          'monospace-font-name', 'string', font)
Esempio n. 33
0
 def set_window_title_font(self, font):
     return gsettings.set('org.gnome.desktop.wm.preferences', None,
                          'titlebar-font', 'string', font)
Esempio n. 34
0
 def set_font_zoom(self, zoom):
     return gsettings.set('org.gnome.desktop.interface', None,
                          'text-scaling-factor', 'double', zoom)
Esempio n. 35
0
 def set_document_font(self, font):
     return gsettings.set('org.gnome.desktop.interface', None,
                          'document-font-name', 'string', font)