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

app/actions/buffers-commands.[ch] app/actions/data-commands.[ch]

2005-01-14  Michael Natterer  <mitch@gimp.org>

	* app/actions/buffers-commands.[ch]
	* app/actions/data-commands.[ch]
	* app/actions/documents-commands.[ch]
	* app/actions/palettes-commands.[ch]
	* app/actions/templates-commands.[ch]: changed the remaining
	callbacks to follow a consistent naming scheme
	(e.g. buffers_delete_buffer_cmd_callback ->
	buffers_delete_cmd_callback).

	* app/actions/brushes-actions.c
	* app/actions/buffers-actions.c
	* app/actions/documents-actions.c
	* app/actions/gradients-actions.c
	* app/actions/palettes-actions.c
	* app/actions/patterns-actions.c
	* app/actions/templates-actions.c: changed accordingly.
parent 9a84d9f7
2005-01-14 Michael Natterer <mitch@gimp.org>
* app/actions/buffers-commands.[ch]
* app/actions/data-commands.[ch]
* app/actions/documents-commands.[ch]
* app/actions/palettes-commands.[ch]
* app/actions/templates-commands.[ch]: changed the remaining
callbacks to follow a consistent naming scheme
(e.g. buffers_delete_buffer_cmd_callback ->
buffers_delete_cmd_callback).
* app/actions/brushes-actions.c
* app/actions/buffers-actions.c
* app/actions/documents-actions.c
* app/actions/gradients-actions.c
* app/actions/palettes-actions.c
* app/actions/patterns-actions.c
* app/actions/templates-actions.c: changed accordingly.
2005-01-14 Sven Neumann <sven@gimp.org>
* plug-ins/common/retinex.c (run): fixed check for number of
......
......@@ -52,25 +52,25 @@ static GimpActionEntry brushes_actions[] =
{ "brushes-new", GTK_STOCK_NEW,
N_("_New Brush"), "",
N_("New brush"),
G_CALLBACK (data_new_data_cmd_callback),
G_CALLBACK (data_new_cmd_callback),
GIMP_HELP_BRUSH_NEW },
{ "brushes-duplicate", GIMP_STOCK_DUPLICATE,
N_("D_uplicate Brush"), NULL,
N_("Duplicate brush"),
G_CALLBACK (data_duplicate_data_cmd_callback),
G_CALLBACK (data_duplicate_cmd_callback),
GIMP_HELP_BRUSH_DUPLICATE },
{ "brushes-delete", GTK_STOCK_DELETE,
N_("_Delete Brush"), "",
N_("Delete brush"),
G_CALLBACK (data_delete_data_cmd_callback),
G_CALLBACK (data_delete_cmd_callback),
GIMP_HELP_BRUSH_DELETE },
{ "brushes-refresh", GTK_STOCK_REFRESH,
N_("_Refresh Brushes"), "",
N_("Refresh brushes"),
G_CALLBACK (data_refresh_data_cmd_callback),
G_CALLBACK (data_refresh_cmd_callback),
GIMP_HELP_BRUSH_REFRESH }
};
......@@ -94,7 +94,7 @@ brushes_actions_setup (GimpActionGroup *group)
gimp_action_group_add_string_actions (group,
brushes_edit_actions,
G_N_ELEMENTS (brushes_edit_actions),
G_CALLBACK (data_edit_data_cmd_callback));
G_CALLBACK (data_edit_cmd_callback));
}
void
......
......@@ -45,25 +45,25 @@ static GimpActionEntry buffers_actions[] =
{ "buffers-paste", GTK_STOCK_PASTE,
N_("_Paste Buffer"), "",
N_("Paste the selected buffer"),
G_CALLBACK (buffers_paste_buffer_cmd_callback),
G_CALLBACK (buffers_paste_cmd_callback),
GIMP_HELP_BUFFER_PASTE },
{ "buffers-paste-into", GIMP_STOCK_PASTE_INTO,
N_("Paste Buffer _Into"), NULL,
N_("Paste the selected buffer into the selection"),
G_CALLBACK (buffers_paste_buffer_into_cmd_callback),
G_CALLBACK (buffers_paste_into_cmd_callback),
GIMP_HELP_BUFFER_PASTE_INTO },
{ "buffers-paste-as-new", GIMP_STOCK_PASTE_AS_NEW,
N_("Paste Buffer as _New"), NULL,
N_("Paste the selected buffer as new image"),
G_CALLBACK (buffers_paste_buffer_as_new_cmd_callback),
G_CALLBACK (buffers_paste_as_new_cmd_callback),
GIMP_HELP_BUFFER_PASTE_AS_NEW },
{ "buffers-delete", GTK_STOCK_DELETE,
N_("_Delete Buffer"), "",
N_("Delete the selected buffer"),
G_CALLBACK (buffers_delete_buffer_cmd_callback),
G_CALLBACK (buffers_delete_cmd_callback),
GIMP_HELP_BUFFER_DELETE }
};
......
......@@ -48,22 +48,22 @@ static void buffers_paste (GimpBufferView *view,
/* public functionss */
void
buffers_paste_buffer_cmd_callback (GtkAction *action,
gpointer data)
buffers_paste_cmd_callback (GtkAction *action,
gpointer data)
{
buffers_paste (GIMP_BUFFER_VIEW (data), FALSE);
}
void
buffers_paste_buffer_into_cmd_callback (GtkAction *action,
gpointer data)
buffers_paste_into_cmd_callback (GtkAction *action,
gpointer data)
{
buffers_paste (GIMP_BUFFER_VIEW (data), TRUE);
}
void
buffers_paste_buffer_as_new_cmd_callback (GtkAction *action,
gpointer data)
buffers_paste_as_new_cmd_callback (GtkAction *action,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContainer *container;
......@@ -85,8 +85,8 @@ buffers_paste_buffer_as_new_cmd_callback (GtkAction *action,
}
void
buffers_delete_buffer_cmd_callback (GtkAction *action,
gpointer data)
buffers_delete_cmd_callback (GtkAction *action,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContainer *container;
......
......@@ -20,14 +20,14 @@
#define __BUFFERS_COMMANDS_H__
void buffers_paste_buffer_cmd_callback (GtkAction *action,
gpointer data);
void buffers_paste_buffer_into_cmd_callback (GtkAction *action,
gpointer data);
void buffers_paste_buffer_as_new_cmd_callback (GtkAction *action,
gpointer data);
void buffers_delete_buffer_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_cmd_callback (GtkAction *action,
gpointer data);
void buffers_delete_cmd_callback (GtkAction *action,
gpointer data);
#endif /* __BUFFERS_COMMANDS_H__ */
......@@ -110,8 +110,8 @@ data_open_as_image_cmd_callback (GtkAction *action,
}
void
data_new_data_cmd_callback (GtkAction *action,
gpointer user_data)
data_new_cmd_callback (GtkAction *action,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
......@@ -137,8 +137,8 @@ data_new_data_cmd_callback (GtkAction *action,
}
void
data_duplicate_data_cmd_callback (GtkAction *action,
gpointer user_data)
data_duplicate_cmd_callback (GtkAction *action,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
GimpContext *context;
......@@ -169,8 +169,8 @@ data_duplicate_data_cmd_callback (GtkAction *action,
}
void
data_delete_data_cmd_callback (GtkAction *action,
gpointer user_data)
data_delete_cmd_callback (GtkAction *action,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
GimpContext *context;
......@@ -219,8 +219,8 @@ data_delete_data_cmd_callback (GtkAction *action,
}
void
data_refresh_data_cmd_callback (GtkAction *action,
gpointer user_data)
data_refresh_cmd_callback (GtkAction *action,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
......@@ -229,9 +229,9 @@ data_refresh_data_cmd_callback (GtkAction *action,
}
void
data_edit_data_cmd_callback (GtkAction *action,
const gchar *value,
gpointer user_data)
data_edit_cmd_callback (GtkAction *action,
const gchar *value,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
GimpContext *context;
......
......@@ -20,19 +20,19 @@
#define __DATA_COMMANDS_H__
void data_open_as_image_cmd_callback (GtkAction *action,
gpointer data);
void data_new_data_cmd_callback (GtkAction *action,
gpointer data);
void data_duplicate_data_cmd_callback (GtkAction *action,
gpointer data);
void data_delete_data_cmd_callback (GtkAction *action,
gpointer data);
void data_refresh_data_cmd_callback (GtkAction *action,
gpointer data);
void data_edit_data_cmd_callback (GtkAction *action,
const gchar *value,
gpointer data);
void data_open_as_image_cmd_callback (GtkAction *action,
gpointer data);
void data_new_cmd_callback (GtkAction *action,
gpointer data);
void data_duplicate_cmd_callback (GtkAction *action,
gpointer data);
void data_delete_cmd_callback (GtkAction *action,
gpointer data);
void data_refresh_cmd_callback (GtkAction *action,
gpointer data);
void data_edit_cmd_callback (GtkAction *action,
const gchar *value,
gpointer data);
#endif /* __DATA_COMMANDS_H__ */
......@@ -45,13 +45,13 @@ static GimpActionEntry documents_actions[] =
{ "documents-open", GTK_STOCK_OPEN,
N_("_Open Image"), "",
N_("Open the selected entry"),
G_CALLBACK (documents_open_document_cmd_callback),
G_CALLBACK (documents_open_cmd_callback),
GIMP_HELP_DOCUMENT_OPEN },
{ "documents-raise-or-open", GTK_STOCK_OPEN,
N_("_Raise or Open Image"), "",
N_("Raise window if already open"),
G_CALLBACK (documents_raise_or_open_document_cmd_callback),
G_CALLBACK (documents_raise_or_open_cmd_callback),
GIMP_HELP_DOCUMENT_OPEN },
{ "documents-file-open-dialog", GTK_STOCK_OPEN,
......@@ -63,7 +63,7 @@ static GimpActionEntry documents_actions[] =
{ "documents-remove", GTK_STOCK_REMOVE,
N_("Remove _Entry"), "",
N_("Remove the selected entry"),
G_CALLBACK (documents_remove_document_cmd_callback),
G_CALLBACK (documents_remove_cmd_callback),
GIMP_HELP_DOCUMENT_REMOVE },
{ "documents-recreate-preview", GTK_STOCK_REFRESH,
......@@ -81,7 +81,7 @@ static GimpActionEntry documents_actions[] =
{ "documents-remove-dangling", GTK_STOCK_REFRESH,
N_("Remove Dangling E_ntries"), "",
N_("Remove dangling entries"),
G_CALLBACK (documents_delete_dangling_documents_cmd_callback),
G_CALLBACK (documents_remove_dangling_cmd_callback),
GIMP_HELP_DOCUMENT_REFRESH }
};
......
......@@ -69,8 +69,8 @@ static void documents_raise_display (gpointer data,
/* public functions */
void
documents_open_document_cmd_callback (GtkAction *action,
gpointer data)
documents_open_cmd_callback (GtkAction *action,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context;
......@@ -93,8 +93,8 @@ documents_open_document_cmd_callback (GtkAction *action,
}
void
documents_raise_or_open_document_cmd_callback (GtkAction *action,
gpointer data)
documents_raise_or_open_cmd_callback (GtkAction *action,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context;
......@@ -145,8 +145,8 @@ documents_file_open_dialog_cmd_callback (GtkAction *action,
}
void
documents_remove_document_cmd_callback (GtkAction *action,
gpointer data)
documents_remove_cmd_callback (GtkAction *action,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context;
......@@ -202,7 +202,7 @@ documents_reload_previews_cmd_callback (GtkAction *action,
}
static void
documents_delete_dangling_foreach (GimpImagefile *imagefile,
documents_remove_dangling_foreach (GimpImagefile *imagefile,
GimpContainer *container)
{
if (gimp_thumbnail_peek_image (imagefile->thumbnail) ==
......@@ -213,8 +213,8 @@ documents_delete_dangling_foreach (GimpImagefile *imagefile,
}
void
documents_delete_dangling_documents_cmd_callback (GtkAction *action,
gpointer data)
documents_remove_dangling_cmd_callback (GtkAction *action,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContainer *container;
......@@ -222,7 +222,7 @@ documents_delete_dangling_documents_cmd_callback (GtkAction *action,
container = gimp_container_view_get_container (editor->view);
gimp_container_foreach (container,
(GFunc) documents_delete_dangling_foreach,
(GFunc) documents_remove_dangling_foreach,
container);
}
......
......@@ -20,20 +20,20 @@
#define __DOCUMENTS_COMMANDS_H__
void documents_open_document_cmd_callback (GtkAction *action,
gpointer data);
void documents_raise_or_open_document_cmd_callback (GtkAction *action,
gpointer data);
void documents_file_open_dialog_cmd_callback (GtkAction *action,
gpointer data);
void documents_remove_document_cmd_callback (GtkAction *action,
gpointer data);
void documents_recreate_preview_cmd_callback (GtkAction *action,
gpointer data);
void documents_reload_previews_cmd_callback (GtkAction *action,
gpointer data);
void documents_delete_dangling_documents_cmd_callback (GtkAction *action,
gpointer data);
void documents_open_cmd_callback (GtkAction *action,
gpointer data);
void documents_raise_or_open_cmd_callback (GtkAction *action,
gpointer data);
void documents_file_open_dialog_cmd_callback (GtkAction *action,
gpointer data);
void documents_remove_cmd_callback (GtkAction *action,
gpointer data);
void documents_recreate_preview_cmd_callback (GtkAction *action,
gpointer data);
void documents_reload_previews_cmd_callback (GtkAction *action,
gpointer data);
void documents_remove_dangling_cmd_callback (GtkAction *action,
gpointer data);
#endif /* __DOCUMENTS_COMMANDS_H__ */
......@@ -47,13 +47,13 @@ static GimpActionEntry gradients_actions[] =
{ "gradients-new", GTK_STOCK_NEW,
N_("_New Gradient"), "",
N_("New gradient"),
G_CALLBACK (data_new_data_cmd_callback),
G_CALLBACK (data_new_cmd_callback),
GIMP_HELP_GRADIENT_NEW },
{ "gradients-duplicate", GIMP_STOCK_DUPLICATE,
N_("D_uplicate Gradient"), NULL,
N_("Duplicate gradient"),
G_CALLBACK (data_duplicate_data_cmd_callback),
G_CALLBACK (data_duplicate_cmd_callback),
GIMP_HELP_GRADIENT_DUPLICATE },
{ "gradients-save-as-pov", GTK_STOCK_SAVE_AS,
......@@ -65,13 +65,13 @@ static GimpActionEntry gradients_actions[] =
{ "gradients-delete", GTK_STOCK_DELETE,
N_("_Delete Gradient..."), "",
N_("Delete gradient"),
G_CALLBACK (data_delete_data_cmd_callback),
G_CALLBACK (data_delete_cmd_callback),
GIMP_HELP_GRADIENT_DELETE },
{ "gradients-refresh", GTK_STOCK_REFRESH,
N_("_Refresh Gradients"), "",
N_("Refresh gradients"),
G_CALLBACK (data_refresh_data_cmd_callback),
G_CALLBACK (data_refresh_cmd_callback),
GIMP_HELP_GRADIENT_REFRESH }
};
......@@ -95,7 +95,7 @@ gradients_actions_setup (GimpActionGroup *group)
gimp_action_group_add_string_actions (group,
gradients_edit_actions,
G_N_ELEMENTS (gradients_edit_actions),
G_CALLBACK (data_edit_data_cmd_callback));
G_CALLBACK (data_edit_cmd_callback));
}
void
......
......@@ -47,37 +47,37 @@ static GimpActionEntry palettes_actions[] =
{ "palettes-new", GTK_STOCK_NEW,
N_("_New Palette"), "",
N_("New palette"),
G_CALLBACK (data_new_data_cmd_callback),
G_CALLBACK (data_new_cmd_callback),
GIMP_HELP_PALETTE_NEW },
{ "palettes-import", GTK_STOCK_CONVERT,
N_("_Import Palette..."), "",
N_("Import palette"),
G_CALLBACK (palettes_import_palette_cmd_callback),
G_CALLBACK (palettes_import_cmd_callback),
GIMP_HELP_PALETTE_IMPORT },
{ "palettes-duplicate", GIMP_STOCK_DUPLICATE,
N_("D_uplicate Palette"), NULL,
N_("Duplicate palette"),
G_CALLBACK (data_duplicate_data_cmd_callback),
G_CALLBACK (data_duplicate_cmd_callback),
GIMP_HELP_PALETTE_DUPLICATE },
{ "palettes-merge", NULL,
N_("_Merge Palettes..."), NULL,
N_("Merge palettes"),
G_CALLBACK (palettes_merge_palettes_cmd_callback),
G_CALLBACK (palettes_merge_cmd_callback),
GIMP_HELP_PALETTE_MERGE },
{ "palettes-delete", GTK_STOCK_DELETE,
N_("_Delete Palette"), "",
N_("Delete palette"),
G_CALLBACK (data_delete_data_cmd_callback),
G_CALLBACK (data_delete_cmd_callback),
GIMP_HELP_PALETTE_DELETE },
{ "palettes-refresh", GTK_STOCK_REFRESH,
N_("_Refresh Palettes"), "",
N_("Refresh palettes"),
G_CALLBACK (data_refresh_data_cmd_callback),
G_CALLBACK (data_refresh_cmd_callback),
GIMP_HELP_PALETTE_REFRESH }
};
......@@ -101,7 +101,7 @@ palettes_actions_setup (GimpActionGroup *group)
gimp_action_group_add_string_actions (group,
palettes_edit_actions,
G_N_ELEMENTS (palettes_edit_actions),
G_CALLBACK (data_edit_data_cmd_callback));
G_CALLBACK (data_edit_cmd_callback));
}
void
......
......@@ -43,16 +43,16 @@
/* local function prototypes */
static void palettes_merge_palettes_callback (GtkWidget *widget,
const gchar *palette_name,
gpointer data);
static void palettes_merge_callback (GtkWidget *widget,
const gchar *palette_name,
gpointer data);
/* public functionss */
void
palettes_import_palette_cmd_callback (GtkAction *action,
gpointer data)
palettes_import_cmd_callback (GtkAction *action,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context;
......@@ -63,8 +63,8 @@ palettes_import_palette_cmd_callback (GtkAction *action,
}
void
palettes_merge_palettes_cmd_callback (GtkAction *action,
gpointer data)
palettes_merge_cmd_callback (GtkAction *action,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GtkWidget *dialog;
......@@ -76,7 +76,7 @@ palettes_merge_palettes_cmd_callback (GtkAction *action,
_("Enter a name for the merged palette"),
NULL,
G_OBJECT (editor), "destroy",
palettes_merge_palettes_callback,
palettes_merge_callback,
editor);
gtk_widget_show (dialog);
}
......@@ -85,12 +85,12 @@ palettes_merge_palettes_cmd_callback (GtkAction *action,
/* private functions */
static void
palettes_merge_palettes_callback (GtkWidget *widget,
const gchar *palette_name,
gpointer data)
palettes_merge_callback (GtkWidget *widget,
const gchar *palette_name,
gpointer data)
{
#ifdef __GNUC__
#warning FIXME: reimplement palettes_merge_palettes_callback()
#warning FIXME: reimplement palettes_merge_callback()
#endif
#if 0
GimpContainerEditor *editor;
......
......@@ -20,10 +20,10 @@
#define __PALETTES_COMMANDS_H__
void palettes_import_palette_cmd_callback (GtkAction *action,
gpointer data);
void palettes_merge_palettes_cmd_callback (GtkAction *action,
gpointer data);
void palettes_import_cmd_callback (GtkAction *action,
gpointer data);
void palettes_merge_cmd_callback (GtkAction *action,
gpointer data);
#endif /* __PALETTES_COMMANDS_H__ */
......@@ -52,25 +52,25 @@ static GimpActionEntry patterns_actions[] =
{ "patterns-new", GTK_STOCK_NEW,
N_("_New Pattern"), "",
N_("New pattern"),
G_CALLBACK (data_new_data_cmd_callback),
G_CALLBACK (data_new_cmd_callback),
GIMP_HELP_PATTERN_NEW },
{ "patterns-duplicate", GIMP_STOCK_DUPLICATE,
N_("D_uplicate Pattern"), NULL,
N_("Duplicate pattern"),
G_CALLBACK (data_duplicate_data_cmd_callback),
G_CALLBACK (data_duplicate_cmd_callback),
GIMP_HELP_PATTERN_DUPLICATE },
{ "patterns-delete", GTK_STOCK_DELETE,
N_("_Delete Pattern..."), "",
N_("Delete pattern"),
G_CALLBACK (data_delete_data_cmd_callback),
G_CALLBACK (data_delete_cmd_callback),
GIMP_HELP_PATTERN_DELETE },
{ "patterns-refresh", GTK_STOCK_REFRESH,
N_("_Refresh Patterns"), "",
N_("Refresh patterns"),
G_CALLBACK (data_refresh_data_cmd_callback),
G_CALLBACK (data_refresh_cmd_callback),
GIMP_HELP_PATTERN_REFRESH }
};
......@@ -94,7 +94,7 @@ patterns_actions_setup (GimpActionGroup *group)
gimp_action_group_add_string_actions (group,
patterns_edit_actions,
G_N_ELEMENTS (patterns_edit_actions),
G_CALLBACK (data_edit_data_cmd_callback));
G_CALLBACK (data_edit_cmd_callback));
}
void
......
......@@ -51,25 +51,25 @@ static GimpActionEntry templates_actions[] =
{ "templates-new", GTK_STOCK_NEW,
N_("_New Template..."), "",
N_("Create a new template"),
G_CALLBACK (templates_new_template_cmd_callback),
G_CALLBACK (templates_new_cmd_callback),
GIMP_HELP_TEMPLATE_NEW },
{ "templates-duplicate", GIMP_STOCK_DUPLICATE,
N_("D_uplicate Template..."), "",
N_("Duplicate the selected template"),
G_CALLBACK (templates_duplicate_template_cmd_callback),
G_CALLBACK (templates_duplicate_cmd_callback),
GIMP_HELP_TEMPLATE_DUPLICATE },
{ "templates-edit", GIMP_STOCK_EDIT,
N_("_Edit Template..."), "",
N_("Edit the selected template"),
G_CALLBACK (templates_edit_template_cmd_callback),
G_CALLBACK (templates_edit_cmd_callback),
GIMP_HELP_TEMPLATE_EDIT },
{ "templates-delete", GTK_STOCK_DELETE,
N_("_Delete Template"), "",
N_("Delete the selected template"),
G_CALLBACK (templates_delete_template_cmd_callback),
G_CALLBACK (templates_delete_cmd_callback),
GIMP_HELP_TEMPLATE_DELETE }
};
......
......@@ -61,15 +61,15 @@ struct _TemplateDeleteData
/* local function prototypes */
static void templates_new_template_response (GtkWidget *dialog,
gint response_id,
TemplateOptionsDialog *options);