diff src/pluginpref.c @ 12712:8ae981f2c9cb

[gaim-migrate @ 15056] SF Patch #1395207 from Sadrul "Gaim currently doesn't allow to have formatted/multiline string as a preference for core-plugins. It'd be great if core plugins could have formatted strings for preference (ie. have imhtml+toolbar for the preference in the Plugin-preference dialog) without actually having to worry about gtk-codes." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 04 Jan 2006 04:14:02 +0000
parents 26eac2362c32
children a0a4b44239e8
line wrap: on
line diff
--- a/src/pluginpref.c	Wed Jan 04 03:01:32 2006 +0000
+++ b/src/pluginpref.c	Wed Jan 04 04:14:02 2006 +0000
@@ -45,6 +45,7 @@
 	GList *choices;
 	unsigned int max_length;
 	gboolean masked;
+	GaimStringFormatType format;
 };
 
 GaimPluginPrefFrame *
@@ -293,3 +294,24 @@
 
 	return pref->masked;
 }
+
+void
+gaim_plugin_pref_set_format_type(GaimPluginPref *pref, GaimStringFormatType format)
+{
+	g_return_if_fail(pref);
+	g_return_if_fail(pref->type == GAIM_PLUGIN_PREF_STRING_FORMAT);
+
+	pref->format = format;
+}
+
+GaimStringFormatType
+gaim_plugin_pref_get_format_type(GaimPluginPref *pref)
+{
+	g_return_val_if_fail(pref, 0);
+
+	if (pref->type != GAIM_PLUGIN_PREF_STRING_FORMAT)
+		return GAIM_STRING_FORMAT_TYPE_NONE;
+	
+	return pref->format;
+}
+