Package: nicotine
Version: 1.0.8rc1-1
Severity: normal
Tags: patch

The color selection box does not open if the color name is empty (for
example, because you clicked "Default").

The problem is in BloatFrame.PickColour() in pynicotine/gtkgui/settingswindow.py
and I fixed it by handling the ValueError exception and supplying a
default color name of "red". It works, but maybe someone who wnows more
than me about Python, GTK and stuff can come up with a better fix.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-athlon
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages nicotine depends on:
ii  python                        2.3.4-5    An interactive high-level object-o
ii  python-gtk2                   2.4.1-2    Python bindings for the GTK+ widge

-- no debconf information
--- pynicotine/gtkgui/settingswindow.py 2005/02/06 19:52:25     1.1
+++ pynicotine/gtkgui/settingswindow.py 2005/02/06 20:42:18
@@ -433,7 +433,10 @@
        
        def PickColour(self, widget, entry):
                dlg = gtk.ColorSelectionDialog("Pick a colour, any colour")
-               colour = gtk.gdk.color_parse(entry.get_text())
+               try:
+                       colour = gtk.gdk.color_parse(entry.get_text())
+               except ValueError:
+                       colour = gtk.gdk.color_parse("red")
                dlg.colorsel.set_current_color(colour)
                if dlg.run() == gtk.RESPONSE_OK:
                        colour = dlg.colorsel.get_current_color()

Reply via email to