Commit a4025e05 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/menus.c app/channels_dialog.[ch] app/layers_dialog.[ch] Added an "Edit

2000-02-01  Michael Natterer  <mitch@gimp.org>

	* app/menus.c
	* app/channels_dialog.[ch]
	* app/layers_dialog.[ch]
	* app/paths_dialog.[ch]: Added an "Edit xxx Attributes..." menu
	entry to the dialogs' popup menus.
parent 697cfcd5
2000-02-01 Michael Natterer <mitch@gimp.org>
* app/menus.c
* app/channels_dialog.[ch]
* app/layers_dialog.[ch]
* app/paths_dialog.[ch]: Added an "Edit xxx Attributes..." menu
entry to the dialogs' popup menus.
2000-02-01 Michael Natterer <mitch@gimp.org>
 
* app/preferences_dialog.c: applied a (modified) patch from Daniel
......
......@@ -649,6 +649,8 @@ channels_dialog_set_menu_sensitivity (void)
SET_SENSITIVE ("Delete Channel", !fs_sens && aux_sens);
SET_OPS_SENSITIVE (5, !fs_sens && aux_sens);
SET_SENSITIVE ("Edit Channel Attributes...", !fs_sens && aux_sens);
#undef SET_OPS_SENSITIVE
#undef SET_SENSITIVE
}
......@@ -1112,6 +1114,20 @@ channels_dialog_intersect_channel_with_sel_callback (GtkWidget *widget,
}
}
void
channels_dialog_edit_channel_attributes_callback (GtkWidget *widget,
gpointer data)
{
if (channelsD && channelsD->active_channel)
{
ChannelWidget *channel_widget;
channel_widget = channel_widget_get_ID (channelsD->active_channel);
channels_dialog_edit_channel_query (channel_widget);
}
}
/*******************************/
/* ops buttons dnd callbacks */
/*******************************/
......
......@@ -27,5 +27,6 @@ void channels_dialog_channel_to_sel_callback (GtkWidget *, gpointer);
void channels_dialog_add_channel_to_sel_callback (GtkWidget *, gpointer);
void channels_dialog_sub_channel_from_sel_callback (GtkWidget *, gpointer);
void channels_dialog_intersect_channel_with_sel_callback(GtkWidget *, gpointer);
void channels_dialog_edit_channel_attributes_callback (GtkWidget *, gpointer);
#endif /* __CHANNELS_DIALOG_H__ */
......@@ -649,6 +649,8 @@ channels_dialog_set_menu_sensitivity (void)
SET_SENSITIVE ("Delete Channel", !fs_sens && aux_sens);
SET_OPS_SENSITIVE (5, !fs_sens && aux_sens);
SET_SENSITIVE ("Edit Channel Attributes...", !fs_sens && aux_sens);
#undef SET_OPS_SENSITIVE
#undef SET_SENSITIVE
}
......@@ -1112,6 +1114,20 @@ channels_dialog_intersect_channel_with_sel_callback (GtkWidget *widget,
}
}
void
channels_dialog_edit_channel_attributes_callback (GtkWidget *widget,
gpointer data)
{
if (channelsD && channelsD->active_channel)
{
ChannelWidget *channel_widget;
channel_widget = channel_widget_get_ID (channelsD->active_channel);
channels_dialog_edit_channel_query (channel_widget);
}
}
/*******************************/
/* ops buttons dnd callbacks */
/*******************************/
......
......@@ -27,5 +27,6 @@ void channels_dialog_channel_to_sel_callback (GtkWidget *, gpointer);
void channels_dialog_add_channel_to_sel_callback (GtkWidget *, gpointer);
void channels_dialog_sub_channel_from_sel_callback (GtkWidget *, gpointer);
void channels_dialog_intersect_channel_with_sel_callback(GtkWidget *, gpointer);
void channels_dialog_edit_channel_attributes_callback (GtkWidget *, gpointer);
#endif /* __CHANNELS_DIALOG_H__ */
......@@ -1058,6 +1058,8 @@ layers_dialog_set_menu_sensitivity (void)
SET_SENSITIVE ("Add Alpha Channel", !alpha);
SET_SENSITIVE ("Alpha to Selection", fs && ac && gimage && lp && alpha);
SET_SENSITIVE ("Edit Layer Attributes...", ac && gimage && lp);
#undef SET_OPS_SENSITIVE
#undef SET_SENSITIVE
......@@ -1764,6 +1766,20 @@ layers_dialog_add_alpha_channel_callback (GtkWidget *widget,
gdisplays_flush ();
}
void
layers_dialog_edit_layer_attributes_callback (GtkWidget *widget,
gpointer data)
{
if (layersD && layersD->active_layer)
{
LayerWidget *layer_widget;
layer_widget = layer_widget_get_ID (layersD->active_layer);
layers_dialog_edit_layer_query (layer_widget);
}
}
/*******************************/
/* ops buttons dnd callbacks */
/*******************************/
......
......@@ -39,5 +39,6 @@ void layers_dialog_flatten_image_callback (GtkWidget *, gpointer);
void layers_dialog_alpha_select_callback (GtkWidget *, gpointer);
void layers_dialog_mask_select_callback (GtkWidget *, gpointer);
void layers_dialog_add_alpha_channel_callback (GtkWidget *, gpointer);
void layers_dialog_edit_layer_attributes_callback (GtkWidget *, gpointer);
#endif /* __LAYERS_DIALOG_H__ */
......@@ -735,7 +735,12 @@ static GimpItemFactoryEntry layers_entries[] =
{ { N_("/Add Alpha Channel"), NULL, layers_dialog_add_alpha_channel_callback, 0 },
"add_alpha_channel.html", NULL },
{ { N_("/Alpha to Selection"), NULL, layers_dialog_alpha_select_callback, 0 },
"alpha_to_selection.html", NULL }
"alpha_to_selection.html", NULL },
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Edit Layer Attributes..."), NULL, layers_dialog_edit_layer_attributes_callback, 0 },
"dialogs/edit_layer_attributes.html", NULL }
};
static guint n_layers_entries = (sizeof (layers_entries) /
sizeof (layers_entries[0]));
......@@ -768,7 +773,12 @@ static GimpItemFactoryEntry channels_entries[] =
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Delete Channel"), "<control>X", channels_dialog_delete_channel_callback, 0 },
"delete_channel.html", NULL }
"delete_channel.html", NULL },
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Edit Channel Attributes..."), NULL, channels_dialog_edit_channel_attributes_callback, 0 },
"dialogs/edit_channel_attributes.html", NULL }
};
static guint n_channels_entries = (sizeof (channels_entries) /
sizeof (channels_entries[0]));
......@@ -800,7 +810,12 @@ static GimpItemFactoryEntry paths_entries[] =
{ { N_("/Import Path..."), "<control>I", paths_dialog_import_path_callback, 0 },
"dialogs/import_path.html", NULL },
{ { N_("/Export Path..."), "<control>E", paths_dialog_export_path_callback, 0 },
"dialogs/export_path.html", NULL }
"dialogs/export_path.html", NULL },
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Edit Path Attributes..."), NULL, paths_dialog_edit_path_attributes_callback, 0 },
"dialogs/edit_path_attributes.html", NULL }
};
static guint n_paths_entries = (sizeof (paths_entries) /
sizeof (paths_entries[0]));
......
......@@ -265,6 +265,8 @@ paths_dialog_set_menu_sensitivity (void)
SET_SENSITIVE ("Import Path...", gimage);
SET_SENSITIVE ("Export Path...", pp);
SET_SENSITIVE ("Edit Path Attributes...", pp);
/* new point */
SET_POINT_SENSITIVE (0, pp);
......@@ -1237,7 +1239,7 @@ paths_dialog_edit_path_query (GtkWidget *widget)
NULL,
&mask);
qbox = gimp_query_string_box (_("Rename path"),
qbox = gimp_query_string_box (_("Edit Path Attributes"),
gimp_standard_help_func,
"paths/dialogs/rename_path.html",
_("Enter a new name for the path"),
......@@ -1593,7 +1595,6 @@ paths_dialog_null_callback (GtkWidget *widget,
/* Maybe some more here later? */
}
void
paths_dialog_sel_to_path_callback (GtkWidget *widget,
gpointer data)
......@@ -1700,6 +1701,14 @@ paths_dialog_stroke_path_callback (GtkWidget *widget,
paths_stroke (paths_dialog->gimage, paths_dialog->current_path_list, bzp);
}
void
paths_dialog_edit_path_attributes_callback (GtkWidget *widget,
gpointer data)
{
if (paths_dialog && paths_dialog->paths_list)
paths_dialog_edit_path_query (paths_dialog->paths_list);
}
static void
paths_dialog_map_callback (GtkWidget *widget,
gpointer data)
......@@ -2121,14 +2130,14 @@ pathpoint_new (gint type,
}
PATHP
path_new(GimpImage *gimage,
PathType ptype,
GSList *path_details,
gint closed,
gint state,
gint locked,
gint tattoo,
gchar *name)
path_new (GimpImage *gimage,
PathType ptype,
GSList *path_details,
gint closed,
gint state,
gint locked,
gint tattoo,
gchar *name)
{
PATHP path = g_new0(PATH,1);
......@@ -2147,9 +2156,9 @@ path_new(GimpImage *gimage,
}
PathsList *
pathsList_new(GimpImage *gimage,
gint last_selected_row,
GSList *bz_paths)
pathsList_new (GimpImage *gimage,
gint last_selected_row,
GSList *bz_paths)
{
PATHIMAGELISTP pip = g_new0(PATHIMAGELIST,1);
pip->gimage = gimage;
......
......@@ -18,15 +18,16 @@
#ifndef __PATHS_DIALOG_H__
#define __PATHS_DIALOG_H__
void paths_dialog_new_path_callback (GtkWidget *, gpointer);
void paths_dialog_delete_path_callback (GtkWidget *, gpointer);
void paths_dialog_dup_path_callback (GtkWidget *, gpointer);
void paths_dialog_copy_path_callback (GtkWidget *, gpointer);
void paths_dialog_paste_path_callback (GtkWidget *, gpointer);
void paths_dialog_stroke_path_callback (GtkWidget *, gpointer);
void paths_dialog_path_to_sel_callback (GtkWidget *, gpointer);
void paths_dialog_sel_to_path_callback (GtkWidget *, gpointer);
void paths_dialog_import_path_callback (GtkWidget *, gpointer);
void paths_dialog_export_path_callback (GtkWidget *, gpointer);
void paths_dialog_new_path_callback (GtkWidget *, gpointer);
void paths_dialog_delete_path_callback (GtkWidget *, gpointer);
void paths_dialog_dup_path_callback (GtkWidget *, gpointer);
void paths_dialog_copy_path_callback (GtkWidget *, gpointer);
void paths_dialog_paste_path_callback (GtkWidget *, gpointer);
void paths_dialog_stroke_path_callback (GtkWidget *, gpointer);
void paths_dialog_path_to_sel_callback (GtkWidget *, gpointer);
void paths_dialog_sel_to_path_callback (GtkWidget *, gpointer);
void paths_dialog_import_path_callback (GtkWidget *, gpointer);
void paths_dialog_export_path_callback (GtkWidget *, gpointer);
void paths_dialog_edit_path_attributes_callback (GtkWidget *, gpointer);
#endif /* __PATHS_DIALOG_H__ */
......@@ -1058,6 +1058,8 @@ layers_dialog_set_menu_sensitivity (void)
SET_SENSITIVE ("Add Alpha Channel", !alpha);
SET_SENSITIVE ("Alpha to Selection", fs && ac && gimage && lp && alpha);
SET_SENSITIVE ("Edit Layer Attributes...", ac && gimage && lp);
#undef SET_OPS_SENSITIVE
#undef SET_SENSITIVE
......@@ -1764,6 +1766,20 @@ layers_dialog_add_alpha_channel_callback (GtkWidget *widget,
gdisplays_flush ();
}
void
layers_dialog_edit_layer_attributes_callback (GtkWidget *widget,
gpointer data)
{
if (layersD && layersD->active_layer)
{
LayerWidget *layer_widget;
layer_widget = layer_widget_get_ID (layersD->active_layer);
layers_dialog_edit_layer_query (layer_widget);
}
}
/*******************************/
/* ops buttons dnd callbacks */
/*******************************/
......
......@@ -39,5 +39,6 @@ void layers_dialog_flatten_image_callback (GtkWidget *, gpointer);
void layers_dialog_alpha_select_callback (GtkWidget *, gpointer);
void layers_dialog_mask_select_callback (GtkWidget *, gpointer);
void layers_dialog_add_alpha_channel_callback (GtkWidget *, gpointer);
void layers_dialog_edit_layer_attributes_callback (GtkWidget *, gpointer);
#endif /* __LAYERS_DIALOG_H__ */
......@@ -735,7 +735,12 @@ static GimpItemFactoryEntry layers_entries[] =
{ { N_("/Add Alpha Channel"), NULL, layers_dialog_add_alpha_channel_callback, 0 },
"add_alpha_channel.html", NULL },
{ { N_("/Alpha to Selection"), NULL, layers_dialog_alpha_select_callback, 0 },
"alpha_to_selection.html", NULL }
"alpha_to_selection.html", NULL },
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Edit Layer Attributes..."), NULL, layers_dialog_edit_layer_attributes_callback, 0 },
"dialogs/edit_layer_attributes.html", NULL }
};
static guint n_layers_entries = (sizeof (layers_entries) /
sizeof (layers_entries[0]));
......@@ -768,7 +773,12 @@ static GimpItemFactoryEntry channels_entries[] =
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Delete Channel"), "<control>X", channels_dialog_delete_channel_callback, 0 },
"delete_channel.html", NULL }
"delete_channel.html", NULL },
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Edit Channel Attributes..."), NULL, channels_dialog_edit_channel_attributes_callback, 0 },
"dialogs/edit_channel_attributes.html", NULL }
};
static guint n_channels_entries = (sizeof (channels_entries) /
sizeof (channels_entries[0]));
......@@ -800,7 +810,12 @@ static GimpItemFactoryEntry paths_entries[] =
{ { N_("/Import Path..."), "<control>I", paths_dialog_import_path_callback, 0 },
"dialogs/import_path.html", NULL },
{ { N_("/Export Path..."), "<control>E", paths_dialog_export_path_callback, 0 },
"dialogs/export_path.html", NULL }
"dialogs/export_path.html", NULL },
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Edit Path Attributes..."), NULL, paths_dialog_edit_path_attributes_callback, 0 },
"dialogs/edit_path_attributes.html", NULL }
};
static guint n_paths_entries = (sizeof (paths_entries) /
sizeof (paths_entries[0]));
......
......@@ -735,7 +735,12 @@ static GimpItemFactoryEntry layers_entries[] =
{ { N_("/Add Alpha Channel"), NULL, layers_dialog_add_alpha_channel_callback, 0 },
"add_alpha_channel.html", NULL },
{ { N_("/Alpha to Selection"), NULL, layers_dialog_alpha_select_callback, 0 },
"alpha_to_selection.html", NULL }
"alpha_to_selection.html", NULL },
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Edit Layer Attributes..."), NULL, layers_dialog_edit_layer_attributes_callback, 0 },
"dialogs/edit_layer_attributes.html", NULL }
};
static guint n_layers_entries = (sizeof (layers_entries) /
sizeof (layers_entries[0]));
......@@ -768,7 +773,12 @@ static GimpItemFactoryEntry channels_entries[] =
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Delete Channel"), "<control>X", channels_dialog_delete_channel_callback, 0 },
"delete_channel.html", NULL }
"delete_channel.html", NULL },
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Edit Channel Attributes..."), NULL, channels_dialog_edit_channel_attributes_callback, 0 },
"dialogs/edit_channel_attributes.html", NULL }
};
static guint n_channels_entries = (sizeof (channels_entries) /
sizeof (channels_entries[0]));
......@@ -800,7 +810,12 @@ static GimpItemFactoryEntry paths_entries[] =
{ { N_("/Import Path..."), "<control>I", paths_dialog_import_path_callback, 0 },
"dialogs/import_path.html", NULL },
{ { N_("/Export Path..."), "<control>E", paths_dialog_export_path_callback, 0 },
"dialogs/export_path.html", NULL }
"dialogs/export_path.html", NULL },
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Edit Path Attributes..."), NULL, paths_dialog_edit_path_attributes_callback, 0 },
"dialogs/edit_path_attributes.html", NULL }
};
static guint n_paths_entries = (sizeof (paths_entries) /
sizeof (paths_entries[0]));
......
......@@ -265,6 +265,8 @@ paths_dialog_set_menu_sensitivity (void)
SET_SENSITIVE ("Import Path...", gimage);
SET_SENSITIVE ("Export Path...", pp);
SET_SENSITIVE ("Edit Path Attributes...", pp);
/* new point */
SET_POINT_SENSITIVE (0, pp);
......@@ -1237,7 +1239,7 @@ paths_dialog_edit_path_query (GtkWidget *widget)
NULL,
&mask);
qbox = gimp_query_string_box (_("Rename path"),
qbox = gimp_query_string_box (_("Edit Path Attributes"),
gimp_standard_help_func,
"paths/dialogs/rename_path.html",
_("Enter a new name for the path"),
......@@ -1593,7 +1595,6 @@ paths_dialog_null_callback (GtkWidget *widget,
/* Maybe some more here later? */
}
void
paths_dialog_sel_to_path_callback (GtkWidget *widget,
gpointer data)
......@@ -1700,6 +1701,14 @@ paths_dialog_stroke_path_callback (GtkWidget *widget,
paths_stroke (paths_dialog->gimage, paths_dialog->current_path_list, bzp);
}
void
paths_dialog_edit_path_attributes_callback (GtkWidget *widget,
gpointer data)
{
if (paths_dialog && paths_dialog->paths_list)
paths_dialog_edit_path_query (paths_dialog->paths_list);
}
static void
paths_dialog_map_callback (GtkWidget *widget,
gpointer data)
......@@ -2121,14 +2130,14 @@ pathpoint_new (gint type,
}
PATHP
path_new(GimpImage *gimage,
PathType ptype,
GSList *path_details,
gint closed,
gint state,
gint locked,
gint tattoo,
gchar *name)
path_new (GimpImage *gimage,
PathType ptype,
GSList *path_details,
gint closed,
gint state,
gint locked,
gint tattoo,
gchar *name)
{
PATHP path = g_new0(PATH,1);
......@@ -2147,9 +2156,9 @@ path_new(GimpImage *gimage,
}
PathsList *
pathsList_new(GimpImage *gimage,
gint last_selected_row,
GSList *bz_paths)
pathsList_new (GimpImage *gimage,
gint last_selected_row,
GSList *bz_paths)
{
PATHIMAGELISTP pip = g_new0(PATHIMAGELIST,1);
pip->gimage = gimage;
......
......@@ -18,15 +18,16 @@
#ifndef __PATHS_DIALOG_H__
#define __PATHS_DIALOG_H__
void paths_dialog_new_path_callback (GtkWidget *, gpointer);
void paths_dialog_delete_path_callback (GtkWidget *, gpointer);
void paths_dialog_dup_path_callback (GtkWidget *, gpointer);
void paths_dialog_copy_path_callback (GtkWidget *, gpointer);
void paths_dialog_paste_path_callback (GtkWidget *, gpointer);
void paths_dialog_stroke_path_callback (GtkWidget *, gpointer);
void paths_dialog_path_to_sel_callback (GtkWidget *, gpointer);
void paths_dialog_sel_to_path_callback (GtkWidget *, gpointer);
void paths_dialog_import_path_callback (GtkWidget *, gpointer);
void paths_dialog_export_path_callback (GtkWidget *, gpointer);
void paths_dialog_new_path_callback (GtkWidget *, gpointer);
void paths_dialog_delete_path_callback (GtkWidget *, gpointer);
void paths_dialog_dup_path_callback (GtkWidget *, gpointer);
void paths_dialog_copy_path_callback (GtkWidget *, gpointer);
void paths_dialog_paste_path_callback (GtkWidget *, gpointer);
void paths_dialog_stroke_path_callback (GtkWidget *, gpointer);
void paths_dialog_path_to_sel_callback (GtkWidget *, gpointer);
void paths_dialog_sel_to_path_callback (GtkWidget *, gpointer);
void paths_dialog_import_path_callback (GtkWidget *, gpointer);
void paths_dialog_export_path_callback (GtkWidget *, gpointer);
void paths_dialog_edit_path_attributes_callback (GtkWidget *, gpointer);
#endif /* __PATHS_DIALOG_H__ */
......@@ -735,7 +735,12 @@ static GimpItemFactoryEntry layers_entries[] =
{ { N_("/Add Alpha Channel"), NULL, layers_dialog_add_alpha_channel_callback, 0 },
"add_alpha_channel.html", NULL },
{ { N_("/Alpha to Selection"), NULL, layers_dialog_alpha_select_callback, 0 },
"alpha_to_selection.html", NULL }
"alpha_to_selection.html", NULL },
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Edit Layer Attributes..."), NULL, layers_dialog_edit_layer_attributes_callback, 0 },
"dialogs/edit_layer_attributes.html", NULL }
};
static guint n_layers_entries = (sizeof (layers_entries) /
sizeof (layers_entries[0]));
......@@ -768,7 +773,12 @@ static GimpItemFactoryEntry channels_entries[] =
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Delete Channel"), "<control>X", channels_dialog_delete_channel_callback, 0 },
"delete_channel.html", NULL }
"delete_channel.html", NULL },
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Edit Channel Attributes..."), NULL, channels_dialog_edit_channel_attributes_callback, 0 },
"dialogs/edit_channel_attributes.html", NULL }
};
static guint n_channels_entries = (sizeof (channels_entries) /
sizeof (channels_entries[0]));
......@@ -800,7 +810,12 @@ static GimpItemFactoryEntry paths_entries[] =
{ { N_("/Import Path..."), "<control>I", paths_dialog_import_path_callback, 0 },
"dialogs/import_path.html", NULL },
{ { N_("/Export Path..."), "<control>E", paths_dialog_export_path_callback, 0 },
"dialogs/export_path.html", NULL }
"dialogs/export_path.html", NULL },
{ { "/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/Edit Path Attributes..."), NULL, paths_dialog_edit_path_attributes_callback, 0 },
"dialogs/edit_path_attributes.html", NULL }
};
static guint n_paths_entries = (sizeof (paths_entries) /
sizeof (paths_entries[0]));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment