Merge lp:~charlesk/libdbusmenu/constify-dbusmenu-menuitem-getters into lp:libdbusmenu/12.10

Proposed by Charles Kerr on 2012-04-25
Status: Merged
Approved by: Ted Gould on 2012-04-30
Approved revision: 416
Merged at revision: 421
Proposed branch: lp:~charlesk/libdbusmenu/constify-dbusmenu-menuitem-getters
Merge into: lp:libdbusmenu/12.10
Diff against target: 89 lines (+13/-13)
2 files modified
libdbusmenu-glib/menuitem.c (+7/-7)
libdbusmenu-glib/menuitem.h (+6/-6)
To merge this branch: bzr merge lp:~charlesk/libdbusmenu/constify-dbusmenu-menuitem-getters
Reviewer Review Type Date Requested Status
Ted Gould (community) 2012-04-25 Approve on 2012-04-30
Review via email: mp+103506@code.launchpad.net
To post a comment you must log in.
Ted Gould (ted) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libdbusmenu-glib/menuitem.c'
2--- libdbusmenu-glib/menuitem.c 2012-03-08 15:44:05 +0000
3+++ libdbusmenu-glib/menuitem.c 2012-04-25 15:45:37 +0000
4@@ -463,7 +463,7 @@
5 /* A helper function to get the type of the menuitem, this might
6 be a candidate for optimization in the future. */
7 static const gchar *
8-menuitem_get_type (DbusmenuMenuitem * mi)
9+menuitem_get_type (const DbusmenuMenuitem * mi)
10 {
11 DbusmenuMenuitemPrivate * priv = DBUSMENU_MENUITEM_GET_PRIVATE(mi);
12 GVariant * currentval = (GVariant *)g_hash_table_lookup(priv->properties, DBUSMENU_MENUITEM_PROP_TYPE);
13@@ -1287,7 +1287,7 @@
14 * is not set or is not a string.
15 */
16 const gchar *
17-dbusmenu_menuitem_property_get (DbusmenuMenuitem * mi, const gchar * property)
18+dbusmenu_menuitem_property_get (const DbusmenuMenuitem * mi, const gchar * property)
19 {
20 GVariant * variant = dbusmenu_menuitem_property_get_variant(mi, property);
21 if (variant == NULL) return NULL;
22@@ -1307,7 +1307,7 @@
23 * Return value: (transfer none): A GVariant for the property.
24 */
25 GVariant *
26-dbusmenu_menuitem_property_get_variant (DbusmenuMenuitem * mi, const gchar * property)
27+dbusmenu_menuitem_property_get_variant (const DbusmenuMenuitem * mi, const gchar * property)
28 {
29 g_return_val_if_fail(DBUSMENU_IS_MENUITEM(mi), NULL);
30 g_return_val_if_fail(property != NULL, NULL);
31@@ -1334,7 +1334,7 @@
32 * Return value: The value of the property or #FALSE.
33 */
34 gboolean
35-dbusmenu_menuitem_property_get_bool (DbusmenuMenuitem * mi, const gchar * property)
36+dbusmenu_menuitem_property_get_bool (const DbusmenuMenuitem * mi, const gchar * property)
37 {
38 GVariant * variant = dbusmenu_menuitem_property_get_variant(mi, property);
39 if (variant == NULL) return FALSE;
40@@ -1368,7 +1368,7 @@
41 * Return value: The value of the property or zero.
42 */
43 gint
44-dbusmenu_menuitem_property_get_int (DbusmenuMenuitem * mi, const gchar * property)
45+dbusmenu_menuitem_property_get_int (const DbusmenuMenuitem * mi, const gchar * property)
46 {
47 GVariant * variant = dbusmenu_menuitem_property_get_variant(mi, property);
48 if (variant == NULL) return 0;
49@@ -1401,7 +1401,7 @@
50 * is not set or is not a byte array.
51 */
52 const guchar *
53-dbusmenu_menuitem_property_get_byte_array (DbusmenuMenuitem * mi, const gchar * property, gsize * nelements)
54+dbusmenu_menuitem_property_get_byte_array (const DbusmenuMenuitem * mi, const gchar * property, gsize * nelements)
55 {
56 GVariant * variant = dbusmenu_menuitem_property_get_variant(mi, property);
57 if (variant == NULL) {
58@@ -1423,7 +1423,7 @@
59 * Return value: A boolean checking to see if the property is available
60 */
61 gboolean
62-dbusmenu_menuitem_property_exist (DbusmenuMenuitem * mi, const gchar * property)
63+dbusmenu_menuitem_property_exist (const DbusmenuMenuitem * mi, const gchar * property)
64 {
65 g_return_val_if_fail(DBUSMENU_IS_MENUITEM(mi), FALSE);
66 g_return_val_if_fail(property != NULL, FALSE);
67
68=== modified file 'libdbusmenu-glib/menuitem.h'
69--- libdbusmenu-glib/menuitem.h 2012-01-26 19:50:22 +0000
70+++ libdbusmenu-glib/menuitem.h 2012-04-25 15:45:37 +0000
71@@ -498,12 +498,12 @@
72 gboolean dbusmenu_menuitem_property_set_bool (DbusmenuMenuitem * mi, const gchar * property, const gboolean value);
73 gboolean dbusmenu_menuitem_property_set_int (DbusmenuMenuitem * mi, const gchar * property, const gint value);
74 gboolean dbusmenu_menuitem_property_set_byte_array (DbusmenuMenuitem * mi, const gchar * property, const guchar * value, gsize nelements);
75-const gchar * dbusmenu_menuitem_property_get (DbusmenuMenuitem * mi, const gchar * property);
76-GVariant * dbusmenu_menuitem_property_get_variant (DbusmenuMenuitem * mi, const gchar * property);
77-gboolean dbusmenu_menuitem_property_get_bool (DbusmenuMenuitem * mi, const gchar * property);
78-gint dbusmenu_menuitem_property_get_int (DbusmenuMenuitem * mi, const gchar * property);
79-const guchar * dbusmenu_menuitem_property_get_byte_array (DbusmenuMenuitem * mi, const gchar * property, gsize * nelements);
80-gboolean dbusmenu_menuitem_property_exist (DbusmenuMenuitem * mi, const gchar * property);
81+const gchar * dbusmenu_menuitem_property_get (const DbusmenuMenuitem * mi, const gchar * property);
82+GVariant * dbusmenu_menuitem_property_get_variant (const DbusmenuMenuitem * mi, const gchar * property);
83+gboolean dbusmenu_menuitem_property_get_bool (const DbusmenuMenuitem * mi, const gchar * property);
84+gint dbusmenu_menuitem_property_get_int (const DbusmenuMenuitem * mi, const gchar * property);
85+const guchar * dbusmenu_menuitem_property_get_byte_array (const DbusmenuMenuitem * mi, const gchar * property, gsize * nelements);
86+gboolean dbusmenu_menuitem_property_exist (const DbusmenuMenuitem * mi, const gchar * property);
87 GList * dbusmenu_menuitem_properties_list (DbusmenuMenuitem * mi) G_GNUC_WARN_UNUSED_RESULT;
88 GHashTable * dbusmenu_menuitem_properties_copy (DbusmenuMenuitem * mi);
89 void dbusmenu_menuitem_property_remove (DbusmenuMenuitem * mi, const gchar * property);

Subscribers

People subscribed via source and target branches

to all changes: