Ticket #1592: 0001-added-enhanced-color-selector-cycle-through-previous.patch

File 0001-added-enhanced-color-selector-cycle-through-previous.patch, 1.5 KB (added by walter, 11 years ago)

Enhanced color selector adds previous/next stoke and fill color selection; removes random

  • extensions/cpsection/aboutme/view.py

    From 571cdf01c3d18def75be0c082d4daa5b9b728e96 Mon Sep 17 00:00:00 2001
    From: Walter Bender <walter@sugarlabs.org>
    Date: Mon, 16 Aug 2010 10:47:20 -0400
    Subject: [PATCH] added enhanced color selector: cycle through previous and next stroke and fill colors instead of random
    
    ---
     extensions/cpsection/aboutme/view.py |    8 ++------
     1 files changed, 2 insertions(+), 6 deletions(-)
    
    diff --git a/extensions/cpsection/aboutme/view.py b/extensions/cpsection/aboutme/view.py
    index 49843f2..95314a1 100644
    a b class AboutMe(SectionView): 
    173173        self._nick_sid = 0
    174174        self._color_valid = True
    175175        self._nick_valid = True
    176         self._handlers = []
    177176
    178177        self.set_border_width(style.DEFAULT_SPACING * 2)
    179178        self.set_spacing(style.DEFAULT_SPACING)
    class AboutMe(SectionView): 
    282281        self._nick_valid = True
    283282        self.needs_restart = False
    284283
    285         def connect(widget, signal, cb):
    286             self._handlers.append((widget, widget.connect(signal, cb)))
    287 
    288         connect(self._nick_entry, 'changed', self.__nick_changed_cb)
     284        self._nick_entry.connect('changed', self.__nick_changed_cb)
    289285        for picker in self._pickers.values():
    290             connect(picker, 'color-changed', self.__color_changed_cb)
     286            picker.connect('color-changed', self.__color_changed_cb)
    291287
    292288    def undo(self):
    293289        self._model.undo()