app, menus: fix the "Recently Closed Docks" auto-filling menu.

It was actually working fine except that I wrongly named the submenu somehow,
but even more particularly I thought it was about single dockables (tabs)
whereas it was about full detached docks (a window containing several
dockables/tabs).
This commit is contained in:
Jehan 2023-03-31 23:42:55 +02:00
parent bd4e17dd1e
commit 9b0c1b6f62
3 changed files with 9 additions and 4 deletions

View File

@ -255,7 +255,6 @@ windows_menu_recent_add (GimpContainer *container,
action_name = g_strdup_printf ("windows-recent-%04d", info_id);
/* TODO GMenu: doesn't look like it's working, neither will old or new API. */
gimp_ui_manager_add_ui (manager, "/Windows/Recently Closed Docks",
action_name, NULL, TRUE);

View File

@ -283,8 +283,14 @@ static void
gimp_action_impl_activate (GAction *action,
GVariant *parameter)
{
g_object_add_weak_pointer (G_OBJECT (action), (gpointer) &action);
gimp_action_emit_activate (GIMP_ACTION (action), parameter);
if (action != NULL)
/* Some actions are self-destructive, such as the "windows-recent-*"
* actions which don't exist after being run. Don't log these.
*/
gimp_action_history_action_activated (GIMP_ACTION (action));
}

View File

@ -790,8 +790,8 @@
<attribute name="label" translatable="yes" context="windows-action">_Windows</attribute>
<section>
<submenu>
<attribute name="label" translatable="yes" context="windows-action">_Recently Closed Dialogs</attribute>
<!-- TODO: fill recently closed dialogs -->
<attribute name="label" translatable="yes" context="windows-action">_Recently Closed Docks</attribute>
<!-- Recently closed docks will be filled here automatically -->
</submenu>
<submenu>
<attribute name="label" translatable="yes" context="windows-action">_Dockable Dialogs</attribute>