Project

General

Profile

Actions

Bug #9399

closed

opening a file from the 'Recent Files' menu results in a recursive call to update_recent_files(..)

Added by Kosta A. about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
09/28/2021
Due date:
% Done:

100%

Estimated time:
Chirp Version:
daily
Model affected:
(All models)
Platform:
Windows
Debug Log:
I read the instructions above:

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.

Actions

Also available in: Atom PDF