diff --git a/ChangeLog b/ChangeLog index e69d9c0729..3c8e4101cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,33 @@ +2004-04-21 Michael Natterer + + * app/actions/qmask-actions.c + * app/actions/qmask-commands.c: prepared qmask_actions_update() + and the qmask callbacks to be merged into the image ui manager. + + * app/actions/dialogs-actions.c + * app/actions/edit-actions.c + * app/actions/file-actions.c + * app/actions/image-actions.c + * app/actions/layers-actions.c + * app/actions/plug-in-actions.c + * app/actions/tools-actions.c + * app/actions/view-actions.c: fixed lots of typos and buglets + spotted in my first test run. + + * app/gui/menus.c: register the needed action groups with the + menu. + + * app/tools/gimp-tools.c + * app/tools/gimpdodgeburntool.[ch] + * app/tools/gimppaintoptions-gui.c: s/dodgeburn/dodge_burn/g. + + * app/widgets/gimpactionfactory.c + * app/widgets/gimpmenufactory.[ch]: s/G_GNUC_FUNCTION/G_STRFUNC/g, + updated copyright header. + + * menus/image-menu.xml: fixed typos and added the "Filters" + submenus. + 2004-04-21 Michael Natterer More unused action stuff: diff --git a/app/actions/dialogs-actions.c b/app/actions/dialogs-actions.c index 213cbd5de5..e2dada9e1a 100644 --- a/app/actions/dialogs-actions.c +++ b/app/actions/dialogs-actions.c @@ -104,7 +104,7 @@ GimpStringActionEntry dialogs_dockable_actions[] = "gimp-selection-editor", GIMP_HELP_SELECTION_DIALOG }, - { "dialogs-navigations", GIMP_STOCK_NAVIGATION, + { "dialogs-navigation", GIMP_STOCK_NAVIGATION, N_("Na_vigation"), NULL, NULL, "gimp-navigation-view", GIMP_HELP_NAVIGATION_DIALOG }, diff --git a/app/actions/edit-actions.c b/app/actions/edit-actions.c index 78f2ff4805..e1d63f75a4 100644 --- a/app/actions/edit-actions.c +++ b/app/actions/edit-actions.c @@ -61,8 +61,8 @@ static void edit_actions_background_changed (GimpContext *context, static GimpActionEntry edit_actions[] = { - { "edit-menu", NULL, - N_("/_Edit") }, + { "edit-menu", NULL, N_("_Edit") }, + { "edit-buffer-menu", NULL, N_("Buffer") }, { "edit-undo", GTK_STOCK_UNDO, N_("_Undo"), "Z", NULL, @@ -99,20 +99,17 @@ static GimpActionEntry edit_actions[] = G_CALLBACK (edit_paste_as_new_cmd_callback), GIMP_HELP_EDIT_PASTE_AS_NEW }, - { "edit-buffer-menu", NULL, - N_("Buffer") }, - - { "edit-cut-named", GTK_STOCK_CUT, + { "edit-named-cut", GTK_STOCK_CUT, N_("Cu_t Named..."), "X",NULL, G_CALLBACK (edit_named_cut_cmd_callback), GIMP_HELP_BUFFER_CUT }, - { "edit-copy-named", GTK_STOCK_COPY, + { "edit-named-copy", GTK_STOCK_COPY, N_("_Copy Named..."), "C", NULL, G_CALLBACK (edit_named_copy_cmd_callback), GIMP_HELP_BUFFER_COPY }, - { "edit-paste-named", GTK_STOCK_PASTE, + { "edit-named-paste", GTK_STOCK_PASTE, N_("_Paste Named..."), "V", NULL, G_CALLBACK (edit_named_paste_cmd_callback), GIMP_HELP_BUFFER_PASTE }, @@ -259,8 +256,8 @@ edit_actions_update (GimpActionGroup *group, SET_SENSITIVE ("edit-paste", gdisp && group->gimp->global_buffer); SET_SENSITIVE ("edit-paste-into", gdisp && group->gimp->global_buffer); - SET_SENSITIVE ("edit-cut-named", drawable); - SET_SENSITIVE ("edit-copy-named", drawable); + SET_SENSITIVE ("edit-named-cut", drawable); + SET_SENSITIVE ("edit-named-paste", drawable); SET_SENSITIVE ("edit-clear", drawable); SET_SENSITIVE ("edit-fill-fg", drawable); diff --git a/app/actions/file-actions.c b/app/actions/file-actions.c index 3cab9add93..72780d3db5 100644 --- a/app/actions/file-actions.c +++ b/app/actions/file-actions.c @@ -57,14 +57,10 @@ static void file_actions_last_opened_reorder (GimpContainer *container, static GimpActionEntry file_actions[] = { - { "file-menu", NULL, - N_("_File") }, - - { "file-open-recent-menu", NULL, - N_("Open _Recent") }, - - { "file-open-recent-empty", NULL, - N_("(Empty)") }, + { "file-menu", NULL, N_("_File") }, + { "file-open-recent-menu", NULL, N_("Open _Recent") }, + { "file-open-recent-empty", NULL, N_("(Empty)") }, + { "file-acquire-menu", NULL, N_("_Acquire") }, { "file-new", GTK_STOCK_NEW, N_("_New..."), "N", NULL, @@ -132,7 +128,7 @@ file_actions_setup (GimpActionGroup *group, for (i = 0; i < n_entries; i++) { - entries[i].name = g_strdup_printf ("file-last-opened-%02d", i + 1); + entries[i].name = g_strdup_printf ("file-open-recent-%02d", i + 1); entries[i].stock_id = GTK_STOCK_OPEN; entries[i].label = NULL; entries[i].tooltip = NULL; diff --git a/app/actions/image-actions.c b/app/actions/image-actions.c index 7520d4f838..463b87c309 100644 --- a/app/actions/image-actions.c +++ b/app/actions/image-actions.c @@ -45,11 +45,10 @@ static GimpActionEntry image_actions[] = { - { "image-menu", NULL, - N_("/_Image") }, - - { "image-mode-menu", NULL, - N_("/_Mode") }, + { "image-menubar", NULL, N_("Image Menu") }, + { "image-menu", NULL, N_("_Image") }, + { "image-mode-menu", NULL, N_("_Mode") }, + { "image-transform-menu", NULL, N_("_Transform") }, { "image-convert-rgb", GIMP_STOCK_CONVERT_RGB, N_("_RGB"), NULL, NULL, @@ -66,9 +65,6 @@ static GimpActionEntry image_actions[] = G_CALLBACK (image_convert_indexed_cmd_callback), GIMP_HELP_IMAGE_CONVERT_INDEXED }, - { "image-transform-menu", NULL, - N_("/Image/_Transform") }, - { "image-resize", GIMP_STOCK_RESIZE, N_("Can_vas Size..."), NULL, NULL, G_CALLBACK (image_resize_cmd_callback), diff --git a/app/actions/layers-actions.c b/app/actions/layers-actions.c index 352e632d94..81bb1e9079 100644 --- a/app/actions/layers-actions.c +++ b/app/actions/layers-actions.c @@ -106,7 +106,7 @@ static GimpActionEntry layers_actions[] = G_CALLBACK (layers_select_next_cmd_callback), GIMP_HELP_LAYER_NEXT }, - { "layer-select-bottom", NULL, + { "layers-select-bottom", NULL, N_("Select _Bottom Layer"), "End", NULL, G_CALLBACK (layers_select_bottom_cmd_callback), GIMP_HELP_LAYER_BOTTOM }, @@ -171,6 +171,11 @@ static GimpActionEntry layers_actions[] = G_CALLBACK (layers_scale_cmd_callback), GIMP_HELP_LAYER_SCALE }, + { "layers-crop", GIMP_STOCK_TOOL_CROP, + N_("Cr_op Layer"), NULL, NULL, + G_CALLBACK (layers_crop_cmd_callback), + GIMP_HELP_LAYER_CROP }, + { "layers-mask-add", GIMP_STOCK_LAYER_MASK, N_("Add La_yer Mask..."), NULL, NULL, G_CALLBACK (layers_mask_add_cmd_callback), @@ -199,7 +204,7 @@ static GimpEnumActionEntry layers_mask_to_selection_actions[] = GIMP_CHANNEL_OP_REPLACE, GIMP_HELP_LAYER_MASK_SELECTION_REPLACE }, - { "layer-mask-selection-add", GIMP_STOCK_SELECTION_ADD, + { "layers-mask-selection-add", GIMP_STOCK_SELECTION_ADD, N_("_Add to Selection"), NULL, NULL, GIMP_CHANNEL_OP_ADD, GIMP_HELP_LAYER_MASK_SELECTION_ADD }, @@ -232,7 +237,7 @@ static GimpEnumActionEntry layers_alpha_to_selection_actions[] = GIMP_CHANNEL_OP_SUBTRACT, GIMP_HELP_LAYER_ALPHA_SELECTION_SUBTRACT }, - { "layer-alpha-selection-intersect", GIMP_STOCK_SELECTION_INTERSECT, + { "layers-alpha-selection-intersect", GIMP_STOCK_SELECTION_INTERSECT, N_("_Intersect with Selection"), NULL, NULL, GIMP_CHANNEL_OP_INTERSECT, GIMP_HELP_LAYER_ALPHA_SELECTION_INTERSECT } diff --git a/app/actions/plug-in-actions.c b/app/actions/plug-in-actions.c index c0ee4e623c..c2d73f6e83 100644 --- a/app/actions/plug-in-actions.c +++ b/app/actions/plug-in-actions.c @@ -64,12 +64,12 @@ static gboolean plug_in_actions_tree_traverse_func (gpointer foo, static GimpActionEntry plug_in_actions[] = { - { "plug-in-menu", NULL, N_("/Filte_rs") }, + { "plug-in-menu", NULL, N_("Filte_rs") }, { "plug-in-blur-menu", NULL, N_("_Blur") }, { "plug-in-colors-menu", NULL, N_("_Colors") }, { "plug-in-colors-map-menu", NULL, N_("Ma_p") }, { "plug-in-noise-menu", NULL, N_("_Noise") }, - { "pluf-in-edge-detect-menu", NULL, N_("Edge-De_tect") }, + { "plug-in-edge-detect-menu", NULL, N_("Edge-De_tect") }, { "plug-in-enhance-menu", NULL, N_("En_hance") }, { "plug-in-generic-menu", NULL, N_("_Generic") }, { "plug-in-glass-effects-menu", NULL, N_("Gla_ss Effects") }, diff --git a/app/actions/qmask-actions.c b/app/actions/qmask-actions.c index 7a202525d4..59addb0c21 100644 --- a/app/actions/qmask-actions.c +++ b/app/actions/qmask-actions.c @@ -95,23 +95,37 @@ void qmask_actions_update (GimpActionGroup *group, gpointer data) { - GimpDisplayShell *shell; + GimpDisplay *gdisp = NULL; + GimpDisplayShell *shell = NULL; + GimpImage *gimage = NULL; - shell = GIMP_DISPLAY_SHELL (data); + if (GIMP_IS_DISPLAY_SHELL (data)) + { + shell = GIMP_DISPLAY_SHELL (data); + gdisp = shell->gdisp; + } + else if (GIMP_IS_DISPLAY (data)) + { + gdisp = GIMP_DISPLAY (data); + shell = GIMP_DISPLAY_SHELL (gdisp->shell); + } + + if (gdisp) + gimage = gdisp->gimage; #define SET_ACTIVE(action,active) \ gimp_action_group_set_action_active (group, action, (active)) #define SET_COLOR(action,color) \ gimp_action_group_set_action_color (group, action, (color), FALSE) - SET_ACTIVE ("qmask-toggle", shell->gdisp->gimage->qmask_state); + SET_ACTIVE ("qmask-toggle", gimage->qmask_state); - if (shell->gdisp->gimage->qmask_inverted) + if (gimage->qmask_inverted) SET_ACTIVE ("qmask-invert-on", TRUE); else SET_ACTIVE ("qmask-invert-off", TRUE); - SET_COLOR ("qmask-configure", &shell->gdisp->gimage->qmask_color); + SET_COLOR ("qmask-configure", &gimage->qmask_color); #undef SET_SENSITIVE #undef SET_COLOR diff --git a/app/actions/qmask-commands.c b/app/actions/qmask-commands.c index 62dc67ccfa..fdb421b4a8 100644 --- a/app/actions/qmask-commands.c +++ b/app/actions/qmask-commands.c @@ -27,10 +27,12 @@ #include "core/gimp.h" #include "core/gimpchannel.h" +#include "core/gimpcontext.h" #include "core/gimpimage.h" #include "core/gimpimage-qmask.h" #include "widgets/gimpcolorpanel.h" +#include "widgets/gimpdock.h" #include "widgets/gimphelp-ids.h" #include "widgets/gimpviewabledialog.h" @@ -54,6 +56,35 @@ struct _EditQmaskOptions }; +#define return_if_no_display(gdisp,data) \ + if (GIMP_IS_DISPLAY (data)) \ + gdisp = data; \ + else if (GIMP_IS_DISPLAY_SHELL (data)) \ + gdisp = ((GimpDisplayShell *) data)->gdisp; \ + else if (GIMP_IS_GIMP (data)) \ + gdisp = gimp_context_get_display (gimp_get_user_context (GIMP (data))); \ + else if (GIMP_IS_DOCK (data)) \ + gdisp = gimp_context_get_display (((GimpDock *) data)->context); \ + else \ + gdisp = NULL; \ + if (! gdisp) \ + return + +#define return_if_no_image(gimage,data) \ + if (GIMP_IS_DISPLAY (data)) \ + gimage = ((GimpDisplay *) data)->gimage; \ + else if (GIMP_IS_DISPLAY_SHELL (data)) \ + gimage = ((GimpDisplayShell *) data)->gdisp->gimage; \ + else if (GIMP_IS_GIMP (data)) \ + gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \ + else if (GIMP_IS_DOCK (data)) \ + gimage = gimp_context_get_image (((GimpDock *) data)->context); \ + else \ + gimage = NULL; \ + if (! gimage) \ + return + + /* local function prototypes */ static void qmask_channel_query (GimpDisplayShell *shell); @@ -72,15 +103,14 @@ void qmask_toggle_cmd_callback (GtkWidget *widget, gpointer data) { - GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (data); + GimpImage *gimage; + return_if_no_image (gimage, data); if (GTK_CHECK_MENU_ITEM (widget)->active != - gimp_image_get_qmask_state (shell->gdisp->gimage)) + gimp_image_get_qmask_state (gimage)) { - gimp_image_set_qmask_state (shell->gdisp->gimage, - GTK_CHECK_MENU_ITEM (widget)->active); - - gimp_image_flush (shell->gdisp->gimage); + gimp_image_set_qmask_state (gimage, GTK_CHECK_MENU_ITEM (widget)->active); + gimp_image_flush (gimage); } } @@ -89,16 +119,17 @@ qmask_invert_cmd_callback (GtkWidget *widget, gpointer data, guint action) { - GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (data); + GimpImage *gimage; + return_if_no_image (gimage, data); if (GTK_CHECK_MENU_ITEM (widget)->active) { - if (action != shell->gdisp->gimage->qmask_inverted) + if (action != gimage->qmask_inverted) { - gimp_image_qmask_invert (shell->gdisp->gimage); + gimp_image_qmask_invert (gimage); - if (gimp_image_get_qmask_state (shell->gdisp->gimage)) - gimp_image_flush (shell->gdisp->gimage); + if (gimp_image_get_qmask_state (gimage)) + gimp_image_flush (gimage); } } } @@ -107,9 +138,10 @@ void qmask_configure_cmd_callback (GtkWidget *widget, gpointer data) { - GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (data); + GimpDisplay *gdisp; + return_if_no_display (gdisp, data); - qmask_channel_query (shell); + qmask_channel_query (GIMP_DISPLAY_SHELL (gdisp->shell)); } diff --git a/app/actions/quick-mask-actions.c b/app/actions/quick-mask-actions.c index 7a202525d4..59addb0c21 100644 --- a/app/actions/quick-mask-actions.c +++ b/app/actions/quick-mask-actions.c @@ -95,23 +95,37 @@ void qmask_actions_update (GimpActionGroup *group, gpointer data) { - GimpDisplayShell *shell; + GimpDisplay *gdisp = NULL; + GimpDisplayShell *shell = NULL; + GimpImage *gimage = NULL; - shell = GIMP_DISPLAY_SHELL (data); + if (GIMP_IS_DISPLAY_SHELL (data)) + { + shell = GIMP_DISPLAY_SHELL (data); + gdisp = shell->gdisp; + } + else if (GIMP_IS_DISPLAY (data)) + { + gdisp = GIMP_DISPLAY (data); + shell = GIMP_DISPLAY_SHELL (gdisp->shell); + } + + if (gdisp) + gimage = gdisp->gimage; #define SET_ACTIVE(action,active) \ gimp_action_group_set_action_active (group, action, (active)) #define SET_COLOR(action,color) \ gimp_action_group_set_action_color (group, action, (color), FALSE) - SET_ACTIVE ("qmask-toggle", shell->gdisp->gimage->qmask_state); + SET_ACTIVE ("qmask-toggle", gimage->qmask_state); - if (shell->gdisp->gimage->qmask_inverted) + if (gimage->qmask_inverted) SET_ACTIVE ("qmask-invert-on", TRUE); else SET_ACTIVE ("qmask-invert-off", TRUE); - SET_COLOR ("qmask-configure", &shell->gdisp->gimage->qmask_color); + SET_COLOR ("qmask-configure", &gimage->qmask_color); #undef SET_SENSITIVE #undef SET_COLOR diff --git a/app/actions/quick-mask-commands.c b/app/actions/quick-mask-commands.c index 62dc67ccfa..fdb421b4a8 100644 --- a/app/actions/quick-mask-commands.c +++ b/app/actions/quick-mask-commands.c @@ -27,10 +27,12 @@ #include "core/gimp.h" #include "core/gimpchannel.h" +#include "core/gimpcontext.h" #include "core/gimpimage.h" #include "core/gimpimage-qmask.h" #include "widgets/gimpcolorpanel.h" +#include "widgets/gimpdock.h" #include "widgets/gimphelp-ids.h" #include "widgets/gimpviewabledialog.h" @@ -54,6 +56,35 @@ struct _EditQmaskOptions }; +#define return_if_no_display(gdisp,data) \ + if (GIMP_IS_DISPLAY (data)) \ + gdisp = data; \ + else if (GIMP_IS_DISPLAY_SHELL (data)) \ + gdisp = ((GimpDisplayShell *) data)->gdisp; \ + else if (GIMP_IS_GIMP (data)) \ + gdisp = gimp_context_get_display (gimp_get_user_context (GIMP (data))); \ + else if (GIMP_IS_DOCK (data)) \ + gdisp = gimp_context_get_display (((GimpDock *) data)->context); \ + else \ + gdisp = NULL; \ + if (! gdisp) \ + return + +#define return_if_no_image(gimage,data) \ + if (GIMP_IS_DISPLAY (data)) \ + gimage = ((GimpDisplay *) data)->gimage; \ + else if (GIMP_IS_DISPLAY_SHELL (data)) \ + gimage = ((GimpDisplayShell *) data)->gdisp->gimage; \ + else if (GIMP_IS_GIMP (data)) \ + gimage = gimp_context_get_image (gimp_get_user_context (GIMP (data))); \ + else if (GIMP_IS_DOCK (data)) \ + gimage = gimp_context_get_image (((GimpDock *) data)->context); \ + else \ + gimage = NULL; \ + if (! gimage) \ + return + + /* local function prototypes */ static void qmask_channel_query (GimpDisplayShell *shell); @@ -72,15 +103,14 @@ void qmask_toggle_cmd_callback (GtkWidget *widget, gpointer data) { - GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (data); + GimpImage *gimage; + return_if_no_image (gimage, data); if (GTK_CHECK_MENU_ITEM (widget)->active != - gimp_image_get_qmask_state (shell->gdisp->gimage)) + gimp_image_get_qmask_state (gimage)) { - gimp_image_set_qmask_state (shell->gdisp->gimage, - GTK_CHECK_MENU_ITEM (widget)->active); - - gimp_image_flush (shell->gdisp->gimage); + gimp_image_set_qmask_state (gimage, GTK_CHECK_MENU_ITEM (widget)->active); + gimp_image_flush (gimage); } } @@ -89,16 +119,17 @@ qmask_invert_cmd_callback (GtkWidget *widget, gpointer data, guint action) { - GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (data); + GimpImage *gimage; + return_if_no_image (gimage, data); if (GTK_CHECK_MENU_ITEM (widget)->active) { - if (action != shell->gdisp->gimage->qmask_inverted) + if (action != gimage->qmask_inverted) { - gimp_image_qmask_invert (shell->gdisp->gimage); + gimp_image_qmask_invert (gimage); - if (gimp_image_get_qmask_state (shell->gdisp->gimage)) - gimp_image_flush (shell->gdisp->gimage); + if (gimp_image_get_qmask_state (gimage)) + gimp_image_flush (gimage); } } } @@ -107,9 +138,10 @@ void qmask_configure_cmd_callback (GtkWidget *widget, gpointer data) { - GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (data); + GimpDisplay *gdisp; + return_if_no_display (gdisp, data); - qmask_channel_query (shell); + qmask_channel_query (GIMP_DISPLAY_SHELL (gdisp->shell)); } diff --git a/app/actions/tools-actions.c b/app/actions/tools-actions.c index 44d07c4bfa..eb2e7fa5a5 100644 --- a/app/actions/tools-actions.c +++ b/app/actions/tools-actions.c @@ -18,6 +18,8 @@ #include "config.h" +#include + #include #include "libgimpwidgets/gimpwidgets.h" @@ -39,20 +41,11 @@ static GimpActionEntry tools_actions[] = { - { "tools-menu", NULL, - N_("_Tools") }, - - { "tools-select-menu", NULL, - N_("_Selection Tools") }, - - { "tools-paint-menu", NULL, - N_("_Paint Tools") }, - - { "tools-transform-menu", NULL, - N_("/Tools/_Transform Tools") }, - - { "tools-color-menu", NULL, - N_("_Color Tools") }, + { "tools-menu", NULL, N_("_Tools") }, + { "tools-select-menu", NULL, N_("_Selection Tools") }, + { "tools-paint-menu", NULL, N_("_Paint Tools") }, + { "tools-transform-menu", NULL, N_("_Transform Tools") }, + { "tools-color-menu", NULL, N_("_Color Tools") }, { "tools-default-colors", GIMP_STOCK_DEFAULT_COLORS, N_("_Default Colors"), "D", NULL, @@ -88,11 +81,18 @@ tools_actions_setup (GimpActionGroup *group, GimpStringActionEntry entry; const gchar *stock_id; const gchar *identifier; + gchar *tmp; + gchar *name; stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info)); identifier = gimp_object_get_name (GIMP_OBJECT (tool_info)); - entry.name = identifier; /* FIXME */ + tmp = g_strndup (identifier + strlen ("gimp-"), + strlen (identifier) - strlen ("gimp--tool")); + name = g_strdup_printf ("tools-%s", tmp); + g_free (tmp); + + entry.name = name; entry.stock_id = stock_id; entry.label = tool_info->menu_path; entry.accelerator = tool_info->menu_accel; @@ -103,6 +103,8 @@ tools_actions_setup (GimpActionGroup *group, &entry, 1, G_CALLBACK (tools_select_cmd_callback), data); + + g_free (name); } } } diff --git a/app/actions/view-actions.c b/app/actions/view-actions.c index 9ebcda0b63..da1797d7e1 100644 --- a/app/actions/view-actions.c +++ b/app/actions/view-actions.c @@ -53,11 +53,8 @@ static void view_actions_set_zoom (GimpActionGroup *group, static GimpActionEntry view_actions[] = { - { "view-menu", NULL, - N_("/_View") }, - - { "view-zoom-menu", NULL, - N_("_Zoom") }, + { "view-menu", NULL, N_("_View") }, + { "view-zoom-menu", NULL, N_("_Zoom") }, { "view-new", GTK_STOCK_NEW, N_("_New View"), "", NULL, @@ -131,7 +128,7 @@ static GimpToggleActionEntry view_toggle_actions[] = TRUE, GIMP_HELP_VIEW_SHOW_GUIDES }, - { "view-snap-to-giudes", NULL, + { "view-snap-to-guides", NULL, N_("Sn_ap to Guides"), NULL, NULL, G_CALLBACK (view_snap_to_guides_cmd_callback), TRUE, diff --git a/app/gui/menus.c b/app/gui/menus.c index 6ed4c7df5d..8fa038cb45 100644 --- a/app/gui/menus.c +++ b/app/gui/menus.c @@ -126,6 +126,10 @@ menus_init (Gimp *gimp) image_menu_setup, image_menu_update, FALSE, n_image_menu_entries, image_menu_entries); + gimp_menu_factory_manager_register (global_menu_factory, "", + "file", "edit", "select", "view", + "image", "drawable", "layers", "vectors", + "tools", "dialogs", "plug-in", NULL); gimp_menu_factory_menu_register (global_menu_factory, "", _("Open Menu"), diff --git a/app/menus/menus.c b/app/menus/menus.c index 6ed4c7df5d..8fa038cb45 100644 --- a/app/menus/menus.c +++ b/app/menus/menus.c @@ -126,6 +126,10 @@ menus_init (Gimp *gimp) image_menu_setup, image_menu_update, FALSE, n_image_menu_entries, image_menu_entries); + gimp_menu_factory_manager_register (global_menu_factory, "", + "file", "edit", "select", "view", + "image", "drawable", "layers", "vectors", + "tools", "dialogs", "plug-in", NULL); gimp_menu_factory_menu_register (global_menu_factory, "", _("Open Menu"), diff --git a/app/tools/gimp-tools.c b/app/tools/gimp-tools.c index 18d75989dd..a22520da31 100644 --- a/app/tools/gimp-tools.c +++ b/app/tools/gimp-tools.c @@ -114,7 +114,7 @@ gimp_tools_init (Gimp *gimp) /* paint tools */ - gimp_dodgeburn_tool_register, + gimp_dodge_burn_tool_register, gimp_smudge_tool_register, gimp_convolve_tool_register, gimp_clone_tool_register, @@ -343,7 +343,7 @@ gimp_tools_register (GType tool_type, { paint_core_name = "GimpSmudge"; } - else if (tool_type == GIMP_TYPE_DODGEBURN_TOOL) + else if (tool_type == GIMP_TYPE_DODGE_BURN_TOOL) { paint_core_name = "GimpDodgeBurn"; } diff --git a/app/tools/gimpdodgeburntool.c b/app/tools/gimpdodgeburntool.c index 706a2f5b10..1d2e84af6e 100644 --- a/app/tools/gimpdodgeburntool.c +++ b/app/tools/gimpdodgeburntool.c @@ -39,18 +39,18 @@ #include "gimp-intl.h" -static void gimp_dodgeburn_tool_class_init (GimpDodgeBurnToolClass *klass); -static void gimp_dodgeburn_tool_init (GimpDodgeBurnTool *dodgeburn); +static void gimp_dodge_burn_tool_class_init (GimpDodgeBurnToolClass *klass); +static void gimp_dodge_burn_tool_init (GimpDodgeBurnTool *dodgeburn); -static void gimp_dodgeburn_tool_modifier_key (GimpTool *tool, - GdkModifierType key, - gboolean press, - GdkModifierType state, - GimpDisplay *gdisp); -static void gimp_dodgeburn_tool_cursor_update (GimpTool *tool, - GimpCoords *coords, - GdkModifierType state, - GimpDisplay *gdisp); +static void gimp_dodge_burn_tool_modifier_key (GimpTool *tool, + GdkModifierType key, + gboolean press, + GdkModifierType state, + GimpDisplay *gdisp); +static void gimp_dodge_burn_tool_cursor_update (GimpTool *tool, + GimpCoords *coords, + GdkModifierType state, + GimpDisplay *gdisp); static GtkWidget * gimp_dodge_burn_options_gui (GimpToolOptions *tool_options); @@ -59,14 +59,14 @@ static GimpPaintToolClass *parent_class = NULL; void -gimp_dodgeburn_tool_register (GimpToolRegisterCallback callback, - gpointer data) +gimp_dodge_burn_tool_register (GimpToolRegisterCallback callback, + gpointer data) { - (* callback) (GIMP_TYPE_DODGEBURN_TOOL, + (* callback) (GIMP_TYPE_DODGE_BURN_TOOL, GIMP_TYPE_DODGE_BURN_OPTIONS, gimp_dodge_burn_options_gui, GIMP_PAINT_OPTIONS_CONTEXT_MASK, - "gimp-dodgeburn-tool", + "gimp-dodge-burn-tool", _("Dodge/Burn"), _("Dodge or Burn strokes"), N_("/Tools/Paint Tools/Dod_geBurn"), "D", @@ -76,7 +76,7 @@ gimp_dodgeburn_tool_register (GimpToolRegisterCallback callback, } GType -gimp_dodgeburn_tool_get_type (void) +gimp_dodge_burn_tool_get_type (void) { static GType tool_type = 0; @@ -87,12 +87,12 @@ gimp_dodgeburn_tool_get_type (void) sizeof (GimpDodgeBurnToolClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) gimp_dodgeburn_tool_class_init, + (GClassInitFunc) gimp_dodge_burn_tool_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (GimpDodgeBurnTool), 0, /* n_preallocs */ - (GInstanceInitFunc) gimp_dodgeburn_tool_init, + (GInstanceInitFunc) gimp_dodge_burn_tool_init, }; tool_type = g_type_register_static (GIMP_TYPE_PAINT_TOOL, @@ -104,7 +104,7 @@ gimp_dodgeburn_tool_get_type (void) } static void -gimp_dodgeburn_tool_class_init (GimpDodgeBurnToolClass *klass) +gimp_dodge_burn_tool_class_init (GimpDodgeBurnToolClass *klass) { GimpToolClass *tool_class; @@ -112,12 +112,12 @@ gimp_dodgeburn_tool_class_init (GimpDodgeBurnToolClass *klass) parent_class = g_type_class_peek_parent (klass); - tool_class->modifier_key = gimp_dodgeburn_tool_modifier_key; - tool_class->cursor_update = gimp_dodgeburn_tool_cursor_update; + tool_class->modifier_key = gimp_dodge_burn_tool_modifier_key; + tool_class->cursor_update = gimp_dodge_burn_tool_cursor_update; } static void -gimp_dodgeburn_tool_init (GimpDodgeBurnTool *dodgeburn) +gimp_dodge_burn_tool_init (GimpDodgeBurnTool *dodgeburn) { GimpTool *tool; GimpPaintTool *paint_tool; @@ -132,11 +132,11 @@ gimp_dodgeburn_tool_init (GimpDodgeBurnTool *dodgeburn) } static void -gimp_dodgeburn_tool_modifier_key (GimpTool *tool, - GdkModifierType key, - gboolean press, - GdkModifierType state, - GimpDisplay *gdisp) +gimp_dodge_burn_tool_modifier_key (GimpTool *tool, + GdkModifierType key, + gboolean press, + GdkModifierType state, + GimpDisplay *gdisp) { GimpDodgeBurnOptions *options; @@ -164,10 +164,10 @@ gimp_dodgeburn_tool_modifier_key (GimpTool *tool, } static void -gimp_dodgeburn_tool_cursor_update (GimpTool *tool, - GimpCoords *coords, - GdkModifierType state, - GimpDisplay *gdisp) +gimp_dodge_burn_tool_cursor_update (GimpTool *tool, + GimpCoords *coords, + GdkModifierType state, + GimpDisplay *gdisp) { GimpDodgeBurnOptions *options; diff --git a/app/tools/gimpdodgeburntool.h b/app/tools/gimpdodgeburntool.h index 2dcd996c85..759e017b5e 100644 --- a/app/tools/gimpdodgeburntool.h +++ b/app/tools/gimpdodgeburntool.h @@ -23,11 +23,11 @@ #include "gimppainttool.h" -#define GIMP_TYPE_DODGEBURN_TOOL (gimp_dodgeburn_tool_get_type ()) -#define GIMP_DODGEBURN_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DODGEBURN_TOOL, GimpDodgeBurnTool)) -#define GIMP_IS_DODGEBURN_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DODGEBURN_TOOL)) -#define GIMP_DODGEBURN_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DODGEBURN_TOOL, GimpDodgeBurnToolClass)) -#define GIMP_IS_DODGEBURN_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DODGEBURN_TOOL)) +#define GIMP_TYPE_DODGE_BURN_TOOL (gimp_dodge_burn_tool_get_type ()) +#define GIMP_DODGE_BURN_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DODGE_BURN_TOOL, GimpDodgeBurnTool)) +#define GIMP_IS_DODGE_BURN_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DODGE_BURN_TOOL)) +#define GIMP_DODGE_BURN_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DODGE_BURN_TOOL, GimpDodgeBurnToolClass)) +#define GIMP_IS_DODGE_BURN_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DODGE_BURN_TOOL)) typedef struct _GimpDodgeBurnTool GimpDodgeBurnTool; @@ -44,10 +44,10 @@ struct _GimpDodgeBurnToolClass }; -void gimp_dodgeburn_tool_register (GimpToolRegisterCallback callback, - gpointer data); +void gimp_dodge_burn_tool_register (GimpToolRegisterCallback callback, + gpointer data); -GType gimp_dodgeburn_tool_get_type (void) G_GNUC_CONST; +GType gimp_dodge_burn_tool_get_type (void) G_GNUC_CONST; #endif /* __GIMP_DODGEBURN_TOOL_H__ */ diff --git a/app/tools/gimppaintoptions-gui.c b/app/tools/gimppaintoptions-gui.c index 7ae8e56cfd..6406dfac73 100644 --- a/app/tools/gimppaintoptions-gui.c +++ b/app/tools/gimppaintoptions-gui.c @@ -122,9 +122,9 @@ gimp_paint_options_gui (GimpToolOptions *tool_options) _("Mode:"), 1.0, 0.5, optionmenu, 2, TRUE); - if (tool_type == GIMP_TYPE_ERASER_TOOL || - tool_type == GIMP_TYPE_CONVOLVE_TOOL || - tool_type == GIMP_TYPE_DODGEBURN_TOOL || + if (tool_type == GIMP_TYPE_ERASER_TOOL || + tool_type == GIMP_TYPE_CONVOLVE_TOOL || + tool_type == GIMP_TYPE_DODGE_BURN_TOOL || tool_type == GIMP_TYPE_SMUDGE_TOOL) { gtk_widget_set_sensitive (optionmenu, FALSE); @@ -227,10 +227,10 @@ gimp_paint_options_gui (GimpToolOptions *tool_options) } /* the "hard edge" toggle */ - if (tool_type == GIMP_TYPE_ERASER_TOOL || - tool_type == GIMP_TYPE_CLONE_TOOL || - tool_type == GIMP_TYPE_CONVOLVE_TOOL || - tool_type == GIMP_TYPE_DODGEBURN_TOOL || + if (tool_type == GIMP_TYPE_ERASER_TOOL || + tool_type == GIMP_TYPE_CLONE_TOOL || + tool_type == GIMP_TYPE_CONVOLVE_TOOL || + tool_type == GIMP_TYPE_DODGE_BURN_TOOL || tool_type == GIMP_TYPE_SMUDGE_TOOL) { button = gimp_prop_check_button_new (config, "hard", _("Hard Edge")); @@ -284,7 +284,7 @@ pressure_options_gui (GimpPressureOptions *pressure, if (g_type_is_a (tool_type, GIMP_TYPE_PAINTBRUSH_TOOL) || tool_type == GIMP_TYPE_CLONE_TOOL || tool_type == GIMP_TYPE_CONVOLVE_TOOL || - tool_type == GIMP_TYPE_DODGEBURN_TOOL || + tool_type == GIMP_TYPE_DODGE_BURN_TOOL || tool_type == GIMP_TYPE_ERASER_TOOL || tool_type == GIMP_TYPE_SMUDGE_TOOL) { @@ -298,7 +298,7 @@ pressure_options_gui (GimpPressureOptions *pressure, /* the opacity toggle */ if (tool_type == GIMP_TYPE_CLONE_TOOL || - tool_type == GIMP_TYPE_DODGEBURN_TOOL || + tool_type == GIMP_TYPE_DODGE_BURN_TOOL || tool_type == GIMP_TYPE_ERASER_TOOL || tool_type == GIMP_TYPE_PAINTBRUSH_TOOL || tool_type == GIMP_TYPE_PENCIL_TOOL) @@ -313,7 +313,7 @@ pressure_options_gui (GimpPressureOptions *pressure, if (tool_type == GIMP_TYPE_AIRBRUSH_TOOL || tool_type == GIMP_TYPE_CLONE_TOOL || tool_type == GIMP_TYPE_CONVOLVE_TOOL || - tool_type == GIMP_TYPE_DODGEBURN_TOOL || + tool_type == GIMP_TYPE_DODGE_BURN_TOOL || tool_type == GIMP_TYPE_PAINTBRUSH_TOOL || tool_type == GIMP_TYPE_SMUDGE_TOOL) { @@ -338,7 +338,7 @@ pressure_options_gui (GimpPressureOptions *pressure, if (g_type_is_a (tool_type, GIMP_TYPE_PAINTBRUSH_TOOL) || tool_type == GIMP_TYPE_CLONE_TOOL || tool_type == GIMP_TYPE_CONVOLVE_TOOL || - tool_type == GIMP_TYPE_DODGEBURN_TOOL || + tool_type == GIMP_TYPE_DODGE_BURN_TOOL || tool_type == GIMP_TYPE_ERASER_TOOL) { button = gimp_prop_check_button_new (config, "pressure-size", @@ -376,7 +376,7 @@ fade_options_gui (GimpFadeOptions *fade, if (g_type_is_a (tool_type, GIMP_TYPE_PAINTBRUSH_TOOL) || tool_type == GIMP_TYPE_CLONE_TOOL || tool_type == GIMP_TYPE_CONVOLVE_TOOL || - tool_type == GIMP_TYPE_DODGEBURN_TOOL || + tool_type == GIMP_TYPE_DODGE_BURN_TOOL || tool_type == GIMP_TYPE_ERASER_TOOL || tool_type == GIMP_TYPE_SMUDGE_TOOL) { diff --git a/app/widgets/gimpactionfactory.c b/app/widgets/gimpactionfactory.c index 669359fe3d..ef2ef19b0f 100644 --- a/app/widgets/gimpactionfactory.c +++ b/app/widgets/gimpactionfactory.c @@ -176,7 +176,7 @@ gimp_action_factory_group_new (GimpActionFactory *factory, } g_warning ("%s: no entry registered for \"%s\"", - G_GNUC_FUNCTION, identifier); + G_STRFUNC, identifier); return NULL; } diff --git a/app/widgets/gimpmenufactory.c b/app/widgets/gimpmenufactory.c index d7a6615152..c7b658e276 100644 --- a/app/widgets/gimpmenufactory.c +++ b/app/widgets/gimpmenufactory.c @@ -2,7 +2,7 @@ * Copyright (C) 1995 Spencer Kimball and Peter Mattis * * gimpmenufactory.c - * Copyright (C) 2001 Michael Natterer + * Copyright (C) 2001-2004 Michael Natterer * * 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 @@ -207,7 +207,7 @@ gimp_menu_factory_menu_new (GimpMenuFactory *factory, } g_warning ("%s: no entry registered for \"%s\"", - G_GNUC_FUNCTION, identifier); + G_STRFUNC, identifier); return NULL; } @@ -254,7 +254,7 @@ gimp_menu_factory_manager_register (GimpMenuFactory *factory, } g_warning ("%s: no entry registered for \"%s\"", - G_GNUC_FUNCTION, identifier); + G_STRFUNC, identifier); } GtkUIManager * @@ -298,7 +298,7 @@ gimp_menu_factory_manager_new (GimpMenuFactory *factory, } g_warning ("%s: no entry registered for \"%s\"", - G_GNUC_FUNCTION, identifier); + G_STRFUNC, identifier); return NULL; } diff --git a/app/widgets/gimpmenufactory.h b/app/widgets/gimpmenufactory.h index dd8aed9b67..0954e5dd72 100644 --- a/app/widgets/gimpmenufactory.h +++ b/app/widgets/gimpmenufactory.h @@ -2,7 +2,7 @@ * Copyright (C) 1995 Spencer Kimball and Peter Mattis * * gimpmenufactory.h - * Copyright (C) 2003 Michael Natterer + * Copyright (C) 2003-2004 Michael Natterer * * 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 diff --git a/menus/image-menu.xml b/menus/image-menu.xml index 3ebe6ea044..135ad8b14f 100644 --- a/menus/image-menu.xml +++ b/menus/image-menu.xml @@ -2,7 +2,7 @@ - + @@ -37,8 +37,8 @@ - - + + @@ -46,7 +46,7 @@ - + @@ -66,16 +66,17 @@ - + - + + @@ -90,7 +91,7 @@ - + @@ -212,7 +213,7 @@ - + @@ -254,9 +255,9 @@ - + - + @@ -282,7 +283,7 @@ - + @@ -295,6 +296,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +