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.
This commit is contained in:
Michael Natterer 1999-11-23 19:11:29 +00:00 committed by Michael Natterer
parent facdf43902
commit b6a3dd5acf
48 changed files with 611 additions and 706 deletions

View File

@ -1,3 +1,22 @@
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

View File

@ -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);
}
}
}

View File

@ -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,

View File

@ -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

View File

@ -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 ("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 (N_("/Select"), gdisp && lp);
SET_SENSITIVE (N_("/Select/Save To Channel"), !fs);
SET_SENSITIVE ("Select", gdisp && lp);
SET_SENSITIVE ("Select/Save To Channel", !fs);
SET_SENSITIVE (N_("/View"), gdisp);
SET_SENSITIVE (N_("/View/Zoom"), gdisp);
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 ("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 (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 ("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 (N_("/Image/Alpha/Add Alpha Channel"),
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

View File

@ -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[] =
{

View File

@ -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);

View File

@ -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",

View File

@ -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 ("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 (N_("/Select"), gdisp && lp);
SET_SENSITIVE (N_("/Select/Save To Channel"), !fs);
SET_SENSITIVE ("Select", gdisp && lp);
SET_SENSITIVE ("Select/Save To Channel", !fs);
SET_SENSITIVE (N_("/View"), gdisp);
SET_SENSITIVE (N_("/View/Zoom"), gdisp);
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 ("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 (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 ("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 (N_("/Image/Alpha/Add Alpha Channel"),
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

View File

@ -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);

View File

@ -1649,10 +1649,10 @@ file_save_ok_callback (GtkWidget *widget,
static void
file_dialog_show (GtkWidget *filesel)
{
menus_set_sensitive_glue ("<Toolbox>", N_("/File/Open..."), FALSE);
menus_set_sensitive_glue ("<Image>", N_("/File/Open..."), FALSE);
menus_set_sensitive_glue ("<Image>", N_("/File/Save"), FALSE);
menus_set_sensitive_glue ("<Image>", N_("/File/Save as..."), FALSE);
menus_set_sensitive ("<Toolbox>/File/Open...", FALSE);
menus_set_sensitive ("<Image>/File/Open...", FALSE);
menus_set_sensitive ("<Image>/File/Save", FALSE);
menus_set_sensitive ("<Image>/File/Save as...", FALSE);
gtk_widget_show (filesel);
}
@ -1662,13 +1662,13 @@ file_dialog_hide (GtkWidget *filesel)
{
gtk_widget_hide (filesel);
menus_set_sensitive_glue ("<Toolbox>", N_("/File/Open..."), TRUE);
menus_set_sensitive_glue ("<Image>", N_("/File/Open..."), TRUE);
menus_set_sensitive ("<Toolbox>/File/Open...", TRUE);
menus_set_sensitive ("<Image>/File/Open...", TRUE);
if (gdisplay_active ())
{
menus_set_sensitive_glue ("<Image>", N_("/File/Save"), TRUE);
menus_set_sensitive_glue ("<Image>", N_("/File/Save as..."), TRUE);
menus_set_sensitive ("<Image>/File/Save", TRUE);
menus_set_sensitive ("<Image>/File/Save as...", TRUE);
}
return TRUE;

View File

@ -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 ("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 (N_("/Select"), gdisp && lp);
SET_SENSITIVE (N_("/Select/Save To Channel"), !fs);
SET_SENSITIVE ("Select", gdisp && lp);
SET_SENSITIVE ("Select/Save To Channel", !fs);
SET_SENSITIVE (N_("/View"), gdisp);
SET_SENSITIVE (N_("/View/Zoom"), gdisp);
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 ("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 (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 ("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 (N_("/Image/Alpha/Add Alpha Channel"),
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

View File

@ -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",

View File

@ -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

View File

@ -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);

View File

@ -1009,52 +1009,52 @@ layers_dialog_set_menu_sensitivity (void)
next_alpha = FALSE;
#define SET_SENSITIVE(menu,condition) \
menus_set_sensitive_glue ("<Layers>", (menu), (condition) != 0)
menus_set_sensitive ("<Layers>/" menu, (condition) != 0)
#define SET_OPS_SENSITIVE(button,condition) \
gtk_widget_set_sensitive (layers_ops_buttons[(button)].widget, \
(condition) != 0)
SET_SENSITIVE (N_("/New Layer..."), gimage);
SET_SENSITIVE ("New Layer...", gimage);
SET_OPS_SENSITIVE (0, gimage);
SET_SENSITIVE (N_("/Stack/Previous Layer"), fs && ac && gimage && lp && prev);
SET_SENSITIVE (N_("/Stack/Next Layer"), fs && ac && gimage && lp && next);
SET_SENSITIVE ("Stack/Previous Layer", fs && ac && gimage && lp && prev);
SET_SENSITIVE ("Stack/Next Layer", fs && ac && gimage && lp && next);
SET_SENSITIVE (N_("/Stack/Raise Layer"),
SET_SENSITIVE ("Stack/Raise Layer",
fs && ac && gimage && lp && alpha && prev);
SET_OPS_SENSITIVE (1, fs && ac && gimage && lp && alpha && prev);
SET_SENSITIVE (N_("/Stack/Lower Layer"),
SET_SENSITIVE ("Stack/Lower Layer",
fs && ac && gimage && lp && next && next_alpha);
SET_OPS_SENSITIVE (2, fs && ac && gimage && lp && next && next_alpha);
SET_SENSITIVE (N_("/Stack/Layer to Top"),
SET_SENSITIVE ("Stack/Layer to Top",
fs && ac && gimage && lp && alpha && prev);
SET_SENSITIVE (N_("/Stack/Layer to Bottom"),
SET_SENSITIVE ("Stack/Layer to Bottom",
fs && ac && gimage && lp && next && next_alpha);
SET_SENSITIVE (N_("/Duplicate Layer"), fs && ac && gimage && lp);
SET_SENSITIVE ("Duplicate Layer", fs && ac && gimage && lp);
SET_OPS_SENSITIVE (3, fs && ac && gimage && lp);
SET_SENSITIVE (N_("/Anchor Layer"), !fs && ac && gimage && lp);
SET_SENSITIVE ("Anchor Layer", !fs && ac && gimage && lp);
SET_OPS_SENSITIVE (4, !fs && ac && gimage && lp);
SET_SENSITIVE (N_("/Delete Layer"), ac && gimage && lp);
SET_SENSITIVE ("Delete Layer", ac && gimage && lp);
SET_OPS_SENSITIVE (5, ac && gimage && lp);
SET_SENSITIVE (N_("/Layer Boundary Size..."), ac && gimage && lp);
SET_SENSITIVE (N_("/Scale Layer..."), ac && gimage && lp);
SET_SENSITIVE ("Layer Boundary Size...", ac && gimage && lp);
SET_SENSITIVE ("Scale Layer...", ac && gimage && lp);
SET_SENSITIVE (N_("/Merge Visible Layers..."), fs && ac && gimage && lp);
SET_SENSITIVE (N_("/Merge Down"), fs && ac && gimage && lp);
SET_SENSITIVE (N_("/Flatten Image"), fs && ac && gimage && lp);
SET_SENSITIVE ("Merge Visible Layers...", fs && ac && gimage && lp);
SET_SENSITIVE ("Merge Down", fs && ac && gimage && lp);
SET_SENSITIVE ("Flatten Image", fs && ac && gimage && lp);
SET_SENSITIVE (N_("/Add Layer Mask..."), fs && ac && gimage && !lm && lp && alpha);
SET_SENSITIVE (N_("/Apply Layer Mask..."), fs && ac && gimage && lm && lp);
SET_SENSITIVE (N_("/Mask to Selection"), fs && ac && gimage && lm && lp);
SET_SENSITIVE ("Add Layer Mask...", fs && ac && gimage && !lm && lp && alpha);
SET_SENSITIVE ("Apply Layer Mask...", fs && ac && gimage && lm && lp);
SET_SENSITIVE ("Mask to Selection", fs && ac && gimage && lm && lp);
SET_SENSITIVE (N_("/Add Alpha Channel"), !alpha);
SET_SENSITIVE (N_("/Alpha to Selection"), fs && ac && gimage && lp && alpha);
SET_SENSITIVE ("Add Alpha Channel", !alpha);
SET_SENSITIVE ("Alpha to Selection", fs && ac && gimage && lp && alpha);
#undef SET_OPS_SENSITIVE
#undef SET_SENSITIVE

View File

@ -829,7 +829,7 @@ menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
if (! strncmp (entry->entry.path, "<Image>", 7))
{
gchar *p;
p = strchr (entry->entry.path + 8, '/');
while (p)
{
@ -837,7 +837,7 @@ menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
g_string_truncate (tearoff_path,
p - entry->entry.path + 1 - 7);
g_string_append (tearoff_path, "tearoff1");
if (! gtk_item_factory_get_widget (image_factory,
tearoff_path->str))
{
@ -861,8 +861,7 @@ menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
if (!ifactory)
{
g_warning ("menus_create_item_from_full_path(): "
"entry refers to unknown item factory: \"%s\"", path);
g_warning ("entry refers to unknown item factory: \"%s\"", path);
return;
}
@ -1007,7 +1006,8 @@ menus_set_sensitive (gchar *path,
{
widget = gtk_item_factory_get_widget (ifactory, path);
gtk_widget_set_sensitive (widget, sensitive);
if (widget)
gtk_widget_set_sensitive (widget, sensitive);
}
if (!ifactory || !widget)
@ -1015,22 +1015,7 @@ menus_set_sensitive (gchar *path,
path);
}
/* The following function will enhance our localesystem because
we don't need to have our menuentries twice in our catalog */
void
menus_set_sensitive_glue (gchar *prepath,
gchar *path,
gboolean sensitive)
{
gchar *menupath;
menupath = g_strdup_printf ("%s%s", prepath, path);
menus_set_sensitive (menupath, sensitive);
g_free (menupath);
}
static void
menus_set_state (gchar *path,
gboolean state)
{
@ -1051,23 +1036,12 @@ menus_set_state (gchar *path,
else
widget = NULL;
}
if (!ifactory || !widget)
g_warning ("Unable to set state for menu which doesn't exist:\n%s\n",
path);
}
void
menus_set_state_glue (gchar *prepath,
gchar *path,
gboolean state)
{
gchar *menupath;
menupath = g_strdup_printf ("%s%s", prepath, path);
menus_set_state (menupath, state);
g_free (menupath);
}
void
menus_destroy (gchar *path)
{
@ -1517,29 +1491,29 @@ menu_translate (const gchar *path,
menupath[MENUPATH_SIZE - 1] = '\0';
retval = gettext (path);
if (!strcmp (path, retval))
if (strcmp (path, retval))
return retval;
strncpy (menupath, path, MENUPATH_SIZE - 1);
strncat (menupath, "/tearoff1", MENUPATH_SIZE - 1 - strlen (menupath));
retval = gettext (menupath);
if (strcmp (menupath, retval))
{
strncpy (menupath, path, MENUPATH_SIZE - 1);
strncat (menupath, "/tearoff1", MENUPATH_SIZE - 1 - strlen (menupath));
retval = gettext (menupath);
if (strcmp (menupath, retval))
{
strncpy (menupath, retval, MENUPATH_SIZE - 1);
*(strrchr(menupath, '/')) = '\0';
return menupath;
}
else
{
strcpy (menupath, "<Image>");
strncat (menupath, path, MENUPATH_SIZE - 1 - sizeof ("<Image>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Image>");
if (!strcmp (path, retval))
{
strcpy (menupath, "<Toolbox>");
strncat (menupath, path, MENUPATH_SIZE - 1 - sizeof ("<Toolbox>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Toolbox>");
}
}
strncpy (menupath, retval, MENUPATH_SIZE - 1);
*(strrchr(menupath, '/')) = '\0';
return menupath;
}
else
{
strcpy (menupath, "<Image>");
strncat (menupath, path, MENUPATH_SIZE - 1 - strlen ("<Image>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Image>");
if (!strcmp (path, retval))
{
strcpy (menupath, "<Toolbox>");
strncat (menupath, path, MENUPATH_SIZE - 1 - strlen ("<Toolbox>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Toolbox>");
}
}
return retval;

View File

@ -56,12 +56,8 @@ void menus_quit (void);
void menus_set_sensitive (gchar *path,
gboolean sensitive);
void menus_set_sensitive_glue (gchar *prepath,
gchar *path,
gboolean sensitive);
void menus_set_state_glue (gchar *prepath,
gchar *path,
void menus_set_state (gchar *path,
gboolean state);
void menus_last_opened_add (gchar *filename);

View File

@ -233,7 +233,7 @@ paths_dialog_set_menu_sensitivity (void)
cpp = TRUE;
#define SET_SENSITIVE(menu,condition) \
menus_set_sensitive_glue ("<Paths>", (menu), (condition) != 0)
menus_set_sensitive ("<Paths>/" menu, (condition) != 0)
#define SET_OPS_SENSITIVE(button,condition) \
gtk_widget_set_sensitive (paths_ops_buttons[(button)].widget, \
(condition) != 0)
@ -241,29 +241,29 @@ paths_dialog_set_menu_sensitivity (void)
gtk_widget_set_sensitive (point_ops_buttons[(button)].widget, \
(condition) != 0)
SET_SENSITIVE (N_("/New Path"), gimage);
SET_SENSITIVE ("New Path", gimage);
SET_OPS_SENSITIVE (0, gimage);
SET_SENSITIVE (N_("/Duplicate Path"), pp);
SET_SENSITIVE ("Duplicate Path", pp);
SET_OPS_SENSITIVE (1, pp);
SET_SENSITIVE (N_("/Path to Selection"), pp);
SET_SENSITIVE ("Path to Selection", pp);
SET_OPS_SENSITIVE (2, pp);
SET_SENSITIVE (N_("/Selection to Path"), gimage);
SET_SENSITIVE ("Selection to Path", gimage);
SET_OPS_SENSITIVE (3, gimage);
SET_SENSITIVE (N_("/Stroke Path"), pp);
SET_SENSITIVE ("Stroke Path", pp);
SET_OPS_SENSITIVE (4, pp);
SET_SENSITIVE (N_("/Delete Path"), pp);
SET_SENSITIVE ("Delete Path", pp);
SET_OPS_SENSITIVE (5, pp);
SET_SENSITIVE (N_("/Copy Path"), pp);
SET_SENSITIVE (N_("/Paste Path"), pp && cpp);
SET_SENSITIVE ("Copy Path", pp);
SET_SENSITIVE ("Paste Path", pp && cpp);
SET_SENSITIVE (N_("/Import Path..."), gimage);
SET_SENSITIVE (N_("/Export Path..."), pp);
SET_SENSITIVE ("Import Path...", gimage);
SET_SENSITIVE ("Export Path...", pp);
/* new point */
SET_POINT_SENSITIVE (0, pp);

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -1009,52 +1009,52 @@ layers_dialog_set_menu_sensitivity (void)
next_alpha = FALSE;
#define SET_SENSITIVE(menu,condition) \
menus_set_sensitive_glue ("<Layers>", (menu), (condition) != 0)
menus_set_sensitive ("<Layers>/" menu, (condition) != 0)
#define SET_OPS_SENSITIVE(button,condition) \
gtk_widget_set_sensitive (layers_ops_buttons[(button)].widget, \
(condition) != 0)
SET_SENSITIVE (N_("/New Layer..."), gimage);
SET_SENSITIVE ("New Layer...", gimage);
SET_OPS_SENSITIVE (0, gimage);
SET_SENSITIVE (N_("/Stack/Previous Layer"), fs && ac && gimage && lp && prev);
SET_SENSITIVE (N_("/Stack/Next Layer"), fs && ac && gimage && lp && next);
SET_SENSITIVE ("Stack/Previous Layer", fs && ac && gimage && lp && prev);
SET_SENSITIVE ("Stack/Next Layer", fs && ac && gimage && lp && next);
SET_SENSITIVE (N_("/Stack/Raise Layer"),
SET_SENSITIVE ("Stack/Raise Layer",
fs && ac && gimage && lp && alpha && prev);
SET_OPS_SENSITIVE (1, fs && ac && gimage && lp && alpha && prev);
SET_SENSITIVE (N_("/Stack/Lower Layer"),
SET_SENSITIVE ("Stack/Lower Layer",
fs && ac && gimage && lp && next && next_alpha);
SET_OPS_SENSITIVE (2, fs && ac && gimage && lp && next && next_alpha);
SET_SENSITIVE (N_("/Stack/Layer to Top"),
SET_SENSITIVE ("Stack/Layer to Top",
fs && ac && gimage && lp && alpha && prev);
SET_SENSITIVE (N_("/Stack/Layer to Bottom"),
SET_SENSITIVE ("Stack/Layer to Bottom",
fs && ac && gimage && lp && next && next_alpha);
SET_SENSITIVE (N_("/Duplicate Layer"), fs && ac && gimage && lp);
SET_SENSITIVE ("Duplicate Layer", fs && ac && gimage && lp);
SET_OPS_SENSITIVE (3, fs && ac && gimage && lp);
SET_SENSITIVE (N_("/Anchor Layer"), !fs && ac && gimage && lp);
SET_SENSITIVE ("Anchor Layer", !fs && ac && gimage && lp);
SET_OPS_SENSITIVE (4, !fs && ac && gimage && lp);
SET_SENSITIVE (N_("/Delete Layer"), ac && gimage && lp);
SET_SENSITIVE ("Delete Layer", ac && gimage && lp);
SET_OPS_SENSITIVE (5, ac && gimage && lp);
SET_SENSITIVE (N_("/Layer Boundary Size..."), ac && gimage && lp);
SET_SENSITIVE (N_("/Scale Layer..."), ac && gimage && lp);
SET_SENSITIVE ("Layer Boundary Size...", ac && gimage && lp);
SET_SENSITIVE ("Scale Layer...", ac && gimage && lp);
SET_SENSITIVE (N_("/Merge Visible Layers..."), fs && ac && gimage && lp);
SET_SENSITIVE (N_("/Merge Down"), fs && ac && gimage && lp);
SET_SENSITIVE (N_("/Flatten Image"), fs && ac && gimage && lp);
SET_SENSITIVE ("Merge Visible Layers...", fs && ac && gimage && lp);
SET_SENSITIVE ("Merge Down", fs && ac && gimage && lp);
SET_SENSITIVE ("Flatten Image", fs && ac && gimage && lp);
SET_SENSITIVE (N_("/Add Layer Mask..."), fs && ac && gimage && !lm && lp && alpha);
SET_SENSITIVE (N_("/Apply Layer Mask..."), fs && ac && gimage && lm && lp);
SET_SENSITIVE (N_("/Mask to Selection"), fs && ac && gimage && lm && lp);
SET_SENSITIVE ("Add Layer Mask...", fs && ac && gimage && !lm && lp && alpha);
SET_SENSITIVE ("Apply Layer Mask...", fs && ac && gimage && lm && lp);
SET_SENSITIVE ("Mask to Selection", fs && ac && gimage && lm && lp);
SET_SENSITIVE (N_("/Add Alpha Channel"), !alpha);
SET_SENSITIVE (N_("/Alpha to Selection"), fs && ac && gimage && lp && alpha);
SET_SENSITIVE ("Add Alpha Channel", !alpha);
SET_SENSITIVE ("Alpha to Selection", fs && ac && gimage && lp && alpha);
#undef SET_OPS_SENSITIVE
#undef SET_SENSITIVE

View File

@ -829,7 +829,7 @@ menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
if (! strncmp (entry->entry.path, "<Image>", 7))
{
gchar *p;
p = strchr (entry->entry.path + 8, '/');
while (p)
{
@ -837,7 +837,7 @@ menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
g_string_truncate (tearoff_path,
p - entry->entry.path + 1 - 7);
g_string_append (tearoff_path, "tearoff1");
if (! gtk_item_factory_get_widget (image_factory,
tearoff_path->str))
{
@ -861,8 +861,7 @@ menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
if (!ifactory)
{
g_warning ("menus_create_item_from_full_path(): "
"entry refers to unknown item factory: \"%s\"", path);
g_warning ("entry refers to unknown item factory: \"%s\"", path);
return;
}
@ -1007,7 +1006,8 @@ menus_set_sensitive (gchar *path,
{
widget = gtk_item_factory_get_widget (ifactory, path);
gtk_widget_set_sensitive (widget, sensitive);
if (widget)
gtk_widget_set_sensitive (widget, sensitive);
}
if (!ifactory || !widget)
@ -1015,22 +1015,7 @@ menus_set_sensitive (gchar *path,
path);
}
/* The following function will enhance our localesystem because
we don't need to have our menuentries twice in our catalog */
void
menus_set_sensitive_glue (gchar *prepath,
gchar *path,
gboolean sensitive)
{
gchar *menupath;
menupath = g_strdup_printf ("%s%s", prepath, path);
menus_set_sensitive (menupath, sensitive);
g_free (menupath);
}
static void
menus_set_state (gchar *path,
gboolean state)
{
@ -1051,23 +1036,12 @@ menus_set_state (gchar *path,
else
widget = NULL;
}
if (!ifactory || !widget)
g_warning ("Unable to set state for menu which doesn't exist:\n%s\n",
path);
}
void
menus_set_state_glue (gchar *prepath,
gchar *path,
gboolean state)
{
gchar *menupath;
menupath = g_strdup_printf ("%s%s", prepath, path);
menus_set_state (menupath, state);
g_free (menupath);
}
void
menus_destroy (gchar *path)
{
@ -1517,29 +1491,29 @@ menu_translate (const gchar *path,
menupath[MENUPATH_SIZE - 1] = '\0';
retval = gettext (path);
if (!strcmp (path, retval))
if (strcmp (path, retval))
return retval;
strncpy (menupath, path, MENUPATH_SIZE - 1);
strncat (menupath, "/tearoff1", MENUPATH_SIZE - 1 - strlen (menupath));
retval = gettext (menupath);
if (strcmp (menupath, retval))
{
strncpy (menupath, path, MENUPATH_SIZE - 1);
strncat (menupath, "/tearoff1", MENUPATH_SIZE - 1 - strlen (menupath));
retval = gettext (menupath);
if (strcmp (menupath, retval))
{
strncpy (menupath, retval, MENUPATH_SIZE - 1);
*(strrchr(menupath, '/')) = '\0';
return menupath;
}
else
{
strcpy (menupath, "<Image>");
strncat (menupath, path, MENUPATH_SIZE - 1 - sizeof ("<Image>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Image>");
if (!strcmp (path, retval))
{
strcpy (menupath, "<Toolbox>");
strncat (menupath, path, MENUPATH_SIZE - 1 - sizeof ("<Toolbox>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Toolbox>");
}
}
strncpy (menupath, retval, MENUPATH_SIZE - 1);
*(strrchr(menupath, '/')) = '\0';
return menupath;
}
else
{
strcpy (menupath, "<Image>");
strncat (menupath, path, MENUPATH_SIZE - 1 - strlen ("<Image>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Image>");
if (!strcmp (path, retval))
{
strcpy (menupath, "<Toolbox>");
strncat (menupath, path, MENUPATH_SIZE - 1 - strlen ("<Toolbox>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Toolbox>");
}
}
return retval;

View File

@ -56,12 +56,8 @@ void menus_quit (void);
void menus_set_sensitive (gchar *path,
gboolean sensitive);
void menus_set_sensitive_glue (gchar *prepath,
gchar *path,
gboolean sensitive);
void menus_set_state_glue (gchar *prepath,
gchar *path,
void menus_set_state (gchar *path,
gboolean state);
void menus_last_opened_add (gchar *filename);

View File

@ -829,7 +829,7 @@ menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
if (! strncmp (entry->entry.path, "<Image>", 7))
{
gchar *p;
p = strchr (entry->entry.path + 8, '/');
while (p)
{
@ -837,7 +837,7 @@ menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
g_string_truncate (tearoff_path,
p - entry->entry.path + 1 - 7);
g_string_append (tearoff_path, "tearoff1");
if (! gtk_item_factory_get_widget (image_factory,
tearoff_path->str))
{
@ -861,8 +861,7 @@ menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
if (!ifactory)
{
g_warning ("menus_create_item_from_full_path(): "
"entry refers to unknown item factory: \"%s\"", path);
g_warning ("entry refers to unknown item factory: \"%s\"", path);
return;
}
@ -1007,7 +1006,8 @@ menus_set_sensitive (gchar *path,
{
widget = gtk_item_factory_get_widget (ifactory, path);
gtk_widget_set_sensitive (widget, sensitive);
if (widget)
gtk_widget_set_sensitive (widget, sensitive);
}
if (!ifactory || !widget)
@ -1015,22 +1015,7 @@ menus_set_sensitive (gchar *path,
path);
}
/* The following function will enhance our localesystem because
we don't need to have our menuentries twice in our catalog */
void
menus_set_sensitive_glue (gchar *prepath,
gchar *path,
gboolean sensitive)
{
gchar *menupath;
menupath = g_strdup_printf ("%s%s", prepath, path);
menus_set_sensitive (menupath, sensitive);
g_free (menupath);
}
static void
menus_set_state (gchar *path,
gboolean state)
{
@ -1051,23 +1036,12 @@ menus_set_state (gchar *path,
else
widget = NULL;
}
if (!ifactory || !widget)
g_warning ("Unable to set state for menu which doesn't exist:\n%s\n",
path);
}
void
menus_set_state_glue (gchar *prepath,
gchar *path,
gboolean state)
{
gchar *menupath;
menupath = g_strdup_printf ("%s%s", prepath, path);
menus_set_state (menupath, state);
g_free (menupath);
}
void
menus_destroy (gchar *path)
{
@ -1517,29 +1491,29 @@ menu_translate (const gchar *path,
menupath[MENUPATH_SIZE - 1] = '\0';
retval = gettext (path);
if (!strcmp (path, retval))
if (strcmp (path, retval))
return retval;
strncpy (menupath, path, MENUPATH_SIZE - 1);
strncat (menupath, "/tearoff1", MENUPATH_SIZE - 1 - strlen (menupath));
retval = gettext (menupath);
if (strcmp (menupath, retval))
{
strncpy (menupath, path, MENUPATH_SIZE - 1);
strncat (menupath, "/tearoff1", MENUPATH_SIZE - 1 - strlen (menupath));
retval = gettext (menupath);
if (strcmp (menupath, retval))
{
strncpy (menupath, retval, MENUPATH_SIZE - 1);
*(strrchr(menupath, '/')) = '\0';
return menupath;
}
else
{
strcpy (menupath, "<Image>");
strncat (menupath, path, MENUPATH_SIZE - 1 - sizeof ("<Image>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Image>");
if (!strcmp (path, retval))
{
strcpy (menupath, "<Toolbox>");
strncat (menupath, path, MENUPATH_SIZE - 1 - sizeof ("<Toolbox>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Toolbox>");
}
}
strncpy (menupath, retval, MENUPATH_SIZE - 1);
*(strrchr(menupath, '/')) = '\0';
return menupath;
}
else
{
strcpy (menupath, "<Image>");
strncat (menupath, path, MENUPATH_SIZE - 1 - strlen ("<Image>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Image>");
if (!strcmp (path, retval))
{
strcpy (menupath, "<Toolbox>");
strncat (menupath, path, MENUPATH_SIZE - 1 - strlen ("<Toolbox>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Toolbox>");
}
}
return retval;

View File

@ -56,12 +56,8 @@ void menus_quit (void);
void menus_set_sensitive (gchar *path,
gboolean sensitive);
void menus_set_sensitive_glue (gchar *prepath,
gchar *path,
gboolean sensitive);
void menus_set_state_glue (gchar *prepath,
gchar *path,
void menus_set_state (gchar *path,
gboolean state);
void menus_last_opened_add (gchar *filename);

View File

@ -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);
}
}
}

View File

@ -233,7 +233,7 @@ paths_dialog_set_menu_sensitivity (void)
cpp = TRUE;
#define SET_SENSITIVE(menu,condition) \
menus_set_sensitive_glue ("<Paths>", (menu), (condition) != 0)
menus_set_sensitive ("<Paths>/" menu, (condition) != 0)
#define SET_OPS_SENSITIVE(button,condition) \
gtk_widget_set_sensitive (paths_ops_buttons[(button)].widget, \
(condition) != 0)
@ -241,29 +241,29 @@ paths_dialog_set_menu_sensitivity (void)
gtk_widget_set_sensitive (point_ops_buttons[(button)].widget, \
(condition) != 0)
SET_SENSITIVE (N_("/New Path"), gimage);
SET_SENSITIVE ("New Path", gimage);
SET_OPS_SENSITIVE (0, gimage);
SET_SENSITIVE (N_("/Duplicate Path"), pp);
SET_SENSITIVE ("Duplicate Path", pp);
SET_OPS_SENSITIVE (1, pp);
SET_SENSITIVE (N_("/Path to Selection"), pp);
SET_SENSITIVE ("Path to Selection", pp);
SET_OPS_SENSITIVE (2, pp);
SET_SENSITIVE (N_("/Selection to Path"), gimage);
SET_SENSITIVE ("Selection to Path", gimage);
SET_OPS_SENSITIVE (3, gimage);
SET_SENSITIVE (N_("/Stroke Path"), pp);
SET_SENSITIVE ("Stroke Path", pp);
SET_OPS_SENSITIVE (4, pp);
SET_SENSITIVE (N_("/Delete Path"), pp);
SET_SENSITIVE ("Delete Path", pp);
SET_OPS_SENSITIVE (5, pp);
SET_SENSITIVE (N_("/Copy Path"), pp);
SET_SENSITIVE (N_("/Paste Path"), pp && cpp);
SET_SENSITIVE ("Copy Path", pp);
SET_SENSITIVE ("Paste Path", pp && cpp);
SET_SENSITIVE (N_("/Import Path..."), gimage);
SET_SENSITIVE (N_("/Export Path..."), pp);
SET_SENSITIVE ("Import Path...", gimage);
SET_SENSITIVE ("Export Path...", pp);
/* new point */
SET_POINT_SENSITIVE (0, pp);

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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[] =
{

View File

@ -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[] =
{

View File

@ -829,7 +829,7 @@ menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
if (! strncmp (entry->entry.path, "<Image>", 7))
{
gchar *p;
p = strchr (entry->entry.path + 8, '/');
while (p)
{
@ -837,7 +837,7 @@ menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
g_string_truncate (tearoff_path,
p - entry->entry.path + 1 - 7);
g_string_append (tearoff_path, "tearoff1");
if (! gtk_item_factory_get_widget (image_factory,
tearoff_path->str))
{
@ -861,8 +861,7 @@ menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
if (!ifactory)
{
g_warning ("menus_create_item_from_full_path(): "
"entry refers to unknown item factory: \"%s\"", path);
g_warning ("entry refers to unknown item factory: \"%s\"", path);
return;
}
@ -1007,7 +1006,8 @@ menus_set_sensitive (gchar *path,
{
widget = gtk_item_factory_get_widget (ifactory, path);
gtk_widget_set_sensitive (widget, sensitive);
if (widget)
gtk_widget_set_sensitive (widget, sensitive);
}
if (!ifactory || !widget)
@ -1015,22 +1015,7 @@ menus_set_sensitive (gchar *path,
path);
}
/* The following function will enhance our localesystem because
we don't need to have our menuentries twice in our catalog */
void
menus_set_sensitive_glue (gchar *prepath,
gchar *path,
gboolean sensitive)
{
gchar *menupath;
menupath = g_strdup_printf ("%s%s", prepath, path);
menus_set_sensitive (menupath, sensitive);
g_free (menupath);
}
static void
menus_set_state (gchar *path,
gboolean state)
{
@ -1051,23 +1036,12 @@ menus_set_state (gchar *path,
else
widget = NULL;
}
if (!ifactory || !widget)
g_warning ("Unable to set state for menu which doesn't exist:\n%s\n",
path);
}
void
menus_set_state_glue (gchar *prepath,
gchar *path,
gboolean state)
{
gchar *menupath;
menupath = g_strdup_printf ("%s%s", prepath, path);
menus_set_state (menupath, state);
g_free (menupath);
}
void
menus_destroy (gchar *path)
{
@ -1517,29 +1491,29 @@ menu_translate (const gchar *path,
menupath[MENUPATH_SIZE - 1] = '\0';
retval = gettext (path);
if (!strcmp (path, retval))
if (strcmp (path, retval))
return retval;
strncpy (menupath, path, MENUPATH_SIZE - 1);
strncat (menupath, "/tearoff1", MENUPATH_SIZE - 1 - strlen (menupath));
retval = gettext (menupath);
if (strcmp (menupath, retval))
{
strncpy (menupath, path, MENUPATH_SIZE - 1);
strncat (menupath, "/tearoff1", MENUPATH_SIZE - 1 - strlen (menupath));
retval = gettext (menupath);
if (strcmp (menupath, retval))
{
strncpy (menupath, retval, MENUPATH_SIZE - 1);
*(strrchr(menupath, '/')) = '\0';
return menupath;
}
else
{
strcpy (menupath, "<Image>");
strncat (menupath, path, MENUPATH_SIZE - 1 - sizeof ("<Image>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Image>");
if (!strcmp (path, retval))
{
strcpy (menupath, "<Toolbox>");
strncat (menupath, path, MENUPATH_SIZE - 1 - sizeof ("<Toolbox>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Toolbox>");
}
}
strncpy (menupath, retval, MENUPATH_SIZE - 1);
*(strrchr(menupath, '/')) = '\0';
return menupath;
}
else
{
strcpy (menupath, "<Image>");
strncat (menupath, path, MENUPATH_SIZE - 1 - strlen ("<Image>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Image>");
if (!strcmp (path, retval))
{
strcpy (menupath, "<Toolbox>");
strncat (menupath, path, MENUPATH_SIZE - 1 - strlen ("<Toolbox>"));
retval = dgettext ("gimp-std-plugins", menupath) + strlen ("<Toolbox>");
}
}
return retval;

View File

@ -56,12 +56,8 @@ void menus_quit (void);
void menus_set_sensitive (gchar *path,
gboolean sensitive);
void menus_set_sensitive_glue (gchar *prepath,
gchar *path,
gboolean sensitive);
void menus_set_state_glue (gchar *prepath,
gchar *path,
void menus_set_state (gchar *path,
gboolean state);
void menus_last_opened_add (gchar *filename);