app/tools/gimpcurvestool.c app/tools/gimplevelstool.c added buttons to

2004-03-05  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpthresholdtool.c: added buttons to toggle the
	histogram scale from the tool dialogs. Fixes bug #136227.
This commit is contained in:
Sven Neumann 2004-03-05 01:31:33 +00:00 committed by Sven Neumann
parent 0ea07ee392
commit 0ef0afea3a
4 changed files with 43 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2004-03-05 Sven Neumann <sven@gimp.org>
* app/tools/gimpcurvestool.c
* app/tools/gimplevelstool.c
* app/tools/gimpthresholdtool.c: added buttons to toggle the
histogram scale from the tool dialogs. Fixes bug #136227.
2004-03-04 Michael Natterer <mitch@gimp.org>
* app/tools/gimpmovetool.c (gimp_move_tool_button_press): if we

View File

@ -463,6 +463,8 @@ gimp_curves_tool_dialog (GimpImageMapTool *image_map_tool)
GtkWidget *bar;
gint padding;
tool_options = GIMP_TOOL (tool)->tool_info->tool_options;
vbox = image_map_tool->main_vbox;
/* The option menu for selecting channels */
@ -485,13 +487,18 @@ gimp_curves_tool_dialog (GimpImageMapTool *image_map_tool)
tool->channel_menu = menu;
button = gtk_button_new_with_mnemonic (_("R_eset Channel"));
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (button, "clicked",
G_CALLBACK (curves_channel_reset_callback),
tool);
menu = gimp_prop_enum_stock_box_new (G_OBJECT (tool_options),
"histogram-scale", "gimp-histogram",
0, 0);
gtk_box_pack_end (GTK_BOX (hbox), menu, FALSE, FALSE, 0);
gtk_widget_show (menu);
/* The table for the color bars and the graph */
table = gtk_table_new (2, 2, FALSE);
@ -546,7 +553,6 @@ gimp_curves_tool_dialog (GimpImageMapTool *image_map_tool)
tool);
tool_options = GIMP_TOOL (tool)->tool_info->tool_options;
gimp_histogram_options_connect_view (GIMP_HISTOGRAM_OPTIONS (tool_options),
GIMP_HISTOGRAM_VIEW (tool->graph));

View File

@ -47,6 +47,7 @@
#include "widgets/gimpenummenu.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimphistogramview.h"
#include "widgets/gimppropwidgets.h"
#include "display/gimpdisplay.h"
@ -398,6 +399,8 @@ gimp_levels_tool_dialog (GimpImageMapTool *image_map_tool)
GtkObject *data;
gint border;
tool_options = GIMP_TOOL (tool)->tool_info->tool_options;
vbox = image_map_tool->main_vbox;
/* The option menu for selecting channels */
@ -420,13 +423,18 @@ gimp_levels_tool_dialog (GimpImageMapTool *image_map_tool)
tool->channel_menu = menu;
button = gtk_button_new_with_mnemonic (_("R_eset Channel"));
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (button, "clicked",
G_CALLBACK (levels_channel_reset_callback),
tool);
menu = gimp_prop_enum_stock_box_new (G_OBJECT (tool_options),
"histogram-scale", "gimp-histogram",
0, 0);
gtk_box_pack_end (GTK_BOX (hbox), menu, FALSE, FALSE, 0);
gtk_widget_show (menu);
/* Input levels frame */
frame = gtk_frame_new (_("Input Levels"));
@ -447,7 +455,6 @@ gimp_levels_tool_dialog (GimpImageMapTool *image_map_tool)
gtk_container_add (GTK_CONTAINER (frame), tool->hist_view);
gtk_widget_show (GTK_WIDGET (tool->hist_view));
tool_options = GIMP_TOOL (tool)->tool_info->tool_options;
gimp_histogram_options_connect_view (GIMP_HISTOGRAM_OPTIONS (tool_options),
GIMP_HISTOGRAM_VIEW (tool->hist_view));

View File

@ -39,6 +39,7 @@
#include "widgets/gimphelp-ids.h"
#include "widgets/gimphistogrambox.h"
#include "widgets/gimphistogramview.h"
#include "widgets/gimppropwidgets.h"
#include "display/gimpdisplay.h"
@ -251,10 +252,27 @@ gimp_threshold_tool_dialog (GimpImageMapTool *image_map_tool)
{
GimpThresholdTool *t_tool = GIMP_THRESHOLD_TOOL (image_map_tool);
GimpToolOptions *tool_options;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *menu;
GtkWidget *box;
tool_options = GIMP_TOOL (t_tool)->tool_info->tool_options;
vbox = image_map_tool->main_vbox;
hbox = gtk_hbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
menu = gimp_prop_enum_stock_box_new (G_OBJECT (tool_options),
"histogram-scale", "gimp-histogram",
0, 0);
gtk_box_pack_end (GTK_BOX (hbox), menu, FALSE, FALSE, 0);
gtk_widget_show (menu);
box = gimp_histogram_box_new (_("Threshold Range:"));
gtk_container_add (GTK_CONTAINER (image_map_tool->main_vbox), box);
gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0);
gtk_widget_show (box);
t_tool->histogram_box = GIMP_HISTOGRAM_BOX (box);
@ -263,7 +281,6 @@ gimp_threshold_tool_dialog (GimpImageMapTool *image_map_tool)
G_CALLBACK (gimp_threshold_tool_histogram_range),
t_tool);
tool_options = GIMP_TOOL (t_tool)->tool_info->tool_options;
gimp_histogram_options_connect_view (GIMP_HISTOGRAM_OPTIONS (tool_options),
t_tool->histogram_box->view);
}