app, menus: rename all "vectors-" actions to "paths-".

Though these are not as user-facing as other strings, the action names
still are somewhat user-facing. Let's rename them consistently with the
GUI and the API.

This commit also handles user config migration so that custom shortcuts
are not lost.
This commit is contained in:
Jehan 2024-08-04 20:11:53 +02:00
parent 6bbaaeb39e
commit d46d26933b
16 changed files with 691 additions and 679 deletions

View File

@ -238,9 +238,9 @@ static const GimpActionFactoryEntry action_groups[] =
{ "vector-toolpath", N_("Path Toolpath"), GIMP_ICON_PATH,
vector_toolpath_actions_setup,
vector_toolpath_actions_update },
{ "vectors", N_("Paths"), GIMP_ICON_PATH,
vectors_actions_setup,
vectors_actions_update },
{ "paths", N_("Paths"), GIMP_ICON_PATH,
paths_actions_setup,
paths_actions_update },
{ "view", N_("View"), GIMP_ICON_VISIBLE,
view_actions_setup,
view_actions_update },

View File

@ -40,309 +40,309 @@
#include "gimp-intl.h"
static const GimpActionEntry vectors_actions[] =
static const GimpActionEntry paths_actions[] =
{
{ "vectors-edit", GIMP_ICON_TOOL_PATH,
NC_("vectors-action", "Edit Pa_th"), NULL, { NULL },
NC_("vectors-action", "Edit the active path"),
vectors_edit_cmd_callback,
{ "paths-edit", GIMP_ICON_TOOL_PATH,
NC_("paths-action", "Edit Pa_th"), NULL, { NULL },
NC_("paths-action", "Edit the active path"),
paths_edit_cmd_callback,
GIMP_HELP_TOOL_VECTORS },
{ "vectors-edit-attributes", GIMP_ICON_EDIT,
NC_("vectors-action", "_Edit Path Attributes..."), NULL, { NULL },
NC_("vectors-action", "Edit path attributes"),
vectors_edit_attributes_cmd_callback,
{ "paths-edit-attributes", GIMP_ICON_EDIT,
NC_("paths-action", "_Edit Path Attributes..."), NULL, { NULL },
NC_("paths-action", "Edit path attributes"),
paths_edit_attributes_cmd_callback,
GIMP_HELP_PATH_EDIT },
{ "vectors-new", GIMP_ICON_DOCUMENT_NEW,
NC_("vectors-action", "_New Path..."), NULL, { NULL },
NC_("vectors-action", "Create a new path..."),
vectors_new_cmd_callback,
{ "paths-new", GIMP_ICON_DOCUMENT_NEW,
NC_("paths-action", "_New Path..."), NULL, { NULL },
NC_("paths-action", "Create a new path..."),
paths_new_cmd_callback,
GIMP_HELP_PATH_NEW },
{ "vectors-new-last-values", GIMP_ICON_DOCUMENT_NEW,
NC_("vectors-action", "_New Path with last values"), NULL, { NULL },
NC_("vectors-action", "Create a new path with last used values"),
vectors_new_last_vals_cmd_callback,
{ "paths-new-last-values", GIMP_ICON_DOCUMENT_NEW,
NC_("paths-action", "_New Path with last values"), NULL, { NULL },
NC_("paths-action", "Create a new path with last used values"),
paths_new_last_vals_cmd_callback,
GIMP_HELP_PATH_NEW },
{ "vectors-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
NC_("vectors-action", "D_uplicate Paths"), NULL, { NULL },
NC_("vectors-action", "Duplicate these paths"),
vectors_duplicate_cmd_callback,
{ "paths-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
NC_("paths-action", "D_uplicate Paths"), NULL, { NULL },
NC_("paths-action", "Duplicate these paths"),
paths_duplicate_cmd_callback,
GIMP_HELP_PATH_DUPLICATE },
{ "vectors-delete", GIMP_ICON_EDIT_DELETE,
NC_("vectors-action", "_Delete Paths"), NULL, { NULL },
NC_("vectors-action", "Delete the selected paths"),
vectors_delete_cmd_callback,
{ "paths-delete", GIMP_ICON_EDIT_DELETE,
NC_("paths-action", "_Delete Paths"), NULL, { NULL },
NC_("paths-action", "Delete the selected paths"),
paths_delete_cmd_callback,
GIMP_HELP_PATH_DELETE },
{ "vectors-merge-visible", NULL,
NC_("vectors-action", "Merge _Visible Paths"), NULL, { NULL }, NULL,
vectors_merge_visible_cmd_callback,
{ "paths-merge-visible", NULL,
NC_("paths-action", "Merge _Visible Paths"), NULL, { NULL }, NULL,
paths_merge_visible_cmd_callback,
GIMP_HELP_PATH_MERGE_VISIBLE },
{ "vectors-raise", GIMP_ICON_GO_UP,
NC_("vectors-action", "_Raise Paths"), NULL, { NULL },
NC_("vectors-action", "Raise the selected paths"),
vectors_raise_cmd_callback,
{ "paths-raise", GIMP_ICON_GO_UP,
NC_("paths-action", "_Raise Paths"), NULL, { NULL },
NC_("paths-action", "Raise the selected paths"),
paths_raise_cmd_callback,
GIMP_HELP_PATH_RAISE },
{ "vectors-raise-to-top", GIMP_ICON_GO_TOP,
NC_("vectors-action", "Raise Paths to _Top"), NULL, { NULL },
NC_("vectors-action", "Raise the selected paths to the top"),
vectors_raise_to_top_cmd_callback,
{ "paths-raise-to-top", GIMP_ICON_GO_TOP,
NC_("paths-action", "Raise Paths to _Top"), NULL, { NULL },
NC_("paths-action", "Raise the selected paths to the top"),
paths_raise_to_top_cmd_callback,
GIMP_HELP_PATH_RAISE_TO_TOP },
{ "vectors-lower", GIMP_ICON_GO_DOWN,
NC_("vectors-action", "_Lower Paths"), NULL, { NULL },
NC_("vectors-action", "Lower the selected paths"),
vectors_lower_cmd_callback,
{ "paths-lower", GIMP_ICON_GO_DOWN,
NC_("paths-action", "_Lower Paths"), NULL, { NULL },
NC_("paths-action", "Lower the selected paths"),
paths_lower_cmd_callback,
GIMP_HELP_PATH_LOWER },
{ "vectors-lower-to-bottom", GIMP_ICON_GO_BOTTOM,
NC_("vectors-action", "Lower Paths to _Bottom"), NULL, { NULL },
NC_("vectors-action", "Lower the selected paths to the bottom"),
vectors_lower_to_bottom_cmd_callback,
{ "paths-lower-to-bottom", GIMP_ICON_GO_BOTTOM,
NC_("paths-action", "Lower Paths to _Bottom"), NULL, { NULL },
NC_("paths-action", "Lower the selected paths to the bottom"),
paths_lower_to_bottom_cmd_callback,
GIMP_HELP_PATH_LOWER_TO_BOTTOM },
{ "vectors-fill", GIMP_ICON_TOOL_BUCKET_FILL,
NC_("vectors-action", "Fill Pat_hs..."), NULL, { NULL },
NC_("vectors-action", "Fill the paths"),
vectors_fill_cmd_callback,
{ "paths-fill", GIMP_ICON_TOOL_BUCKET_FILL,
NC_("paths-action", "Fill Pat_hs..."), NULL, { NULL },
NC_("paths-action", "Fill the paths"),
paths_fill_cmd_callback,
GIMP_HELP_PATH_FILL },
{ "vectors-fill-last-values", GIMP_ICON_TOOL_BUCKET_FILL,
NC_("vectors-action", "Fill Paths"), NULL, { NULL },
NC_("vectors-action", "Fill the paths with last values"),
vectors_fill_last_vals_cmd_callback,
{ "paths-fill-last-values", GIMP_ICON_TOOL_BUCKET_FILL,
NC_("paths-action", "Fill Paths"), NULL, { NULL },
NC_("paths-action", "Fill the paths with last values"),
paths_fill_last_vals_cmd_callback,
GIMP_HELP_PATH_FILL },
{ "vectors-stroke", GIMP_ICON_PATH_STROKE,
NC_("vectors-action", "Stro_ke Paths..."), NULL, { NULL },
NC_("vectors-action", "Paint along the paths"),
vectors_stroke_cmd_callback,
{ "paths-stroke", GIMP_ICON_PATH_STROKE,
NC_("paths-action", "Stro_ke Paths..."), NULL, { NULL },
NC_("paths-action", "Paint along the paths"),
paths_stroke_cmd_callback,
GIMP_HELP_PATH_STROKE },
{ "vectors-stroke-last-values", GIMP_ICON_PATH_STROKE,
NC_("vectors-action", "Stro_ke Paths"), NULL, { NULL },
NC_("vectors-action", "Paint along the paths with last values"),
vectors_stroke_last_vals_cmd_callback,
{ "paths-stroke-last-values", GIMP_ICON_PATH_STROKE,
NC_("paths-action", "Stro_ke Paths"), NULL, { NULL },
NC_("paths-action", "Paint along the paths with last values"),
paths_stroke_last_vals_cmd_callback,
GIMP_HELP_PATH_STROKE },
{ "vectors-copy", GIMP_ICON_EDIT_COPY,
NC_("vectors-action", "Co_py Paths"), NULL, { NULL }, NULL,
vectors_copy_cmd_callback,
{ "paths-copy", GIMP_ICON_EDIT_COPY,
NC_("paths-action", "Co_py Paths"), NULL, { NULL }, NULL,
paths_copy_cmd_callback,
GIMP_HELP_PATH_COPY },
{ "vectors-paste", GIMP_ICON_EDIT_PASTE,
NC_("vectors-action", "Paste Pat_h"), NULL, { NULL }, NULL,
vectors_paste_cmd_callback,
{ "paths-paste", GIMP_ICON_EDIT_PASTE,
NC_("paths-action", "Paste Pat_h"), NULL, { NULL }, NULL,
paths_paste_cmd_callback,
GIMP_HELP_PATH_PASTE },
{ "vectors-export", GIMP_ICON_DOCUMENT_SAVE,
NC_("vectors-action", "E_xport Paths..."), NULL, { NULL }, NULL,
vectors_export_cmd_callback,
{ "paths-export", GIMP_ICON_DOCUMENT_SAVE,
NC_("paths-action", "E_xport Paths..."), NULL, { NULL }, NULL,
paths_export_cmd_callback,
GIMP_HELP_PATH_EXPORT },
{ "vectors-import", GIMP_ICON_DOCUMENT_OPEN,
NC_("vectors-action", "I_mport Path..."), NULL, { NULL }, NULL,
vectors_import_cmd_callback,
{ "paths-import", GIMP_ICON_DOCUMENT_OPEN,
NC_("paths-action", "I_mport Path..."), NULL, { NULL }, NULL,
paths_import_cmd_callback,
GIMP_HELP_PATH_IMPORT }
};
static const GimpToggleActionEntry vectors_toggle_actions[] =
static const GimpToggleActionEntry paths_toggle_actions[] =
{
{ "vectors-visible", GIMP_ICON_VISIBLE,
NC_("vectors-action", "Toggle Path _Visibility"), NULL, { NULL }, NULL,
vectors_visible_cmd_callback,
{ "paths-visible", GIMP_ICON_VISIBLE,
NC_("paths-action", "Toggle Path _Visibility"), NULL, { NULL }, NULL,
paths_visible_cmd_callback,
FALSE,
GIMP_HELP_PATH_VISIBLE },
{ "vectors-lock-content", GIMP_ICON_LOCK_CONTENT,
NC_("vectors-action", "L_ock Strokes of Path"), NULL, { NULL }, NULL,
vectors_lock_content_cmd_callback,
{ "paths-lock-content", GIMP_ICON_LOCK_CONTENT,
NC_("paths-action", "L_ock Strokes of Path"), NULL, { NULL }, NULL,
paths_lock_content_cmd_callback,
FALSE,
GIMP_HELP_PATH_LOCK_STROKES },
{ "vectors-lock-position", GIMP_ICON_LOCK_POSITION,
NC_("vectors-action", "L_ock Position of Path"), NULL, { NULL }, NULL,
vectors_lock_position_cmd_callback,
{ "paths-lock-position", GIMP_ICON_LOCK_POSITION,
NC_("paths-action", "L_ock Position of Path"), NULL, { NULL }, NULL,
paths_lock_position_cmd_callback,
FALSE,
GIMP_HELP_PATH_LOCK_POSITION }
};
static const GimpEnumActionEntry vectors_color_tag_actions[] =
static const GimpEnumActionEntry paths_color_tag_actions[] =
{
{ "vectors-color-tag-none", GIMP_ICON_EDIT_CLEAR,
NC_("vectors-action", "None"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Clear"),
{ "paths-color-tag-none", GIMP_ICON_EDIT_CLEAR,
NC_("paths-action", "None"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Clear"),
GIMP_COLOR_TAG_NONE, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-blue", NULL,
NC_("vectors-action", "Blue"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Blue"),
{ "paths-color-tag-blue", NULL,
NC_("paths-action", "Blue"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Blue"),
GIMP_COLOR_TAG_BLUE, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-green", NULL,
NC_("vectors-action", "Green"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Green"),
{ "paths-color-tag-green", NULL,
NC_("paths-action", "Green"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Green"),
GIMP_COLOR_TAG_GREEN, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-yellow", NULL,
NC_("vectors-action", "Yellow"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Yellow"),
{ "paths-color-tag-yellow", NULL,
NC_("paths-action", "Yellow"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Yellow"),
GIMP_COLOR_TAG_YELLOW, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-orange", NULL,
NC_("vectors-action", "Orange"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Orange"),
{ "paths-color-tag-orange", NULL,
NC_("paths-action", "Orange"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Orange"),
GIMP_COLOR_TAG_ORANGE, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-brown", NULL,
NC_("vectors-action", "Brown"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Brown"),
{ "paths-color-tag-brown", NULL,
NC_("paths-action", "Brown"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Brown"),
GIMP_COLOR_TAG_BROWN, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-red", NULL,
NC_("vectors-action", "Red"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Red"),
{ "paths-color-tag-red", NULL,
NC_("paths-action", "Red"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Red"),
GIMP_COLOR_TAG_RED, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-violet", NULL,
NC_("vectors-action", "Violet"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Violet"),
{ "paths-color-tag-violet", NULL,
NC_("paths-action", "Violet"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Violet"),
GIMP_COLOR_TAG_VIOLET, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-gray", NULL,
NC_("vectors-action", "Gray"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Gray"),
{ "paths-color-tag-gray", NULL,
NC_("paths-action", "Gray"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Gray"),
GIMP_COLOR_TAG_GRAY, FALSE,
GIMP_HELP_PATH_COLOR_TAG }
};
static const GimpEnumActionEntry vectors_to_selection_actions[] =
static const GimpEnumActionEntry paths_to_selection_actions[] =
{
{ "vectors-selection-replace", GIMP_ICON_SELECTION_REPLACE,
NC_("vectors-action", "Paths to Sele_ction"), NULL, { NULL },
NC_("vectors-action", "Path to selection"),
{ "paths-selection-replace", GIMP_ICON_SELECTION_REPLACE,
NC_("paths-action", "Paths to Sele_ction"), NULL, { NULL },
NC_("paths-action", "Path to selection"),
GIMP_CHANNEL_OP_REPLACE, FALSE,
GIMP_HELP_PATH_SELECTION_REPLACE },
{ "vectors-selection-from-vectors", GIMP_ICON_SELECTION_REPLACE,
NC_("vectors-action", "Selection Fr_om Paths"), NULL, { "<shift>V", NULL },
NC_("vectors-action", "Replace selection with paths"),
{ "paths-selection-from-paths", GIMP_ICON_SELECTION_REPLACE,
NC_("paths-action", "Selection Fr_om Paths"), NULL, { "<shift>V", NULL },
NC_("paths-action", "Replace selection with paths"),
GIMP_CHANNEL_OP_REPLACE, FALSE,
GIMP_HELP_PATH_SELECTION_REPLACE },
{ "vectors-selection-add", GIMP_ICON_SELECTION_ADD,
NC_("vectors-action", "_Add Paths to Selection"), NULL, { NULL },
NC_("vectors-action", "Add paths to selection"),
{ "paths-selection-add", GIMP_ICON_SELECTION_ADD,
NC_("paths-action", "_Add Paths to Selection"), NULL, { NULL },
NC_("paths-action", "Add paths to selection"),
GIMP_CHANNEL_OP_ADD, FALSE,
GIMP_HELP_PATH_SELECTION_ADD },
{ "vectors-selection-subtract", GIMP_ICON_SELECTION_SUBTRACT,
NC_("vectors-action", "_Subtract Paths from Selection"), NULL, { NULL },
NC_("vectors-action", "Subtract paths from selection"),
{ "paths-selection-subtract", GIMP_ICON_SELECTION_SUBTRACT,
NC_("paths-action", "_Subtract Paths from Selection"), NULL, { NULL },
NC_("paths-action", "Subtract paths from selection"),
GIMP_CHANNEL_OP_SUBTRACT, FALSE,
GIMP_HELP_PATH_SELECTION_SUBTRACT },
{ "vectors-selection-intersect", GIMP_ICON_SELECTION_INTERSECT,
NC_("vectors-action", "_Intersect Paths with Selection"), NULL, { NULL },
NC_("vectors-action", "Intersect paths with selection"),
{ "paths-selection-intersect", GIMP_ICON_SELECTION_INTERSECT,
NC_("paths-action", "_Intersect Paths with Selection"), NULL, { NULL },
NC_("paths-action", "Intersect paths with selection"),
GIMP_CHANNEL_OP_INTERSECT, FALSE,
GIMP_HELP_PATH_SELECTION_INTERSECT }
};
static const GimpEnumActionEntry vectors_selection_to_vectors_actions[] =
static const GimpEnumActionEntry paths_selection_to_paths_actions[] =
{
{ "vectors-selection-to-vectors", GIMP_ICON_SELECTION_TO_PATH,
NC_("vectors-action", "Selecti_on to Path"),
NC_("vectors-action", "To _Path"), { NULL },
NC_("vectors-action", "Selection to path"),
{ "paths-selection-to-path", GIMP_ICON_SELECTION_TO_PATH,
NC_("paths-action", "Selecti_on to Path"),
NC_("paths-action", "To _Path"), { NULL },
NC_("paths-action", "Selection to path"),
FALSE, FALSE,
GIMP_HELP_SELECTION_TO_PATH },
{ "vectors-selection-to-vectors-advanced", GIMP_ICON_SELECTION_TO_PATH,
NC_("vectors-action", "Selection to Path (_Advanced)"), NULL, { NULL },
NC_("vectors-action", "Advanced options"),
{ "paths-selection-to-path-advanced", GIMP_ICON_SELECTION_TO_PATH,
NC_("paths-action", "Selection to Path (_Advanced)"), NULL, { NULL },
NC_("paths-action", "Advanced options"),
TRUE, FALSE,
GIMP_HELP_SELECTION_TO_PATH }
};
static const GimpEnumActionEntry vectors_select_actions[] =
static const GimpEnumActionEntry paths_select_actions[] =
{
{ "vectors-select-top", NULL,
NC_("vectors-action", "Select _Top Path"), NULL, { NULL },
NC_("vectors-action", "Select the topmost path"),
{ "paths-select-top", NULL,
NC_("paths-action", "Select _Top Path"), NULL, { NULL },
NC_("paths-action", "Select the topmost path"),
GIMP_ACTION_SELECT_FIRST, FALSE,
GIMP_HELP_PATH_TOP },
{ "vectors-select-bottom", NULL,
NC_("vectors-action", "Select _Bottom Path"), NULL, { NULL },
NC_("vectors-action", "Select the bottommost path"),
{ "paths-select-bottom", NULL,
NC_("paths-action", "Select _Bottom Path"), NULL, { NULL },
NC_("paths-action", "Select the bottommost path"),
GIMP_ACTION_SELECT_LAST, FALSE,
GIMP_HELP_PATH_BOTTOM },
{ "vectors-select-previous", NULL,
NC_("vectors-action", "Select _Previous Path"), NULL, { NULL },
NC_("vectors-action", "Select the path above the current path"),
{ "paths-select-previous", NULL,
NC_("paths-action", "Select _Previous Path"), NULL, { NULL },
NC_("paths-action", "Select the path above the current path"),
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
GIMP_HELP_PATH_PREVIOUS },
{ "vectors-select-next", NULL,
NC_("vectors-action", "Select _Next Path"), NULL, { NULL },
NC_("vectors-action", "Select the vector below the current path"),
{ "paths-select-next", NULL,
NC_("paths-action", "Select _Next Path"), NULL, { NULL },
NC_("paths-action", "Select the path below the current path"),
GIMP_ACTION_SELECT_NEXT, FALSE,
GIMP_HELP_PATH_NEXT }
};
void
vectors_actions_setup (GimpActionGroup *group)
paths_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group, "vectors-action",
vectors_actions,
G_N_ELEMENTS (vectors_actions));
gimp_action_group_add_actions (group, "paths-action",
paths_actions,
G_N_ELEMENTS (paths_actions));
gimp_action_group_add_toggle_actions (group, "vectors-action",
vectors_toggle_actions,
G_N_ELEMENTS (vectors_toggle_actions));
gimp_action_group_add_toggle_actions (group, "paths-action",
paths_toggle_actions,
G_N_ELEMENTS (paths_toggle_actions));
gimp_action_group_add_enum_actions (group, "vectors-action",
vectors_color_tag_actions,
G_N_ELEMENTS (vectors_color_tag_actions),
vectors_color_tag_cmd_callback);
gimp_action_group_add_enum_actions (group, "paths-action",
paths_color_tag_actions,
G_N_ELEMENTS (paths_color_tag_actions),
paths_color_tag_cmd_callback);
gimp_action_group_add_enum_actions (group, "vectors-action",
vectors_to_selection_actions,
G_N_ELEMENTS (vectors_to_selection_actions),
vectors_to_selection_cmd_callback);
gimp_action_group_add_enum_actions (group, "paths-action",
paths_to_selection_actions,
G_N_ELEMENTS (paths_to_selection_actions),
paths_to_selection_cmd_callback);
gimp_action_group_add_enum_actions (group, "vectors-action",
vectors_selection_to_vectors_actions,
G_N_ELEMENTS (vectors_selection_to_vectors_actions),
vectors_selection_to_vectors_cmd_callback);
gimp_action_group_add_enum_actions (group, "paths-action",
paths_selection_to_paths_actions,
G_N_ELEMENTS (paths_selection_to_paths_actions),
paths_selection_to_paths_cmd_callback);
gimp_action_group_add_enum_actions (group, "vectors-action",
vectors_select_actions,
G_N_ELEMENTS (vectors_select_actions),
vectors_select_cmd_callback);
gimp_action_group_add_enum_actions (group, "paths-action",
paths_select_actions,
G_N_ELEMENTS (paths_select_actions),
paths_select_cmd_callback);
items_actions_setup (group, "vectors");
items_actions_setup (group, "paths");
}
void
vectors_actions_update (GimpActionGroup *group,
gpointer data)
paths_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *image = action_data_get_image (data);
GList *selected_path = NULL;
@ -371,11 +371,11 @@ vectors_actions_update (GimpActionGroup *group,
for (iter = selected_path; iter; iter = iter->next)
{
GList *vectors_list;
GList *paths_list;
GList *iter2;
vectors_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
iter2 = g_list_find (vectors_list, iter->data);
paths_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
iter2 = g_list_find (paths_list, iter->data);
if (iter2)
{
@ -410,53 +410,53 @@ vectors_actions_update (GimpActionGroup *group,
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
SET_SENSITIVE ("vectors-edit", n_selected_paths == 1);
SET_SENSITIVE ("vectors-edit-attributes", n_selected_paths == 1);
SET_SENSITIVE ("paths-edit", n_selected_paths == 1);
SET_SENSITIVE ("paths-edit-attributes", n_selected_paths == 1);
SET_SENSITIVE ("vectors-new", image);
SET_SENSITIVE ("vectors-new-last-values", image);
SET_SENSITIVE ("vectors-duplicate", n_selected_paths > 0);
SET_SENSITIVE ("vectors-delete", n_selected_paths > 0);
SET_SENSITIVE ("vectors-merge-visible", n_paths > 1);
SET_SENSITIVE ("paths-new", image);
SET_SENSITIVE ("paths-new-last-values", image);
SET_SENSITIVE ("paths-duplicate", n_selected_paths > 0);
SET_SENSITIVE ("paths-delete", n_selected_paths > 0);
SET_SENSITIVE ("paths-merge-visible", n_paths > 1);
SET_SENSITIVE ("vectors-raise", n_selected_paths > 0 && have_prev && !first_selected);
SET_SENSITIVE ("vectors-raise-to-top", n_selected_paths > 0 && have_prev);
SET_SENSITIVE ("vectors-lower", n_selected_paths > 0 && have_next && !last_selected);
SET_SENSITIVE ("vectors-lower-to-bottom", n_selected_paths > 0 && have_next);
SET_SENSITIVE ("paths-raise", n_selected_paths > 0 && have_prev && !first_selected);
SET_SENSITIVE ("paths-raise-to-top", n_selected_paths > 0 && have_prev);
SET_SENSITIVE ("paths-lower", n_selected_paths > 0 && have_next && !last_selected);
SET_SENSITIVE ("paths-lower-to-bottom", n_selected_paths > 0 && have_next);
SET_SENSITIVE ("vectors-copy", n_selected_paths > 0);
SET_SENSITIVE ("vectors-paste", image);
SET_SENSITIVE ("vectors-export", n_selected_paths > 0);
SET_SENSITIVE ("vectors-import", image);
SET_SENSITIVE ("paths-copy", n_selected_paths > 0);
SET_SENSITIVE ("paths-paste", image);
SET_SENSITIVE ("paths-export", n_selected_paths > 0);
SET_SENSITIVE ("paths-import", image);
SET_SENSITIVE ("vectors-selection-to-vectors", image && !mask_empty);
SET_SENSITIVE ("vectors-selection-to-vectors-advanced", image && !mask_empty);
SET_SENSITIVE ("vectors-fill", n_selected_paths > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("vectors-fill-last-values", n_selected_paths > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("vectors-stroke", n_selected_paths > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("vectors-stroke-last-values", n_selected_paths > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("paths-selection-to-path", image && !mask_empty);
SET_SENSITIVE ("paths-selection-to-path-advanced", image && !mask_empty);
SET_SENSITIVE ("paths-fill", n_selected_paths > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("paths-fill-last-values", n_selected_paths > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("paths-stroke", n_selected_paths > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("paths-stroke-last-values", n_selected_paths > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("vectors-selection-replace", n_selected_paths > 0);
SET_SENSITIVE ("vectors-selection-from-vectors", n_selected_paths > 0);
SET_SENSITIVE ("vectors-selection-add", n_selected_paths > 0);
SET_SENSITIVE ("vectors-selection-subtract", n_selected_paths > 0);
SET_SENSITIVE ("vectors-selection-intersect", n_selected_paths > 0);
SET_SENSITIVE ("paths-selection-replace", n_selected_paths > 0);
SET_SENSITIVE ("paths-selection-from-paths", n_selected_paths > 0);
SET_SENSITIVE ("paths-selection-add", n_selected_paths > 0);
SET_SENSITIVE ("paths-selection-subtract", n_selected_paths > 0);
SET_SENSITIVE ("paths-selection-intersect", n_selected_paths > 0);
SET_SENSITIVE ("vectors-select-top", n_selected_paths > 0 && have_prev);
SET_SENSITIVE ("vectors-select-bottom", n_selected_paths > 0 && have_next);
SET_SENSITIVE ("vectors-select-previous", n_selected_paths > 0 && have_prev);
SET_SENSITIVE ("vectors-select-next", n_selected_paths > 0 && have_next);
SET_SENSITIVE ("paths-select-top", n_selected_paths > 0 && have_prev);
SET_SENSITIVE ("paths-select-bottom", n_selected_paths > 0 && have_next);
SET_SENSITIVE ("paths-select-previous", n_selected_paths > 0 && have_prev);
SET_SENSITIVE ("paths-select-next", n_selected_paths > 0 && have_next);
#undef SET_SENSITIVE
#undef SET_ACTIVE
items_actions_update (group, "vectors", selected_path);
items_actions_update (group, "paths", selected_path);
}

View File

@ -15,13 +15,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __VECTORS_ACTIONS_H__
#define __VECTORS_ACTIONS_H__
#ifndef __PATHS_ACTIONS_H__
#define __PATHS_ACTIONS_H__
void vectors_actions_setup (GimpActionGroup *group);
void vectors_actions_update (GimpActionGroup *group,
gpointer data);
void paths_actions_setup (GimpActionGroup *group);
void paths_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __VECTORS_ACTIONS_H__ */
#endif /* __PATHS_ACTIONS_H__ */

View File

@ -71,49 +71,49 @@
/* local function prototypes */
static void vectors_new_callback (GtkWidget *dialog,
GimpImage *image,
GimpPath *path,
GimpContext *context,
const gchar *path_name,
gboolean path_visible,
GimpColorTag path_color_tag,
gboolean path_lock_content,
gboolean path_lock_position,
gboolean path_lock_visibility,
gpointer user_data);
static void vectors_edit_attributes_callback (GtkWidget *dialog,
GimpImage *image,
GimpPath *path,
GimpContext *context,
const gchar *path_name,
gboolean path_visible,
GimpColorTag path_color_tag,
gboolean path_lock_content,
gboolean path_lock_position,
gboolean path_lock_visibility,
gpointer user_data);
static void vectors_import_callback (GtkWidget *dialog,
GimpImage *image,
GFile *file,
GFile *import_folder,
gboolean merge_paths,
gboolean scale_paths,
gpointer user_data);
static void vectors_export_callback (GtkWidget *dialog,
GimpImage *image,
GFile *file,
GFile *export_folder,
gboolean active_only,
gpointer user_data);
static void paths_new_callback (GtkWidget *dialog,
GimpImage *image,
GimpPath *path,
GimpContext *context,
const gchar *path_name,
gboolean path_visible,
GimpColorTag path_color_tag,
gboolean path_lock_content,
gboolean path_lock_position,
gboolean path_lock_visibility,
gpointer user_data);
static void paths_edit_attributes_callback (GtkWidget *dialog,
GimpImage *image,
GimpPath *path,
GimpContext *context,
const gchar *path_name,
gboolean path_visible,
GimpColorTag path_color_tag,
gboolean path_lock_content,
gboolean path_lock_position,
gboolean path_lock_visibility,
gpointer user_data);
static void paths_import_callback (GtkWidget *dialog,
GimpImage *image,
GFile *file,
GFile *import_folder,
gboolean merge_paths,
gboolean scale_paths,
gpointer user_data);
static void paths_export_callback (GtkWidget *dialog,
GimpImage *image,
GFile *file,
GFile *export_folder,
gboolean active_only,
gpointer user_data);
/* public functions */
void
vectors_edit_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_edit_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *paths;
@ -142,13 +142,13 @@ vectors_edit_cmd_callback (GimpAction *action,
}
void
vectors_edit_attributes_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_edit_attributes_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *paths;
GimpPath *vectors;
GimpPath *path;
GtkWidget *widget;
GtkWidget *dialog;
return_if_no_paths (image, paths, data);
@ -157,43 +157,43 @@ vectors_edit_attributes_cmd_callback (GimpAction *action,
if (g_list_length (paths) != 1)
return;
vectors = paths->data;
path = paths->data;
#define EDIT_DIALOG_KEY "gimp-vectors-edit-attributes-dialog"
#define EDIT_DIALOG_KEY "gimp-path-edit-attributes-dialog"
dialog = dialogs_get_dialog (G_OBJECT (vectors), EDIT_DIALOG_KEY);
dialog = dialogs_get_dialog (G_OBJECT (path), EDIT_DIALOG_KEY);
if (! dialog)
{
GimpItem *item = GIMP_ITEM (vectors);
GimpItem *item = GIMP_ITEM (path);
dialog = path_options_dialog_new (image, vectors,
dialog = path_options_dialog_new (image, path,
action_data_get_context (data),
widget,
_("Path Attributes"),
"gimp-vectors-edit",
"gimp-path-edit",
GIMP_ICON_EDIT,
_("Edit Path Attributes"),
GIMP_HELP_PATH_EDIT,
gimp_object_get_name (vectors),
gimp_object_get_name (path),
gimp_item_get_visible (item),
gimp_item_get_color_tag (item),
gimp_item_get_lock_content (item),
gimp_item_get_lock_position (item),
gimp_item_get_lock_visibility (item),
vectors_edit_attributes_callback,
paths_edit_attributes_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (vectors), EDIT_DIALOG_KEY, dialog);
dialogs_attach_dialog (G_OBJECT (path), EDIT_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
}
void
vectors_new_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_new_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GtkWidget *widget;
@ -201,7 +201,7 @@ vectors_new_cmd_callback (GimpAction *action,
return_if_no_image (image, data);
return_if_no_widget (widget, data);
#define NEW_DIALOG_KEY "gimp-vectors-new-dialog"
#define NEW_DIALOG_KEY "gimp-path-new-dialog"
dialog = dialogs_get_dialog (G_OBJECT (image), NEW_DIALOG_KEY);
@ -213,17 +213,17 @@ vectors_new_cmd_callback (GimpAction *action,
action_data_get_context (data),
widget,
_("New Path"),
"gimp-vectors-new",
"gimp-path-new",
GIMP_ICON_PATH,
_("Create a New Path"),
GIMP_HELP_PATH_NEW,
config->vectors_new_name,
config->path_new_name,
FALSE,
GIMP_COLOR_TAG_NONE,
FALSE,
FALSE,
FALSE,
vectors_new_callback,
paths_new_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (image), NEW_DIALOG_KEY, dialog);
@ -233,27 +233,27 @@ vectors_new_cmd_callback (GimpAction *action,
}
void
vectors_new_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_new_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpPath *vectors;
GimpPath *path;
GimpDialogConfig *config;
return_if_no_image (image, data);
config = GIMP_DIALOG_CONFIG (image->gimp->config);
vectors = gimp_path_new (image, config->vectors_new_name);
gimp_image_add_path (image, vectors,
path = gimp_path_new (image, config->path_new_name);
gimp_image_add_path (image, path,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
gimp_image_flush (image);
}
void
vectors_raise_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_raise_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *list;
@ -297,9 +297,9 @@ vectors_raise_cmd_callback (GimpAction *action,
}
void
vectors_raise_to_top_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_raise_to_top_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *list;
@ -334,9 +334,9 @@ vectors_raise_to_top_cmd_callback (GimpAction *action,
}
void
vectors_lower_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_lower_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *list;
@ -346,12 +346,12 @@ vectors_lower_cmd_callback (GimpAction *action,
for (iter = list; iter; iter = iter->next)
{
GList *vectors_list;
GList *paths_list;
gint index;
vectors_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
paths_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
index = gimp_item_get_index (iter->data);
if (index < g_list_length (vectors_list) - 1)
if (index < g_list_length (paths_list) - 1)
{
moved_list = g_list_prepend (moved_list, iter->data);
}
@ -381,9 +381,9 @@ vectors_lower_cmd_callback (GimpAction *action,
}
void
vectors_lower_to_bottom_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_lower_to_bottom_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *list;
@ -393,12 +393,12 @@ vectors_lower_to_bottom_cmd_callback (GimpAction *action,
for (iter = list; iter; iter = iter->next)
{
GList *vectors_list;
GList *paths_list;
gint index;
vectors_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
paths_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
index = gimp_item_get_index (iter->data);
if (index < g_list_length (vectors_list) - 1)
if (index < g_list_length (paths_list) - 1)
moved_list = g_list_prepend (moved_list, iter->data);
}
@ -421,9 +421,9 @@ vectors_lower_to_bottom_cmd_callback (GimpAction *action,
}
void
vectors_duplicate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_duplicate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *paths;
@ -463,9 +463,9 @@ vectors_duplicate_cmd_callback (GimpAction *action,
}
void
vectors_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *paths;
@ -486,15 +486,15 @@ vectors_delete_cmd_callback (GimpAction *action,
}
void
vectors_merge_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_merge_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *vectors;
GList *paths;
GtkWidget *widget;
GError *error = NULL;
return_if_no_paths (image, vectors, data);
return_if_no_paths (image, paths, data);
return_if_no_widget (widget, data);
if (! gimp_image_merge_visible_paths (image, &error))
@ -510,15 +510,15 @@ vectors_merge_visible_cmd_callback (GimpAction *action,
}
void
vectors_to_selection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_to_selection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *vectors;
GList *paths;
GList *iter;
GimpChannelOps operation;
return_if_no_paths (image, vectors, data);
return_if_no_paths (image, paths, data);
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_DRAWABLE_MOD,
@ -526,11 +526,11 @@ vectors_to_selection_cmd_callback (GimpAction *action,
operation = (GimpChannelOps) g_variant_get_int32 (value);
for (iter = vectors; iter; iter = iter->next)
for (iter = paths; iter; iter = iter->next)
{
gimp_item_to_selection (iter->data, operation, TRUE, FALSE, 0, 0);
if (operation == GIMP_CHANNEL_OP_REPLACE && iter == vectors)
if (operation == GIMP_CHANNEL_OP_REPLACE && iter == paths)
operation = GIMP_CHANNEL_OP_ADD;
}
@ -539,9 +539,9 @@ vectors_to_selection_cmd_callback (GimpAction *action,
}
void
vectors_selection_to_vectors_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_selection_to_paths_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GtkWidget *widget;
@ -593,15 +593,15 @@ vectors_selection_to_vectors_cmd_callback (GimpAction *action,
}
void
vectors_fill_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_fill_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *vectors;
return_if_no_paths (image, vectors, data);
GList *paths;
return_if_no_paths (image, paths, data);
items_fill_cmd_callback (action, image, vectors,
items_fill_cmd_callback (action, image, paths,
_("Fill Path"),
GIMP_ICON_TOOL_BUCKET_FILL,
GIMP_HELP_PATH_FILL,
@ -609,27 +609,27 @@ vectors_fill_cmd_callback (GimpAction *action,
}
void
vectors_fill_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_fill_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *vectors;
return_if_no_paths (image, vectors, data);
GList *paths;
return_if_no_paths (image, paths, data);
items_fill_last_vals_cmd_callback (action, image, vectors, data);
items_fill_last_vals_cmd_callback (action, image, paths, data);
}
void
vectors_stroke_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_stroke_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *vectors;
return_if_no_paths (image, vectors, data);
GList *paths;
return_if_no_paths (image, paths, data);
items_stroke_cmd_callback (action, image, vectors,
items_stroke_cmd_callback (action, image, paths,
_("Stroke Path"),
GIMP_ICON_PATH_STROKE,
GIMP_HELP_PATH_STROKE,
@ -637,28 +637,28 @@ vectors_stroke_cmd_callback (GimpAction *action,
}
void
vectors_stroke_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_stroke_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *vectors;
return_if_no_paths (image, vectors, data);
GList *paths;
return_if_no_paths (image, paths, data);
items_stroke_last_vals_cmd_callback (action, image, vectors, data);
items_stroke_last_vals_cmd_callback (action, image, paths, data);
}
void
vectors_copy_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_copy_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *vectors;
GList *paths;
gchar *svg;
return_if_no_paths (image, vectors, data);
return_if_no_paths (image, paths, data);
svg = gimp_path_export_string (image, vectors);
svg = gimp_path_export_string (image, paths);
if (svg)
{
@ -668,9 +668,9 @@ vectors_copy_cmd_callback (GimpAction *action,
}
void
vectors_paste_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_paste_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GtkWidget *widget;
@ -704,18 +704,18 @@ vectors_paste_cmd_callback (GimpAction *action,
}
void
vectors_export_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_export_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *vectors;
GList *paths;
GtkWidget *widget;
GtkWidget *dialog;
return_if_no_paths (image, vectors, data);
return_if_no_paths (image, paths, data);
return_if_no_widget (widget, data);
#define EXPORT_DIALOG_KEY "gimp-vectors-export-dialog"
#define EXPORT_DIALOG_KEY "gimp-paths-export-dialog"
dialog = dialogs_get_dialog (G_OBJECT (image), EXPORT_DIALOG_KEY);
@ -724,14 +724,14 @@ vectors_export_cmd_callback (GimpAction *action,
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
GFile *folder = NULL;
if (config->vectors_export_path)
folder = gimp_file_new_for_config_path (config->vectors_export_path,
if (config->path_export_path)
folder = gimp_file_new_for_config_path (config->path_export_path,
NULL);
dialog = path_export_dialog_new (image, widget,
folder,
config->vectors_export_active_only,
vectors_export_callback,
config->path_export_active_only,
paths_export_callback,
NULL);
if (folder)
@ -744,9 +744,9 @@ vectors_export_cmd_callback (GimpAction *action,
}
void
vectors_import_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_import_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GtkWidget *widget;
@ -754,7 +754,7 @@ vectors_import_cmd_callback (GimpAction *action,
return_if_no_image (image, data);
return_if_no_widget (widget, data);
#define IMPORT_DIALOG_KEY "gimp-vectors-import-dialog"
#define IMPORT_DIALOG_KEY "gimp-paths-import-dialog"
dialog = dialogs_get_dialog (G_OBJECT (image), IMPORT_DIALOG_KEY);
@ -763,15 +763,15 @@ vectors_import_cmd_callback (GimpAction *action,
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
GFile *folder = NULL;
if (config->vectors_import_path)
folder = gimp_file_new_for_config_path (config->vectors_import_path,
if (config->path_import_path)
folder = gimp_file_new_for_config_path (config->path_import_path,
NULL);
dialog = path_import_dialog_new (image, widget,
folder,
config->vectors_import_merge,
config->vectors_import_scale,
vectors_import_callback,
config->path_import_merge,
config->path_import_scale,
paths_import_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (image), IMPORT_DIALOG_KEY, dialog);
@ -781,86 +781,86 @@ vectors_import_cmd_callback (GimpAction *action,
}
void
vectors_visible_cmd_callback (GimpAction *action,
paths_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *paths;
return_if_no_paths (image, paths, data);
items_visible_cmd_callback (action, value, image, paths);
}
void
paths_lock_content_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *paths;
return_if_no_paths (image, paths, data);
items_lock_content_cmd_callback (action, value, image, paths);
}
void
paths_lock_position_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *paths;
return_if_no_paths (image, paths, data);
items_lock_position_cmd_callback (action, value, image, paths);
}
void
paths_color_tag_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *vectors;
return_if_no_paths (image, vectors, data);
items_visible_cmd_callback (action, value, image, vectors);
}
void
vectors_lock_content_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *vectors;
return_if_no_paths (image, vectors, data);
items_lock_content_cmd_callback (action, value, image, vectors);
}
void
vectors_lock_position_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *vectors;
return_if_no_paths (image, vectors, data);
items_lock_position_cmd_callback (action, value, image, vectors);
}
void
vectors_color_tag_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *vectors;
GList *paths;
GimpColorTag color_tag;
return_if_no_paths (image, vectors, data);
return_if_no_paths (image, paths, data);
color_tag = (GimpColorTag) g_variant_get_int32 (value);
items_color_tag_cmd_callback (action, image, vectors, color_tag);
items_color_tag_cmd_callback (action, image, paths, color_tag);
}
/* private functions */
static void
vectors_new_callback (GtkWidget *dialog,
GimpImage *image,
GimpPath *vectors,
GimpContext *context,
const gchar *vectors_name,
gboolean vectors_visible,
GimpColorTag vectors_color_tag,
gboolean vectors_lock_content,
gboolean vectors_lock_position,
gboolean vectors_lock_visibility,
gpointer user_data)
paths_new_callback (GtkWidget *dialog,
GimpImage *image,
GimpPath *path,
GimpContext *context,
const gchar *paths_name,
gboolean paths_visible,
GimpColorTag paths_color_tag,
gboolean paths_lock_content,
gboolean paths_lock_position,
gboolean paths_lock_visibility,
gpointer user_data)
{
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
g_object_set (config,
"path-new-name", vectors_name,
"path-new-name", paths_name,
NULL);
vectors = gimp_path_new (image, config->vectors_new_name);
gimp_item_set_visible (GIMP_ITEM (vectors), vectors_visible, FALSE);
gimp_item_set_color_tag (GIMP_ITEM (vectors), vectors_color_tag, FALSE);
gimp_item_set_lock_content (GIMP_ITEM (vectors), vectors_lock_content, FALSE);
gimp_item_set_lock_position (GIMP_ITEM (vectors), vectors_lock_position, FALSE);
gimp_item_set_lock_visibility (GIMP_ITEM (vectors), vectors_lock_visibility, FALSE);
path = gimp_path_new (image, config->path_new_name);
gimp_item_set_visible (GIMP_ITEM (path), paths_visible, FALSE);
gimp_item_set_color_tag (GIMP_ITEM (path), paths_color_tag, FALSE);
gimp_item_set_lock_content (GIMP_ITEM (path), paths_lock_content, FALSE);
gimp_item_set_lock_position (GIMP_ITEM (path), paths_lock_position, FALSE);
gimp_item_set_lock_visibility (GIMP_ITEM (path), paths_lock_visibility, FALSE);
gimp_image_add_path (image, vectors,
gimp_image_add_path (image, path,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
gimp_image_flush (image);
@ -868,48 +868,48 @@ vectors_new_callback (GtkWidget *dialog,
}
static void
vectors_edit_attributes_callback (GtkWidget *dialog,
GimpImage *image,
GimpPath *vectors,
GimpContext *context,
const gchar *vectors_name,
gboolean vectors_visible,
GimpColorTag vectors_color_tag,
gboolean vectors_lock_content,
gboolean vectors_lock_position,
gboolean vectors_lock_visibility,
gpointer user_data)
paths_edit_attributes_callback (GtkWidget *dialog,
GimpImage *image,
GimpPath *path,
GimpContext *context,
const gchar *paths_name,
gboolean paths_visible,
GimpColorTag paths_color_tag,
gboolean paths_lock_content,
gboolean paths_lock_position,
gboolean paths_lock_visibility,
gpointer user_data)
{
GimpItem *item = GIMP_ITEM (vectors);
GimpItem *item = GIMP_ITEM (path);
if (strcmp (vectors_name, gimp_object_get_name (vectors)) ||
vectors_visible != gimp_item_get_visible (item) ||
vectors_color_tag != gimp_item_get_color_tag (item) ||
vectors_lock_content != gimp_item_get_lock_content (item) ||
vectors_lock_position != gimp_item_get_lock_position (item) ||
vectors_lock_visibility != gimp_item_get_lock_visibility (item))
if (strcmp (paths_name, gimp_object_get_name (path)) ||
paths_visible != gimp_item_get_visible (item) ||
paths_color_tag != gimp_item_get_color_tag (item) ||
paths_lock_content != gimp_item_get_lock_content (item) ||
paths_lock_position != gimp_item_get_lock_position (item) ||
paths_lock_visibility != gimp_item_get_lock_visibility (item))
{
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_ITEM_PROPERTIES,
_("Path Attributes"));
if (strcmp (vectors_name, gimp_object_get_name (vectors)))
gimp_item_rename (GIMP_ITEM (vectors), vectors_name, NULL);
if (strcmp (paths_name, gimp_object_get_name (path)))
gimp_item_rename (GIMP_ITEM (path), paths_name, NULL);
if (vectors_visible != gimp_item_get_visible (item))
gimp_item_set_visible (item, vectors_visible, TRUE);
if (paths_visible != gimp_item_get_visible (item))
gimp_item_set_visible (item, paths_visible, TRUE);
if (vectors_color_tag != gimp_item_get_color_tag (item))
gimp_item_set_color_tag (item, vectors_color_tag, TRUE);
if (paths_color_tag != gimp_item_get_color_tag (item))
gimp_item_set_color_tag (item, paths_color_tag, TRUE);
if (vectors_lock_content != gimp_item_get_lock_content (item))
gimp_item_set_lock_content (item, vectors_lock_content, TRUE);
if (paths_lock_content != gimp_item_get_lock_content (item))
gimp_item_set_lock_content (item, paths_lock_content, TRUE);
if (vectors_lock_position != gimp_item_get_lock_position (item))
gimp_item_set_lock_position (item, vectors_lock_position, TRUE);
if (paths_lock_position != gimp_item_get_lock_position (item))
gimp_item_set_lock_position (item, paths_lock_position, TRUE);
if (vectors_lock_visibility != gimp_item_get_lock_visibility (item))
gimp_item_set_lock_visibility (item, vectors_lock_visibility, TRUE);
if (paths_lock_visibility != gimp_item_get_lock_visibility (item))
gimp_item_set_lock_visibility (item, paths_lock_visibility, TRUE);
gimp_image_undo_group_end (image);
@ -920,13 +920,13 @@ vectors_edit_attributes_callback (GtkWidget *dialog,
}
static void
vectors_import_callback (GtkWidget *dialog,
GimpImage *image,
GFile *file,
GFile *import_folder,
gboolean merge_vectors,
gboolean scale_vectors,
gpointer user_data)
paths_import_callback (GtkWidget *dialog,
GimpImage *image,
GFile *file,
GFile *import_folder,
gboolean merge_vectors,
gboolean scale_vectors,
gpointer user_data)
{
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
gchar *path = NULL;
@ -945,8 +945,8 @@ vectors_import_callback (GtkWidget *dialog,
g_free (path);
if (gimp_path_import_file (image, file,
config->vectors_import_merge,
config->vectors_import_scale,
config->path_import_merge,
config->path_import_scale,
GIMP_IMAGE_ACTIVE_PARENT, -1,
NULL, &error))
{
@ -965,15 +965,15 @@ vectors_import_callback (GtkWidget *dialog,
}
static void
vectors_export_callback (GtkWidget *dialog,
GimpImage *image,
GFile *file,
GFile *export_folder,
gboolean active_only,
gpointer user_data)
paths_export_callback (GtkWidget *dialog,
GimpImage *image,
GFile *file,
GFile *export_folder,
gboolean active_only,
gpointer user_data)
{
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
GList *vectors = NULL;
GList *paths = NULL;
gchar *path = NULL;
GError *error = NULL;
@ -988,10 +988,10 @@ vectors_export_callback (GtkWidget *dialog,
if (path)
g_free (path);
if (config->vectors_export_active_only)
vectors = gimp_image_get_selected_paths (image);
if (config->path_export_active_only)
paths = gimp_image_get_selected_paths (image);
if (! gimp_path_export_file (image, vectors, file, &error))
if (! gimp_path_export_file (image, paths, file, &error))
{
gimp_message (image->gimp, G_OBJECT (dialog),
GIMP_MESSAGE_ERROR,
@ -1004,13 +1004,13 @@ vectors_export_callback (GtkWidget *dialog,
}
void
vectors_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
paths_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *new_vectors = NULL;
GList *vectors;
GList *new_paths = NULL;
GList *paths;
GList *iter;
GimpActionSelectType select_type;
gboolean run_once;
@ -1018,10 +1018,10 @@ vectors_select_cmd_callback (GimpAction *action,
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
vectors = gimp_image_get_selected_paths (image);
run_once = (g_list_length (vectors) == 0);
paths = gimp_image_get_selected_paths (image);
run_once = (g_list_length (paths) == 0);
for (iter = vectors; iter || run_once; iter = iter ? iter->next : NULL)
for (iter = paths; iter || run_once; iter = iter ? iter->next : NULL)
{
GimpPath *new_vec;
GimpContainer *container;
@ -1039,14 +1039,14 @@ vectors_select_cmd_callback (GimpAction *action,
container,
iter ? iter->data : NULL);
if (new_vec)
new_vectors = g_list_prepend (new_vectors, new_vec);
new_paths = g_list_prepend (new_paths, new_vec);
}
if (new_vectors)
if (new_paths)
{
gimp_image_set_selected_paths (image, new_vectors);
gimp_image_set_selected_paths (image, new_paths);
gimp_image_flush (image);
}
g_list_free (new_vectors);
g_list_free (new_paths);
}

View File

@ -15,95 +15,95 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __VECTORS_COMMANDS_H__
#define __VECTORS_COMMANDS_H__
#ifndef __PATHS_COMMANDS_H__
#define __PATHS_COMMANDS_H__
void vectors_edit_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_edit_attributes_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_new_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_new_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_edit_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_edit_attributes_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_new_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_new_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_raise_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_raise_to_top_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_lower_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_lower_to_bottom_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_raise_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_raise_to_top_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_lower_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_lower_to_bottom_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_duplicate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_merge_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_to_selection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_selection_to_vectors_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_duplicate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_merge_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_to_selection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_selection_to_paths_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_fill_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_fill_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_stroke_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_stroke_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_fill_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_fill_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_stroke_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_stroke_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_copy_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_paste_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_export_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_import_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_copy_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_paste_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_export_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_import_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_lock_content_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_lock_position_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_lock_content_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_lock_position_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_color_tag_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_color_tag_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __VECTORS_COMMANDS_H__ */
#endif /* __PATHS_COMMANDS_H__ */

View File

@ -457,14 +457,14 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass)
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_VECTORS_IMPORT_MERGE,
"path-import-merge",
"Default merge imported vectors",
"Default merge imported path",
VECTORS_IMPORT_MERGE_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_VECTORS_IMPORT_SCALE,
"path-import-scale",
"Default scale imported vectors",
"Default scale imported path",
VECTORS_IMPORT_SCALE_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
@ -592,9 +592,9 @@ gimp_dialog_config_finalize (GObject *object)
g_clear_pointer (&config->color_profile_path, g_free);
g_clear_pointer (&config->layer_new_name, g_free);
g_clear_pointer (&config->channel_new_name, g_free);
g_clear_pointer (&config->vectors_new_name, g_free);
g_clear_pointer (&config->vectors_export_path, g_free);
g_clear_pointer (&config->vectors_import_path, g_free);
g_clear_pointer (&config->path_new_name, g_free);
g_clear_pointer (&config->path_export_path, g_free);
g_clear_pointer (&config->path_import_path, g_free);
g_clear_object (&config->fill_options);
g_clear_object (&config->stroke_options);
@ -736,30 +736,30 @@ gimp_dialog_config_set_property (GObject *object,
break;
case PROP_VECTORS_NEW_NAME:
if (config->vectors_new_name)
g_free (config->vectors_new_name);
config->vectors_new_name = g_value_dup_string (value);
if (config->path_new_name)
g_free (config->path_new_name);
config->path_new_name = g_value_dup_string (value);
break;
case PROP_VECTORS_EXPORT_PATH:
if (config->vectors_export_path)
g_free (config->vectors_export_path);
config->vectors_export_path = g_value_dup_string (value);
if (config->path_export_path)
g_free (config->path_export_path);
config->path_export_path = g_value_dup_string (value);
break;
case PROP_VECTORS_EXPORT_ACTIVE_ONLY:
config->vectors_export_active_only = g_value_get_boolean (value);
config->path_export_active_only = g_value_get_boolean (value);
break;
case PROP_VECTORS_IMPORT_PATH:
if (config->vectors_import_path)
g_free (config->vectors_import_path);
config->vectors_import_path = g_value_dup_string (value);
if (config->path_import_path)
g_free (config->path_import_path);
config->path_import_path = g_value_dup_string (value);
break;
case PROP_VECTORS_IMPORT_MERGE:
config->vectors_import_merge = g_value_get_boolean (value);
config->path_import_merge = g_value_get_boolean (value);
break;
case PROP_VECTORS_IMPORT_SCALE:
config->vectors_import_scale = g_value_get_boolean (value);
config->path_import_scale = g_value_get_boolean (value);
break;
case PROP_SELECTION_FEATHER_RADIUS:
@ -933,24 +933,24 @@ gimp_dialog_config_get_property (GObject *object,
break;
case PROP_VECTORS_NEW_NAME:
g_value_set_string (value, config->vectors_new_name);
g_value_set_string (value, config->path_new_name);
break;
case PROP_VECTORS_EXPORT_PATH:
g_value_set_string (value, config->vectors_export_path);
g_value_set_string (value, config->path_export_path);
break;
case PROP_VECTORS_EXPORT_ACTIVE_ONLY:
g_value_set_boolean (value, config->vectors_export_active_only);
g_value_set_boolean (value, config->path_export_active_only);
break;
case PROP_VECTORS_IMPORT_PATH:
g_value_set_string (value, config->vectors_import_path);
g_value_set_string (value, config->path_import_path);
break;
case PROP_VECTORS_IMPORT_MERGE:
g_value_set_boolean (value, config->vectors_import_merge);
g_value_set_boolean (value, config->path_import_merge);
break;
case PROP_VECTORS_IMPORT_SCALE:
g_value_set_boolean (value, config->vectors_import_scale);
g_value_set_boolean (value, config->path_import_scale);
break;
case PROP_SELECTION_FEATHER_RADIUS:

View File

@ -87,14 +87,14 @@ struct _GimpDialogConfig
gchar *channel_new_name;
GeglColor *channel_new_color;
gchar *vectors_new_name;
gchar *path_new_name;
gchar *vectors_export_path;
gboolean vectors_export_active_only;
gchar *path_export_path;
gboolean path_export_active_only;
gchar *vectors_import_path;
gboolean vectors_import_merge;
gboolean vectors_import_scale;
gchar *path_import_path;
gboolean path_import_merge;
gboolean path_import_scale;
gdouble selection_feather_radius;
gboolean selection_feather_edge_lock;

View File

@ -537,17 +537,29 @@ user_update_menurc_over20 (const GMatchInfo *matched_value,
* since GIMP 2.4, changed for 2.10 in commit 0bdb747.
*/
else if (g_str_has_prefix (action_match, "tools-value-1-"))
new_action_name = g_strdup ("tools-opacity-");
new_action_name = g_strdup_printf ("tools-opacity-%s", action_match + 14);
else if (g_str_has_prefix (action_match, "tools-value-2-"))
new_action_name = g_strdup_printf ("tools-size-%s", action_match + 14);
else if (g_str_has_prefix (action_match, "tools-value-3-"))
new_action_name = g_strdup_printf ("tools-aspect-%s", action_match + 14);
else if (g_str_has_prefix (action_match, "tools-value-4-"))
new_action_name = g_strdup_printf ("tools-angle-%s", action_match + 14);
else if (g_strcmp0 (action_match, "vectors-path-tool") == 0)
new_action_name = g_strdup ("vectors-edit");
else if (g_strcmp0 (action_match, "tools-blend") == 0)
new_action_name = g_strdup ("tools-gradient");
else if (g_strcmp0 (action_match, "vectors-path-tool") == 0)
new_action_name = g_strdup ("paths-edit");
/* Following the s/GimpVectors/GimpPath/ renaming to be more
* consistent with the GUI, we also rename all the action names.
* Since GIMP 3.0, commit XXXX.
*/
else if (g_strcmp0 (action_match, "vectors-selection-from-vectors") == 0)
new_action_name = g_strdup ("paths-selection-from-paths");
else if (g_str_has_prefix (action_match, "vectors-selection-to-vectors"))
new_action_name = g_strdup_printf ("paths-selection-to-path%s",
action_match + strlen ("vectors-selection-to-vectors"));
else if (g_str_has_prefix (action_match, "vectors-"))
new_action_name = g_strdup_printf ("paths-%s", action_match + 8);
/* view-rotate-reset became view-reset and new view-rotate-reset and
* view-flip-reset actions were created. See commit 15fb4a7be0.
*/

View File

@ -96,7 +96,7 @@ path_export_dialog_new (GimpImage *image,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_role (GTK_WINDOW (dialog), "gimp-vectors-export");
gtk_window_set_role (GTK_WINDOW (dialog), "gimp-paths-export");
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
gtk_window_set_screen (GTK_WINDOW (dialog),
gtk_widget_get_screen (parent));

View File

@ -101,7 +101,7 @@ path_import_dialog_new (GimpImage *image,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_role (GTK_WINDOW (dialog), "gimp-vectors-import");
gtk_window_set_role (GTK_WINDOW (dialog), "gimp-paths-import");
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
gtk_window_set_screen (GTK_WINDOW (dialog),
gtk_widget_get_screen (parent));

View File

@ -81,7 +81,7 @@ menus_init (Gimp *gimp)
"drawable",
"layers",
"channels",
"vectors",
"paths",
"tools",
"dialogs",
"windows",
@ -119,7 +119,7 @@ menus_init (Gimp *gimp)
"drawable",
"layers",
"channels",
"vectors",
"paths",
"tools",
"windows",
"dialogs",
@ -139,7 +139,7 @@ menus_init (Gimp *gimp)
"drawable",
"layers",
"channels",
"vectors",
"paths",
"tools",
"windows",
"dialogs",
@ -168,10 +168,10 @@ menus_init (Gimp *gimp)
NULL);
gimp_menu_factory_manager_register (global_menu_factory, "<Vectors>",
"vectors",
"paths",
"plug-in",
NULL,
"/vectors-popup",
"/paths-popup",
"vectors-menu", plug_in_menus_setup,
NULL);

View File

@ -97,16 +97,16 @@ gimp_path_tree_view_class_init (GimpPathTreeViewClass *klass)
iv_class->remove_item = (GimpRemoveItemFunc) gimp_image_remove_path;
iv_class->new_item = gimp_path_tree_view_item_new;
iv_class->action_group = "vectors";
iv_class->activate_action = "vectors-edit";
iv_class->new_action = "vectors-new";
iv_class->new_default_action = "vectors-new-last-values";
iv_class->raise_action = "vectors-raise";
iv_class->raise_top_action = "vectors-raise-to-top";
iv_class->lower_action = "vectors-lower";
iv_class->lower_bottom_action = "vectors-lower-to-bottom";
iv_class->duplicate_action = "vectors-duplicate";
iv_class->delete_action = "vectors-delete";
iv_class->action_group = "paths";
iv_class->activate_action = "paths-edit";
iv_class->new_action = "paths-new";
iv_class->new_default_action = "paths-new-last-values";
iv_class->raise_action = "paths-raise";
iv_class->raise_top_action = "paths-raise-to-top";
iv_class->lower_action = "paths-lower";
iv_class->lower_bottom_action = "paths-lower-to-bottom";
iv_class->duplicate_action = "paths-duplicate";
iv_class->delete_action = "paths-delete";
iv_class->lock_content_icon_name = GIMP_ICON_LOCK_PATH;
iv_class->lock_content_tooltip = _("Lock path");
iv_class->lock_content_help_id = GIMP_HELP_PATH_LOCK_STROKES;
@ -148,13 +148,13 @@ gimp_path_tree_view_constructed (GObject *object)
GDK_MODIFIER_INTENT_MODIFY_SELECTION);
view->toselection_button =
gimp_editor_add_action_button (editor, "vectors",
"vectors-selection-replace",
"vectors-selection-add",
gimp_editor_add_action_button (editor, "paths",
"paths-selection-replace",
"paths-selection-add",
extend_mask,
"vectors-selection-subtract",
"paths-selection-subtract",
modify_mask,
"vectors-selection-intersect",
"paths-selection-intersect",
extend_mask | modify_mask,
NULL);
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (editor),
@ -164,18 +164,18 @@ gimp_path_tree_view_constructed (GObject *object)
view->toselection_button, 4);
view->tovectors_button =
gimp_editor_add_action_button (editor, "vectors",
"vectors-selection-to-vectors",
"vectors-selection-to-vectors-advanced",
gimp_editor_add_action_button (editor, "paths",
"paths-selection-to-path",
"paths-selection-to-path-advanced",
GDK_SHIFT_MASK,
NULL);
gtk_box_reorder_child (gimp_editor_get_button_box (editor),
view->tovectors_button, 5);
view->stroke_button =
gimp_editor_add_action_button (editor, "vectors",
"vectors-stroke",
"vectors-stroke-last-values",
gimp_editor_add_action_button (editor, "paths",
"paths-stroke",
"paths-stroke-last-values",
GDK_SHIFT_MASK,
NULL);
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (editor),

View File

@ -164,9 +164,9 @@ gimp_selection_editor_constructed (GObject *object)
"select-save", NULL);
editor->path_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor), "vectors",
"vectors-selection-to-vectors",
"vectors-selection-to-vectors-advanced",
gimp_editor_add_action_button (GIMP_EDITOR (editor), "paths",
"paths-selection-to-path",
"paths-selection-to-path-advanced",
GDK_SHIFT_MASK,
NULL);

View File

@ -118,9 +118,9 @@
<item><attribute name="action">app.edit-fill-bg</attribute></item>
<item><attribute name="action">app.edit-fill-pattern</attribute></item>
<item><attribute name="action">app.select-fill</attribute></item>
<item><attribute name="action">app.vectors-fill</attribute></item>
<item><attribute name="action">app.paths-fill</attribute></item>
<item><attribute name="action">app.select-stroke</attribute></item>
<item><attribute name="action">app.vectors-stroke</attribute></item>
<item><attribute name="action">app.paths-stroke</attribute></item>
</section>
<section>
<attribute name="section-name" translatable="no">Preferences</attribute>
@ -157,7 +157,7 @@
<item><attribute name="action">app.select-copy-float</attribute></item>
</submenu>
<item><attribute name="action">app.tools-by-color-select-short</attribute></item>
<item><attribute name="action">app.vectors-selection-from-vectors</attribute></item>
<item><attribute name="action">app.paths-selection-from-paths</attribute></item>
<item><attribute name="action">app.dialogs-selection-editor</attribute></item>
</section>
<section>
@ -172,7 +172,7 @@
<section>
<item><attribute name="action">app.quick-mask-toggle</attribute></item>
<item><attribute name="action">app.select-save</attribute></item>
<item><attribute name="action">app.vectors-selection-to-vectors</attribute></item>
<item><attribute name="action">app.paths-selection-to-path</attribute></item>
</section>
</submenu>

View File

@ -9,7 +9,7 @@
<item><attribute name="action">app.select-all</attribute></item>
<item><attribute name="action">app.select-none</attribute></item>
<item><attribute name="action">app.select-invert</attribute></item>
<item><attribute name="action">app.vectors-selection-from-vectors</attribute></item>
<item><attribute name="action">app.paths-selection-from-paths</attribute></item>
<section>
<item><attribute name="action">app.select-cut-float</attribute></item>
<item><attribute name="action">app.select-copy-float</attribute></item>
@ -24,7 +24,7 @@
</section>
<section>
<item><attribute name="action">app.select-save</attribute></item>
<item><attribute name="action">app.vectors-selection-to-vectors</attribute></item>
<item><attribute name="action">app.paths-selection-to-path</attribute></item>
</section>
<item><attribute name="action">app.select-fill</attribute></item>
<item><attribute name="action">app.select-stroke</attribute></item>

View File

@ -1,49 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<interface>
<menu id="/vectors-popup">
<menu id="/paths-popup">
<submenu>
<attribute name="label" translatable="yes" context="vectors-action">Paths Menu</attribute>
<attribute name="label" translatable="yes" context="paths-action">Paths Menu</attribute>
<attribute name="icon">gimp-paths</attribute>
<item><attribute name="action">app.vectors-edit</attribute></item>
<item><attribute name="action">app.vectors-edit-attributes</attribute></item>
<item><attribute name="action">app.paths-edit</attribute></item>
<item><attribute name="action">app.paths-edit-attributes</attribute></item>
<submenu>
<attribute name="label" translatable="yes">Color Tags</attribute>
<item><attribute name="action">app.vectors-color-tag-none</attribute></item>
<item><attribute name="action">app.vectors-color-tag-blue</attribute></item>
<item><attribute name="action">app.vectors-color-tag-green</attribute></item>
<item><attribute name="action">app.vectors-color-tag-yellow</attribute></item>
<item><attribute name="action">app.vectors-color-tag-orange</attribute></item>
<item><attribute name="action">app.vectors-color-tag-brown</attribute></item>
<item><attribute name="action">app.vectors-color-tag-red</attribute></item>
<item><attribute name="action">app.vectors-color-tag-violet</attribute></item>
<item><attribute name="action">app.vectors-color-tag-gray</attribute></item>
<item><attribute name="action">app.paths-color-tag-none</attribute></item>
<item><attribute name="action">app.paths-color-tag-blue</attribute></item>
<item><attribute name="action">app.paths-color-tag-green</attribute></item>
<item><attribute name="action">app.paths-color-tag-yellow</attribute></item>
<item><attribute name="action">app.paths-color-tag-orange</attribute></item>
<item><attribute name="action">app.paths-color-tag-brown</attribute></item>
<item><attribute name="action">app.paths-color-tag-red</attribute></item>
<item><attribute name="action">app.paths-color-tag-violet</attribute></item>
<item><attribute name="action">app.paths-color-tag-gray</attribute></item>
</submenu>
<section>
<item><attribute name="action">app.vectors-new</attribute></item>
<item><attribute name="action">app.vectors-raise</attribute></item>
<item><attribute name="action">app.vectors-lower</attribute></item>
<item><attribute name="action">app.vectors-duplicate</attribute></item>
<item><attribute name="action">app.vectors-delete</attribute></item>
<item><attribute name="action">app.vectors-merge-visible</attribute></item>
<item><attribute name="action">app.paths-new</attribute></item>
<item><attribute name="action">app.paths-raise</attribute></item>
<item><attribute name="action">app.paths-lower</attribute></item>
<item><attribute name="action">app.paths-duplicate</attribute></item>
<item><attribute name="action">app.paths-delete</attribute></item>
<item><attribute name="action">app.paths-merge-visible</attribute></item>
</section>
<section>
<item><attribute name="action">app.vectors-selection-replace</attribute></item>
<item><attribute name="action">app.vectors-selection-add</attribute></item>
<item><attribute name="action">app.vectors-selection-subtract</attribute></item>
<item><attribute name="action">app.vectors-selection-intersect</attribute></item>
<item><attribute name="action">app.vectors-selection-to-vectors</attribute><attribute name="label-variant">long</attribute></item>
<item><attribute name="action">app.paths-selection-replace</attribute></item>
<item><attribute name="action">app.paths-selection-add</attribute></item>
<item><attribute name="action">app.paths-selection-subtract</attribute></item>
<item><attribute name="action">app.paths-selection-intersect</attribute></item>
<item><attribute name="action">app.paths-selection-to-path</attribute><attribute name="label-variant">long</attribute></item>
</section>
<section>
<item><attribute name="action">app.vectors-fill</attribute></item>
<item><attribute name="action">app.vectors-stroke</attribute></item>
<item><attribute name="action">app.paths-fill</attribute></item>
<item><attribute name="action">app.paths-stroke</attribute></item>
</section>
<section>
<item><attribute name="action">app.vectors-copy</attribute></item>
<item><attribute name="action">app.vectors-paste</attribute></item>
<item><attribute name="action">app.vectors-export</attribute></item>
<item><attribute name="action">app.vectors-import</attribute></item>
<item><attribute name="action">app.paths-copy</attribute></item>
<item><attribute name="action">app.paths-paste</attribute></item>
<item><attribute name="action">app.paths-export</attribute></item>
<item><attribute name="action">app.paths-import</attribute></item>
</section>
</submenu>
</menu>