-
Committer:
Johannes Sasongko
-
Date:
2016-12-15 07:38:46 UTC
-
Revision ID:
git-v1:f607a5f4573dd3015cbf7aa01261da5d34d22ddd
bpm: Fix autodetection from panel.
When the menu is opened from a panel, the playlist_view argument passed to
on_auto_menuitem (a menu.simple_menu_item() callback) is a panel.Panel
(which is not a widget). This caused playlist_view.get_toplevel() to fail.
This commit makes the code very specific: if playlist_view is a Widget, use
get_toplevel(); if it's a Panel, use parent; otherwise use None as the
dialog's parent window.
Fixes https://github.com/exaile/exaile/issues/296