app, menus: rename the vector-toolpath menu stuff to tool-path
This commit is contained in:
parent
4ce5181cc5
commit
6a3256ad69
14 changed files with 122 additions and 122 deletions
|
|
@ -91,10 +91,10 @@
|
|||
#include "text-editor-actions.h"
|
||||
#include "text-tool-actions.h"
|
||||
#include "tool-options-actions.h"
|
||||
#include "tool-path-actions.h"
|
||||
#include "tool-presets-actions.h"
|
||||
#include "tool-preset-editor-actions.h"
|
||||
#include "tools-actions.h"
|
||||
#include "vector-toolpath-actions.h"
|
||||
#include "view-actions.h"
|
||||
#include "windows-actions.h"
|
||||
|
||||
|
|
@ -233,12 +233,12 @@ static const GimpActionFactoryEntry action_groups[] =
|
|||
{ "tool-options", N_("Tool Options"), GIMP_ICON_DIALOG_TOOL_OPTIONS,
|
||||
tool_options_actions_setup,
|
||||
tool_options_actions_update },
|
||||
{ "tool-path", N_("Tool Path"), GIMP_ICON_PATH,
|
||||
tool_path_actions_setup,
|
||||
tool_path_actions_update },
|
||||
{ "tools", N_("Tools"), GIMP_ICON_DIALOG_TOOLS,
|
||||
tools_actions_setup,
|
||||
tools_actions_update },
|
||||
{ "vector-toolpath", N_("Path Toolpath"), GIMP_ICON_PATH,
|
||||
vector_toolpath_actions_setup,
|
||||
vector_toolpath_actions_update },
|
||||
{ "paths", N_("Paths"), GIMP_ICON_PATH,
|
||||
paths_actions_setup,
|
||||
paths_actions_update },
|
||||
|
|
|
|||
|
|
@ -79,14 +79,14 @@ libappactions_sources = [
|
|||
'text-tool-commands.c',
|
||||
'tool-options-actions.c',
|
||||
'tool-options-commands.c',
|
||||
'tool-path-actions.c',
|
||||
'tool-path-commands.c',
|
||||
'tool-preset-editor-actions.c',
|
||||
'tool-preset-editor-commands.c',
|
||||
'tool-presets-actions.c',
|
||||
'tool-presets-commands.c',
|
||||
'tools-actions.c',
|
||||
'tools-commands.c',
|
||||
'vector-toolpath-actions.c',
|
||||
'vector-toolpath-commands.c',
|
||||
'view-actions.c',
|
||||
'view-commands.c',
|
||||
'window-actions.c',
|
||||
|
|
|
|||
|
|
@ -33,34 +33,34 @@
|
|||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimptoolpath.h"
|
||||
|
||||
#include "vector-toolpath-actions.h"
|
||||
#include "vector-toolpath-commands.h"
|
||||
#include "tool-path-actions.h"
|
||||
#include "tool-path-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry vector_toolpath_actions[] =
|
||||
static const GimpActionEntry tool_path_actions[] =
|
||||
{
|
||||
{ "vector-toolpath-delete-anchor", GIMP_ICON_PATH,
|
||||
NC_("vector-toolpath-action", "_Delete Anchor"), NULL, { NULL }, NULL,
|
||||
vector_toolpath_delete_anchor_cmd_callback,
|
||||
{ "tool-path-delete-anchor", GIMP_ICON_PATH,
|
||||
NC_("tool-path-action", "_Delete Anchor"), NULL, { NULL }, NULL,
|
||||
tool_path_delete_anchor_cmd_callback,
|
||||
GIMP_HELP_PATH_TOOL_DELETE_ANCHOR },
|
||||
{ "vector-toolpath-shift-start", GIMP_ICON_PATH,
|
||||
NC_("vector-toolpath-action", "Shift S_tart"), NULL, { NULL }, NULL,
|
||||
vector_toolpath_shift_start_cmd_callback,
|
||||
{ "tool-path-shift-start", GIMP_ICON_PATH,
|
||||
NC_("tool-path-action", "Shift S_tart"), NULL, { NULL }, NULL,
|
||||
tool_path_shift_start_cmd_callback,
|
||||
GIMP_HELP_PATH_TOOL_SHIFT_START },
|
||||
|
||||
{ "vector-toolpath-insert-anchor", GIMP_ICON_PATH,
|
||||
NC_("vector-toolpath-action", "_Insert Anchor"), NULL, { NULL }, NULL,
|
||||
vector_toolpath_insert_anchor_cmd_callback,
|
||||
{ "tool-path-insert-anchor", GIMP_ICON_PATH,
|
||||
NC_("tool-path-action", "_Insert Anchor"), NULL, { NULL }, NULL,
|
||||
tool_path_insert_anchor_cmd_callback,
|
||||
GIMP_HELP_PATH_TOOL_INSERT_ANCHOR },
|
||||
{ "vector-toolpath-delete-segment", GIMP_ICON_PATH,
|
||||
NC_("vector-toolpath-action", "Delete _Segment"), NULL, { NULL }, NULL,
|
||||
vector_toolpath_delete_segment_cmd_callback,
|
||||
{ "tool-path-delete-segment", GIMP_ICON_PATH,
|
||||
NC_("tool-path-action", "Delete _Segment"), NULL, { NULL }, NULL,
|
||||
tool_path_delete_segment_cmd_callback,
|
||||
GIMP_HELP_PATH_TOOL_DELETE_SEGMENT },
|
||||
{ "vector-toolpath-reverse-stroke", GIMP_ICON_PATH,
|
||||
NC_("vector-toolpath-action", "_Reverse Stroke"), NULL, { NULL }, NULL,
|
||||
vector_toolpath_reverse_stroke_cmd_callback,
|
||||
{ "tool-path-reverse-stroke", GIMP_ICON_PATH,
|
||||
NC_("tool-path-action", "_Reverse Stroke"), NULL, { NULL }, NULL,
|
||||
tool_path_reverse_stroke_cmd_callback,
|
||||
GIMP_HELP_PATH_TOOL_REVERSE_STROKE }
|
||||
};
|
||||
|
||||
|
|
@ -69,28 +69,28 @@ static const GimpActionEntry vector_toolpath_actions[] =
|
|||
gimp_action_group_set_action_hide_empty (group, action, (condition) != 0)
|
||||
|
||||
void
|
||||
vector_toolpath_actions_setup (GimpActionGroup *group)
|
||||
tool_path_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "vector-toolpath-action",
|
||||
vector_toolpath_actions,
|
||||
G_N_ELEMENTS (vector_toolpath_actions));
|
||||
gimp_action_group_add_actions (group, "tool-path-action",
|
||||
tool_path_actions,
|
||||
G_N_ELEMENTS (tool_path_actions));
|
||||
}
|
||||
|
||||
/* The following code is written on the assumption that this is for a
|
||||
* context menu, activated by right-clicking on a toolpath vectors widget.
|
||||
* context menu, activated by right-clicking on a tool-path widget.
|
||||
* Therefore, the tool must have a display. If for any reason the
|
||||
* code is adapted to a different situation, some existence testing
|
||||
* will need to be added.
|
||||
*/
|
||||
void
|
||||
vector_toolpath_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
tool_path_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpToolPath *toolpath = GIMP_TOOL_PATH (data);
|
||||
GimpToolPath *tool_path = GIMP_TOOL_PATH (data);
|
||||
gboolean on_handle;
|
||||
gboolean on_curve;
|
||||
|
||||
gimp_tool_path_get_popup_state (toolpath, &on_handle, &on_curve);
|
||||
gimp_tool_path_get_popup_state (tool_path, &on_handle, &on_curve);
|
||||
|
||||
#define SET_VISIBLE(action,condition) \
|
||||
gimp_action_group_set_action_visible (group, action, (condition) != 0)
|
||||
|
|
@ -99,11 +99,11 @@ vector_toolpath_actions_update (GimpActionGroup *group,
|
|||
#define SET_ACTIVE(action,condition) \
|
||||
gimp_action_group_set_action_active (group, action, (condition) != 0)
|
||||
|
||||
SET_VISIBLE ("vector-toolpath-shift-start", on_handle);
|
||||
SET_VISIBLE ("vector-toolpath-delete-anchor", on_handle);
|
||||
SET_VISIBLE ("tool-path-shift-start", on_handle);
|
||||
SET_VISIBLE ("tool-path-delete-anchor", on_handle);
|
||||
|
||||
SET_VISIBLE ("vector-toolpath-insert-anchor", !on_handle && on_curve);
|
||||
SET_VISIBLE ("vector-toolpath-delete-segment", !on_handle && on_curve);
|
||||
SET_VISIBLE ("vector-toolpath-reverse-stroke", on_curve);
|
||||
SET_VISIBLE ("tool-path-insert-anchor", !on_handle && on_curve);
|
||||
SET_VISIBLE ("tool-path-delete-segment", !on_handle && on_curve);
|
||||
SET_VISIBLE ("tool-path-reverse-stroke", on_curve);
|
||||
|
||||
}
|
||||
|
|
@ -15,13 +15,13 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __VECTOR_TOOLPATH_ACTIONS_H__
|
||||
#define __VECTOR_TOOLPATH_ACTIONS_H__
|
||||
#ifndef __TOOL_PATH_ACTIONS_H__
|
||||
#define __TOOL_PATH_ACTIONS_H__
|
||||
|
||||
|
||||
void vector_toolpath_actions_setup (GimpActionGroup *group);
|
||||
void vector_toolpath_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
void tool_path_actions_setup (GimpActionGroup *group);
|
||||
void tool_path_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __VECTOR_TOOLPATH_ACTIONS_H__ */
|
||||
#endif /* __TOOL_PATH_ACTIONS_H__ */
|
||||
|
|
@ -37,15 +37,15 @@
|
|||
|
||||
#include "dialogs/dialogs.h"
|
||||
|
||||
#include "vector-toolpath-commands.h"
|
||||
#include "tool-path-commands.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
vector_toolpath_delete_anchor_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
tool_path_delete_anchor_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpToolPath *tool_path = GIMP_TOOL_PATH (data);
|
||||
|
||||
|
|
@ -53,9 +53,9 @@ vector_toolpath_delete_anchor_cmd_callback (GimpAction *action,
|
|||
}
|
||||
|
||||
void
|
||||
vector_toolpath_shift_start_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
tool_path_shift_start_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpToolPath *tool_path = GIMP_TOOL_PATH (data);
|
||||
|
||||
|
|
@ -63,9 +63,9 @@ vector_toolpath_shift_start_cmd_callback (GimpAction *action,
|
|||
}
|
||||
|
||||
void
|
||||
vector_toolpath_insert_anchor_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
tool_path_insert_anchor_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpToolPath *tool_path = GIMP_TOOL_PATH (data);
|
||||
|
||||
|
|
@ -73,9 +73,9 @@ vector_toolpath_insert_anchor_cmd_callback (GimpAction *action,
|
|||
}
|
||||
|
||||
void
|
||||
vector_toolpath_delete_segment_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
tool_path_delete_segment_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpToolPath *tool_path = GIMP_TOOL_PATH (data);
|
||||
|
||||
|
|
@ -83,9 +83,9 @@ vector_toolpath_delete_segment_cmd_callback (GimpAction *action,
|
|||
}
|
||||
|
||||
void
|
||||
vector_toolpath_reverse_stroke_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
tool_path_reverse_stroke_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpToolPath *tool_path = GIMP_TOOL_PATH (data);
|
||||
|
||||
40
app/actions/tool-path-commands.h
Normal file
40
app/actions/tool-path-commands.h
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __TOOL_PATH_COMMANDS_H__
|
||||
#define __TOOL_PATH_COMMANDS_H__
|
||||
|
||||
|
||||
void tool_path_delete_anchor_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void tool_path_shift_start_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void tool_path_insert_anchor_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void tool_path_delete_segment_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void tool_path_reverse_stroke_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __TOOL_PATH_COMMANDS_H__ */
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __VECTOR_TOOLPATH_COMMANDS_H__
|
||||
#define __VECTOR_TOOLPATH_COMMANDS_H__
|
||||
|
||||
|
||||
void vector_toolpath_delete_anchor_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void vector_toolpath_shift_start_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void vector_toolpath_insert_anchor_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void vector_toolpath_delete_segment_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void vector_toolpath_reverse_stroke_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __VECTOR_TOOLPATH_COMMANDS_H__ */
|
||||
|
|
@ -1309,7 +1309,7 @@ gimp_tool_path_get_popup (GimpToolWidget *widget,
|
|||
|
||||
menu_factory = menus_get_global_menu_factory (gimp_dialog_factory_get_context (dialog_factory)->gimp);
|
||||
ui_manager = gimp_menu_factory_get_manager (menu_factory,
|
||||
"<VectorToolPath>", widget);
|
||||
"<ToolPath>", widget);
|
||||
|
||||
/* we're using a side effects of gimp_tool_path_get_function
|
||||
* that update the private->cur_* variables. */
|
||||
|
|
@ -1319,7 +1319,7 @@ gimp_tool_path_get_popup (GimpToolWidget *widget,
|
|||
{
|
||||
gimp_ui_manager_update (ui_manager, widget);
|
||||
|
||||
*ui_path = "/vector-toolpath-popup";
|
||||
*ui_path = "/tool-path-popup";
|
||||
return ui_manager;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -175,11 +175,11 @@ menus_init (Gimp *gimp)
|
|||
"paths-menu", plug_in_menus_setup,
|
||||
NULL);
|
||||
|
||||
gimp_menu_factory_manager_register (global_menu_factory, "<VectorToolPath>",
|
||||
"vector-toolpath",
|
||||
gimp_menu_factory_manager_register (global_menu_factory, "<ToolPath>",
|
||||
"tool-path",
|
||||
NULL,
|
||||
"/vector-toolpath-popup",
|
||||
"vector-toolpath-menu",
|
||||
"/tool-path-popup",
|
||||
"tool-path-menu",
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -1006,7 +1006,7 @@ tool_manager_cast_spell (GimpToolInfo *tool_info)
|
|||
{ .sequence = "gimp-warp-tool\0"
|
||||
"gimp-iscissors-tool\0"
|
||||
"gimp-gradient-tool\0"
|
||||
"gimp-vector-tool\0"
|
||||
"gimp-path-tool\0"
|
||||
"gimp-ellipse-select-tool\0"
|
||||
"gimp-rect-select-tool\0",
|
||||
.func = gimp_cairo_wilber_toggle_pointer_eyes
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ ui_menus_files = files(
|
|||
'text-editor-toolbar.ui',
|
||||
'text-tool-menu.ui',
|
||||
'tool-options-menu.ui',
|
||||
'tool-path-menu.ui',
|
||||
'tool-preset-editor-menu.ui',
|
||||
'tool-presets-menu.ui',
|
||||
'undo-menu.ui',
|
||||
'vector-toolpath-menu.ui',
|
||||
)
|
||||
|
||||
install_data(ui_menus_files,
|
||||
|
|
|
|||
13
menus/tool-path-menu.ui
Normal file
13
menus/tool-path-menu.ui
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<interface>
|
||||
<menu id="/tool-path-popup">
|
||||
<section>
|
||||
<item><attribute name="action">tool-path.tool-path-delete-anchor</attribute></item>
|
||||
<item><attribute name="action">tool-path.tool-path-shift-start</attribute></item>
|
||||
</section>
|
||||
<item><attribute name="action">tool-path.tool-path-insert-anchor</attribute></item>
|
||||
<item><attribute name="action">tool-path.tool-path-delete-segment</attribute></item>
|
||||
<item><attribute name="action">tool-path.tool-path-reverse-stroke</attribute></item>
|
||||
</menu>
|
||||
</interface>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<interface>
|
||||
<menu id="/vector-toolpath-popup">
|
||||
<section>
|
||||
<item><attribute name="action">vector-toolpath.vector-toolpath-delete-anchor</attribute></item>
|
||||
<item><attribute name="action">vector-toolpath.vector-toolpath-shift-start</attribute></item>
|
||||
</section>
|
||||
<item><attribute name="action">vector-toolpath.vector-toolpath-insert-anchor</attribute></item>
|
||||
<item><attribute name="action">vector-toolpath.vector-toolpath-delete-segment</attribute></item>
|
||||
<item><attribute name="action">vector-toolpath.vector-toolpath-reverse-stroke</attribute></item>
|
||||
</menu>
|
||||
</interface>
|
||||
|
|
@ -78,12 +78,12 @@ app/actions/text-tool-actions.c
|
|||
app/actions/text-tool-commands.c
|
||||
app/actions/tool-options-actions.c
|
||||
app/actions/tool-options-commands.c
|
||||
app/actions/tool-path-actions.c
|
||||
app/actions/tool-preset-editor-actions.c
|
||||
app/actions/tool-preset-editor-commands.c
|
||||
app/actions/tool-presets-actions.c
|
||||
app/actions/tool-presets-commands.c
|
||||
app/actions/tools-actions.c
|
||||
app/actions/vector-toolpath-actions.c
|
||||
app/actions/view-actions.c
|
||||
app/actions/view-commands.c
|
||||
app/actions/window-actions.c
|
||||
|
|
|
|||
Loading…
Reference in a new issue