sommer / loxodo

Password Safe V3 compatible Password Vault
http://www.christoph-sommer.de/loxodo
GNU General Public License v2.0
75 stars 38 forks source link

Fix for "menus attached to menu bar can't have invoking window" warning #35

Closed jansel closed 1 year ago

jansel commented 8 years ago

On the latest versions of wxwidgets right clicking on a record results in the console warning:

Traceback (most recent call last):
  File ".../loxodo/src/frontends/wx/vaultframe.py", line 351, in _on_list_contextmenu
    self.PopupMenu(self._recordmenu)
  File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 11144, in PopupMenu
    return _core_.Window_PopupMenu(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "!IsAttached()" failed at ../src/common/menucmn.cpp(715) in SetInvokingWindow(): menus attached to menu bar can't have invoking window

This problem is described here -- wxwidgets does not want you to use a single menu both for popups and menu bars. This pull request fixes the warning by creating two copies of the record menu.