gnome-menus r873 - in trunk: . libmenu
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-menus r873 - in trunk: . libmenu
- Date: Fri, 11 Apr 2008 16:50:42 +0100 (BST)
Author: vuntz
Date: Fri Apr 11 16:50:41 2008
New Revision: 873
URL: http://svn.gnome.org/viewvc/gnome-menus?rev=873&view=rev
Log:
2008-04-11 Vincent Untz <vuntz gnome org>
* libmenu/inotify-syscalls.h:
* libmenu/inotify.h: killed
* libmenu/menu-monitor.c: (register_monitor): call g_type_init() once
since we're using gio in this file and so GObjects. Since
libgnome-menus doesn't export any GObject stuff, an app can't know that
g_type_init() has to be called and we have to do it.
Removed:
trunk/libmenu/inotify-syscalls.h
trunk/libmenu/inotify.h
Modified:
trunk/ChangeLog
trunk/libmenu/menu-monitor.c
Modified: trunk/libmenu/menu-monitor.c
==============================================================================
--- trunk/libmenu/menu-monitor.c (original)
+++ trunk/libmenu/menu-monitor.c Fri Apr 11 16:50:41 2008
@@ -203,8 +203,17 @@
register_monitor (const char *path,
gboolean is_directory)
{
- MenuMonitor *retval;
- GFile *file;
+ static gboolean initted = FALSE;
+ MenuMonitor *retval;
+ GFile *file;
+
+ if (!initted)
+ {
+ /* This is the only place where we're using GObject and the app can't
+ * know we're using it, so we need to init the type system ourselves. */
+ g_type_init ();
+ initted = TRUE;
+ }
retval = g_new0 (MenuMonitor, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]