[gtksourceview] file: use g_set_object()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] file: use g_set_object()
- Date: Thu, 11 Jun 2015 14:07:50 +0000 (UTC)
commit 4954e339b3cc1be9937d421a4920d5513569c8b1
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Jun 11 16:05:07 2015 +0200
file: use g_set_object()
gtksourceview/gtksourcefile.c | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
---
diff --git a/gtksourceview/gtksourcefile.c b/gtksourceview/gtksourcefile.c
index 15875ee..35f813d 100644
--- a/gtksourceview/gtksourcefile.c
+++ b/gtksourceview/gtksourcefile.c
@@ -264,16 +264,8 @@ gtk_source_file_set_location (GtkSourceFile *file,
g_return_if_fail (GTK_SOURCE_IS_FILE (file));
g_return_if_fail (location == NULL || G_IS_FILE (location));
- if (file->priv->location != location)
+ if (g_set_object (&file->priv->location, location))
{
- g_clear_object (&file->priv->location);
- file->priv->location = location;
-
- if (location != NULL)
- {
- g_object_ref (location);
- }
-
g_object_notify (G_OBJECT (file), "location");
/* The modification_time is for the old location. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]