]> Pileus Git - ~andy/gtk/commitdiff
Fix clamping to [0,1] to avoid unnecessary roundtrip failures. (#93500)
authorMatthias Clasen <maclas@gmx.de>
Mon, 20 Jan 2003 23:57:12 +0000 (23:57 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 20 Jan 2003 23:57:12 +0000 (23:57 +0000)
2003-01-21  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid
unnecessary roundtrip failures.  (#93500)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcolorsel.c

index 1092fc22e06e8b26032e99ec136c23e55de16c72..8aaebd85aa46a8e4584f58e4deb884f2f2171bd4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-21  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid 
+       unnecessary roundtrip failures.  (#93500)
+
 2003-01-19  Tor Lillqvist  <tml@iki.fi>
 
        Merge from stable:
@@ -220,7 +225,7 @@ Wed Jan  8 18:43:03 2003  Manish Singh  <yosh@gimp.org>
        (selection_motion_event_handler): 
        (selection_scan_timeout): Support select-by-words/lines.
        (gtk_text_view_button_press_event): Start a selection drag on
-       double/triple clicks.  (#78599)
+       double/triple clicks.  (#78499)
 
 2003-01-06  Matthias Clasen  <maclas@gmx.de>
 
index 1092fc22e06e8b26032e99ec136c23e55de16c72..8aaebd85aa46a8e4584f58e4deb884f2f2171bd4 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-21  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid 
+       unnecessary roundtrip failures.  (#93500)
+
 2003-01-19  Tor Lillqvist  <tml@iki.fi>
 
        Merge from stable:
@@ -220,7 +225,7 @@ Wed Jan  8 18:43:03 2003  Manish Singh  <yosh@gimp.org>
        (selection_motion_event_handler): 
        (selection_scan_timeout): Support select-by-words/lines.
        (gtk_text_view_button_press_event): Start a selection drag on
-       double/triple clicks.  (#78599)
+       double/triple clicks.  (#78499)
 
 2003-01-06  Matthias Clasen  <maclas@gmx.de>
 
index 1092fc22e06e8b26032e99ec136c23e55de16c72..8aaebd85aa46a8e4584f58e4deb884f2f2171bd4 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-21  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid 
+       unnecessary roundtrip failures.  (#93500)
+
 2003-01-19  Tor Lillqvist  <tml@iki.fi>
 
        Merge from stable:
@@ -220,7 +225,7 @@ Wed Jan  8 18:43:03 2003  Manish Singh  <yosh@gimp.org>
        (selection_motion_event_handler): 
        (selection_scan_timeout): Support select-by-words/lines.
        (gtk_text_view_button_press_event): Start a selection drag on
-       double/triple clicks.  (#78599)
+       double/triple clicks.  (#78499)
 
 2003-01-06  Matthias Clasen  <maclas@gmx.de>
 
index 1092fc22e06e8b26032e99ec136c23e55de16c72..8aaebd85aa46a8e4584f58e4deb884f2f2171bd4 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-21  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid 
+       unnecessary roundtrip failures.  (#93500)
+
 2003-01-19  Tor Lillqvist  <tml@iki.fi>
 
        Merge from stable:
@@ -220,7 +225,7 @@ Wed Jan  8 18:43:03 2003  Manish Singh  <yosh@gimp.org>
        (selection_motion_event_handler): 
        (selection_scan_timeout): Support select-by-words/lines.
        (gtk_text_view_button_press_event): Start a selection drag on
-       double/triple clicks.  (#78599)
+       double/triple clicks.  (#78499)
 
 2003-01-06  Matthias Clasen  <maclas@gmx.de>
 
index 1092fc22e06e8b26032e99ec136c23e55de16c72..8aaebd85aa46a8e4584f58e4deb884f2f2171bd4 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-21  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid 
+       unnecessary roundtrip failures.  (#93500)
+
 2003-01-19  Tor Lillqvist  <tml@iki.fi>
 
        Merge from stable:
@@ -220,7 +225,7 @@ Wed Jan  8 18:43:03 2003  Manish Singh  <yosh@gimp.org>
        (selection_motion_event_handler): 
        (selection_scan_timeout): Support select-by-words/lines.
        (gtk_text_view_button_press_event): Start a selection drag on
-       double/triple clicks.  (#78599)
+       double/triple clicks.  (#78499)
 
 2003-01-06  Matthias Clasen  <maclas@gmx.de>
 
index a5cdd0f34802a26799bcb885607da44591271dc0..c0d9def65dbdf052a4371470a6b03a02c8b50f06 100644 (file)
@@ -1375,9 +1375,9 @@ hex_changed (GtkWidget *hex_entry,
   text = gtk_editable_get_chars (GTK_EDITABLE (priv->hex_entry), 0, -1);
   if (gdk_color_parse (text, &color))
     {
-      priv->color[COLORSEL_RED] = CLAMP (color.red/65280.0, 0.0, 1.0);
-      priv->color[COLORSEL_GREEN] = CLAMP (color.green/65280.0, 0.0, 1.0);
-      priv->color[COLORSEL_BLUE] = CLAMP (color.blue/65280.0, 0.0, 1.0);
+      priv->color[COLORSEL_RED] = CLAMP (color.red/65535.0, 0.0, 1.0);
+      priv->color[COLORSEL_GREEN] = CLAMP (color.green/65535.0, 0.0, 1.0);
+      priv->color[COLORSEL_BLUE] = CLAMP (color.blue/65535.0, 0.0, 1.0);
       gtk_rgb_to_hsv (priv->color[COLORSEL_RED],
                      priv->color[COLORSEL_GREEN],
                      priv->color[COLORSEL_BLUE],