From 75814c2cb059475555bb40120f2fa510e2d9ea45 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 25 Apr 2012 10:38:49 -0500 Subject: constify the dbusmenu_menuitem_get*() functions --- libdbusmenu-glib/menuitem.c | 14 +++++++------- libdbusmenu-glib/menuitem.h | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'libdbusmenu-glib') diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index c81c36e..cfc6bc3 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -463,7 +463,7 @@ send_about_to_show (DbusmenuMenuitem * mi, void (*cb) (DbusmenuMenuitem * mi, gp /* A helper function to get the type of the menuitem, this might be a candidate for optimization in the future. */ static const gchar * -menuitem_get_type (DbusmenuMenuitem * mi) +menuitem_get_type (const DbusmenuMenuitem * mi) { DbusmenuMenuitemPrivate * priv = DBUSMENU_MENUITEM_GET_PRIVATE(mi); GVariant * currentval = (GVariant *)g_hash_table_lookup(priv->properties, DBUSMENU_MENUITEM_PROP_TYPE); @@ -1287,7 +1287,7 @@ dbusmenu_menuitem_property_set_variant (DbusmenuMenuitem * mi, const gchar * pro * is not set or is not a string. */ const gchar * -dbusmenu_menuitem_property_get (DbusmenuMenuitem * mi, const gchar * property) +dbusmenu_menuitem_property_get (const DbusmenuMenuitem * mi, const gchar * property) { GVariant * variant = dbusmenu_menuitem_property_get_variant(mi, property); if (variant == NULL) return NULL; @@ -1307,7 +1307,7 @@ dbusmenu_menuitem_property_get (DbusmenuMenuitem * mi, const gchar * property) * Return value: (transfer none): A GVariant for the property. */ GVariant * -dbusmenu_menuitem_property_get_variant (DbusmenuMenuitem * mi, const gchar * property) +dbusmenu_menuitem_property_get_variant (const DbusmenuMenuitem * mi, const gchar * property) { g_return_val_if_fail(DBUSMENU_IS_MENUITEM(mi), NULL); g_return_val_if_fail(property != NULL, NULL); @@ -1334,7 +1334,7 @@ dbusmenu_menuitem_property_get_variant (DbusmenuMenuitem * mi, const gchar * pro * Return value: The value of the property or #FALSE. */ gboolean -dbusmenu_menuitem_property_get_bool (DbusmenuMenuitem * mi, const gchar * property) +dbusmenu_menuitem_property_get_bool (const DbusmenuMenuitem * mi, const gchar * property) { GVariant * variant = dbusmenu_menuitem_property_get_variant(mi, property); if (variant == NULL) return FALSE; @@ -1368,7 +1368,7 @@ dbusmenu_menuitem_property_get_bool (DbusmenuMenuitem * mi, const gchar * proper * Return value: The value of the property or zero. */ gint -dbusmenu_menuitem_property_get_int (DbusmenuMenuitem * mi, const gchar * property) +dbusmenu_menuitem_property_get_int (const DbusmenuMenuitem * mi, const gchar * property) { GVariant * variant = dbusmenu_menuitem_property_get_variant(mi, property); if (variant == NULL) return 0; @@ -1401,7 +1401,7 @@ dbusmenu_menuitem_property_get_int (DbusmenuMenuitem * mi, const gchar * propert * is not set or is not a byte array. */ const guchar * -dbusmenu_menuitem_property_get_byte_array (DbusmenuMenuitem * mi, const gchar * property, gsize * nelements) +dbusmenu_menuitem_property_get_byte_array (const DbusmenuMenuitem * mi, const gchar * property, gsize * nelements) { GVariant * variant = dbusmenu_menuitem_property_get_variant(mi, property); if (variant == NULL) { @@ -1423,7 +1423,7 @@ dbusmenu_menuitem_property_get_byte_array (DbusmenuMenuitem * mi, const gchar * * Return value: A boolean checking to see if the property is available */ gboolean -dbusmenu_menuitem_property_exist (DbusmenuMenuitem * mi, const gchar * property) +dbusmenu_menuitem_property_exist (const DbusmenuMenuitem * mi, const gchar * property) { g_return_val_if_fail(DBUSMENU_IS_MENUITEM(mi), FALSE); g_return_val_if_fail(property != NULL, FALSE); diff --git a/libdbusmenu-glib/menuitem.h b/libdbusmenu-glib/menuitem.h index 76422f9..d9e26cf 100644 --- a/libdbusmenu-glib/menuitem.h +++ b/libdbusmenu-glib/menuitem.h @@ -498,12 +498,12 @@ gboolean dbusmenu_menuitem_property_set_variant (DbusmenuMenuitem * mi, const gc gboolean dbusmenu_menuitem_property_set_bool (DbusmenuMenuitem * mi, const gchar * property, const gboolean value); gboolean dbusmenu_menuitem_property_set_int (DbusmenuMenuitem * mi, const gchar * property, const gint value); gboolean dbusmenu_menuitem_property_set_byte_array (DbusmenuMenuitem * mi, const gchar * property, const guchar * value, gsize nelements); -const gchar * dbusmenu_menuitem_property_get (DbusmenuMenuitem * mi, const gchar * property); -GVariant * dbusmenu_menuitem_property_get_variant (DbusmenuMenuitem * mi, const gchar * property); -gboolean dbusmenu_menuitem_property_get_bool (DbusmenuMenuitem * mi, const gchar * property); -gint dbusmenu_menuitem_property_get_int (DbusmenuMenuitem * mi, const gchar * property); -const guchar * dbusmenu_menuitem_property_get_byte_array (DbusmenuMenuitem * mi, const gchar * property, gsize * nelements); -gboolean dbusmenu_menuitem_property_exist (DbusmenuMenuitem * mi, const gchar * property); +const gchar * dbusmenu_menuitem_property_get (const DbusmenuMenuitem * mi, const gchar * property); +GVariant * dbusmenu_menuitem_property_get_variant (const DbusmenuMenuitem * mi, const gchar * property); +gboolean dbusmenu_menuitem_property_get_bool (const DbusmenuMenuitem * mi, const gchar * property); +gint dbusmenu_menuitem_property_get_int (const DbusmenuMenuitem * mi, const gchar * property); +const guchar * dbusmenu_menuitem_property_get_byte_array (const DbusmenuMenuitem * mi, const gchar * property, gsize * nelements); +gboolean dbusmenu_menuitem_property_exist (const DbusmenuMenuitem * mi, const gchar * property); GList * dbusmenu_menuitem_properties_list (DbusmenuMenuitem * mi) G_GNUC_WARN_UNUSED_RESULT; GHashTable * dbusmenu_menuitem_properties_copy (DbusmenuMenuitem * mi); void dbusmenu_menuitem_property_remove (DbusmenuMenuitem * mi, const gchar * property); -- cgit v1.2.3