changeset 32656:79d48418ba0b

Add a function for lookup of Info.plist entries.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Wed, 21 Sep 2011 02:54:35 +0000
parents 4d85e218a52e
children ceae9fb7ae0b
files pidgin/gtkconv-theme.c pidgin/gtkconv-theme.h
diffstat 2 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv-theme.c	Wed Sep 21 01:51:34 2011 +0000
+++ b/pidgin/gtkconv-theme.c	Wed Sep 21 02:54:35 2011 +0000
@@ -671,6 +671,15 @@
 	priv->info = info;
 }
 
+const GValue *
+pidgin_conversation_theme_lookup(PidginConvTheme *theme, const char *key, gboolean specific)
+{
+	PidginConvThemePrivate *priv;
+	priv = PIDGIN_CONV_THEME_GET_PRIVATE(theme);
+
+	return get_key(priv, key, specific);
+}
+
 const char *
 pidgin_conversation_theme_get_template(PidginConvTheme *theme, PidginConvThemeTemplateType type)
 {
--- a/pidgin/gtkconv-theme.h	Wed Sep 21 01:51:34 2011 +0000
+++ b/pidgin/gtkconv-theme.h	Wed Sep 21 02:54:35 2011 +0000
@@ -110,6 +110,19 @@
 void pidgin_conversation_theme_set_info(PidginConvTheme *theme, GHashTable *info);
 
 /**
+ * Lookup a key in a theme
+ *
+ * @param theme    The conversation theme
+ * @param key      The key to find
+ * @param specific Whether to search variant-specific keys
+ *
+ * @return The key information. If @a specific is @c TRUE, then keys are first
+ *         searched by variant, then by general ones. Otherwise, only general
+ *         key values are returned.
+ */
+const GValue *pidgin_conversation_theme_lookup(PidginConvTheme *theme, const char *key, gboolean specific);
+
+/**
  * Get the template data from a conversation theme.
  *
  * @param theme The conversation theme