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. over 1 year ago. Updated over 1 year ago.

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

100%

Estimated time:
Chirp Version:
daily
Model affected:
(All models)
Platform:
Windows

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 #1

Updated by Kosta A. over 1 year ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Patch sent to dev mailing list.

Actions #2

Updated by Kosta A. over 1 year ago

  • Status changed from Resolved to Closed

Applied in changeset commit:c22789aeac4a.

Actions

Also available in: Atom PDF