disconnect the keyPress handler when destroying the plugin

This commit is contained in:
gm10 2019-01-19 13:18:50 +01:00
parent 856addf5b8
commit 805570985a
No known key found for this signature in database
GPG Key ID: A981D4EA8CF993A9

View File

@ -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 ):