[gedit-cossa] Destroy previewer if the document is closed.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-cossa] Destroy previewer if the document is closed.
- Date: Thu, 2 Jun 2011 11:01:39 +0000 (UTC)
commit f3286fbb49073639ca9003acbda6180323256884
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Jun 2 13:03:42 2011 +0200
Destroy previewer if the document is closed.
src/gedit-cossa-plugin.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/gedit-cossa-plugin.c b/src/gedit-cossa-plugin.c
index 739c1dc..0659571 100644
--- a/src/gedit-cossa-plugin.c
+++ b/src/gedit-cossa-plugin.c
@@ -292,6 +292,7 @@ cossa_view_activatable_deactivate (GeditViewActivatable *activatable)
{
CossaPluginPrivate *priv;
GeditDocument *doc;
+ GtkWidget *window;
gedit_debug (DEBUG_PLUGINS);
@@ -300,6 +301,14 @@ cossa_view_activatable_deactivate (GeditViewActivatable *activatable)
doc = GEDIT_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->view)));
g_signal_handlers_disconnect_by_func (doc, on_document_saved, activatable);
+
+ window = g_object_get_data (G_OBJECT (priv->view), COSSA_WINDOW_PREVIEW);
+
+ if (window != NULL)
+ {
+ gtk_widget_destroy (window);
+ g_object_set_data (G_OBJECT (priv->view), COSSA_WINDOW_PREVIEW, NULL);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]