Browse Source

Overwrite wxEVT_MENU_HIGHLIGHT on frames level

doc-issue-template
MrS0m30n3 8 years ago
parent
commit
a550596c2c
1 changed files with 3 additions and 3 deletions
  1. 6
      youtube_dl_gui/mainframe.py

6
youtube_dl_gui/mainframe.py

@ -306,6 +306,9 @@ class MainFrame(wx.Frame):
self._settings_menu = self._create_menu_item(settings_menu_data) self._settings_menu = self._create_menu_item(settings_menu_data)
self._statuslist_menu = self._create_menu_item(statuslist_menu_data) self._statuslist_menu = self._create_menu_item(statuslist_menu_data)
# Overwrite the menu hover event to avoid changing the statusbar
self.Bind(wx.EVT_MENU_HIGHLIGHT, lambda event: None)
# Bind extra events # Bind extra events
self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self._on_statuslist_right_click, self._status_list) self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self._on_statuslist_right_click, self._status_list)
self.Bind(wx.EVT_TEXT, self._update_savepath, self._path_combobox) self.Bind(wx.EVT_TEXT, self._update_savepath, self._path_combobox)
@ -345,9 +348,6 @@ class MainFrame(wx.Frame):
menu.Bind(wx.EVT_MENU, evt_handler, menu_item) menu.Bind(wx.EVT_MENU, evt_handler, menu_item)
# Overwrite the hover event to avoid changing the statusbar
menu.Bind(wx.EVT_MENU_HIGHLIGHT, lambda event: None)
return menu return menu
def _on_statuslist_right_click(self, event): def _on_statuslist_right_click(self, event):

Loading…
Cancel
Save