From 805570985a2681d6bf9aad3c58924a8c5f102a36 Mon Sep 17 00:00:00 2001 From: gm10 <13855078+gm10@users.noreply.github.com> Date: Sat, 19 Jan 2019 13:18:50 +0100 Subject: [PATCH] disconnect the keyPress handler when destroying the plugin --- usr/lib/linuxmint/mintMenu/plugins/applications.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index cb4fd45..9508af5 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -215,7 +215,7 @@ class pluginclass( object ): self.filterTimer = None self.menuChangedTimer = None # Hookup for text input - self.mintMenuWin.window.connect( "key-press-event", self.keyPress ) + self.keyPress_handler = self.mintMenuWin.window.connect( "key-press-event", self.keyPress ) self.favoritesBox.connect( "drag-data-received", self.ReceiveCallback ) @@ -324,6 +324,8 @@ class pluginclass( object ): self.categoriesBox.destroy() self.favoritesBox.destroy() + self.mintMenuWin.window.disconnect(self.keyPress_handler) + self.settings.notifyRemoveAll() def changePluginSize( self, settings, key, args ):