[gnome-builder] beautifier plugin: fix view cleanup
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] beautifier plugin: fix view cleanup
- Date: Sun, 7 Jan 2018 21:20:16 +0000 (UTC)
commit 1756acee3c6f2e707a092b2ecbae4db1339919d9
Author: Sebastien Lafargue <slafargue gnome org>
Date: Fri Jan 5 19:22:06 2018 +0100
beautifier plugin: fix view cleanup
.../beautifier/gb-beautifier-editor-addin.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/beautifier/gb-beautifier-editor-addin.c
b/src/plugins/beautifier/gb-beautifier-editor-addin.c
index e593fe1..9dd5bad 100644
--- a/src/plugins/beautifier/gb-beautifier-editor-addin.c
+++ b/src/plugins/beautifier/gb-beautifier-editor-addin.c
@@ -414,13 +414,16 @@ gb_beautifier_editor_addin_view_set (IdeEditorAddin *addin,
if (view == self->current_view)
return;
- if (view != NULL)
- cleanup_view_cb (GTK_WIDGET (view), self);
+ cleanup_view_cb (GTK_WIDGET (self->current_view), self);
}
- self->current_view = view;
if (view != NULL)
- setup_view_cb (GTK_WIDGET (view), self);
+ {
+ dzl_set_weak_pointer (&self->current_view, view);
+ setup_view_cb (GTK_WIDGET (view), self);
+ }
+ else
+ self->current_view = NULL;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]