comparison libpurple/blist.c @ 32474:53ae12ee0b68

pidgin: Fix so that logging works again This was broken in 941f205e71bee6f0fe79442af21238c088eecbac. The semantics are that the global setting is used if a per-blist-node doesn't exist. This requires we know whether one exists or not (value being non-NULL previously), hence the new API. I was going to add this as _get_type(), but I thought I remembered we were trying to move away from PurpleValue. Anyway, feel free to fix this another way before 3.0.0. Thanks to dvpdiner2 for narrowing down the offending commit.
author Paul Aurich <paul@darkrain42.org>
date Sun, 15 Jan 2012 05:50:58 +0000
parents d288f5215a9a
children
comparison
equal deleted inserted replaced
32473:6ffb26b8a8ce 32474:53ae12ee0b68
2906 { 2906 {
2907 g_return_val_if_fail(node != NULL, PURPLE_BLIST_OTHER_NODE); 2907 g_return_val_if_fail(node != NULL, PURPLE_BLIST_OTHER_NODE);
2908 return node->type; 2908 return node->type;
2909 } 2909 }
2910 2910
2911 gboolean
2912 purple_blist_node_has_setting(PurpleBlistNode* node, const char *key)
2913 {
2914 g_return_val_if_fail(node != NULL, FALSE);
2915 g_return_val_if_fail(node->settings != NULL, FALSE);
2916 g_return_val_if_fail(key != NULL, FALSE);
2917
2918 /* Boxed type, so it won't ever be NULL, so no need for _extended */
2919 return (g_hash_table_lookup(node->settings, key) != NULL);
2920 }
2921
2911 void 2922 void
2912 purple_blist_node_set_bool(PurpleBlistNode* node, const char *key, gboolean data) 2923 purple_blist_node_set_bool(PurpleBlistNode* node, const char *key, gboolean data)
2913 { 2924 {
2914 PurpleValue *value; 2925 PurpleValue *value;
2915 PurpleBlistUiOps *ops; 2926 PurpleBlistUiOps *ops;