diff options
author | Ted Gould <ted@canonical.com> | 2009-04-16 12:57:03 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-04-16 12:57:03 -0500 |
commit | c3d826854d0dd3b27b5591d03e70d2c1d903bb37 (patch) | |
tree | 9801e55554e366c76e113b92e8d4da1f2e6ce82e /libdbusmenu-glib | |
parent | 50f2ad0a5e649d43acdcdf06c0453f7a5733e953 (diff) | |
download | libdbusmenu-c3d826854d0dd3b27b5591d03e70d2c1d903bb37.tar.gz libdbusmenu-c3d826854d0dd3b27b5591d03e70d2c1d903bb37.tar.bz2 libdbusmenu-c3d826854d0dd3b27b5591d03e70d2c1d903bb37.zip |
Putting in IDs
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/menuitem.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index 5d22b32..f6cd99e 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -7,6 +7,7 @@ typedef struct _DbusmenuMenuitemPrivate DbusmenuMenuitemPrivate; struct _DbusmenuMenuitemPrivate { + guint id; GList * children; }; @@ -33,9 +34,16 @@ dbusmenu_menuitem_class_init (DbusmenuMenuitemClass *klass) object_class->finalize = dbusmenu_menuitem_finalize; } +static guint menuitem_next_id = 1; + static void dbusmenu_menuitem_init (DbusmenuMenuitem *self) { + DbusmenuMenuitemPrivate * priv = DBUSMENU_MENUITEM_GET_PRIVATE(self); + + priv->id = menuitem_next_id++; + priv->children = NULL; + return; } |