From 2b00f658a9162af62a1318ffd4dcc21563afe198 Mon Sep 17 00:00:00 2001 From: Andrew Fowlie Date: Fri, 18 Jan 2019 16:30:29 +0800 Subject: addresses #391 - gets snippet window size before destroying it --- plugins/snippets/snippets/Manager.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'plugins/snippets') diff --git a/plugins/snippets/snippets/Manager.py b/plugins/snippets/snippets/Manager.py index e94cd283..f496b1c3 100755 --- a/plugins/snippets/snippets/Manager.py +++ b/plugins/snippets/snippets/Manager.py @@ -599,16 +599,17 @@ class Manager: if self.snippets_doc: self.snippets_doc.stop() - alloc = dlg.get_allocation() - self.default_size = [alloc.width, alloc.height] self.manager = None - self.unref_languages() self.snippet = None self.model = None self.dlg = None - def on_dialog_snippets_response(self, dlg, resp): + def on_dialog_snippets_response(self, dlg, resp): + + alloc = dlg.get_allocation() + self.default_size = [alloc.width, alloc.height] + if resp == Gtk.ResponseType.HELP: Pluma.help_display(self, 'pluma', 'pluma-snippets-plugin') return -- cgit v1.2.1