aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-06-14 16:10:54 -0500
committerTed Gould <ted@gould.cx>2010-06-14 16:10:54 -0500
commitb2be41cd5085e821f5557303592c11a064eef104 (patch)
tree1e8f9e3141e9275916352beab4b2ddb1f854d9cc
parent2525166d72f421e045b21910aa7df2523135d1c9 (diff)
downloadlibdbusmenu-b2be41cd5085e821f5557303592c11a064eef104.tar.gz
libdbusmenu-b2be41cd5085e821f5557303592c11a064eef104.tar.bz2
libdbusmenu-b2be41cd5085e821f5557303592c11a064eef104.zip
Add two functions for setting and getting the accelerator group.
-rw-r--r--libdbusmenu-gtk/client.c34
-rw-r--r--libdbusmenu-gtk/client.h3
2 files changed, 37 insertions, 0 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index 3bd0af6..64f6a6d 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -99,6 +99,40 @@ dbusmenu_gtkclient_finalize (GObject *object)
return;
}
+/**
+ dbusmenu_gtkclient_set_accel_group:
+ @client: To set the group on
+ @agroup: The new acceleration group
+
+ Sets the acceleration group for the menu items with accelerators
+ on this client.
+*/
+void
+dbusmenu_gtkclient_set_accel_group (DbusmenuGtkClient * client, GtkAccelGroup * agroup)
+{
+ g_return_if_fail(DBUSMENU_IS_GTKCLIENT(client));
+ g_return_if_fail(GTK_IS_ACCEL_GROUP(agroup));
+
+ return;
+}
+
+/**
+ dbusmenu_gtkclient_get_accel_group:
+ @client: Client to query for an accelerator group
+
+ Gets the accel group for this client.
+
+ Return value: Either a valid group or #NULL on error or
+ none set.
+*/
+GtkAccelGroup *
+dbusmenu_gtkclient_get_accel_group (DbusmenuGtkClient * client)
+{
+ g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), NULL);
+
+ return NULL;
+}
+
/* Internal Functions */
static const gchar * data_menuitem = "dbusmenugtk-data-gtkmenuitem";
diff --git a/libdbusmenu-gtk/client.h b/libdbusmenu-gtk/client.h
index 7672bf7..a7c96ee 100644
--- a/libdbusmenu-gtk/client.h
+++ b/libdbusmenu-gtk/client.h
@@ -79,6 +79,9 @@ DbusmenuGtkClient * dbusmenu_gtkclient_new (gchar * dbus_name, gchar * dbus_obje
GtkMenuItem * dbusmenu_gtkclient_menuitem_get (DbusmenuGtkClient * client, DbusmenuMenuitem * item);
GtkMenu * dbusmenu_gtkclient_menuitem_get_submenu (DbusmenuGtkClient * client, DbusmenuMenuitem * item);
+void dbusmenu_gtkclient_set_accel_group (DbusmenuGtkClient * client, GtkAccelGroup * agroup);
+GtkAccelGroup * dbusmenu_gtkclient_get_accel_group (DbusmenuGtkClient * client);
+
void dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem * item, GtkMenuItem * gmi, DbusmenuMenuitem * parent);
/**