From: H.G.Muller Date: Sat, 2 Apr 2016 17:12:22 +0000 (+0200) Subject: Let color-pickers start at current color X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=f27821329a0684bb553be9bb45afc388c224660c;p=xboard.git Let color-pickers start at current color --- diff --git a/gtk/xoptions.c b/gtk/xoptions.c index 8df9c44..d9e528a 100644 --- 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);