Ejemplo n.º 1
0
        def _make_effect_group(group_label, key, effects):
            tmin, tmax, tstep, tdefault = (0, 2000, 50, 200)
            self.size_groups = getattr(
                self, "size_groups",
                [SizeGroup(SizeGroupMode.HORIZONTAL) for x in range(4)])
            root = "org.cinnamon"
            path = "org.cinnamon/desktop-effects"
            template = "desktop-effects-%s-%s"

            box = IndentedHBox()
            label = Gtk.Label()
            label.set_markup(group_label)
            label.props.xalign = 0.0
            self.size_groups[0].add_widget(label)
            box.add(label)

            w = GSettingsComboBox("", root, template % (key, "effect"), path,
                                  effects)
            self.size_groups[1].add_widget(w)
            box.add(w)
            w = GSettingsComboBox("", root, template % (key, "transition"),
                                  path, transition_effects)
            self.size_groups[2].add_widget(w)
            box.add(w)
            w = GSettingsSpinButton("", root, template % (key, "time"), path,
                                    tmin, tmax, tstep, tdefault,
                                    _("milliseconds"))
            self.size_groups[3].add_widget(w)
            box.add(w)

            return box
Ejemplo n.º 2
0
        def _make_effect_group(group_label, key, effects):
            tmin, tmax, tstep, tdefault = (0, 2000, 50, 200)
            self.size_groups = getattr(self, "size_groups", [SizeGroup.new(SizeGroupMode.HORIZONTAL) for x in range(4)])
            root = "org.cinnamon"
            path = "org.cinnamon/desktop-effects"
            template = "desktop-effects-%s-%s"

            box = IndentedHBox()
            label = Gtk.Label.new()
            label.set_markup(group_label)
            label.props.xalign = 0.0
            self.size_groups[0].add_widget(label)
            box.add(label)

            w = GSettingsComboBox("", root, template % (key, "effect"), path, effects)
            self.size_groups[1].add_widget(w)
            box.add(w)
            w = GSettingsComboBox("", root, template % (key, "transition"), path, transition_effects)
            self.size_groups[2].add_widget(w)
            box.add(w)
            w = GSettingsSpinButton("", root, template % (key, "time"), path, tmin, tmax, tstep, tdefault, _("milliseconds"))
            self.size_groups[3].add_widget(w)
            box.add(w)

            return box
Ejemplo n.º 3
0
    def make_group(self, group_label, widget, add_widget_to_size_group=True):
        self.size_groups = getattr(self, "size_groups", [SizeGroup.new(SizeGroupMode.HORIZONTAL) for x in range(2)])
        box = SettingsWidget()
        label = Label()
        label.set_markup(group_label)
        label.props.xalign = 0.0
        self.size_groups[0].add_widget(label)
        box.pack_start(label, False, False, 0)
        if add_widget_to_size_group:
            self.size_groups[1].add_widget(widget)
        box.pack_end(widget, False, False, 0)

        return box
Ejemplo n.º 4
0
    def _make_titlebar_action_group(self, group_label, root, key, stuff):
        self.size_groups = getattr(self, "size_groups", [SizeGroup.new(SizeGroupMode.HORIZONTAL) for x in range(2)])
        
        box = Gtk.HBox()
        label = Gtk.Label()
        label.set_markup(group_label)
        label.props.xalign = 0.0
        self.size_groups[0].add_widget(label)
        box.pack_start(label, False, False, 0)

        w = GSettingsComboBox("", root, key, None, stuff)
        self.size_groups[1].add_widget(w)
        box.pack_start(w, False, False, 0)
        
        return box
Ejemplo n.º 5
0
    def _make_group(self, group_label, root, key, schema):
        self.size_groups = getattr(self, "size_groups", [SizeGroup.new(SizeGroupMode.HORIZONTAL) for x in range(2)])
        
        box = Gtk.HBox()
        label = Gtk.Label()
        label.set_markup(group_label)
        label.props.xalign = 0.0
        self.size_groups[0].add_widget(label)
        box.pack_start(label, False, False, 4)

        w = GSettingsComboBox("", root, key, None, schema)
        self.size_groups[1].add_widget(w)
        box.add(w)
        
        return box