From abdc50068d121525ef04dba9037f5f37560adc5c Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Wed, 1 Apr 1998 18:48:34 +0000 Subject: [PATCH] Applied gimp-simon-980331-0. Cosmetic change to the Layers&Channels-dialog. I will hopefully finish my changes to the dialog tonight and will upload a new version of my patch. Could you (the core developers) please make up your mind whether to include it in 1.0 or not... The Blend-Tool dialog now changes the repeat_mode_menu to insensitive when the Gradient-Type is one of the Shapeburst-types. --Sven --- ChangeLog | 6 ++++++ app/blend.c | 5 +++++ app/core/gimpdrawable-blend.c | 5 +++++ app/gui/layers-dialog.c | 11 ++++++----- app/layers_dialog.c | 11 ++++++----- app/tools/blend.c | 5 +++++ app/tools/gimpblendtool.c | 5 +++++ 7 files changed, 38 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe0b03b45a..96d3c47c9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Apr 1 20:04:26 MEST 1998 Sven Neumann + + * app/layers_dialog.c: applied gimp-simon-980331-0 + * app/blend.c: change the repeat_mode_menu to insensitive when + gradient_type is Shapeburst* + Wed Apr 01 04:07:29 EST 1998 Matthew Wilson * app/disp_callbacks.c: Only destroy the current tool if you change diff --git a/app/blend.c b/app/blend.c index c39a7379a8..8dfcda5a94 100644 --- a/app/blend.c +++ b/app/blend.c @@ -100,6 +100,7 @@ struct _BlendOptions int paint_mode; GradientType gradient_type; RepeatMode repeat; + GtkWidget *repeat_mode_menu; int supersample; GtkWidget *frame; int max_depth; @@ -250,6 +251,8 @@ gradient_type_callback (GtkWidget *w, gpointer client_data) { blend_options->gradient_type = (GradientType) client_data; + gtk_widget_set_sensitive (blend_options->repeat_mode_menu, + (blend_options->gradient_type < 6)); } static void @@ -444,6 +447,8 @@ create_blend_options () gtk_widget_show(label); gtk_widget_show(rt_option_menu); + options->repeat_mode_menu = rt_option_menu; + /* show the whole table */ gtk_widget_show (table); diff --git a/app/core/gimpdrawable-blend.c b/app/core/gimpdrawable-blend.c index c39a7379a8..8dfcda5a94 100644 --- a/app/core/gimpdrawable-blend.c +++ b/app/core/gimpdrawable-blend.c @@ -100,6 +100,7 @@ struct _BlendOptions int paint_mode; GradientType gradient_type; RepeatMode repeat; + GtkWidget *repeat_mode_menu; int supersample; GtkWidget *frame; int max_depth; @@ -250,6 +251,8 @@ gradient_type_callback (GtkWidget *w, gpointer client_data) { blend_options->gradient_type = (GradientType) client_data; + gtk_widget_set_sensitive (blend_options->repeat_mode_menu, + (blend_options->gradient_type < 6)); } static void @@ -444,6 +447,8 @@ create_blend_options () gtk_widget_show(label); gtk_widget_show(rt_option_menu); + options->repeat_mode_menu = rt_option_menu; + /* show the whole table */ gtk_widget_show (table); diff --git a/app/gui/layers-dialog.c b/app/gui/layers-dialog.c index 977935d508..ed382b98ae 100644 --- a/app/gui/layers-dialog.c +++ b/app/gui/layers-dialog.c @@ -286,8 +286,8 @@ lc_dialog_create (int gimage_id) &lc_shell); gtk_quit_add_destroy (1, GTK_OBJECT (lc_shell)); - lc_subshell = gtk_vbox_new(FALSE, 1); - gtk_box_pack_start (GTK_BOX(GTK_DIALOG(lc_shell)->vbox), lc_subshell, TRUE, TRUE, 0); + lc_subshell = gtk_vbox_new(FALSE, 2); + gtk_box_pack_start (GTK_BOX(GTK_DIALOG(lc_shell)->vbox), lc_subshell, TRUE, TRUE, 2); /* The hbox to hold the image option menu box */ util_box = gtk_hbox_new (FALSE, 1); @@ -309,7 +309,7 @@ lc_dialog_create (int gimage_id) gtk_widget_show (util_box); separator = gtk_hseparator_new (); - gtk_box_pack_start (GTK_BOX(lc_subshell), separator, FALSE, TRUE, 5); + gtk_box_pack_start (GTK_BOX(lc_subshell), separator, FALSE, TRUE, 2); gtk_widget_show (separator); /* The notebook widget */ @@ -332,15 +332,16 @@ lc_dialog_create (int gimage_id) gtk_widget_show (lc_subshell); + gtk_container_border_width (GTK_CONTAINER (GTK_DIALOG(lc_shell)->action_area), 1); /* The close button */ button = gtk_button_new_with_label ("Close"); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG(lc_shell)->vbox), button, FALSE, FALSE, 2); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG(lc_shell)->action_area), button, TRUE, TRUE, 0); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", (GtkSignalFunc) lc_dialog_close_callback, GTK_OBJECT (lc_shell)); gtk_widget_show (button); - gtk_widget_hide (GTK_DIALOG(lc_shell)->action_area); + gtk_widget_show (GTK_DIALOG(lc_shell)->action_area); gtk_widget_show (lc_shell); diff --git a/app/layers_dialog.c b/app/layers_dialog.c index 977935d508..ed382b98ae 100644 --- a/app/layers_dialog.c +++ b/app/layers_dialog.c @@ -286,8 +286,8 @@ lc_dialog_create (int gimage_id) &lc_shell); gtk_quit_add_destroy (1, GTK_OBJECT (lc_shell)); - lc_subshell = gtk_vbox_new(FALSE, 1); - gtk_box_pack_start (GTK_BOX(GTK_DIALOG(lc_shell)->vbox), lc_subshell, TRUE, TRUE, 0); + lc_subshell = gtk_vbox_new(FALSE, 2); + gtk_box_pack_start (GTK_BOX(GTK_DIALOG(lc_shell)->vbox), lc_subshell, TRUE, TRUE, 2); /* The hbox to hold the image option menu box */ util_box = gtk_hbox_new (FALSE, 1); @@ -309,7 +309,7 @@ lc_dialog_create (int gimage_id) gtk_widget_show (util_box); separator = gtk_hseparator_new (); - gtk_box_pack_start (GTK_BOX(lc_subshell), separator, FALSE, TRUE, 5); + gtk_box_pack_start (GTK_BOX(lc_subshell), separator, FALSE, TRUE, 2); gtk_widget_show (separator); /* The notebook widget */ @@ -332,15 +332,16 @@ lc_dialog_create (int gimage_id) gtk_widget_show (lc_subshell); + gtk_container_border_width (GTK_CONTAINER (GTK_DIALOG(lc_shell)->action_area), 1); /* The close button */ button = gtk_button_new_with_label ("Close"); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG(lc_shell)->vbox), button, FALSE, FALSE, 2); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG(lc_shell)->action_area), button, TRUE, TRUE, 0); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", (GtkSignalFunc) lc_dialog_close_callback, GTK_OBJECT (lc_shell)); gtk_widget_show (button); - gtk_widget_hide (GTK_DIALOG(lc_shell)->action_area); + gtk_widget_show (GTK_DIALOG(lc_shell)->action_area); gtk_widget_show (lc_shell); diff --git a/app/tools/blend.c b/app/tools/blend.c index c39a7379a8..8dfcda5a94 100644 --- a/app/tools/blend.c +++ b/app/tools/blend.c @@ -100,6 +100,7 @@ struct _BlendOptions int paint_mode; GradientType gradient_type; RepeatMode repeat; + GtkWidget *repeat_mode_menu; int supersample; GtkWidget *frame; int max_depth; @@ -250,6 +251,8 @@ gradient_type_callback (GtkWidget *w, gpointer client_data) { blend_options->gradient_type = (GradientType) client_data; + gtk_widget_set_sensitive (blend_options->repeat_mode_menu, + (blend_options->gradient_type < 6)); } static void @@ -444,6 +447,8 @@ create_blend_options () gtk_widget_show(label); gtk_widget_show(rt_option_menu); + options->repeat_mode_menu = rt_option_menu; + /* show the whole table */ gtk_widget_show (table); diff --git a/app/tools/gimpblendtool.c b/app/tools/gimpblendtool.c index c39a7379a8..8dfcda5a94 100644 --- a/app/tools/gimpblendtool.c +++ b/app/tools/gimpblendtool.c @@ -100,6 +100,7 @@ struct _BlendOptions int paint_mode; GradientType gradient_type; RepeatMode repeat; + GtkWidget *repeat_mode_menu; int supersample; GtkWidget *frame; int max_depth; @@ -250,6 +251,8 @@ gradient_type_callback (GtkWidget *w, gpointer client_data) { blend_options->gradient_type = (GradientType) client_data; + gtk_widget_set_sensitive (blend_options->repeat_mode_menu, + (blend_options->gradient_type < 6)); } static void @@ -444,6 +447,8 @@ create_blend_options () gtk_widget_show(label); gtk_widget_show(rt_option_menu); + options->repeat_mode_menu = rt_option_menu; + /* show the whole table */ gtk_widget_show (table);