changeset 19101:6ccd66add326

Added the ability to configure sound in Finch. Current Configurations: Method, Mute
author Eric Polino <aluink@pidgin.im>
date Fri, 15 Jun 2007 20:43:27 +0000
parents 68a3b83795c6
children 7f26e5b98b15 062bb6a591ff
files finch/gntprefs.c
diffstat 1 files changed, 28 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntprefs.c	Thu Jun 14 03:54:49 2007 +0000
+++ b/finch/gntprefs.c	Fri Jun 15 20:43:27 2007 +0000
@@ -166,6 +166,25 @@
 	return field;
 }
 
+static GList *
+get_sound_methods()
+{
+	GList *list = NULL;
+	list = g_list_append(list,(char *)_("Console Beep"));
+	list = g_list_append(list,"beep");
+	list = g_list_append(list,(char *)_("Automatic"));
+	list = g_list_append(list,"automatic");
+	list = g_list_append(list,(char *)_("ESD"));
+	list = g_list_append(list,"esd");
+	list = g_list_append(list,(char *)_("ALSA"));
+	list = g_list_append(list,"alsa");
+	list = g_list_append(list,(char *)_("Command"));
+	list = g_list_append(list,"custome");
+	list = g_list_append(list,(char *)_("No Sound"));
+	list = g_list_append(list,"none");
+	return list;
+}
+
 static Prefs blist[] = 
 {
 	{PURPLE_PREF_BOOLEAN, "/finch/blist/idletime", N_("Show Idle Time"), NULL},
@@ -199,6 +218,14 @@
 	{PURPLE_PREF_NONE, NULL, NULL, NULL},
 };
 
+static Prefs sound[] =
+{
+	{PURPLE_PREF_STRING, FINCH_PREFS_ROOT "/sound/method", "Method", get_sound_methods},
+	{PURPLE_PREF_BOOLEAN, FINCH_PREFS_ROOT "/sound/mute", "Mute the Sound", NULL},
+	{PURPLE_PREF_NONE, NULL, NULL, NULL},
+};
+
+
 static void
 free_strings()
 {
@@ -241,6 +268,7 @@
 	add_pref_group(fields, _("Conversations"), convs);
 	add_pref_group(fields, _("Logging"), logging);
 	add_pref_group(fields, _("Idle"), idle);
+	add_pref_group(fields, _("Sound"),sound);
 
 	purple_request_fields(NULL, _("Preferences"), NULL, NULL, fields,
 			_("Save"), G_CALLBACK(save_cb), _("Cancel"), free_strings,