From f27821329a0684bb553be9bb45afc388c224660c Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sat, 2 Apr 2016 19:12:22 +0200 Subject: [PATCH] Let color-pickers start at current color --- gtk/xoptions.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) 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); -- 1.7.0.4