projects
/
xboard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
61d26f9
)
Let color-pickers start at current color
author
H.G.Muller
<hgm@hgm-xboard.(none)>
Sat, 2 Apr 2016 17:12:22 +0000 (19:12 +0200)
committer
H.G.Muller
<hgm@hgm-xboard.(none)>
Sat, 2 Apr 2016 17:12:22 +0000 (19:12 +0200)
gtk/xoptions.c
patch
|
blob
|
history
diff --git
a/gtk/xoptions.c
b/gtk/xoptions.c
index
8df9c44
..
d9e528a
100644
(file)
--- a/
gtk/xoptions.c
+++ b/
gtk/xoptions.c
@@
-1552,7
+1552,11
@@
if(appData.debugMode) printf("n=%d, h=%d, w=%d\n",n,height,width);
break;
} else
if(!strcmp(option[i].name, "D")) {
- option[i].handle = (void *) (button = gtk_color_button_new());
+ GdkColor color;
+ char *name;
+ GetWidgetText(&option[i-5], &name);
+ gdk_color_parse(name, &color);
+ option[i].handle = (void *) (button = gtk_color_button_new_with_color(&color));
} else
button = gtk_button_new_with_label (_(option[i].name));
SetWidgetFont(gtk_bin_get_child(GTK_BIN(button)), option[i].font);