diff --git a/.cvsignore b/.cvsignore index 3a5ac574d7..c89d15ee32 100644 --- a/.cvsignore +++ b/.cvsignore @@ -9,3 +9,4 @@ gimprc config.status libtool aclocal.m4 +gimprc_user diff --git a/ChangeLog b/ChangeLog index 6e8aa7eb42..211a89246d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +Sun Jan 25 18:41:17 PST 1998 Manish Singh + + * app/about_dialog.c: Added a couple names here + + * app/color_area.c + * app/color_panel.c + * app/color_select.c + * app/color_select.h + * app/indexed_palette.c + * app/palette.c: Changed COLOR_UPDATE functionality, along with + cosmetic changes (gimp-quinet-980120-0) + + * .cvsignore + * Makefile.am + * configure.in + * gimprc.in + * gimprc_user.in + * user_install: makes gimprc_user, splitting user and system-wide + settings. (gimp-quinet-980121-1) + Sun Jan 25 16:56:49 1998 Scott Goehring * app/gimage.c (gimage_merge_layers): Added a missing call to diff --git a/Makefile.am b/Makefile.am index 329baa9b90..66a3e19790 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ SUBDIRS = libgimp plug-ins app docs EXTRA_DIST = TODO TODO-DIST NOTES gtkrc gimp_logo.ppm rmshm user_install gimp_tips.txt ps-menurc -gimpdata_DATA = gimprc gtkrc gimp_logo.ppm gimp_tips.txt ps-menurc +gimpdata_DATA = gimprc gimprc_user gtkrc gimp_logo.ppm gimp_tips.txt ps-menurc gimpdata_SCRIPTS = user_install diff --git a/app/about_dialog.c b/app/about_dialog.c index bf3f386def..8036dec882 100644 --- a/app/about_dialog.c +++ b/app/about_dialog.c @@ -41,6 +41,7 @@ static char *scroll_text[] = "Zach Beane", "Tom Bech", "Marc Bless", + "Edward Blevins", "Roberto Boyd", "Seth Burgess", "Brent Burton", @@ -60,6 +61,7 @@ static char *scroll_text[] = "Peter Kirchgessner", "Karl LaRocca", "Jens Lautenbacher", + "Laramie Leavitt", "Raph Levien", "Adrian Likins", "Ingo Luetkebohle", diff --git a/app/color_area.c b/app/color_area.c index a7301f5f60..26cdce9a09 100644 --- a/app/color_area.c +++ b/app/color_area.c @@ -188,7 +188,7 @@ color_area_edit (void) if (! color_select) { - color_select = color_select_new (r, g, b, color_area_select_callback, NULL); + color_select = color_select_new (r, g, b, color_area_select_callback, NULL, TRUE); color_select_active = 1; } else diff --git a/app/color_panel.c b/app/color_panel.c index 62343cd9b7..df616417cc 100644 --- a/app/color_panel.c +++ b/app/color_panel.c @@ -150,7 +150,8 @@ color_panel_events (GtkWidget *widget, color_panel->color[1], color_panel->color[2], color_panel_select_callback, - color_panel); + color_panel, + FALSE); private->color_select_active = 1; } else diff --git a/app/color_select.c b/app/color_select.c index 811426eef5..7934cb153b 100644 --- a/app/color_select.c +++ b/app/color_select.c @@ -139,7 +139,8 @@ color_select_new (int r, int g, int b, ColorSelectCallback callback, - void *client_data) + void *client_data, + int wants_updates) { /* static char *toggle_titles[6] = { "Hue", "Saturation", "Value", "Red", "Green", "Blue" }; */ static char *toggle_titles[6] = { "H", "S", "V", "R", "G", "B" }; @@ -167,6 +168,7 @@ color_select_new (int r, csp->z_color_fill = HUE; csp->xy_color_fill = SATURATION_VALUE; csp->gc = NULL; + csp->wants_updates = wants_updates; csp->values[RED] = csp->orig_values[0] = r; csp->values[GREEN] = csp->orig_values[1] = g; @@ -314,6 +316,16 @@ color_select_new (int r, /* The action area */ action_items[0].user_data = csp; action_items[1].user_data = csp; + if (csp->wants_updates) + { + action_items[0].label = "Close"; + action_items[1].label = "Revert to Old Color"; + } + else + { + action_items[0].label = "OK"; + action_items[1].label = "Cancel"; + } build_action_area (GTK_DIALOG (csp->shell), action_items, 2, 0); color_select_image_fill (csp->z_color, csp->z_color_fill, csp->values); @@ -427,7 +439,7 @@ color_select_update (ColorSelectP csp, static void color_select_update_caller (ColorSelectP csp) { - if (csp && csp->callback) + if (csp && csp->wants_updates && csp->callback) { (* csp->callback) (csp->values[RED], csp->values[GREEN], diff --git a/app/color_select.h b/app/color_select.h index 5704ede97b..518d25a67d 100644 --- a/app/color_select.h +++ b/app/color_select.h @@ -43,10 +43,11 @@ struct _ColorSelect { int orig_values[3]; ColorSelectCallback callback; void *client_data; + int wants_updates; GdkGC *gc; }; -ColorSelectP color_select_new (int, int, int, ColorSelectCallback, void *); +ColorSelectP color_select_new (int, int, int, ColorSelectCallback, void *, int); void color_select_show (ColorSelectP); void color_select_hide (ColorSelectP); void color_select_free (ColorSelectP); diff --git a/app/dialogs/about-dialog.c b/app/dialogs/about-dialog.c index bf3f386def..8036dec882 100644 --- a/app/dialogs/about-dialog.c +++ b/app/dialogs/about-dialog.c @@ -41,6 +41,7 @@ static char *scroll_text[] = "Zach Beane", "Tom Bech", "Marc Bless", + "Edward Blevins", "Roberto Boyd", "Seth Burgess", "Brent Burton", @@ -60,6 +61,7 @@ static char *scroll_text[] = "Peter Kirchgessner", "Karl LaRocca", "Jens Lautenbacher", + "Laramie Leavitt", "Raph Levien", "Adrian Likins", "Ingo Luetkebohle", diff --git a/app/gui/about-dialog.c b/app/gui/about-dialog.c index bf3f386def..8036dec882 100644 --- a/app/gui/about-dialog.c +++ b/app/gui/about-dialog.c @@ -41,6 +41,7 @@ static char *scroll_text[] = "Zach Beane", "Tom Bech", "Marc Bless", + "Edward Blevins", "Roberto Boyd", "Seth Burgess", "Brent Burton", @@ -60,6 +61,7 @@ static char *scroll_text[] = "Peter Kirchgessner", "Karl LaRocca", "Jens Lautenbacher", + "Laramie Leavitt", "Raph Levien", "Adrian Likins", "Ingo Luetkebohle", diff --git a/app/gui/color-area.c b/app/gui/color-area.c index a7301f5f60..26cdce9a09 100644 --- a/app/gui/color-area.c +++ b/app/gui/color-area.c @@ -188,7 +188,7 @@ color_area_edit (void) if (! color_select) { - color_select = color_select_new (r, g, b, color_area_select_callback, NULL); + color_select = color_select_new (r, g, b, color_area_select_callback, NULL, TRUE); color_select_active = 1; } else diff --git a/app/gui/color-select.c b/app/gui/color-select.c index 811426eef5..7934cb153b 100644 --- a/app/gui/color-select.c +++ b/app/gui/color-select.c @@ -139,7 +139,8 @@ color_select_new (int r, int g, int b, ColorSelectCallback callback, - void *client_data) + void *client_data, + int wants_updates) { /* static char *toggle_titles[6] = { "Hue", "Saturation", "Value", "Red", "Green", "Blue" }; */ static char *toggle_titles[6] = { "H", "S", "V", "R", "G", "B" }; @@ -167,6 +168,7 @@ color_select_new (int r, csp->z_color_fill = HUE; csp->xy_color_fill = SATURATION_VALUE; csp->gc = NULL; + csp->wants_updates = wants_updates; csp->values[RED] = csp->orig_values[0] = r; csp->values[GREEN] = csp->orig_values[1] = g; @@ -314,6 +316,16 @@ color_select_new (int r, /* The action area */ action_items[0].user_data = csp; action_items[1].user_data = csp; + if (csp->wants_updates) + { + action_items[0].label = "Close"; + action_items[1].label = "Revert to Old Color"; + } + else + { + action_items[0].label = "OK"; + action_items[1].label = "Cancel"; + } build_action_area (GTK_DIALOG (csp->shell), action_items, 2, 0); color_select_image_fill (csp->z_color, csp->z_color_fill, csp->values); @@ -427,7 +439,7 @@ color_select_update (ColorSelectP csp, static void color_select_update_caller (ColorSelectP csp) { - if (csp && csp->callback) + if (csp && csp->wants_updates && csp->callback) { (* csp->callback) (csp->values[RED], csp->values[GREEN], diff --git a/app/gui/color-select.h b/app/gui/color-select.h index 5704ede97b..518d25a67d 100644 --- a/app/gui/color-select.h +++ b/app/gui/color-select.h @@ -43,10 +43,11 @@ struct _ColorSelect { int orig_values[3]; ColorSelectCallback callback; void *client_data; + int wants_updates; GdkGC *gc; }; -ColorSelectP color_select_new (int, int, int, ColorSelectCallback, void *); +ColorSelectP color_select_new (int, int, int, ColorSelectCallback, void *, int); void color_select_show (ColorSelectP); void color_select_hide (ColorSelectP); void color_select_free (ColorSelectP); diff --git a/app/gui/palette-editor.c b/app/gui/palette-editor.c index 410800cd76..fd2c775a08 100644 --- a/app/gui/palette-editor.c +++ b/app/gui/palette-editor.c @@ -839,7 +839,8 @@ palette_edit_callback (GtkWidget *w, if (!palette->color_select) { palette->color_select = color_select_new (color[0], color[1], color[2], - palette_select_callback, NULL); + palette_select_callback, NULL, + FALSE); palette->color_select_active = 1; } else diff --git a/app/indexed_palette.c b/app/indexed_palette.c index 3c64949ad4..a6c8fcc5cc 100644 --- a/app/indexed_palette.c +++ b/app/indexed_palette.c @@ -416,7 +416,7 @@ indexed_palette_area_events (GtkWidget *widget, if (! color_select) { - color_select = color_select_new (r, g, b, indexed_palette_select_callback, NULL); + color_select = color_select_new (r, g, b, indexed_palette_select_callback, NULL, FALSE); color_select_active = 1; } else diff --git a/app/palette.c b/app/palette.c index 410800cd76..fd2c775a08 100644 --- a/app/palette.c +++ b/app/palette.c @@ -839,7 +839,8 @@ palette_edit_callback (GtkWidget *w, if (!palette->color_select) { palette->color_select = color_select_new (color[0], color[1], color[2], - palette_select_callback, NULL); + palette_select_callback, NULL, + FALSE); palette->color_select_active = 1; } else diff --git a/app/widgets/gimpcolorpanel.c b/app/widgets/gimpcolorpanel.c index 62343cd9b7..df616417cc 100644 --- a/app/widgets/gimpcolorpanel.c +++ b/app/widgets/gimpcolorpanel.c @@ -150,7 +150,8 @@ color_panel_events (GtkWidget *widget, color_panel->color[1], color_panel->color[2], color_panel_select_callback, - color_panel); + color_panel, + FALSE); private->color_select_active = 1; } else diff --git a/app/widgets/gimppaletteeditor.c b/app/widgets/gimppaletteeditor.c index 410800cd76..fd2c775a08 100644 --- a/app/widgets/gimppaletteeditor.c +++ b/app/widgets/gimppaletteeditor.c @@ -839,7 +839,8 @@ palette_edit_callback (GtkWidget *w, if (!palette->color_select) { palette->color_select = color_select_new (color[0], color[1], color[2], - palette_select_callback, NULL); + palette_select_callback, NULL, + FALSE); palette->color_select_active = 1; } else diff --git a/app/widgets/gimptoolbox-color-area.c b/app/widgets/gimptoolbox-color-area.c index a7301f5f60..26cdce9a09 100644 --- a/app/widgets/gimptoolbox-color-area.c +++ b/app/widgets/gimptoolbox-color-area.c @@ -188,7 +188,7 @@ color_area_edit (void) if (! color_select) { - color_select = color_select_new (r, g, b, color_area_select_callback, NULL); + color_select = color_select_new (r, g, b, color_area_select_callback, NULL, TRUE); color_select_active = 1; } else diff --git a/configure.in b/configure.in index 487022150a..c53919fd40 100644 --- a/configure.in +++ b/configure.in @@ -269,6 +269,7 @@ dnl Output the Makefiles AC_OUTPUT( Makefile gimprc +gimprc_user libgimp/Makefile plug-ins/Makefile plug-ins/build diff --git a/data/misc/user_install b/data/misc/user_install index 87308142f5..8ce2765494 100755 --- a/data/misc/user_install +++ b/data/misc/user_install @@ -13,8 +13,8 @@ echo "mkdir $2" mkdir $2 -echo "cp $1/gimprc $2/gimprc" -cp $1/gimprc $2/gimprc +echo "cp $1/gimprc_user $2/gimprc" +cp $1/gimprc_user $2/gimprc echo "cp $1/gtkrc $2/gtkrc" cp $1/gtkrc $2/gtkrc diff --git a/etc/gimprc.in b/etc/gimprc.in index 95353a732b..0d913a559d 100644 --- a/etc/gimprc.in +++ b/etc/gimprc.in @@ -1,3 +1,7 @@ +# This is the system-wide gimprc file. Any change made in this file +# will affect all users of this system, provided that they are not +# overriding the default values in their personal gimprc file. +# # Lines that start with a '#' are comments. # Blank lines are ignored. @@ -201,4 +205,6 @@ (gfig-path "${gimp_dir}/gfig:${gimp_data_dir}/gfig") # path for gflare flares directory -(gflare-path "${gimp_dir}/gflares:${gimp_data_dir}/gflares") \ No newline at end of file +(gflare-path "${gimp_dir}/gflares:${gimp_data_dir}/gflares") + +# [end of file] diff --git a/etc/gimprc_user.in b/etc/gimprc_user.in new file mode 100644 index 0000000000..6e26cf83f0 --- /dev/null +++ b/etc/gimprc_user.in @@ -0,0 +1,14 @@ +# This is your personal gimprc file. Any variable defined in this file +# takes precedence over the value defined in the system-wide gimprc: +# @gimpdatadir@/gimprc +# (where ${prefix} is @prefix@) +# Take a look at that file if you want to see some of the options that +# can be set here. + +# Most values can be set automatically within the GIMP, if you press +# the "save" button after changing some options in the Preferences +# dialog box. You can also edit this file by hand, and the GIMP will +# always try to do the right thing when saving new options after you +# have edited this file. + +(show-tips yes) diff --git a/gimprc.in b/gimprc.in index 95353a732b..0d913a559d 100644 --- a/gimprc.in +++ b/gimprc.in @@ -1,3 +1,7 @@ +# This is the system-wide gimprc file. Any change made in this file +# will affect all users of this system, provided that they are not +# overriding the default values in their personal gimprc file. +# # Lines that start with a '#' are comments. # Blank lines are ignored. @@ -201,4 +205,6 @@ (gfig-path "${gimp_dir}/gfig:${gimp_data_dir}/gfig") # path for gflare flares directory -(gflare-path "${gimp_dir}/gflares:${gimp_data_dir}/gflares") \ No newline at end of file +(gflare-path "${gimp_dir}/gflares:${gimp_data_dir}/gflares") + +# [end of file] diff --git a/gimprc_user.in b/gimprc_user.in new file mode 100644 index 0000000000..6e26cf83f0 --- /dev/null +++ b/gimprc_user.in @@ -0,0 +1,14 @@ +# This is your personal gimprc file. Any variable defined in this file +# takes precedence over the value defined in the system-wide gimprc: +# @gimpdatadir@/gimprc +# (where ${prefix} is @prefix@) +# Take a look at that file if you want to see some of the options that +# can be set here. + +# Most values can be set automatically within the GIMP, if you press +# the "save" button after changing some options in the Preferences +# dialog box. You can also edit this file by hand, and the GIMP will +# always try to do the right thing when saving new options after you +# have edited this file. + +(show-tips yes) diff --git a/libgimpwidgets/gimpcolorselect.c b/libgimpwidgets/gimpcolorselect.c index 811426eef5..7934cb153b 100644 --- a/libgimpwidgets/gimpcolorselect.c +++ b/libgimpwidgets/gimpcolorselect.c @@ -139,7 +139,8 @@ color_select_new (int r, int g, int b, ColorSelectCallback callback, - void *client_data) + void *client_data, + int wants_updates) { /* static char *toggle_titles[6] = { "Hue", "Saturation", "Value", "Red", "Green", "Blue" }; */ static char *toggle_titles[6] = { "H", "S", "V", "R", "G", "B" }; @@ -167,6 +168,7 @@ color_select_new (int r, csp->z_color_fill = HUE; csp->xy_color_fill = SATURATION_VALUE; csp->gc = NULL; + csp->wants_updates = wants_updates; csp->values[RED] = csp->orig_values[0] = r; csp->values[GREEN] = csp->orig_values[1] = g; @@ -314,6 +316,16 @@ color_select_new (int r, /* The action area */ action_items[0].user_data = csp; action_items[1].user_data = csp; + if (csp->wants_updates) + { + action_items[0].label = "Close"; + action_items[1].label = "Revert to Old Color"; + } + else + { + action_items[0].label = "OK"; + action_items[1].label = "Cancel"; + } build_action_area (GTK_DIALOG (csp->shell), action_items, 2, 0); color_select_image_fill (csp->z_color, csp->z_color_fill, csp->values); @@ -427,7 +439,7 @@ color_select_update (ColorSelectP csp, static void color_select_update_caller (ColorSelectP csp) { - if (csp && csp->callback) + if (csp && csp->wants_updates && csp->callback) { (* csp->callback) (csp->values[RED], csp->values[GREEN], diff --git a/user_install b/user_install index 87308142f5..8ce2765494 100755 --- a/user_install +++ b/user_install @@ -13,8 +13,8 @@ echo "mkdir $2" mkdir $2 -echo "cp $1/gimprc $2/gimprc" -cp $1/gimprc $2/gimprc +echo "cp $1/gimprc_user $2/gimprc" +cp $1/gimprc_user $2/gimprc echo "cp $1/gtkrc $2/gtkrc" cp $1/gtkrc $2/gtkrc