[gtk+] window: Use g_set_object
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] window: Use g_set_object
- Date: Tue, 1 Dec 2015 02:55:08 +0000 (UTC)
commit d908c38ec3f552014572a831464e7d8020ef7f7d
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Nov 30 20:45:57 2015 -0500
window: Use g_set_object
No need to do the same thing manually.
gtk/gtkwindow.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 049e05f..4be1034 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -12430,11 +12430,5 @@ gtk_window_set_hardcoded_window (GtkWindow *window,
g_return_if_fail (GTK_IS_WINDOW (window));
g_return_if_fail (!_gtk_widget_get_realized (GTK_WIDGET (window)));
- if (priv->hardcoded_window)
- g_object_unref (priv->hardcoded_window);
-
- priv->hardcoded_window = gdk_window;
-
- if (gdk_window)
- g_object_ref (gdk_window);
+ g_set_object (&priv->hardcoded_window, gdk_window);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]