aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-09 22:23:17 -0600
committerTed Gould <ted@gould.cx>2010-02-09 22:23:17 -0600
commit2617e7e630e8ee29da21d3f2944887164af5c9af (patch)
tree8a48a36b559836420436092b30ef11a26afec35d
parent999c17083310eb1e144602f62e999aed1203c3a0 (diff)
downloadlibdbusmenu-2617e7e630e8ee29da21d3f2944887164af5c9af.tar.gz
libdbusmenu-2617e7e630e8ee29da21d3f2944887164af5c9af.tar.bz2
libdbusmenu-2617e7e630e8ee29da21d3f2944887164af5c9af.zip
Building the proxy item new function.
-rw-r--r--libdbusmenu-glib/menuitem-proxy.c19
-rw-r--r--libdbusmenu-glib/menuitem-proxy.h1
2 files changed, 20 insertions, 0 deletions
diff --git a/libdbusmenu-glib/menuitem-proxy.c b/libdbusmenu-glib/menuitem-proxy.c
index 39315ae..9a83419 100644
--- a/libdbusmenu-glib/menuitem-proxy.c
+++ b/libdbusmenu-glib/menuitem-proxy.c
@@ -200,3 +200,22 @@ remove_menuitem (DbusmenuMenuitemProxy * pmi)
return;
}
+
+/**
+ dbusmenu_menuitem_proxy_new:
+ @mi: The #DbusmenuMenuitem to proxy
+
+ Builds a new #DbusmenuMenuitemProxy object that proxies
+ all of the values for @mi.
+
+ Return value: A new #DbusmenuMenuitemProxy object.
+*/
+DbusmenuMenuitemProxy *
+dbusmenu_menuitem_proxy_new (DbusmenuMenuitem * mi)
+{
+ DbusmenuMenuitemProxy * pmi = g_object_new(DBUSMENU_TYPE_MENUITEM_PROXY,
+ PROP_MENU_ITEM_S, mi,
+ NULL);
+
+ return pmi;
+}
diff --git a/libdbusmenu-glib/menuitem-proxy.h b/libdbusmenu-glib/menuitem-proxy.h
index 7e593d8..dcf1e8d 100644
--- a/libdbusmenu-glib/menuitem-proxy.h
+++ b/libdbusmenu-glib/menuitem-proxy.h
@@ -66,6 +66,7 @@ struct _DbusmenuMenuitemProxy {
};
GType dbusmenu_menuitem_proxy_get_type (void);
+DbusmenuMenuitemProxy * dbusmenu_menuitem_proxy_new (DbusmenuMenuitem * mi);
G_END_DECLS