app, menus: rename everything "paste as new" to "paste as new image"
Actions, functions, variables, help IDs. Also added user profile migration code for importing old menurc files.
This commit is contained in:
@ -54,11 +54,11 @@ static const GimpActionEntry buffers_actions[] =
|
||||
G_CALLBACK (buffers_paste_into_cmd_callback),
|
||||
GIMP_HELP_BUFFER_PASTE_INTO },
|
||||
|
||||
{ "buffers-paste-as-new", GIMP_STOCK_PASTE_AS_NEW,
|
||||
{ "buffers-paste-as-new-image", GIMP_STOCK_PASTE_AS_NEW,
|
||||
NC_("buffers-action", "Paste Buffer as _New"), NULL,
|
||||
NC_("buffers-action", "Paste the selected buffer as a new image"),
|
||||
G_CALLBACK (buffers_paste_as_new_cmd_callback),
|
||||
GIMP_HELP_BUFFER_PASTE_AS_NEW },
|
||||
G_CALLBACK (buffers_paste_as_new_image_cmd_callback),
|
||||
GIMP_HELP_BUFFER_PASTE_AS_NEW_IMAGE },
|
||||
|
||||
{ "buffers-delete", "edit-delete",
|
||||
NC_("buffers-action", "_Delete Buffer"), NULL,
|
||||
@ -89,10 +89,10 @@ buffers_actions_update (GimpActionGroup *group,
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
|
||||
SET_SENSITIVE ("buffers-paste", buffer);
|
||||
SET_SENSITIVE ("buffers-paste-into", buffer);
|
||||
SET_SENSITIVE ("buffers-paste-as-new", buffer);
|
||||
SET_SENSITIVE ("buffers-delete", buffer);
|
||||
SET_SENSITIVE ("buffers-paste", buffer);
|
||||
SET_SENSITIVE ("buffers-paste-into", buffer);
|
||||
SET_SENSITIVE ("buffers-paste-as-new-image", buffer);
|
||||
SET_SENSITIVE ("buffers-delete", buffer);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
}
|
||||
|
@ -67,8 +67,8 @@ buffers_paste_into_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
buffers_paste_as_new_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
buffers_paste_as_new_image_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
|
@ -19,14 +19,14 @@
|
||||
#define __BUFFERS_COMMANDS_H__
|
||||
|
||||
|
||||
void buffers_paste_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void buffers_paste_into_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void buffers_paste_as_new_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void buffers_delete_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void buffers_paste_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void buffers_paste_into_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void buffers_paste_as_new_image_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void buffers_delete_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __BUFFERS_COMMANDS_H__ */
|
||||
|
@ -139,17 +139,17 @@ static const GimpActionEntry edit_actions[] =
|
||||
G_CALLBACK (edit_paste_into_cmd_callback),
|
||||
GIMP_HELP_EDIT_PASTE_INTO },
|
||||
|
||||
{ "edit-paste-as-new", GIMP_STOCK_PASTE_AS_NEW,
|
||||
{ "edit-paste-as-new-image", GIMP_STOCK_PASTE_AS_NEW,
|
||||
NC_("edit-action", "From _Clipboard"), "<primary><shift>V",
|
||||
NC_("edit-action", "Create a new image from the content of the clipboard"),
|
||||
G_CALLBACK (edit_paste_as_new_cmd_callback),
|
||||
GIMP_HELP_EDIT_PASTE_AS_NEW },
|
||||
G_CALLBACK (edit_paste_as_new_image_cmd_callback),
|
||||
GIMP_HELP_EDIT_PASTE_AS_NEW_IMAGE },
|
||||
|
||||
{ "edit-paste-as-new-short", GIMP_STOCK_PASTE_AS_NEW,
|
||||
{ "edit-paste-as-new-image-short", GIMP_STOCK_PASTE_AS_NEW,
|
||||
NC_("edit-action", "_New Image"), NULL,
|
||||
NC_("edit-action", "Create a new image from the content of the clipboard"),
|
||||
G_CALLBACK (edit_paste_as_new_cmd_callback),
|
||||
GIMP_HELP_EDIT_PASTE_AS_NEW },
|
||||
G_CALLBACK (edit_paste_as_new_image_cmd_callback),
|
||||
GIMP_HELP_EDIT_PASTE_AS_NEW_IMAGE },
|
||||
|
||||
{ "edit-paste-as-new-layer", NULL,
|
||||
NC_("edit-action", "New _Layer"), NULL,
|
||||
@ -229,8 +229,8 @@ edit_actions_setup (GimpActionGroup *group)
|
||||
G_CALLBACK (edit_fill_cmd_callback));
|
||||
|
||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||
"edit-paste-as-new-short");
|
||||
gtk_action_set_accel_path (action, "<Actions>/edit/edit-paste-as-new");
|
||||
"edit-paste-as-new-image-short");
|
||||
gtk_action_set_accel_path (action, "<Actions>/edit/edit-paste-as-new-image");
|
||||
|
||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||
"edit-fill-fg");
|
||||
|
@ -321,7 +321,7 @@ edit_paste_cmd_callback (GtkAction *action,
|
||||
if (display && gimp_display_get_image (display))
|
||||
edit_paste (display, FALSE);
|
||||
else
|
||||
edit_paste_as_new_cmd_callback (action, data);
|
||||
edit_paste_as_new_image_cmd_callback (action, data);
|
||||
}
|
||||
|
||||
void
|
||||
@ -335,8 +335,8 @@ edit_paste_into_cmd_callback (GtkAction *action,
|
||||
}
|
||||
|
||||
void
|
||||
edit_paste_as_new_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
edit_paste_as_new_image_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GimpBuffer *buffer;
|
||||
|
@ -44,7 +44,7 @@ void edit_paste_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_paste_into_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_paste_as_new_cmd_callback (GtkAction *action,
|
||||
void edit_paste_as_new_image_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void edit_paste_as_new_layer_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
|
@ -479,10 +479,14 @@ user_install_mkdir_with_parents (GimpUserInstall *install,
|
||||
|
||||
/* The regexp pattern of all options changed from menurc of GIMP 2.8.
|
||||
* Add any pattern that we want to recognize for replacement in the menurc of
|
||||
* the next release*/
|
||||
#define MENURC_OVER20_UPDATE_PATTERN "\"<Actions>/file/file-export-to\"" "|" \
|
||||
"\"<Actions>/file/file-export\"" "|" \
|
||||
"\"<Actions>/tools/tools-value-[1-4]-.*\""
|
||||
* the next release
|
||||
*/
|
||||
#define MENURC_OVER20_UPDATE_PATTERN \
|
||||
"\"<Actions>/file/file-export-to\"" "|" \
|
||||
"\"<Actions>/file/file-export\"" "|" \
|
||||
"\"<Actions>/edit/edit-paste-as-new\"" "|" \
|
||||
"\"<Actions>/buffers/buffers-paste-as-new\"" "|" \
|
||||
"\"<Actions>/tools/tools-value-[1-4]-.*\""
|
||||
|
||||
/**
|
||||
* callback to use for updating a menurc from GIMP over 2.0.
|
||||
@ -494,11 +498,11 @@ user_update_menurc_over20 (const GMatchInfo *matched_value,
|
||||
GString *new_value,
|
||||
gpointer data)
|
||||
{
|
||||
gchar *match;
|
||||
match = g_match_info_fetch (matched_value, 0);
|
||||
gchar *match = g_match_info_fetch (matched_value, 0);
|
||||
|
||||
/* file-export-* changes to follow file-save-* patterns.
|
||||
* Actions available since GIMP 2.8, changed for 2.10 in commit 4b14ed2. */
|
||||
/* file-export-* changes to follow file-save-* patterns. Actions
|
||||
* available since GIMP 2.8, changed for 2.10 in commit 4b14ed2.
|
||||
*/
|
||||
if (g_strcmp0 (match, "\"<Actions>/file/file-export\"") == 0)
|
||||
{
|
||||
g_string_append (new_value, "\"<Actions>/file/file-export-as\"");
|
||||
@ -507,8 +511,19 @@ user_update_menurc_over20 (const GMatchInfo *matched_value,
|
||||
{
|
||||
g_string_append (new_value, "\"<Actions>/file/file-export\"");
|
||||
}
|
||||
/* Tools settings renamed more user-friendly.
|
||||
* Actions available since GIMP 2.4, changed for 2.10 in commit 0bdb747. */
|
||||
/* "*-paste-as-new" renamed to "*-paste-as-new-image"
|
||||
*/
|
||||
else if (g_strcmp0 (match, "\"<Actions>/edit/edit-paste-as-new\"") == 0)
|
||||
{
|
||||
g_string_append (new_value, "\"<Actions>/edit/edit-paste-as-new-image\"");
|
||||
}
|
||||
else if (g_strcmp0 (match, "\"<Actions>/buffers/buffers-paste-as-new\"") == 0)
|
||||
{
|
||||
g_string_append (new_value, "\"<Actions>/buffers/buffers-paste-as-new-image\"");
|
||||
}
|
||||
/* Tools settings renamed more user-friendly. Actions available
|
||||
* since GIMP 2.4, changed for 2.10 in commit 0bdb747.
|
||||
*/
|
||||
else if (g_str_has_prefix (match, "\"<Actions>/tools/tools-value-1-"))
|
||||
{
|
||||
g_string_append (new_value, "\"<Actions>/tools/tools-opacity-");
|
||||
@ -529,7 +544,9 @@ user_update_menurc_over20 (const GMatchInfo *matched_value,
|
||||
g_string_append (new_value, "\"<Actions>/tools/tools-angle-");
|
||||
g_string_append (new_value, match + 31);
|
||||
}
|
||||
/* Should not happen. Just in case we match something unexpected by mistake. */
|
||||
/* Should not happen. Just in case we match something unexpected by
|
||||
* mistake.
|
||||
*/
|
||||
else
|
||||
{
|
||||
g_string_append (new_value, match);
|
||||
@ -539,7 +556,8 @@ user_update_menurc_over20 (const GMatchInfo *matched_value,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#define CONTROLLERRC_UPDATE_PATTERN "\\(map \"(scroll|cursor)-[^\"]*\\bcontrol\\b[^\"]*\""
|
||||
#define CONTROLLERRC_UPDATE_PATTERN \
|
||||
"\\(map \"(scroll|cursor)-[^\"]*\\bcontrol\\b[^\"]*\""
|
||||
|
||||
static gboolean
|
||||
user_update_controllerrc (const GMatchInfo *matched_value,
|
||||
@ -567,7 +585,8 @@ user_update_controllerrc (const GMatchInfo *matched_value,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#define GIMPRC_UPDATE_PATTERN "\\(theme [^)]*\\)"
|
||||
#define GIMPRC_UPDATE_PATTERN \
|
||||
"\\(theme [^)]*\\)"
|
||||
|
||||
static gboolean
|
||||
user_update_gimprc (const GMatchInfo *matched_value,
|
||||
@ -757,7 +776,8 @@ user_install_migrate_files (GimpUserInstall *install)
|
||||
g_snprintf (dest, sizeof (dest), "%s%c%s",
|
||||
gimp_directory (), G_DIR_SEPARATOR, basename);
|
||||
|
||||
user_install_file_copy (install, source, dest, update_pattern, update_callback);
|
||||
user_install_file_copy (install, source, dest,
|
||||
update_pattern, update_callback);
|
||||
}
|
||||
else if (g_file_test (source, G_FILE_TEST_IS_DIR))
|
||||
{
|
||||
|
@ -93,10 +93,6 @@ gimp_buffer_view_docked_iface_init (GimpDockedInterface *iface)
|
||||
static void
|
||||
gimp_buffer_view_init (GimpBufferView *view)
|
||||
{
|
||||
view->paste_button = NULL;
|
||||
view->paste_into_button = NULL;
|
||||
view->paste_as_new_button = NULL;
|
||||
view->delete_button = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -195,9 +191,9 @@ gimp_buffer_view_new (GimpViewType view_type,
|
||||
gimp_editor_add_action_button (GIMP_EDITOR (editor->view), "buffers",
|
||||
"buffers-paste-into", NULL);
|
||||
|
||||
buffer_view->paste_as_new_button =
|
||||
buffer_view->paste_as_new_image_button =
|
||||
gimp_editor_add_action_button (GIMP_EDITOR (editor->view), "buffers",
|
||||
"buffers-paste-as-new", NULL);
|
||||
"buffers-paste-as-new-image", NULL);
|
||||
|
||||
buffer_view->delete_button =
|
||||
gimp_editor_add_action_button (GIMP_EDITOR (editor->view), "buffers",
|
||||
@ -210,7 +206,7 @@ gimp_buffer_view_new (GimpViewType view_type,
|
||||
GTK_BUTTON (buffer_view->paste_into_button),
|
||||
GIMP_TYPE_BUFFER);
|
||||
gimp_container_view_enable_dnd (editor->view,
|
||||
GTK_BUTTON (buffer_view->paste_as_new_button),
|
||||
GTK_BUTTON (buffer_view->paste_as_new_image_button),
|
||||
GIMP_TYPE_BUFFER);
|
||||
gimp_container_view_enable_dnd (editor->view,
|
||||
GTK_BUTTON (buffer_view->delete_button),
|
||||
|
@ -44,7 +44,7 @@ struct _GimpBufferView
|
||||
|
||||
GtkWidget *paste_button;
|
||||
GtkWidget *paste_into_button;
|
||||
GtkWidget *paste_as_new_button;
|
||||
GtkWidget *paste_as_new_image_button;
|
||||
GtkWidget *delete_button;
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
||||
#define GIMP_HELP_EDIT_COPY_VISIBLE "gimp-edit-copy-visible"
|
||||
#define GIMP_HELP_EDIT_PASTE "gimp-edit-paste"
|
||||
#define GIMP_HELP_EDIT_PASTE_INTO "gimp-edit-paste-into"
|
||||
#define GIMP_HELP_EDIT_PASTE_AS_NEW "gimp-edit-paste-as-new"
|
||||
#define GIMP_HELP_EDIT_PASTE_AS_NEW_IMAGE "gimp-edit-paste-as-new-image"
|
||||
#define GIMP_HELP_EDIT_PASTE_AS_NEW_LAYER "gimp-edit-paste-as-new-layer"
|
||||
#define GIMP_HELP_EDIT_CLEAR "gimp-edit-clear"
|
||||
#define GIMP_HELP_EDIT_FILL_FG "gimp-edit-fill-fg"
|
||||
@ -442,7 +442,7 @@
|
||||
#define GIMP_HELP_BUFFER_COPY "gimp-buffer-copy"
|
||||
#define GIMP_HELP_BUFFER_PASTE "gimp-buffer-paste"
|
||||
#define GIMP_HELP_BUFFER_PASTE_INTO "gimp-buffer-paste-into"
|
||||
#define GIMP_HELP_BUFFER_PASTE_AS_NEW "gimp-buffer-paste-as-new"
|
||||
#define GIMP_HELP_BUFFER_PASTE_AS_NEW_IMAGE "gimp-buffer-paste-as-new-image"
|
||||
#define GIMP_HELP_BUFFER_DELETE "gimp-buffer-delete"
|
||||
|
||||
#define GIMP_HELP_TOOL_PRESET_DIALOG "gimp-tool-preset-dialog"
|
||||
|
@ -5,7 +5,7 @@
|
||||
<popup action="buffers-popup">
|
||||
<menuitem action="buffers-paste" />
|
||||
<menuitem action="buffers-paste-into" />
|
||||
<menuitem action="buffers-paste-as-new" />
|
||||
<menuitem action="buffers-paste-as-new-image" />
|
||||
<menuitem action="buffers-delete" />
|
||||
<separator />
|
||||
</popup>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<menuitem action="image-new" />
|
||||
<menu action="file-create-menu" name="Create">
|
||||
<placeholder name="Acquire">
|
||||
<menuitem action="edit-paste-as-new" />
|
||||
<menuitem action="edit-paste-as-new-image" />
|
||||
</placeholder>
|
||||
<separator />
|
||||
</menu>
|
||||
@ -196,7 +196,7 @@
|
||||
<menuitem action="edit-paste-into" />
|
||||
</placeholder>
|
||||
<menu action="edit-paste-as-menu" name="Paste as">
|
||||
<menuitem action="edit-paste-as-new-short" />
|
||||
<menuitem action="edit-paste-as-new-image-short" />
|
||||
<menuitem action="edit-paste-as-new-layer" />
|
||||
</menu>
|
||||
<menu action="edit-buffer-menu" name="Buffer">
|
||||
|
Reference in New Issue
Block a user