Skip to content

Recent file menus and item states not updating correctly #31

@nohamelin

Description

@nohamelin

Giving a try to the current gaupol-master in a live session of Fedora 24 Workstation:

  • Create a new document, add a new subtitle and the respective translation.
  • Save both files, and close the tab.
  • Now there aren't open files. Open the File menu: note that the menuitem "Open translation" is disabled, but the submenu "Open recent translations" have enabled subentries. Clicking in one of these files triggers the next error:

File: /home/liveuser/Downloads/gaupol-master/gaupol/agents/menu.py
Line: 96
In: _on_open_recent_translation_file_activate

    self.open_translation(action.gaupol_path)

File: /home/liveuser/Downloads/gaupol-master/aeidon/deco.py
Line: 218
In: inner_wrapper

    return function(_args, *_kwargs)

File: /home/liveuser/Downloads/gaupol-master/gaupol/agents/open.py
Line: 286
In: open_translation

    page = self._open_file(path, encodings, aeidon.documents.TRAN)

File: /home/liveuser/Downloads/gaupol-master/gaupol/agents/open.py
Line: 250
In: _open_file

    n = self._try_open_file(page, doc, path, encoding)

File: /home/liveuser/Downloads/gaupol-master/gaupol/agents/open.py
Line: 392
In: _try_open_file

    return page.project.open(doc, path, encoding, **kwargs)

AttributeError: 'NoneType' object has no attribute 'project'

Environment

Platform: Linux-4.5.5-300.fc24.i686-i686-with-fedora-24-Twenty_Four
Locale: en_US.utf_8

Versions

aeidon: 0.91
chardet: 2.2.1
enchant: 1.6.6
gaupol: 0.91
gstreamer: 1.8.1.0
gtk+: 3.20.6
pygobject: 3.20.1
python: 3.5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions