Patch from Tom Bech <tomb@ii.uib.no>, to handle color specs of the form c
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org> * gdk/gdkpixmap.c (gdk_pixmap_extract_color): Patch from Tom Bech <tomb@ii.uib.no>, to handle color specs of the form c #abcdef [ more keys ] properly.
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
|
||||
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
|
||||
specs of the form c #abcdef [ more keys ] properly.
|
||||
|
||||
Sat Jun 13 10:51:56 1998 Stefan Jeske <stefan@gtk.org>
|
||||
|
||||
* gtkspinbutton.h gtkspinbutton.c testgtk.c
|
||||
|
||||
@ -1,3 +1,9 @@
|
||||
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
|
||||
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
|
||||
specs of the form c #abcdef [ more keys ] properly.
|
||||
|
||||
Sat Jun 13 10:51:56 1998 Stefan Jeske <stefan@gtk.org>
|
||||
|
||||
* gtkspinbutton.h gtkspinbutton.c testgtk.c
|
||||
|
||||
@ -1,3 +1,9 @@
|
||||
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
|
||||
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
|
||||
specs of the form c #abcdef [ more keys ] properly.
|
||||
|
||||
Sat Jun 13 10:51:56 1998 Stefan Jeske <stefan@gtk.org>
|
||||
|
||||
* gtkspinbutton.h gtkspinbutton.c testgtk.c
|
||||
|
||||
@ -1,3 +1,9 @@
|
||||
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
|
||||
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
|
||||
specs of the form c #abcdef [ more keys ] properly.
|
||||
|
||||
Sat Jun 13 10:51:56 1998 Stefan Jeske <stefan@gtk.org>
|
||||
|
||||
* gtkspinbutton.h gtkspinbutton.c testgtk.c
|
||||
|
||||
@ -1,3 +1,9 @@
|
||||
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
|
||||
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
|
||||
specs of the form c #abcdef [ more keys ] properly.
|
||||
|
||||
Sat Jun 13 10:51:56 1998 Stefan Jeske <stefan@gtk.org>
|
||||
|
||||
* gtkspinbutton.h gtkspinbutton.c testgtk.c
|
||||
|
||||
@ -1,3 +1,9 @@
|
||||
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
|
||||
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
|
||||
specs of the form c #abcdef [ more keys ] properly.
|
||||
|
||||
Sat Jun 13 10:51:56 1998 Stefan Jeske <stefan@gtk.org>
|
||||
|
||||
* gtkspinbutton.h gtkspinbutton.c testgtk.c
|
||||
|
||||
@ -1,3 +1,9 @@
|
||||
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
|
||||
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
|
||||
specs of the form c #abcdef [ more keys ] properly.
|
||||
|
||||
Sat Jun 13 10:51:56 1998 Stefan Jeske <stefan@gtk.org>
|
||||
|
||||
* gtkspinbutton.h gtkspinbutton.c testgtk.c
|
||||
|
||||
@ -340,7 +340,18 @@ gdk_pixmap_extract_color (gchar *buffer)
|
||||
return NULL;
|
||||
else if (ptr[0] == '#')
|
||||
{
|
||||
retcol = g_strdup (ptr);
|
||||
counter = 1;
|
||||
while (ptr[counter] != 0 &&
|
||||
((ptr[counter] >= '0' && ptr[counter] <= '9') ||
|
||||
(ptr[counter] >= 'a' && ptr[counter] <= 'f') ||
|
||||
(ptr[counter] >= 'A' && ptr[counter] <= 'F')))
|
||||
counter++;
|
||||
|
||||
retcol = g_new (gchar, counter+1);
|
||||
strncpy (retcol, ptr, counter);
|
||||
|
||||
retcol[counter] = 0;
|
||||
|
||||
return retcol;
|
||||
}
|
||||
|
||||
|
||||
@ -340,7 +340,18 @@ gdk_pixmap_extract_color (gchar *buffer)
|
||||
return NULL;
|
||||
else if (ptr[0] == '#')
|
||||
{
|
||||
retcol = g_strdup (ptr);
|
||||
counter = 1;
|
||||
while (ptr[counter] != 0 &&
|
||||
((ptr[counter] >= '0' && ptr[counter] <= '9') ||
|
||||
(ptr[counter] >= 'a' && ptr[counter] <= 'f') ||
|
||||
(ptr[counter] >= 'A' && ptr[counter] <= 'F')))
|
||||
counter++;
|
||||
|
||||
retcol = g_new (gchar, counter+1);
|
||||
strncpy (retcol, ptr, counter);
|
||||
|
||||
retcol[counter] = 0;
|
||||
|
||||
return retcol;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user