app/actions/file-actions.c remove "file-close" action and callback...

2004-05-05  Michael Natterer  <mitch@gimp.org>

	* 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 <Image>
	and <Dock> UI managers, renamed UI manager <Dialogs> to
	<Dockable>.

	* app/widgets/gimpdockbook.c: s/<Dialogs>/<Dockable>/.

	* 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.
This commit is contained in:
Michael Natterer 2004-05-05 11:40:20 +00:00 committed by Michael Natterer
parent 6bed69024f
commit 96ba0235ed
15 changed files with 81 additions and 48 deletions

View File

@ -1,3 +1,26 @@
2004-05-05 Michael Natterer <mitch@gimp.org>
* 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 <Image>
and <Dock> UI managers, renamed UI manager <Dialogs> to
<Dockable>.
* app/widgets/gimpdockbook.c: s/<Dialogs>/<Dockable>/.
* 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 <mitch@gimp.org> 2004-05-05 Michael Natterer <mitch@gimp.org>
* app/actions/select-actions.c: removed action "select-by-color". * app/actions/select-actions.c: removed action "select-by-color".

View File

@ -95,11 +95,6 @@ static GimpActionEntry file_actions[] =
G_CALLBACK (file_revert_cmd_callback), G_CALLBACK (file_revert_cmd_callback),
GIMP_HELP_FILE_REVERT }, GIMP_HELP_FILE_REVERT },
{ "file-close", GTK_STOCK_CLOSE,
N_( "_Close"), "<control>W", NULL,
G_CALLBACK (file_close_cmd_callback),
GIMP_HELP_FILE_CLOSE },
{ "file-quit", GTK_STOCK_QUIT, { "file-quit", GTK_STOCK_QUIT,
N_("_Quit"), "<control>Q", NULL, N_("_Quit"), "<control>Q", NULL,
G_CALLBACK (file_quit_cmd_callback), 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-a-copy", gimage && drawable);
SET_SENSITIVE ("file-save-as-template", gimage); SET_SENSITIVE ("file-save-as-template", gimage);
SET_SENSITIVE ("file-revert", gimage && GIMP_OBJECT (gimage)->name); SET_SENSITIVE ("file-revert", gimage && GIMP_OBJECT (gimage)->name);
SET_SENSITIVE ("file-close", gimage);
#undef SET_SENSITIVE #undef SET_SENSITIVE
} }

View File

@ -44,7 +44,6 @@
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
#include "display/gimpdisplay-foreach.h" #include "display/gimpdisplay-foreach.h"
#include "display/gimpdisplayshell.h"
#include "gui/dialogs.h" #include "gui/dialogs.h"
#include "gui/file-new-dialog.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 void
file_quit_cmd_callback (GtkAction *action, file_quit_cmd_callback (GtkAction *action,
gpointer data) gpointer data)

View File

@ -41,8 +41,6 @@ void file_save_template_cmd_callback (GtkAction *action,
void file_revert_cmd_callback (GtkAction *action, void file_revert_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void file_close_cmd_callback (GtkAction *action,
gpointer data);
void file_quit_cmd_callback (GtkAction *action, void file_quit_cmd_callback (GtkAction *action,
gpointer data); gpointer data);

View File

@ -38,7 +38,7 @@
static GimpActionEntry qmask_actions[] = 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 }, GIMP_HELP_QMASK },
{ "qmask-configure", NULL, { "qmask-configure", NULL,
@ -50,7 +50,7 @@ static GimpActionEntry qmask_actions[] =
static GimpToggleActionEntry qmask_toggle_actions[] = static GimpToggleActionEntry qmask_toggle_actions[] =
{ {
{ "qmask-active", NULL, { "qmask-active", NULL,
N_("_QMask Active"), NULL, NULL, N_("_QuickMask Active"), NULL, NULL,
G_CALLBACK (qmask_toggle_cmd_callback), G_CALLBACK (qmask_toggle_cmd_callback),
FALSE, FALSE,
GIMP_HELP_QMASK_TOGGLE }, GIMP_HELP_QMASK_TOGGLE },

View File

@ -133,7 +133,7 @@ qmask_channel_query (GimpDisplayShell *shell)
options = g_new0 (EditQmaskOptions, 1); options = g_new0 (EditQmaskOptions, 1);
options->gimage = shell->gdisp->gimage; 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, &options->gimage->qmask_color,
GIMP_COLOR_AREA_LARGE_CHECKS, GIMP_COLOR_AREA_LARGE_CHECKS,
48, 64); 48, 64);
@ -143,7 +143,7 @@ qmask_channel_query (GimpDisplayShell *shell)
/* The dialog */ /* The dialog */
options->query_box = options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (shell->gdisp->gimage), gimp_viewable_dialog_new (GIMP_VIEWABLE (shell->gdisp->gimage),
_("Qmask Attributes"), "gimp-qmask-edit", _("QuickMask Attributes"), "gimp-qmask-edit",
GIMP_STOCK_QMASK_ON, GIMP_STOCK_QMASK_ON,
_("Edit QuickMask Attributes"), _("Edit QuickMask Attributes"),
GTK_WIDGET (shell), GTK_WIDGET (shell),

View File

@ -38,7 +38,7 @@
static GimpActionEntry qmask_actions[] = 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 }, GIMP_HELP_QMASK },
{ "qmask-configure", NULL, { "qmask-configure", NULL,
@ -50,7 +50,7 @@ static GimpActionEntry qmask_actions[] =
static GimpToggleActionEntry qmask_toggle_actions[] = static GimpToggleActionEntry qmask_toggle_actions[] =
{ {
{ "qmask-active", NULL, { "qmask-active", NULL,
N_("_QMask Active"), NULL, NULL, N_("_QuickMask Active"), NULL, NULL,
G_CALLBACK (qmask_toggle_cmd_callback), G_CALLBACK (qmask_toggle_cmd_callback),
FALSE, FALSE,
GIMP_HELP_QMASK_TOGGLE }, GIMP_HELP_QMASK_TOGGLE },

View File

@ -133,7 +133,7 @@ qmask_channel_query (GimpDisplayShell *shell)
options = g_new0 (EditQmaskOptions, 1); options = g_new0 (EditQmaskOptions, 1);
options->gimage = shell->gdisp->gimage; 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, &options->gimage->qmask_color,
GIMP_COLOR_AREA_LARGE_CHECKS, GIMP_COLOR_AREA_LARGE_CHECKS,
48, 64); 48, 64);
@ -143,7 +143,7 @@ qmask_channel_query (GimpDisplayShell *shell)
/* The dialog */ /* The dialog */
options->query_box = options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (shell->gdisp->gimage), gimp_viewable_dialog_new (GIMP_VIEWABLE (shell->gdisp->gimage),
_("Qmask Attributes"), "gimp-qmask-edit", _("QuickMask Attributes"), "gimp-qmask-edit",
GIMP_STOCK_QMASK_ON, GIMP_STOCK_QMASK_ON,
_("Edit QuickMask Attributes"), _("Edit QuickMask Attributes"),
GTK_WIDGET (shell), GTK_WIDGET (shell),

View File

@ -61,6 +61,11 @@ static GimpActionEntry view_actions[] =
G_CALLBACK (view_new_view_cmd_callback), G_CALLBACK (view_new_view_cmd_callback),
GIMP_HELP_VIEW_NEW }, GIMP_HELP_VIEW_NEW },
{ "view-close", GTK_STOCK_CLOSE,
N_( "_Close"), "<control>W", NULL,
G_CALLBACK (view_close_view_cmd_callback),
GIMP_HELP_FILE_CLOSE },
{ "view-zoom-out", GTK_STOCK_ZOOM_OUT, { "view-zoom-out", GTK_STOCK_ZOOM_OUT,
N_("Zoom _Out"), "minus", NULL, N_("Zoom _Out"), "minus", NULL,
G_CALLBACK (view_zoom_out_cmd_callback), G_CALLBACK (view_zoom_out_cmd_callback),
@ -293,6 +298,7 @@ view_actions_update (GimpActionGroup *group,
gimp_action_group_set_action_sensitive (group, action, (condition) != 0) 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_SENSITIVE ("view-dot-for-dot", gdisp);
SET_ACTIVE ("view-dot-for-dot", gdisp && shell->dot_for_dot); SET_ACTIVE ("view-dot-for-dot", gdisp && shell->dot_for_dot);

View File

@ -62,6 +62,27 @@
/* public functions */ /* 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 void
view_zoom_out_cmd_callback (GtkAction *action, view_zoom_out_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
@ -375,17 +396,6 @@ view_snap_to_grid_cmd_callback (GtkAction *action,
gimp_display_shell_set_snap_to_grid (shell, active); 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 void
view_shrink_wrap_cmd_callback (GtkAction *action, view_shrink_wrap_cmd_callback (GtkAction *action,
gpointer data) gpointer data)

View File

@ -20,6 +20,11 @@
#define __VIEW_COMMANDS_H__ #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, void view_zoom_out_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void view_zoom_in_cmd_callback (GtkAction *action, void view_zoom_in_cmd_callback (GtkAction *action,
@ -57,8 +62,6 @@ void view_toggle_grid_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void view_snap_to_grid_cmd_callback (GtkAction *action, void view_snap_to_grid_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
void view_new_view_cmd_callback (GtkAction *action,
gpointer data);
void view_shrink_wrap_cmd_callback (GtkAction *action, void view_shrink_wrap_cmd_callback (GtkAction *action,
gpointer data); gpointer data);

View File

@ -94,6 +94,7 @@ menus_init (Gimp *gimp)
"image", "image",
"drawable", "drawable",
"layers", "layers",
"channels",
"vectors", "vectors",
"tools", "tools",
"dialogs", "dialogs",
@ -117,6 +118,7 @@ menus_init (Gimp *gimp)
"image", "image",
"drawable", "drawable",
"layers", "layers",
"channels",
"vectors", "vectors",
"tools", "tools",
"dialogs", "dialogs",
@ -162,7 +164,7 @@ menus_init (Gimp *gimp)
"vectors-menu.xml", NULL, "vectors-menu.xml", NULL,
NULL); NULL);
gimp_menu_factory_manager_register (global_menu_factory, "<Dialogs>", gimp_menu_factory_manager_register (global_menu_factory, "<Dockable>",
"dockable", "dockable",
NULL, NULL,
"/dockable-popup", "/dockable-popup",

View File

@ -94,6 +94,7 @@ menus_init (Gimp *gimp)
"image", "image",
"drawable", "drawable",
"layers", "layers",
"channels",
"vectors", "vectors",
"tools", "tools",
"dialogs", "dialogs",
@ -117,6 +118,7 @@ menus_init (Gimp *gimp)
"image", "image",
"drawable", "drawable",
"layers", "layers",
"channels",
"vectors", "vectors",
"tools", "tools",
"dialogs", "dialogs",
@ -162,7 +164,7 @@ menus_init (Gimp *gimp)
"vectors-menu.xml", NULL, "vectors-menu.xml", NULL,
NULL); NULL);
gimp_menu_factory_manager_register (global_menu_factory, "<Dialogs>", gimp_menu_factory_manager_register (global_menu_factory, "<Dockable>",
"dockable", "dockable",
NULL, NULL,
"/dockable-popup", "/dockable-popup",

View File

@ -315,7 +315,7 @@ gimp_dockbook_new (GimpMenuFactory *menu_factory)
dockbook = g_object_new (GIMP_TYPE_DOCKBOOK, NULL); dockbook = g_object_new (GIMP_TYPE_DOCKBOOK, NULL);
dockbook->ui_manager = gimp_menu_factory_manager_new (menu_factory, dockbook->ui_manager = gimp_menu_factory_manager_new (menu_factory,
"<Dialogs>", "<Dockable>",
dockbook, dockbook,
FALSE); FALSE);

View File

@ -23,7 +23,7 @@
<separator /> <separator />
</placeholder> </placeholder>
<separator /> <separator />
<menuitem action="file-close" /> <menuitem action="view-close" />
<menuitem action="file-quit" /> <menuitem action="file-quit" />
</menu> </menu>
@ -75,6 +75,7 @@
<menuitem action="qmask-toggle" /> <menuitem action="qmask-toggle" />
<menuitem action="select-save" /> <menuitem action="select-save" />
<menuitem action="select-to-vectors" /> <menuitem action="select-to-vectors" />
<separator />
</menu> </menu>
<menu action="view-menu" name="View"> <menu action="view-menu" name="View">
@ -98,6 +99,10 @@
<menuitem action="view-zoom-other" /> <menuitem action="view-zoom-other" />
</menu> </menu>
<separator /> <separator />
<menuitem action="view-shrink-wrap" />
<menuitem action="view-fullscreen" />
<menuitem action="view-move-to-screen" />
<separator />
<menuitem action="view-info-window" /> <menuitem action="view-info-window" />
<menuitem action="view-navigation-window" /> <menuitem action="view-navigation-window" />
<menuitem action="view-display-filters" /> <menuitem action="view-display-filters" />
@ -114,9 +119,6 @@
<menuitem action="view-show-scrollbars" /> <menuitem action="view-show-scrollbars" />
<menuitem action="view-show-statusbar" /> <menuitem action="view-show-statusbar" />
<separator /> <separator />
<menuitem action="view-shrink-wrap" />
<menuitem action="view-fullscreen" />
<menuitem action="view-move-to-screen" />
</menu> </menu>
<menu action="image-menu" name="Image"> <menu action="image-menu" name="Image">
@ -124,6 +126,7 @@
<menuitem action="image-convert-rgb" /> <menuitem action="image-convert-rgb" />
<menuitem action="image-convert-grayscale" /> <menuitem action="image-convert-grayscale" />
<menuitem action="image-convert-indexed" /> <menuitem action="image-convert-indexed" />
<separator />
</menu> </menu>
<menu action="image-transform-menu" name="Transform"> <menu action="image-transform-menu" name="Transform">
<menuitem action="image-flip-horizontal" /> <menuitem action="image-flip-horizontal" />
@ -144,6 +147,7 @@
<menuitem action="image-flatten" /> <menuitem action="image-flatten" />
<separator /> <separator />
<menuitem action="image-configure-grid" /> <menuitem action="image-configure-grid" />
<separator />
</menu> </menu>
<menu action="layers-menu" name="Layer"> <menu action="layers-menu" name="Layer">
@ -164,6 +168,7 @@
<menuitem action="layers-lower" /> <menuitem action="layers-lower" />
<menuitem action="layers-raise-to-top" /> <menuitem action="layers-raise-to-top" />
<menuitem action="layers-lower-to-bottom" /> <menuitem action="layers-lower-to-bottom" />
<separator />
</menu> </menu>
<menu action="layers-colors-menu" name="Colors"> <menu action="layers-colors-menu" name="Colors">
<menuitem action="tools-color-balance" /> <menuitem action="tools-color-balance" />
@ -192,6 +197,7 @@
<menuitem action="layers-mask-selection-add" /> <menuitem action="layers-mask-selection-add" />
<menuitem action="layers-mask-selection-subtract" /> <menuitem action="layers-mask-selection-subtract" />
<menuitem action="layers-mask-selection-intersect" /> <menuitem action="layers-mask-selection-intersect" />
<separator />
</menu> </menu>
<menu action="layers-transparency-menu" name="Transparency"> <menu action="layers-transparency-menu" name="Transparency">
<menuitem action="layers-alpha-add" /> <menuitem action="layers-alpha-add" />