Bug #9399
closedopening a file from the 'Recent Files' menu results in a recursive call to update_recent_files(..)
100%
Description
The following console spew is being emited by Gtk each time a file is opened from the Recent Files menu.
chirpw:153: Warning: gsignal.c:2964: invalid object type ` gtk.main() chirpw:153: Warning: g_value_type_compatible: assertion `G_TYPE_IS_VALUE (src_type)' failed gtk.main()
This is a result of a call being made from within a menu action gtk event, removing the menu action. I suspect this results in some sort internal failure of gtk and the consequences are unknown.
Currently, the call to do_open(..) updates the recent_file list by calling record_recent_file(..) which subsequently modifies the recent_file list and calls update_recent_files(..) to regenerate the action menu items by the old_action and creating a new one. The issue is that the old_action is still executing.
The proposed solution is to only update the submenu of Recent Files menu action when it is activated. thus decoupling the act of update the recent_files list and showing the UI.