From 9293054684c447d34da2b55fa5e2277549ce4bad Mon Sep 17 00:00:00 2001 From: Jody Goldberg Date: Mon, 16 Apr 2001 22:34:15 +0000 Subject: Upped the version number to 0.7.99.0. 2001-04-15 Jody Goldberg * configure.in: Upped the version number to 0.7.99.0. * gal/widgets/Makefile.am : add test-color. * gal/widgets/test-color.c (main) : update. * gal/widgets/color-group.c (color_group_new_named) : add a context pointer to manage multiple instances of the same conceptual group in different instances. eg the foregroup colour groups for windows editing different documents should be different. (create_unique_name) : Adjust signature. (color_group_from_name) : ditto, Use the cg as the key, not just name. (color_group_destroy) : ditto. (color_group_new_named) : ditto. (cg_hash) : new function. (cg_cmp) : new function. (initialize_group_names) : used here. * gal/widgets/color-palette.c (color_palette_new) : Take a ColorGroup directly rather than a ColorGroup name. (color_palette_new_with_vals) : ditto. * gal/widgets/widget-color-combo.c (color_table_setup) : Take a ColorGroup directly rather than a ColorGroup name. (color_combo_construct) : Ditto. (color_combo_new) : Ditto. svn path=/trunk/; revision=9391 --- widgets/misc/test-color.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'widgets/misc/test-color.c') diff --git a/widgets/misc/test-color.c b/widgets/misc/test-color.c index ed622201c8..2e6df9cb17 100644 --- a/widgets/misc/test-color.c +++ b/widgets/misc/test-color.c @@ -1,8 +1,8 @@ #include -#include "color.h" -#include "pixmaps/font.xpm" #include "widget-color-combo.h" #include "color-palette.h" +#include "e-colors.h" +#include "pixmaps/cursor_hand_open.xpm" /* To compile (from src/widgets): @@ -10,38 +10,38 @@ gcc -I.. -I../.. -L. -Wall -o tester tester.c ../color.c `gnome-config --cflags */ - gint main ( gint argc, gchar* argv[] ) { GtkWidget * dialog; GtkWidget * T; - + ColorGroup *cg; + gnome_init ("tester", "1.0", argc, argv); - + dialog = gnome_dialog_new ("TESTER", GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); - T = color_palette_new("Color Palette", NULL, "for_colorgroup"); + cg = color_group_fetch ("fore_color_group", dialog); + T = color_palette_new ("Color Palette", NULL, cg); - gtk_box_pack_start(GTK_BOX (GNOME_DIALOG (dialog)-> vbox ), + gtk_box_pack_start(GTK_BOX (GNOME_DIALOG (dialog)-> vbox ), T, TRUE, TRUE, 5); gtk_widget_show_all (T); - T = color_combo_new (font_xpm, _("Automatic"), - &gs_black, - "for_colorgroup"); - gtk_box_pack_start(GTK_BOX (GNOME_DIALOG (dialog)-> vbox ), + cg = color_group_fetch ("fore_color_group", dialog); + T = color_combo_new (cursor_hand_open_xpm, _("Automatic"), + &e_black, cg); + gtk_box_pack_start(GTK_BOX (GNOME_DIALOG (dialog)-> vbox ), T, TRUE, TRUE, 5); gtk_widget_show_all (T); - - T = color_combo_new (font_xpm, _("Automatic"), - &gs_black, - "back_colorgroup"); - gtk_box_pack_start(GTK_BOX (GNOME_DIALOG (dialog)-> vbox ), + + cg = color_group_fetch ("back_color_group", dialog); + T = color_combo_new (cursor_hand_open_xpm, _("Automatic"), + &e_black, cg); + gtk_box_pack_start(GTK_BOX (GNOME_DIALOG (dialog)-> vbox ), T, TRUE, TRUE, 5); gtk_widget_show_all (T); gnome_dialog_run_and_close ( GNOME_DIALOG (dialog) ); return 0; } - -- cgit v1.2.3