use "", not NULL for "no accelerator", since NULL will show the
2003-04-04 Michael Natterer <mitch@gimp.org> * app/gui/documents-menu.c: use "", not NULL for "no accelerator", since NULL will show the stock_item's accelerator. * app/gui/image-menu.c * app/gui/toolbox-menu.c: added a "Document History..." menu item at the bottom of the "Open Recent" submenus. * app/gui/menus.c (menus_last_opened_add): reorder the dynamically created entries to the top of the menu. Cleanup.
This commit is contained in:
committed by
Michael Natterer
parent
7009415716
commit
0d61c2889c
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2003-04-04 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/gui/documents-menu.c: use "", not NULL for "no accelerator",
|
||||
since NULL will show the stock_item's accelerator.
|
||||
|
||||
* app/gui/image-menu.c
|
||||
* app/gui/toolbox-menu.c: added a "Document History..." menu item
|
||||
at the bottom of the "Open Recent" submenus.
|
||||
|
||||
* app/gui/menus.c (menus_last_opened_add): reorder the dynamically
|
||||
created entries to the top of the menu. Cleanup.
|
||||
|
||||
2003-04-04 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/display/gimpdisplayshell-scale.c
|
||||
|
||||
@ -39,15 +39,15 @@
|
||||
|
||||
GimpItemFactoryEntry documents_menu_entries[] =
|
||||
{
|
||||
{ { N_("/Open Image"), NULL,
|
||||
{ { N_("/Open Image"), "",
|
||||
documents_open_document_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
NULL, NULL, NULL },
|
||||
{ { N_("/Raise or Open Image"), NULL,
|
||||
{ { N_("/Raise or Open Image"), "",
|
||||
documents_raise_or_open_document_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
NULL, NULL, NULL },
|
||||
{ { N_("/File Open Dialog..."), NULL,
|
||||
{ { N_("/File Open Dialog..."), "",
|
||||
documents_file_open_dialog_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
NULL, NULL, NULL },
|
||||
|
||||
@ -96,6 +96,14 @@ GimpItemFactoryEntry image_menu_entries[] =
|
||||
{ { N_("/File/Open Recent/(None)"), NULL, NULL, 0 },
|
||||
NULL, NULL, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/File/Open Recent/---"),
|
||||
|
||||
{ { N_("/File/Open Recent/Document History..."), "foo",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
"gimp-document-list",
|
||||
"dialogs/document_index.html", NULL },
|
||||
|
||||
MENU_SEPARATOR ("/File/---"),
|
||||
|
||||
{ { N_("/File/Save"), "<control>S",
|
||||
@ -1186,11 +1194,12 @@ image_menu_update (GtkItemFactory *item_factory,
|
||||
|
||||
/* File */
|
||||
|
||||
SET_SENSITIVE ("/File/Save", gdisp && drawable);
|
||||
SET_SENSITIVE ("/File/Save as...", gdisp && drawable);
|
||||
SET_SENSITIVE ("/File/Save a Copy...", gdisp && drawable);
|
||||
SET_SENSITIVE ("/File/Revert...", gdisp && GIMP_OBJECT (gimage)->name);
|
||||
SET_SENSITIVE ("/File/Close", gdisp);
|
||||
SET_SENSITIVE ("/File/Save", gdisp && drawable);
|
||||
SET_SENSITIVE ("/File/Save as...", gdisp && drawable);
|
||||
SET_SENSITIVE ("/File/Save a Copy...", gdisp && drawable);
|
||||
SET_SENSITIVE ("/File/Save as Template...", gdisp);
|
||||
SET_SENSITIVE ("/File/Revert...", gdisp && GIMP_OBJECT (gimage)->name);
|
||||
SET_SENSITIVE ("/File/Close", gdisp);
|
||||
|
||||
/* Edit */
|
||||
|
||||
|
||||
@ -286,19 +286,23 @@ menus_last_opened_add (GimpItemFactory *item_factory,
|
||||
n, last_opened_entries,
|
||||
gimp, 2, TRUE, FALSE);
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
gimp_item_factory_set_visible (GTK_ITEM_FACTORY (item_factory),
|
||||
last_opened_entries[i].entry.path,
|
||||
FALSE);
|
||||
|
||||
gimp_item_factory_set_sensitive (GTK_ITEM_FACTORY (item_factory),
|
||||
"/File/Open Recent/(None)",
|
||||
FALSE);
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
g_free (last_opened_entries[i].entry.path);
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = gtk_item_factory_get_widget (GTK_ITEM_FACTORY (item_factory),
|
||||
last_opened_entries[i].entry.path);
|
||||
gtk_menu_reorder_child (GTK_MENU (widget->parent), widget, i + 1);
|
||||
|
||||
gimp_item_factory_set_visible (GTK_ITEM_FACTORY (item_factory),
|
||||
last_opened_entries[i].entry.path,
|
||||
FALSE);
|
||||
|
||||
g_free (last_opened_entries[i].entry.path);
|
||||
if (i < 9)
|
||||
g_free (last_opened_entries[i].entry.accelerator);
|
||||
}
|
||||
|
||||
@ -63,6 +63,14 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
||||
{ { N_("/File/Open Recent/(None)"), NULL, NULL, 0 },
|
||||
NULL, NULL, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/File/Open Recent/---"),
|
||||
|
||||
{ { N_("/File/Open Recent/Document History..."), "foo",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
"gimp-document-list",
|
||||
"file/dialogs/document_index.html", NULL },
|
||||
|
||||
/* <Toolbox>/File/Acquire */
|
||||
|
||||
MENU_BRANCH (N_("/File/Acquire")),
|
||||
|
||||
@ -96,6 +96,14 @@ GimpItemFactoryEntry image_menu_entries[] =
|
||||
{ { N_("/File/Open Recent/(None)"), NULL, NULL, 0 },
|
||||
NULL, NULL, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/File/Open Recent/---"),
|
||||
|
||||
{ { N_("/File/Open Recent/Document History..."), "foo",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
"gimp-document-list",
|
||||
"dialogs/document_index.html", NULL },
|
||||
|
||||
MENU_SEPARATOR ("/File/---"),
|
||||
|
||||
{ { N_("/File/Save"), "<control>S",
|
||||
@ -1186,11 +1194,12 @@ image_menu_update (GtkItemFactory *item_factory,
|
||||
|
||||
/* File */
|
||||
|
||||
SET_SENSITIVE ("/File/Save", gdisp && drawable);
|
||||
SET_SENSITIVE ("/File/Save as...", gdisp && drawable);
|
||||
SET_SENSITIVE ("/File/Save a Copy...", gdisp && drawable);
|
||||
SET_SENSITIVE ("/File/Revert...", gdisp && GIMP_OBJECT (gimage)->name);
|
||||
SET_SENSITIVE ("/File/Close", gdisp);
|
||||
SET_SENSITIVE ("/File/Save", gdisp && drawable);
|
||||
SET_SENSITIVE ("/File/Save as...", gdisp && drawable);
|
||||
SET_SENSITIVE ("/File/Save a Copy...", gdisp && drawable);
|
||||
SET_SENSITIVE ("/File/Save as Template...", gdisp);
|
||||
SET_SENSITIVE ("/File/Revert...", gdisp && GIMP_OBJECT (gimage)->name);
|
||||
SET_SENSITIVE ("/File/Close", gdisp);
|
||||
|
||||
/* Edit */
|
||||
|
||||
|
||||
@ -286,19 +286,23 @@ menus_last_opened_add (GimpItemFactory *item_factory,
|
||||
n, last_opened_entries,
|
||||
gimp, 2, TRUE, FALSE);
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
gimp_item_factory_set_visible (GTK_ITEM_FACTORY (item_factory),
|
||||
last_opened_entries[i].entry.path,
|
||||
FALSE);
|
||||
|
||||
gimp_item_factory_set_sensitive (GTK_ITEM_FACTORY (item_factory),
|
||||
"/File/Open Recent/(None)",
|
||||
FALSE);
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
g_free (last_opened_entries[i].entry.path);
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = gtk_item_factory_get_widget (GTK_ITEM_FACTORY (item_factory),
|
||||
last_opened_entries[i].entry.path);
|
||||
gtk_menu_reorder_child (GTK_MENU (widget->parent), widget, i + 1);
|
||||
|
||||
gimp_item_factory_set_visible (GTK_ITEM_FACTORY (item_factory),
|
||||
last_opened_entries[i].entry.path,
|
||||
FALSE);
|
||||
|
||||
g_free (last_opened_entries[i].entry.path);
|
||||
if (i < 9)
|
||||
g_free (last_opened_entries[i].entry.accelerator);
|
||||
}
|
||||
|
||||
@ -63,6 +63,14 @@ GimpItemFactoryEntry toolbox_menu_entries[] =
|
||||
{ { N_("/File/Open Recent/(None)"), NULL, NULL, 0 },
|
||||
NULL, NULL, NULL },
|
||||
|
||||
MENU_SEPARATOR ("/File/Open Recent/---"),
|
||||
|
||||
{ { N_("/File/Open Recent/Document History..."), "foo",
|
||||
dialogs_create_dockable_cmd_callback, 0,
|
||||
"<StockItem>", GTK_STOCK_OPEN },
|
||||
"gimp-document-list",
|
||||
"file/dialogs/document_index.html", NULL },
|
||||
|
||||
/* <Toolbox>/File/Acquire */
|
||||
|
||||
MENU_BRANCH (N_("/File/Acquire")),
|
||||
|
||||
Reference in New Issue
Block a user