[gedit] app: use g_set_object() to set the new GtkPageSetup



commit 673ffe9ebe507013606d526492e9bb436a5f3f64
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Jun 6 17:52:01 2015 +0200

    app: use g_set_object() to set the new GtkPageSetup

 configure.ac      |    2 +-
 gedit/gedit-app.c |    7 +------
 2 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index cd2f0cb..75d9a26 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ GEDIT_API_VERSION=3.14
 AC_SUBST(GEDIT_API_VERSION)
 
 # Dependencies
-GLIB_REQUIRED=2.40.0
+GLIB_REQUIRED=2.44
 GTK_REQUIRED=3.16
 GTKSOURCEVIEW_REQUIRED=3.17.2
 LIBPEAS_REQUIRED=1.14.1
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index 251ad07..c01de28 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -1816,12 +1816,7 @@ _gedit_app_set_default_page_setup (GeditApp     *app,
 
        priv = gedit_app_get_instance_private (app);
 
-       if (priv->page_setup != NULL)
-       {
-               g_object_unref (priv->page_setup);
-       }
-
-       priv->page_setup = g_object_ref (page_setup);
+       g_set_object (&priv->page_setup, page_setup);
 }
 
 /* Returns a copy */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]