[evolution/webkit-composer: 147/231] EEmoticonToolButton: Fix leaking popup window.
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit-composer: 147/231] EEmoticonToolButton: Fix leaking popup window.
- Date: Fri, 13 Sep 2013 14:18:20 +0000 (UTC)
commit b9347540bab49ae61436d59b3d4cdc5c4da6053c
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Feb 5 07:49:20 2013 -0500
EEmoticonToolButton: Fix leaking popup window.
e-util/e-emoticon-tool-button.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/e-util/e-emoticon-tool-button.c b/e-util/e-emoticon-tool-button.c
index e544dc4..54f99c9 100644
--- a/e-util/e-emoticon-tool-button.c
+++ b/e-util/e-emoticon-tool-button.c
@@ -294,7 +294,7 @@ emoticon_tool_button_dispose (GObject *object)
priv = E_EMOTICON_TOOL_BUTTON_GET_PRIVATE (object);
if (priv->window != NULL) {
- g_object_unref (priv->window);
+ gtk_widget_destroy (priv->window);
priv->window = NULL;
}
@@ -573,10 +573,12 @@ e_emoticon_tool_button_init (EEmoticonToolButton *button)
/* Build the pop-up window. */
window = gtk_window_new (GTK_WINDOW_POPUP);
- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (button));
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
gtk_window_set_type_hint (
GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_COMBO);
+ button->priv->window = g_object_ref_sink (window);
+
+ toplevel = gtk_widget_get_toplevel (GTK_WIDGET (button));
if (GTK_IS_WINDOW (toplevel)) {
gtk_window_group_add_window (
gtk_window_get_group (GTK_WINDOW (toplevel)),
@@ -584,7 +586,6 @@ e_emoticon_tool_button_init (EEmoticonToolButton *button)
gtk_window_set_transient_for (
GTK_WINDOW (window), GTK_WINDOW (toplevel));
}
- button->priv->window = g_object_ref (window);
g_signal_connect_swapped (
window, "show",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]