diff options
author | Jody Goldberg <jgoldberg@home.com> | 2000-09-07 22:56:59 +0800 |
---|---|---|
committer | Jody Goldberg <jody@src.gnome.org> | 2000-09-07 22:56:59 +0800 |
commit | 0963419d89f1711cfbf964b75133121a74e90a9e (patch) | |
tree | bc4d845b55497a156624da56ccd98a4fe9de3f38 | |
parent | 1aef3474d900af3ae6890f02232f16129514e896 (diff) | |
download | gsoc2013-evolution-0963419d89f1711cfbf964b75133121a74e90a9e.tar.gz gsoc2013-evolution-0963419d89f1711cfbf964b75133121a74e90a9e.tar.zst gsoc2013-evolution-0963419d89f1711cfbf964b75133121a74e90a9e.zip |
Merge in the colour combo emhancements.
2000-09-06 Jody Goldberg <jgoldberg@home.com>
* color-group.c (color_group_new_named) : strdup the name if it is
supplied by the user.
(color_group_class_init) : Use the destroy method.
2000-09-03 Michael Levy <mlevy@genoscope.cns.fr>
* color-group.c : Re-write of color-combo-group.c to allow
for arbitrary widgets to share a common color history.
* widget-color-combo.c :
Extracted all the code required to make the color table and moved it to a
new object (ColorPalette). Changed the ColorCombo so that it uses
the ColorPalette (and the shared color hsitory provided by the groupped
ColorPalettes).
All the code that refered to the creation of the color table was
removed, and when appropriate, moved to color-palette.c
Removed all mention of ColorComboGroups (as these no longer exist).
* color-palette.c : Extracted from widget-color-combo.c
(color_palette_new) : Creates a color palette.
(color_palette_get_current_color) : returns the current color.
2000-07-30 Michael Levy <mlevy@genoscope.cns.fr>
* color-combo-group.c : New GtkObject meant to group color combo boxes so
that their custom color histories are shared.
Includes functions to create and destroy the object, as
well as those required size, and navigate through the custom color history.
* widget-color-combo.c
(group_new_custom_color) : New function to handle the
new_custom_color signal emitted by the ColorComboGroup
(custom_color_history_setup) : New function which initialises a
combo box's custom color history with the one stored in the group
(color_table_setup) : Added call to custom_color_history_setup.
(cust_color_set) : Removed call to cust_color_row_shift and moved
it to group_new_custom_color. Also added call to
color_combo_group_add_color in order to notify group of change
(color_combo_new_with_vals) : Added mandatory group name to
function prototype. Also added call to color_combo_group_new_named
and connected the "new_custom_color" signal emitted by the newly
created group to group_new_custom_color
(color_combo_new) : Added mandatory group name to function
prototype.
* widget-color-combo.c (color_combo_new) : Added mandatory group
name to function prototype.
svn path=/trunk/; revision=5229
-rw-r--r-- | widgets/misc/test-color.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/widgets/misc/test-color.c b/widgets/misc/test-color.c new file mode 100644 index 0000000000..0b01682d8f --- /dev/null +++ b/widgets/misc/test-color.c @@ -0,0 +1,46 @@ +#include <gnome.h> +#include "color.h" +#include "pixmaps/font.xpm" +#include "widget-color-combo.h" +#include "color-palette.h" +/* To compile (from src/widgets): + +gcc -I.. -I../.. -L. -Wall -o tester tester.c ../color.c `gnome-config --cflags --libs gnome gnomeui` -lwidgets + +*/ + + +gint +main ( gint argc, gchar* argv[] ) +{ + GtkWidget * dialog; + GtkWidget * T; + + 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"); + + 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 ), + 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 ), + T, TRUE, TRUE, 5); + gtk_widget_show_all (T); + + gnome_dialog_run_and_close ( GNOME_DIALOG (dialog) ); + return 0; +} + |