Replace gdk_rgb_find_color()

Use gdk_colormap_alloc_color() instead.
This commit is contained in:
Benjamin Otte
2010-07-13 15:52:56 +02:00
parent 548ebc29e5
commit 8f19db7565
2 changed files with 6 additions and 4 deletions

View File

@ -51,7 +51,8 @@ create_window (GdkWindow *parent,
bg->green = g_random_int_range (0, 0xffff);;
}
gdk_rgb_find_color (gtk_widget_get_colormap (darea), bg);
if (!gdk_colormap_alloc_color (gtk_widget_get_colormap (darea), bg, FALSE, TRUE))
g_assert_not_reached ();
gdk_window_set_background (window, bg);
g_object_set_data_full (G_OBJECT (window), "color", bg, g_free);