gnome-utils r8159 - trunk/logview



Author: cosimoc
Date: Wed Oct 22 11:24:11 2008
New Revision: 8159
URL: http://svn.gnome.org/viewvc/gnome-utils?rev=8159&view=rev

Log:
Unref the GconfClient on shutdown.

Modified:
   trunk/logview/main.c
   trunk/logview/userprefs.c
   trunk/logview/userprefs.h

Modified: trunk/logview/main.c
==============================================================================
--- trunk/logview/main.c	(original)
+++ trunk/logview/main.c	Wed Oct 22 11:24:11 2008
@@ -191,6 +191,8 @@
 	}
 
 	gtk_main ();
+
+	prefs_shutdown ();
    
 	return EXIT_SUCCESS;
 }

Modified: trunk/logview/userprefs.c
==============================================================================
--- trunk/logview/userprefs.c	(original)
+++ trunk/logview/userprefs.c	Wed Oct 22 11:24:11 2008
@@ -23,12 +23,13 @@
 #include "config.h"
 #endif
 
+#include <sys/stat.h>
 #include <string.h>
 #include <gtk/gtk.h>
 #include <gconf/gconf-client.h>
 #include <libgnomevfs/gnome-vfs.h>
+
 #include "userprefs.h"
-#include <sys/stat.h>
 #include "logview.h"
 
 #define LOGVIEW_DEFAULT_HEIGHT 400
@@ -371,3 +372,10 @@
 		prefs = prefs_load ();
 	}
 }
+
+void
+prefs_shutdown (void)
+{
+	if (gconf_client)
+		g_object_unref (gconf_client);
+}

Modified: trunk/logview/userprefs.h
==============================================================================
--- trunk/logview/userprefs.h	(original)
+++ trunk/logview/userprefs.h	Wed Oct 22 11:24:11 2008
@@ -40,6 +40,7 @@
 void prefs_save (void);
 void prefs_free_loglist ();
 void prefs_init ();
+void prefs_shutdown ();
 
 #endif /* __LOG_PREFS_H__ */
 



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