From 96ba0235ed65ea08f4a56187746f7aa25f22973d Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 5 May 2004 11:40:20 +0000 Subject: [PATCH] app/actions/file-actions.c remove "file-close" action and callback... 2004-05-05 Michael Natterer * app/actions/file-actions.c * app/actions/file-commands.[ch]: remove "file-close" action and callback... * app/actions/view-actions.c * app/actions/view-commands.[ch]: ...and added it here as "view-close" because that's what it does. * app/actions/qmask-actions.c * app/actions/qmask-commands.c: s/QMask/QuickMask/g * app/gui/menus.c: add the "channels" action group to the and UI managers, renamed UI manager to . * app/widgets/gimpdockbook.c: s///. * menus/image-menu.xml.in: s/file-close/view-close/, added separators at the end of most menus, moved the bottom group of the "View" menu after the zoom group. --- ChangeLog | 23 ++++++++++++++++++++++ app/actions/file-actions.c | 6 ------ app/actions/file-commands.c | 11 ----------- app/actions/file-commands.h | 2 -- app/actions/qmask-actions.c | 4 ++-- app/actions/qmask-commands.c | 4 ++-- app/actions/quick-mask-actions.c | 4 ++-- app/actions/quick-mask-commands.c | 4 ++-- app/actions/view-actions.c | 8 +++++++- app/actions/view-commands.c | 32 ++++++++++++++++++++----------- app/actions/view-commands.h | 7 +++++-- app/gui/menus.c | 4 +++- app/menus/menus.c | 4 +++- app/widgets/gimpdockbook.c | 2 +- menus/image-menu.xml.in | 14 ++++++++++---- 15 files changed, 81 insertions(+), 48 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0b6e68774..1c55f6256d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2004-05-05 Michael Natterer + + * app/actions/file-actions.c + * app/actions/file-commands.[ch]: remove "file-close" action and + callback... + + * app/actions/view-actions.c + * app/actions/view-commands.[ch]: ...and added it here as + "view-close" because that's what it does. + + * app/actions/qmask-actions.c + * app/actions/qmask-commands.c: s/QMask/QuickMask/g + + * app/gui/menus.c: add the "channels" action group to the + and UI managers, renamed UI manager to + . + + * app/widgets/gimpdockbook.c: s///. + + * menus/image-menu.xml.in: s/file-close/view-close/, added + separators at the end of most menus, moved the bottom group of the + "View" menu after the zoom group. + 2004-05-05 Michael Natterer * app/actions/select-actions.c: removed action "select-by-color". diff --git a/app/actions/file-actions.c b/app/actions/file-actions.c index 3a4a34292a..8de2b6435d 100644 --- a/app/actions/file-actions.c +++ b/app/actions/file-actions.c @@ -95,11 +95,6 @@ static GimpActionEntry file_actions[] = G_CALLBACK (file_revert_cmd_callback), GIMP_HELP_FILE_REVERT }, - { "file-close", GTK_STOCK_CLOSE, - N_( "_Close"), "W", NULL, - G_CALLBACK (file_close_cmd_callback), - GIMP_HELP_FILE_CLOSE }, - { "file-quit", GTK_STOCK_QUIT, N_("_Quit"), "Q", NULL, G_CALLBACK (file_quit_cmd_callback), @@ -187,7 +182,6 @@ file_actions_update (GimpActionGroup *group, SET_SENSITIVE ("file-save-a-copy", gimage && drawable); SET_SENSITIVE ("file-save-as-template", gimage); SET_SENSITIVE ("file-revert", gimage && GIMP_OBJECT (gimage)->name); - SET_SENSITIVE ("file-close", gimage); #undef SET_SENSITIVE } diff --git a/app/actions/file-commands.c b/app/actions/file-commands.c index fe9330ba60..92a2b7fef8 100644 --- a/app/actions/file-commands.c +++ b/app/actions/file-commands.c @@ -44,7 +44,6 @@ #include "display/gimpdisplay.h" #include "display/gimpdisplay-foreach.h" -#include "display/gimpdisplayshell.h" #include "gui/dialogs.h" #include "gui/file-new-dialog.h" @@ -308,16 +307,6 @@ file_revert_cmd_callback (GtkAction *action, } } -void -file_close_cmd_callback (GtkAction *action, - gpointer data) -{ - GimpDisplay *gdisp; - return_if_no_display (gdisp, data); - - gimp_display_shell_close (GIMP_DISPLAY_SHELL (gdisp->shell), FALSE); -} - void file_quit_cmd_callback (GtkAction *action, gpointer data) diff --git a/app/actions/file-commands.h b/app/actions/file-commands.h index e64752ac01..472563bd5f 100644 --- a/app/actions/file-commands.h +++ b/app/actions/file-commands.h @@ -41,8 +41,6 @@ void file_save_template_cmd_callback (GtkAction *action, void file_revert_cmd_callback (GtkAction *action, gpointer data); -void file_close_cmd_callback (GtkAction *action, - gpointer data); void file_quit_cmd_callback (GtkAction *action, gpointer data); diff --git a/app/actions/qmask-actions.c b/app/actions/qmask-actions.c index e866f1df05..963f54bb5d 100644 --- a/app/actions/qmask-actions.c +++ b/app/actions/qmask-actions.c @@ -38,7 +38,7 @@ static GimpActionEntry qmask_actions[] = { - { "qmask-popup", NULL, N_("QMask Menu"), NULL, NULL, NULL, + { "qmask-popup", NULL, N_("QuickMask Menu"), NULL, NULL, NULL, GIMP_HELP_QMASK }, { "qmask-configure", NULL, @@ -50,7 +50,7 @@ static GimpActionEntry qmask_actions[] = static GimpToggleActionEntry qmask_toggle_actions[] = { { "qmask-active", NULL, - N_("_QMask Active"), NULL, NULL, + N_("_QuickMask Active"), NULL, NULL, G_CALLBACK (qmask_toggle_cmd_callback), FALSE, GIMP_HELP_QMASK_TOGGLE }, diff --git a/app/actions/qmask-commands.c b/app/actions/qmask-commands.c index 2d8523623b..b897f9e535 100644 --- a/app/actions/qmask-commands.c +++ b/app/actions/qmask-commands.c @@ -133,7 +133,7 @@ qmask_channel_query (GimpDisplayShell *shell) options = g_new0 (EditQmaskOptions, 1); options->gimage = shell->gdisp->gimage; - options->color_panel = gimp_color_panel_new (_("Edit Qmask Color"), + options->color_panel = gimp_color_panel_new (_("Edit QuickMask Color"), &options->gimage->qmask_color, GIMP_COLOR_AREA_LARGE_CHECKS, 48, 64); @@ -143,7 +143,7 @@ qmask_channel_query (GimpDisplayShell *shell) /* The dialog */ options->query_box = gimp_viewable_dialog_new (GIMP_VIEWABLE (shell->gdisp->gimage), - _("Qmask Attributes"), "gimp-qmask-edit", + _("QuickMask Attributes"), "gimp-qmask-edit", GIMP_STOCK_QMASK_ON, _("Edit QuickMask Attributes"), GTK_WIDGET (shell), diff --git a/app/actions/quick-mask-actions.c b/app/actions/quick-mask-actions.c index e866f1df05..963f54bb5d 100644 --- a/app/actions/quick-mask-actions.c +++ b/app/actions/quick-mask-actions.c @@ -38,7 +38,7 @@ static GimpActionEntry qmask_actions[] = { - { "qmask-popup", NULL, N_("QMask Menu"), NULL, NULL, NULL, + { "qmask-popup", NULL, N_("QuickMask Menu"), NULL, NULL, NULL, GIMP_HELP_QMASK }, { "qmask-configure", NULL, @@ -50,7 +50,7 @@ static GimpActionEntry qmask_actions[] = static GimpToggleActionEntry qmask_toggle_actions[] = { { "qmask-active", NULL, - N_("_QMask Active"), NULL, NULL, + N_("_QuickMask Active"), NULL, NULL, G_CALLBACK (qmask_toggle_cmd_callback), FALSE, GIMP_HELP_QMASK_TOGGLE }, diff --git a/app/actions/quick-mask-commands.c b/app/actions/quick-mask-commands.c index 2d8523623b..b897f9e535 100644 --- a/app/actions/quick-mask-commands.c +++ b/app/actions/quick-mask-commands.c @@ -133,7 +133,7 @@ qmask_channel_query (GimpDisplayShell *shell) options = g_new0 (EditQmaskOptions, 1); options->gimage = shell->gdisp->gimage; - options->color_panel = gimp_color_panel_new (_("Edit Qmask Color"), + options->color_panel = gimp_color_panel_new (_("Edit QuickMask Color"), &options->gimage->qmask_color, GIMP_COLOR_AREA_LARGE_CHECKS, 48, 64); @@ -143,7 +143,7 @@ qmask_channel_query (GimpDisplayShell *shell) /* The dialog */ options->query_box = gimp_viewable_dialog_new (GIMP_VIEWABLE (shell->gdisp->gimage), - _("Qmask Attributes"), "gimp-qmask-edit", + _("QuickMask Attributes"), "gimp-qmask-edit", GIMP_STOCK_QMASK_ON, _("Edit QuickMask Attributes"), GTK_WIDGET (shell), diff --git a/app/actions/view-actions.c b/app/actions/view-actions.c index e5e7bcec70..1286ca6367 100644 --- a/app/actions/view-actions.c +++ b/app/actions/view-actions.c @@ -61,6 +61,11 @@ static GimpActionEntry view_actions[] = G_CALLBACK (view_new_view_cmd_callback), GIMP_HELP_VIEW_NEW }, + { "view-close", GTK_STOCK_CLOSE, + N_( "_Close"), "W", NULL, + G_CALLBACK (view_close_view_cmd_callback), + GIMP_HELP_FILE_CLOSE }, + { "view-zoom-out", GTK_STOCK_ZOOM_OUT, N_("Zoom _Out"), "minus", NULL, G_CALLBACK (view_zoom_out_cmd_callback), @@ -292,7 +297,8 @@ view_actions_update (GimpActionGroup *group, #define SET_SENSITIVE(action,condition) \ gimp_action_group_set_action_sensitive (group, action, (condition) != 0) - SET_SENSITIVE ("view-new", gdisp); + SET_SENSITIVE ("view-new", gdisp); + SET_SENSITIVE ("view-close", gdisp); SET_SENSITIVE ("view-dot-for-dot", gdisp); SET_ACTIVE ("view-dot-for-dot", gdisp && shell->dot_for_dot); diff --git a/app/actions/view-commands.c b/app/actions/view-commands.c index 4240a41a1b..4a24b819a1 100644 --- a/app/actions/view-commands.c +++ b/app/actions/view-commands.c @@ -62,6 +62,27 @@ /* public functions */ +void +view_new_view_cmd_callback (GtkAction *action, + gpointer data) +{ + GimpDisplay *gdisp; + return_if_no_display (gdisp, data); + + gimp_create_display (gdisp->gimage->gimp, gdisp->gimage, + GIMP_DISPLAY_SHELL (gdisp->shell)->scale); +} + +void +view_close_view_cmd_callback (GtkAction *action, + gpointer data) +{ + GimpDisplay *gdisp; + return_if_no_display (gdisp, data); + + gimp_display_shell_close (GIMP_DISPLAY_SHELL (gdisp->shell), FALSE); +} + void view_zoom_out_cmd_callback (GtkAction *action, gpointer data) @@ -375,17 +396,6 @@ view_snap_to_grid_cmd_callback (GtkAction *action, gimp_display_shell_set_snap_to_grid (shell, active); } -void -view_new_view_cmd_callback (GtkAction *action, - gpointer data) -{ - GimpDisplay *gdisp; - return_if_no_display (gdisp, data); - - gimp_create_display (gdisp->gimage->gimp, gdisp->gimage, - GIMP_DISPLAY_SHELL (gdisp->shell)->scale); -} - void view_shrink_wrap_cmd_callback (GtkAction *action, gpointer data) diff --git a/app/actions/view-commands.h b/app/actions/view-commands.h index a10b908c82..672eeff286 100644 --- a/app/actions/view-commands.h +++ b/app/actions/view-commands.h @@ -20,6 +20,11 @@ #define __VIEW_COMMANDS_H__ +void view_new_view_cmd_callback (GtkAction *action, + gpointer data); +void view_close_view_cmd_callback (GtkAction *action, + gpointer data); + void view_zoom_out_cmd_callback (GtkAction *action, gpointer data); void view_zoom_in_cmd_callback (GtkAction *action, @@ -57,8 +62,6 @@ void view_toggle_grid_cmd_callback (GtkAction *action, gpointer data); void view_snap_to_grid_cmd_callback (GtkAction *action, gpointer data); -void view_new_view_cmd_callback (GtkAction *action, - gpointer data); void view_shrink_wrap_cmd_callback (GtkAction *action, gpointer data); diff --git a/app/gui/menus.c b/app/gui/menus.c index 2b03528b81..e9f1f50995 100644 --- a/app/gui/menus.c +++ b/app/gui/menus.c @@ -94,6 +94,7 @@ menus_init (Gimp *gimp) "image", "drawable", "layers", + "channels", "vectors", "tools", "dialogs", @@ -117,6 +118,7 @@ menus_init (Gimp *gimp) "image", "drawable", "layers", + "channels", "vectors", "tools", "dialogs", @@ -162,7 +164,7 @@ menus_init (Gimp *gimp) "vectors-menu.xml", NULL, NULL); - gimp_menu_factory_manager_register (global_menu_factory, "", + gimp_menu_factory_manager_register (global_menu_factory, "", "dockable", NULL, "/dockable-popup", diff --git a/app/menus/menus.c b/app/menus/menus.c index 2b03528b81..e9f1f50995 100644 --- a/app/menus/menus.c +++ b/app/menus/menus.c @@ -94,6 +94,7 @@ menus_init (Gimp *gimp) "image", "drawable", "layers", + "channels", "vectors", "tools", "dialogs", @@ -117,6 +118,7 @@ menus_init (Gimp *gimp) "image", "drawable", "layers", + "channels", "vectors", "tools", "dialogs", @@ -162,7 +164,7 @@ menus_init (Gimp *gimp) "vectors-menu.xml", NULL, NULL); - gimp_menu_factory_manager_register (global_menu_factory, "", + gimp_menu_factory_manager_register (global_menu_factory, "", "dockable", NULL, "/dockable-popup", diff --git a/app/widgets/gimpdockbook.c b/app/widgets/gimpdockbook.c index 5899e1429a..88afab9029 100644 --- a/app/widgets/gimpdockbook.c +++ b/app/widgets/gimpdockbook.c @@ -315,7 +315,7 @@ gimp_dockbook_new (GimpMenuFactory *menu_factory) dockbook = g_object_new (GIMP_TYPE_DOCKBOOK, NULL); dockbook->ui_manager = gimp_menu_factory_manager_new (menu_factory, - "", + "", dockbook, FALSE); diff --git a/menus/image-menu.xml.in b/menus/image-menu.xml.in index 5cffdb56a1..02b7661f80 100644 --- a/menus/image-menu.xml.in +++ b/menus/image-menu.xml.in @@ -23,7 +23,7 @@ - + @@ -75,6 +75,7 @@ + @@ -98,6 +99,10 @@ + + + + @@ -114,9 +119,6 @@ - - - @@ -124,6 +126,7 @@ + @@ -144,6 +147,7 @@ + @@ -164,6 +168,7 @@ + @@ -192,6 +197,7 @@ +