[glib/wip/menus: 16/61] Remove _get accessors from GMenuItem
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/menus: 16/61] Remove _get accessors from GMenuItem
- Date: Thu, 17 Nov 2011 23:36:03 +0000 (UTC)
commit ab0bf0ab76207b36ed79f78f75a5267902cbefc6
Author: Ryan Lortie <desrt desrt ca>
Date: Mon Jul 11 01:26:20 2011 +0200
Remove _get accessors from GMenuItem
gio/gmenu.c | 62 -----------------------------------------------------------
gio/gmenu.h | 9 --------
2 files changed, 0 insertions(+), 71 deletions(-)
---
diff --git a/gio/gmenu.c b/gio/gmenu.c
index 54dac68..a86d9d2 100644
--- a/gio/gmenu.c
+++ b/gio/gmenu.c
@@ -334,55 +334,6 @@ g_menu_item_class_init (GMenuItemClass *class)
class->finalize = g_menu_item_finalize;
}
-GVariant *
-g_menu_item_get_attribute_value (GMenuItem *menu_item,
- GQuark attribute_quark,
- const GVariantType *expected_type)
-{
- GVariant *value = NULL;
-
- g_return_val_if_fail (G_IS_MENU_ITEM (menu_item), NULL);
-
- if (menu_item->attributes)
- {
- value = g_hash_table_lookup (menu_item->attributes, GINT_TO_POINTER (attribute_quark));
-
- if (value != NULL)
- {
- if (expected_type == NULL || g_variant_is_of_type (value, expected_type))
- value = g_variant_ref (value);
- else
- value = NULL;
- }
- }
-
- return value;
-}
-
-gboolean
-g_menu_item_get_attribute (GMenuItem *menu_item,
- GQuark attribute_quark,
- const gchar *format_string,
- ...)
-{
- const GVariantType *expected_type;
- GVariant *value;
- va_list ap;
-
- expected_type = NULL; /* XXX devine the type, ensure no '&' */
-
- value = g_menu_item_get_attribute_value (menu_item, attribute_quark, expected_type);
- if (value == NULL)
- return FALSE;
-
- va_start (ap, format_string);
- g_variant_get_va (value, format_string, NULL, &ap);
- g_variant_unref (value);
- va_end (ap);
-
- return TRUE;
-}
-
void
g_menu_item_set_attribute_value (GMenuItem *menu_item,
GQuark attribute_quark,
@@ -421,19 +372,6 @@ g_menu_item_unset_attribute (GMenuItem *menu_item,
}
-GMenuModel *
-g_menu_item_get_link (GMenuItem *menu_item,
- GQuark link_quark)
-{
- GMenuModel *link = NULL;
-
- g_return_val_if_fail (G_IS_MENU_ITEM (menu_item), NULL);
-
- if (menu_item->links)
- link = g_hash_table_lookup (menu_item->links, GINT_TO_POINTER (link_quark));
-
- return link ? g_object_ref (link) : NULL;
-}
void
diff --git a/gio/gmenu.h b/gio/gmenu.h
index 69253ea..59a48a5 100644
--- a/gio/gmenu.h
+++ b/gio/gmenu.h
@@ -112,13 +112,6 @@ GMenuItem * g_menu_item_new_submenu (const g
GMenuItem * g_menu_item_new_section (const gchar *label,
GMenuModel *section);
-GVariant * g_menu_item_get_attribute_value (GMenuItem *menu_item,
- GQuark attribute_quark,
- const GVariantType *expected_type);
-gboolean g_menu_item_get_attribute (GMenuItem *menu_item,
- GQuark attribute_quark,
- const gchar *format_string,
- ...);
void g_menu_item_set_attribute_value (GMenuItem *menu_item,
GQuark attribute_quark,
GVariant *value);
@@ -126,8 +119,6 @@ void g_menu_item_set_attribute (GMenuIt
GQuark attribute_quark,
const gchar *format_string,
...);
-GMenuModel * g_menu_item_get_link (GMenuItem *menu_item,
- GQuark link_quark);
void g_menu_item_set_link (GMenuItem *menu_item,
GQuark link_quark,
GMenuModel *link);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]