From f66f854c8e0cc8c0013d257335dfc16ec6b85cd0 Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Tue, 21 May 2013 13:15:39 -0400 Subject: [PATCH] Add destroy method to recent plugin --- usr/lib/linuxmint/mintMenu/plugins/recent.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/recent.py b/usr/lib/linuxmint/mintMenu/plugins/recent.py index 407655f..a1eefa0 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/recent.py +++ b/usr/lib/linuxmint/mintMenu/plugins/recent.py @@ -53,7 +53,7 @@ class pluginclass: self.FileList=[] self.RecManagerInstance = Gtk.RecentManager.get_default() - self.RecManagerInstance.connect("changed", self.DoRecent) + self.recentManagerId = self.RecManagerInstance.connect("changed", self.DoRecent) self.RegenPlugin() self.builder.get_object( "RecentTabs" ).set_current_page(1) @@ -64,6 +64,16 @@ class pluginclass: def wake (self) : pass + def destroy( self ): + self.recentBox.destroy() + self.recentVBox.destroy() + self.builder.get_object( "RecentTabs" ).destroy() + self.builder.get_object("ClrBtn").destroy() + self.content_holder.destroy() + self.settings.notifyRemoveAll() + if self.recentManagerId: + self.RecManagerInstance.disconnect(self.recentManagerId) + def RegenPlugin( self, *args, **kargs ): self.GetGSettingsEntries()