Commit b6a3dd5a authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/app_procs.c app/channels_dialog.c app/fileops.c app/gdisplay.c

1999-11-23  Michael Natterer  <mitch@gimp.org>

	* app/app_procs.c
	* app/channels_dialog.c
	* app/fileops.c
	* app/gdisplay.c
	* app/gdisplay_ops.c
	* app/layers_dialog.c
	* app/menus.[ch]
	* app/paths_dialog.c
	* app/plug_in.c: removed
	menus_set_[sensitive|state]_glue(). Removed the N_()'s from all
	menu paths which are not eventually passed to
	gtk_item_factory_create_item().

	* app/tool_options.c: minor updates.

	* app/file_new_dialog.c: reordered the action_area buttons.
parent facdf439
1999-11-23 Michael Natterer <mitch@gimp.org>
* app/app_procs.c
* app/channels_dialog.c
* app/fileops.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/layers_dialog.c
* app/menus.[ch]
* app/paths_dialog.c
* app/plug_in.c: removed
menus_set_[sensitive|state]_glue(). Removed the N_()'s from all
menu paths which are not eventually passed to
gtk_item_factory_create_item().
* app/tool_options.c: minor updates.
* app/file_new_dialog.c: reordered the action_area buttons.
Tue Nov 23 02:02:30 MET 1999 Sven Neumann <sven@gimp.org>
* app/menus.c: fixed a possible buffer overflow
......
......@@ -1282,8 +1282,8 @@ plug_in_set_menu_sensitivity (GimpImageType type)
menus_set_sensitive (proc_def->menu_path, sensitive);
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
menus_set_sensitive_glue ("<Image>", N_("/Filters/Repeat last"), sensitive);
menus_set_sensitive_glue ("<Image>", N_("/Filters/Re-show last"), sensitive);
menus_set_sensitive ("<Image>/Filters/Repeat last", sensitive);
menus_set_sensitive ("<Image>/Filters/Re-show last", sensitive);
}
}
}
......
......@@ -687,7 +687,7 @@ app_exit_finish (void)
if (!no_interface)
{
toolbox_free ();
close_idea_window();
close_idea_window ();
gximage_free ();
render_free ();
tool_options_dialog_free ();
......@@ -724,8 +724,8 @@ static void
really_quit_cancel_callback (GtkWidget *widget,
GtkWidget *dialog)
{
menus_set_sensitive_glue ("<Toolbox>", N_("/File/Quit"), TRUE);
menus_set_sensitive_glue ("<Image>", N_("/File/Quit"), TRUE);
menus_set_sensitive ("<Toolbox>/File/Quit", TRUE);
menus_set_sensitive ("<Image>/File/Quit", TRUE);
gtk_widget_destroy (dialog);
}
......@@ -740,8 +740,8 @@ really_quit_dialog (void)
GtkStyle *style;
GtkWidget *label;
menus_set_sensitive_glue ("<Toolbox>", N_("/File/Quit"), FALSE);
menus_set_sensitive_glue ("<Image>", N_("/File/Quit"), FALSE);
menus_set_sensitive ("<Toolbox>/File/Quit", FALSE);
menus_set_sensitive ("<Image>/File/Quit", FALSE);
dialog = gimp_dialog_new (_("Really Quit?"), "really_quit",
gimp_standard_help_func,
......
......@@ -622,31 +622,31 @@ channels_dialog_set_menu_sensitivity (void)
aux_sens = FALSE;
#define SET_SENSITIVE(menu,condition) \
menus_set_sensitive_glue ("<Channels>", (menu), (condition) != 0)
menus_set_sensitive ("<Channels>/" menu, (condition) != 0)
#define SET_OPS_SENSITIVE(button,condition) \
gtk_widget_set_sensitive (channels_ops_buttons[(button)].widget, \
(condition) != 0)
SET_SENSITIVE (N_("/New Channel..."), !fs_sens);
SET_SENSITIVE ("New Channel...", !fs_sens);
SET_OPS_SENSITIVE (0, !fs_sens);
SET_SENSITIVE (N_("/Raise Channel"), !fs_sens && aux_sens);
SET_SENSITIVE ("Raise Channel", !fs_sens && aux_sens);
SET_OPS_SENSITIVE (1, !fs_sens && aux_sens);
SET_SENSITIVE (N_("/Lower Channel"), !fs_sens && aux_sens);
SET_SENSITIVE ("Lower Channel", !fs_sens && aux_sens);
SET_OPS_SENSITIVE (2, !fs_sens && aux_sens);
SET_SENSITIVE (N_("/Duplicate Channel"), !fs_sens && aux_sens);
SET_SENSITIVE ("Duplicate Channel", !fs_sens && aux_sens);
SET_OPS_SENSITIVE (3, !fs_sens && aux_sens);
SET_SENSITIVE (N_("/Channel to Selection"), aux_sens);
SET_SENSITIVE ("Channel to Selection", aux_sens);
SET_OPS_SENSITIVE (4, aux_sens);
SET_SENSITIVE (N_("/Add to Selection"), aux_sens);
SET_SENSITIVE (N_("/Subtract From Selection"), aux_sens);
SET_SENSITIVE (N_("/Intersect With Selection"), aux_sens);
SET_SENSITIVE ("Add to Selection", aux_sens);
SET_SENSITIVE ("Subtract From Selection", aux_sens);
SET_SENSITIVE ("Intersect With Selection", aux_sens);
SET_SENSITIVE (N_("/Delete Channel"), !fs_sens && aux_sens);
SET_SENSITIVE ("Delete Channel", !fs_sens && aux_sens);
SET_OPS_SENSITIVE (5, !fs_sens && aux_sens);
#undef SET_OPS_SENSITIVE
......
......@@ -1632,112 +1632,112 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
}
#define SET_SENSITIVE(menu,condition) \
menus_set_sensitive_glue ("<Image>", (menu), (condition) != 0)
menus_set_sensitive ("<Image>/" menu, (condition) != 0)
#define SET_STATE(menu,condition) \
menus_set_state_glue ("<Image>", (menu), (condition) != 0)
menus_set_state ("<Image>/" menu, (condition) != 0)
SET_SENSITIVE (N_("/File/Save"), gdisp);
SET_SENSITIVE (N_("/File/Save as..."), gdisp);
SET_SENSITIVE (N_("/File/Revert"), gdisp);
SET_SENSITIVE (N_("/File/Close"), gdisp);
SET_SENSITIVE ("File/Save", gdisp);
SET_SENSITIVE ("File/Save as...", gdisp);
SET_SENSITIVE ("File/Revert", gdisp);
SET_SENSITIVE ("File/Close", gdisp);
SET_SENSITIVE (N_("/Edit"), gdisp);
SET_SENSITIVE (N_("/Edit/Buffer"), gdisp);
SET_SENSITIVE ("Edit", gdisp);
SET_SENSITIVE ("Edit/Buffer", gdisp);
if (gdisp)
{
SET_SENSITIVE (N_("/Edit/Undo"), undo_get_undo_name (gdisp->gimage));
SET_SENSITIVE (N_("/Edit/Redo"), undo_get_redo_name (gdisp->gimage));
SET_SENSITIVE (N_("/Edit/Cut"), lp);
SET_SENSITIVE (N_("/Edit/Copy"), lp);
SET_SENSITIVE (N_("/Edit/Paste"), lp);
SET_SENSITIVE (N_("/Edit/Paste Into"), lp);
SET_SENSITIVE (N_("/Edit/Paste As New"), lp);
SET_SENSITIVE (N_("/Edit/Buffer/Cut Named..."), lp);
SET_SENSITIVE (N_("/Edit/Buffer/Copy Named..."), lp);
SET_SENSITIVE (N_("/Edit/Buffer/Paste Named..."), lp);
SET_SENSITIVE (N_("/Edit/Clear"), lp);
SET_SENSITIVE (N_("/Edit/Fill"), lp);
SET_SENSITIVE (N_("/Edit/Stroke"), lp);
}
SET_SENSITIVE (N_("/Select"), gdisp && lp);
SET_SENSITIVE (N_("/Select/Save To Channel"), !fs);
SET_SENSITIVE (N_("/View"), gdisp);
SET_SENSITIVE (N_("/View/Zoom"), gdisp);
SET_SENSITIVE ("Edit/Undo", undo_get_undo_name (gdisp->gimage));
SET_SENSITIVE ("Edit/Redo", undo_get_redo_name (gdisp->gimage));
SET_SENSITIVE ("Edit/Cut", lp);
SET_SENSITIVE ("Edit/Copy", lp);
SET_SENSITIVE ("Edit/Paste", lp);
SET_SENSITIVE ("Edit/Paste Into", lp);
SET_SENSITIVE ("Edit/Paste As New", lp);
SET_SENSITIVE ("Edit/Buffer/Cut Named...", lp);
SET_SENSITIVE ("Edit/Buffer/Copy Named...", lp);
SET_SENSITIVE ("Edit/Buffer/Paste Named...", lp);
SET_SENSITIVE ("Edit/Clear", lp);
SET_SENSITIVE ("Edit/Fill", lp);
SET_SENSITIVE ("Edit/Stroke", lp);
}
SET_SENSITIVE ("Select", gdisp && lp);
SET_SENSITIVE ("Select/Save To Channel", !fs);
SET_SENSITIVE ("View", gdisp);
SET_SENSITIVE ("View/Zoom", gdisp);
if (gdisp)
{
SET_STATE (N_("/View/Toggle Selection"), !gdisp->select->hidden);
SET_STATE (N_("/View/Toggle Rulers"),
SET_STATE ("View/Toggle Selection", !gdisp->select->hidden);
SET_STATE ("View/Toggle Rulers",
GTK_WIDGET_VISIBLE (gdisp->origin) ? 1 : 0);
SET_STATE (N_("/View/Toggle Guides"), gdisp->draw_guides);
SET_STATE (N_("/View/Snap To Guides"), gdisp->snap_to_guides);
SET_STATE (N_("/View/Toggle Statusbar"),
SET_STATE ("View/Toggle Guides", gdisp->draw_guides);
SET_STATE ("View/Snap To Guides", gdisp->snap_to_guides);
SET_STATE ("View/Toggle Statusbar",
GTK_WIDGET_VISIBLE (gdisp->statusarea) ? 1 : 0);
SET_STATE (N_("/View/Dot for dot"), gdisp->dot_for_dot);
SET_STATE ("View/Dot for dot", gdisp->dot_for_dot);
}
SET_SENSITIVE (N_("/Image"), gdisp);
SET_SENSITIVE (N_("/Image/Mode"), gdisp);
SET_SENSITIVE (N_("/Image/Colors"), gdisp);
SET_SENSITIVE (N_("/Image/Colors/Auto"), gdisp);
SET_SENSITIVE (N_("/Image/Alpha"), gdisp);
SET_SENSITIVE (N_("/Image/Transforms"), gdisp);
SET_SENSITIVE (N_("/Image/Transforms/Rotate"), gdisp);
SET_SENSITIVE ("Image", gdisp);
SET_SENSITIVE ("Image/Mode", gdisp);
SET_SENSITIVE ("Image/Colors", gdisp);
SET_SENSITIVE ("Image/Colors/Auto", gdisp);
SET_SENSITIVE ("Image/Alpha", gdisp);
SET_SENSITIVE ("Image/Transforms", gdisp);
SET_SENSITIVE ("Image/Transforms/Rotate", gdisp);
if (gdisp)
{
SET_SENSITIVE (N_("/Image/Mode/RGB"), (base_type != RGB));
SET_SENSITIVE (N_("/Image/Mode/Grayscale"), (base_type != GRAY));
SET_SENSITIVE (N_("/Image/Mode/Indexed..."), (base_type != INDEXED));
SET_SENSITIVE (N_("/Image/Histogram..."), lp);
SET_SENSITIVE (N_("/Image/Colors"), lp);
SET_SENSITIVE (N_("/Image/Colors/Color Balance..."), (base_type == RGB));
SET_SENSITIVE (N_("/Image/Colors/Hue-Saturation..."), (base_type == RGB));
SET_SENSITIVE (N_("/Image/Colors/Brightness-Contrast..."), (base_type != INDEXED));
SET_SENSITIVE (N_("/Image/Colors/Threshold..."), (base_type != INDEXED));
SET_SENSITIVE (N_("/Image/Colors/Levels..."), (base_type != INDEXED));
SET_SENSITIVE (N_("/Image/Colors/Curves..."), (base_type != INDEXED));
SET_SENSITIVE (N_("/Image/Colors/Desaturate"), (base_type == RGB));
SET_SENSITIVE (N_("/Image/Colors/Posterize..."), (base_type != INDEXED));
SET_SENSITIVE (N_("/Image/Colors/Invert"), (base_type != INDEXED));
SET_SENSITIVE (N_("/Image/Colors/Auto/Equalize"), (base_type != INDEXED));
SET_SENSITIVE (N_("/Image/Alpha/Add Alpha Channel"),
SET_SENSITIVE ("Image/Mode/RGB", (base_type != RGB));
SET_SENSITIVE ("Image/Mode/Grayscale", (base_type != GRAY));
SET_SENSITIVE ("Image/Mode/Indexed...", (base_type != INDEXED));
SET_SENSITIVE ("Image/Histogram...", lp);
SET_SENSITIVE ("Image/Colors", lp);
SET_SENSITIVE ("Image/Colors/Color Balance...", (base_type == RGB));
SET_SENSITIVE ("Image/Colors/Hue-Saturation...", (base_type == RGB));
SET_SENSITIVE ("Image/Colors/Brightness-Contrast...", (base_type != INDEXED));
SET_SENSITIVE ("Image/Colors/Threshold...", (base_type != INDEXED));
SET_SENSITIVE ("Image/Colors/Levels...", (base_type != INDEXED));
SET_SENSITIVE ("Image/Colors/Curves...", (base_type != INDEXED));
SET_SENSITIVE ("Image/Colors/Desaturate", (base_type == RGB));
SET_SENSITIVE ("Image/Colors/Posterize...", (base_type != INDEXED));
SET_SENSITIVE ("Image/Colors/Invert", (base_type != INDEXED));
SET_SENSITIVE ("Image/Colors/Auto/Equalize", (base_type != INDEXED));
SET_SENSITIVE ("Image/Alpha/Add Alpha Channel",
!fs && !aux && lp && !lm && !alpha);
SET_SENSITIVE (N_("/Image/Transforms/Offset..."), lp);
SET_SENSITIVE ("Image/Transforms/Offset...", lp);
}
SET_SENSITIVE (N_("/Layers/Stack"), gdisp);
SET_SENSITIVE (N_("/Layers/Rotate"), gdisp);
SET_SENSITIVE ("Layers/Stack", gdisp);
SET_SENSITIVE ("Layers/Rotate", gdisp);
if (gdisp)
{
SET_SENSITIVE (N_("/Layers/Stack/Previous Layer"),
SET_SENSITIVE ("Layers/Stack/Previous Layer",
!fs && !aux && lp && lind > 0);
SET_SENSITIVE (N_("/Layers/Stack/Next Layer"),
SET_SENSITIVE ("Layers/Stack/Next Layer",
!fs && !aux && lp && lind < (lnum - 1));
SET_SENSITIVE (N_("/Layers/Stack/Raise Layer"),
SET_SENSITIVE ("Layers/Stack/Raise Layer",
!fs && !aux && lp && alpha && lind > 0);
SET_SENSITIVE (N_("/Layers/Stack/Lower Layer"),
SET_SENSITIVE ("Layers/Stack/Lower Layer",
!fs && !aux && lp && alpha && lind < (lnum - 1));
SET_SENSITIVE (N_("/Layers/Stack/Layer to Top"),
SET_SENSITIVE ("Layers/Stack/Layer to Top",
!fs && !aux && lp && alpha && lind > 0);
SET_SENSITIVE (N_("/Layers/Stack/Layer to Bottom"),
SET_SENSITIVE ("Layers/Stack/Layer to Bottom",
!fs && !aux && lp && alpha && lind < (lnum - 1));
}
SET_SENSITIVE (N_("/Layers/Anchor Layer"), gdisp && fs && !aux && lp);
SET_SENSITIVE (N_("/Layers/Merge Visible Layers..."), gdisp && !fs && !aux && lp);
SET_SENSITIVE (N_("/Layers/Flatten Image"), gdisp && !fs && !aux && lp);
SET_SENSITIVE (N_("/Layers/Alpha To Selection"), gdisp && !aux && lp && alpha);
SET_SENSITIVE (N_("/Layers/Mask To Selection"), gdisp && !aux && lm && lp);
SET_SENSITIVE (N_("/Layers/Add Alpha Channel"),
SET_SENSITIVE ("Layers/Anchor Layer", gdisp && fs && !aux && lp);
SET_SENSITIVE ("Layers/Merge Visible Layers...", gdisp && !fs && !aux && lp);
SET_SENSITIVE ("Layers/Flatten Image", gdisp && !fs && !aux && lp);
SET_SENSITIVE ("Layers/Alpha To Selection", gdisp && !aux && lp && alpha);
SET_SENSITIVE ("Layers/Mask To Selection", gdisp && !aux && lm && lp);
SET_SENSITIVE ("Layers/Add Alpha Channel",
gdisp && !fs && !aux && lp && !lm && !alpha);
SET_SENSITIVE (N_("/Filters"), gdisp && lp);
SET_SENSITIVE ("Filters", gdisp && lp);
SET_SENSITIVE (N_("/Script-Fu"), gdisp && lp);
SET_SENSITIVE ("Script-Fu", gdisp && lp);
#undef SET_STATE
#undef SET_SENSITIVE
......
......@@ -174,7 +174,7 @@ tool_options_radio_buttons_new (gchar* label,
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button_widget[i]));
gtk_box_pack_start (GTK_BOX (vbox), button_widget[i], FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button_widget[i]), "toggled",
(GtkSignalFunc) tool_options_radio_buttons_update,
GTK_SIGNAL_FUNC (tool_options_radio_buttons_update),
toggle_val);
gtk_object_set_data (GTK_OBJECT (button_widget[i]), "toggle_value",
(gpointer)button_value[i]);
......@@ -281,7 +281,7 @@ selection_options_init (SelectionOptions *options,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->feather_w),
options->feather_d);
gtk_signal_connect (GTK_OBJECT (options->feather_w), "toggled",
(GtkSignalFunc) tool_options_toggle_update,
GTK_SIGNAL_FUNC (tool_options_toggle_update),
&options->feather);
gtk_widget_show (options->feather_w);
......@@ -298,13 +298,13 @@ selection_options_init (SelectionOptions *options,
gtk_widget_show (abox);
options->feather_radius_w =
gtk_adjustment_new (options->feather_radius_d, 0.0, 100.0, 1.0, 1.0, 0.0);
gtk_adjustment_new (options->feather_radius_d, 0.0, 100.0, 1.0, 1.0, 1.0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->feather_radius_w));
gtk_container_add (GTK_CONTAINER (abox), scale);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (options->feather_radius_w), "value_changed",
(GtkSignalFunc) tool_options_double_adjustment_update,
GTK_SIGNAL_FUNC (tool_options_double_adjustment_update),
&options->feather_radius);
gtk_widget_show (scale);
......@@ -324,7 +324,7 @@ selection_options_init (SelectionOptions *options,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->antialias_w),
options->antialias_d);
gtk_signal_connect (GTK_OBJECT (options->antialias_w), "toggled",
(GtkSignalFunc) tool_options_toggle_update,
GTK_SIGNAL_FUNC (tool_options_toggle_update),
&options->antialias);
gtk_widget_show (options->antialias_w);
}
......@@ -364,7 +364,7 @@ selection_options_init (SelectionOptions *options,
gtk_box_pack_start (GTK_BOX (vbox), options->sample_merged_w,
FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (options->sample_merged_w), "toggled",
(GtkSignalFunc) tool_options_toggle_update,
GTK_SIGNAL_FUNC (tool_options_toggle_update),
&options->sample_merged);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->sample_merged_w),
options->sample_merged_d);
......@@ -375,7 +375,7 @@ selection_options_init (SelectionOptions *options,
}
/* widgets for fixed size select */
if (tool_type == RECT_SELECT || tool_type == ELLIPSE_SELECT)
if (tool_type == RECT_SELECT || tool_type == ELLIPSE_SELECT)
{
GtkWidget *alignment;
GtkWidget *table;
......@@ -387,11 +387,11 @@ selection_options_init (SelectionOptions *options,
gtk_box_pack_start (GTK_BOX (vbox), options->fixed_size_w,
FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (options->fixed_size_w), "toggled",
(GtkSignalFunc) tool_options_toggle_update,
GTK_SIGNAL_FUNC (tool_options_toggle_update),
&options->fixed_size);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(options->fixed_size_w),
options->fixed_size_d);
gtk_widget_show(options->fixed_size_w);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->fixed_size_w),
options->fixed_size_d);
gtk_widget_show (options->fixed_size_w);
alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
......@@ -417,7 +417,7 @@ selection_options_init (SelectionOptions *options,
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (width_spinbutton), TRUE);
gtk_widget_set_usize (width_spinbutton, 75, 0);
gtk_signal_connect (GTK_OBJECT (options->fixed_width_w), "value_changed",
(GtkSignalFunc) tool_options_double_adjustment_update,
GTK_SIGNAL_FUNC (tool_options_double_adjustment_update),
&options->fixed_width);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Width:"), 1.0, 0.5,
......@@ -433,7 +433,7 @@ selection_options_init (SelectionOptions *options,
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(height_spinbutton), TRUE);
gtk_widget_set_usize (height_spinbutton, 75, 0);
gtk_signal_connect (GTK_OBJECT (options->fixed_height_w), "value_changed",
(GtkSignalFunc) tool_options_double_adjustment_update,
GTK_SIGNAL_FUNC (tool_options_double_adjustment_update),
&options->fixed_height);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("Height:"), 1.0, 0.5,
......@@ -442,7 +442,7 @@ selection_options_init (SelectionOptions *options,
options->fixed_unit_w =
gimp_unit_menu_new ("%a", options->fixed_unit_d, TRUE, TRUE, TRUE);
gtk_signal_connect (GTK_OBJECT (options->fixed_unit_w), "unit_changed",
(GtkSignalFunc) tool_options_unitmenu_update,
GTK_SIGNAL_FUNC (tool_options_unitmenu_update),
&options->fixed_unit);
gtk_object_set_data (GTK_OBJECT (options->fixed_unit_w), "set_digits",
width_spinbutton);
......@@ -487,7 +487,7 @@ selection_options_reset (SelectionOptions *options)
if (options->fixed_size_w)
{
GtkWidget *spinbutton;
int digits;
gint digits;
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(options->fixed_size_w),
options->fixed_size_d);
......@@ -589,7 +589,7 @@ paint_options_init (PaintOptions *options,
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (options->opacity_w), "value_changed",
(GtkSignalFunc) tool_options_opacity_adjustment_update,
GTK_SIGNAL_FUNC (tool_options_opacity_adjustment_update),
tool_context);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Opacity:"), 1.0, 1.0,
......@@ -605,6 +605,7 @@ paint_options_init (PaintOptions *options,
case AIRBRUSH:
case CLONE:
case INK:
case XINPUT_AIRBRUSH:
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2);
options->paint_mode_w = gtk_option_menu_new ();
......@@ -643,6 +644,7 @@ paint_options_init (PaintOptions *options,
case INK:
case DODGEBURN:
case SMUDGE:
case XINPUT_AIRBRUSH:
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, FALSE, 0);
gtk_widget_show (separator);
......@@ -671,7 +673,7 @@ paint_options_init (PaintOptions *options,
gtk_box_pack_start (GTK_BOX (options->tool_options.main_vbox),
options->incremental_w, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (options->incremental_w), "toggled",
(GtkSignalFunc) tool_options_toggle_update,
GTK_SIGNAL_FUNC (tool_options_toggle_update),
&options->incremental);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->incremental_w),
options->incremental_d);
......@@ -756,16 +758,17 @@ paint_pressure_options_new (ToolType tool_type)
pressure = g_new (PaintPressureOptions, 1);
pressure->opacity_w = NULL;
pressure->opacity = pressure->opacity_d =TRUE;
pressure->pressure_w = NULL;
pressure->opacity = pressure->opacity_d = TRUE;
pressure->pressure = pressure->pressure_d = TRUE;
pressure->rate_w = NULL;
pressure->rate = pressure->rate_d = FALSE;
pressure->size_w = NULL;
pressure->size = pressure->size_d = FALSE;
pressure->color_w = NULL;
pressure->color = pressure->color_d = FALSE;
pressure->rate = pressure->rate_d = FALSE;
pressure->size = pressure->size_d = FALSE;
pressure->color = pressure->color_d = FALSE;
pressure->opacity_w = NULL;
pressure->pressure_w = NULL;
pressure->rate_w = NULL;
pressure->size_w = NULL;
pressure->color_w = NULL;
switch (tool_type)
{
......@@ -798,7 +801,7 @@ paint_pressure_options_new (ToolType tool_type)
gtk_check_button_new_with_label (_("Opacity"));
gtk_container_add (GTK_CONTAINER (hbox), pressure->opacity_w);
gtk_signal_connect (GTK_OBJECT (pressure->opacity_w), "toggled",
(GtkSignalFunc) tool_options_toggle_update,
GTK_SIGNAL_FUNC (tool_options_toggle_update),
&pressure->opacity);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pressure->opacity_w),
pressure->opacity_d);
......@@ -821,7 +824,7 @@ paint_pressure_options_new (ToolType tool_type)
pressure->pressure_w = gtk_check_button_new_with_label (_("Pressure"));
gtk_container_add (GTK_CONTAINER (hbox), pressure->pressure_w);
gtk_signal_connect (GTK_OBJECT (pressure->pressure_w), "toggled",
(GtkSignalFunc) tool_options_toggle_update,
GTK_SIGNAL_FUNC (tool_options_toggle_update),
&pressure->pressure);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pressure->pressure_w),
pressure->pressure_d);
......@@ -841,7 +844,7 @@ paint_pressure_options_new (ToolType tool_type)
gtk_check_button_new_with_label (_("Rate"));
gtk_container_add (GTK_CONTAINER (hbox), pressure->rate_w);
gtk_signal_connect (GTK_OBJECT (pressure->rate_w), "toggled",
(GtkSignalFunc) tool_options_toggle_update,
GTK_SIGNAL_FUNC (tool_options_toggle_update),
&pressure->rate);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pressure->rate_w),
pressure->rate_d);
......@@ -865,7 +868,7 @@ paint_pressure_options_new (ToolType tool_type)
gtk_check_button_new_with_label (_("Size"));
gtk_container_add (GTK_CONTAINER (hbox), pressure->size_w);
gtk_signal_connect (GTK_OBJECT (pressure->size_w), "toggled",
(GtkSignalFunc) tool_options_toggle_update,
GTK_SIGNAL_FUNC (tool_options_toggle_update),
&pressure->size);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pressure->size_w),
pressure->size_d);
......@@ -885,7 +888,7 @@ paint_pressure_options_new (ToolType tool_type)
gtk_check_button_new_with_label (_("Color"));
gtk_container_add (GTK_CONTAINER (hbox), pressure->color_w);
gtk_signal_connect (GTK_OBJECT (pressure->color_w), "toggled",
(GtkSignalFunc) tool_options_toggle_update,
GTK_SIGNAL_FUNC (tool_options_toggle_update),
&pressure->color);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pressure->color_w),
pressure->color_d);
......@@ -897,7 +900,7 @@ paint_pressure_options_new (ToolType tool_type)
pressure->frame = frame;
return (pressure);
return pressure;
}
static void
......@@ -931,7 +934,6 @@ paint_pressure_options_reset (PaintPressureOptions *pressure)
}
/* global paint options functions *******************************************/
void
......@@ -979,7 +981,7 @@ paint_mode_menu_new (MenuItemCallback callback,
gpointer user_data)
{
GtkWidget *menu;
int i;
gint i;
static MenuItem option_items[] =
{
......
......@@ -374,17 +374,17 @@ ui_new_image_window_create (const GimpImageNewValues *values_orig)
GTK_WIN_POS_MOUSE,
FALSE, FALSE, TRUE,
_("OK"), file_new_ok_callback,
info, NULL, FALSE, FALSE,
_("Reset"), file_new_reset_callback,
info, NULL, FALSE, FALSE,
_("OK"), file_new_ok_callback,
info, NULL, TRUE, FALSE,
_("Cancel"), file_new_cancel_callback,
info, NULL, TRUE, TRUE,
info, NULL, FALSE, TRUE,
NULL);
/* vbox holding the rest of the dialog */
top_vbox = gtk_vbox_new (FALSE, 2);
top_vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (top_vbox), 4);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->dlg)->vbox),
top_vbox, TRUE, TRUE, 0);
......
......@@ -296,7 +296,7 @@ gdisplay_close_warning_callback (GtkWidget *widget,
GDisplay *gdisp;
GtkWidget *mbox;
menus_set_sensitive_glue ("<Image>", N_("/File/Close"), TRUE);
menus_set_sensitive ("<Image>/File/Close", TRUE);
mbox = (GtkWidget *) client_data;
gdisp = (GDisplay *) gtk_object_get_user_data (GTK_OBJECT (mbox));
......@@ -311,7 +311,7 @@ gdisplay_cancel_warning_callback (GtkWidget *widget,
{
GtkWidget *mbox;
menus_set_sensitive_glue ("<Image>", N_("/File/Close"), TRUE);
menus_set_sensitive ("<Image>/File/Close", TRUE);
mbox = (GtkWidget *) client_data;
gtk_widget_destroy (mbox);
}
......@@ -342,7 +342,7 @@ gdisplay_close_warning_dialog (char *image_name,
return;
}
menus_set_sensitive_glue ("<Image>", N_("/File/Close"), FALSE);
menus_set_sensitive ("<Image>/File/Close", FALSE);
warning_dialog = mbox =
gimp_dialog_new (image_name, "really_close",
......
<
......@@ -1632,112 +1632,112 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
}
#define SET_SENSITIVE(menu,condition) \
menus_set_sensitive_glue ("<Image>", (menu), (condition) != 0)
menus_set_sensitive ("<Image>/" menu, (condition) != 0)
#define SET_STATE(menu,condition) \
menus_set_state_glue ("<Image>", (menu), (condition) != 0)
menus_set_state ("<Image>/" menu, (condition) != 0)
SET_SENSITIVE (N_("/File/Save"), gdisp);
SET_SENSITIVE (N_("/File/Save as..."), gdisp);
SET_SENSITIVE (N_("/File/Revert"), gdisp);
SET_SENSITIVE (N_("/File/Close"), gdisp);
SET_SENSITIVE ("File/Save", gdisp);
SET_SENSITIVE ("File/Save as...", gdisp);
SET_SENSITIVE ("File/Revert", gdisp);
SET_SENSITIVE ("File/Close", gdisp);
SET_SENSITIVE (N_("/Edit"), gdisp);