[gtk+] window: Always disconnect signal handlers
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] window: Always disconnect signal handlers
- Date: Wed, 27 Jan 2016 18:10:02 +0000 (UTC)
commit 625f3e5f3940192ed21519c2477bd283a3fa4ae2
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jan 27 13:07:13 2016 -0500
window: Always disconnect signal handlers
We connect to the titlebar widgets change notification regardless
whether it is internally created or not, so don't make the signal
handler disconnection conditional on that either.
gtk/gtkwindow.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 2ff433d..d86f74f 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4028,13 +4028,11 @@ unset_titlebar (GtkWindow *window)
{
GtkWindowPrivate *priv = window->priv;
- if (priv->titlebar != NULL)
- g_signal_handlers_disconnect_by_func (priv->titlebar,
- on_titlebar_title_notify,
- window);
-
if (priv->title_box != NULL)
{
+ g_signal_handlers_disconnect_by_func (priv->title_box,
+ on_titlebar_title_notify,
+ window);
gtk_widget_unparent (priv->title_box);
priv->title_box = NULL;
priv->titlebar = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]