Mercurial > pidgin.yaz
changeset 19117:907c41608ada
Added Sounds to the actions list
Built a prototype for the Sounds config dialog
author | Eric Polino <aluink@pidgin.im> |
---|---|
date | Wed, 27 Jun 2007 20:19:09 +0000 |
parents | 992afeb1d40f |
children | cfe8f791d7c1 b25cb0775be3 |
files | finch/gntsound.c finch/gntsound.h finch/gntui.c |
diffstat | 3 files changed, 69 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntsound.c Wed Jun 27 02:51:00 2007 +0000 +++ b/finch/gntsound.c Wed Jun 27 20:19:09 2007 +0000 @@ -40,8 +40,15 @@ #include "sound.h" #include "util.h" +#include "gntbox.h" +#include "gntwindow.h" +#include "gntcombobox.h" +#include "gntlabel.h" #include "gntconv.h" #include "gntsound.h" +#include "gntwidget.h" +#include "gntentry.h" +#include "gntcheckbox.h" struct finch_sound_event { char *label; @@ -549,6 +556,62 @@ g_free(file_pref); } +void +finch_sounds_show_all(void){ + GntWidget *win; + + GntWidget *box; + GntWidget *cmbox; + GntWidget *entry; + + win = gnt_window_box_new(TRUE,TRUE); + + cmbox = gnt_combo_box_new(); + gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"automatic",_("Automatic")); + gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"alsa","ALSA"); + gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"esd","ESD"); + gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"beep",_("Console Beep")); + gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"custom",_("Command")); + gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"nosound",_("No Sound")); + + box = gnt_hbox_new(TRUE); + gnt_box_set_fill(GNT_BOX(box),FALSE); + gnt_box_add_widget(GNT_BOX(box),gnt_label_new(_("Method: "))); + gnt_box_add_widget(GNT_BOX(box),cmbox); + gnt_box_add_widget(GNT_BOX(win),box); + + box = gnt_hbox_new(TRUE); + gnt_box_set_fill(GNT_BOX(box),FALSE); + gnt_box_add_widget(GNT_BOX(box),gnt_label_new(_("Sound Command\n%s for filename"))); + entry = gnt_entry_new("cat %s > /dev/dsp"); + gnt_box_add_widget(GNT_BOX(box),entry); + gnt_box_add_widget(GNT_BOX(win),box); + + gnt_box_add_widget(GNT_BOX(win),gnt_check_box_new("Sounds when conversation has focus")); + + box = gnt_hbox_new(TRUE); + gnt_box_set_fill(GNT_BOX(box),FALSE); + gnt_box_add_widget(GNT_BOX(box),gnt_label_new("Enable Sounds:")); + cmbox = gnt_combo_box_new(); + gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"always","Always"); + gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"available","Only when available"); + gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"navailable","Only when not available"); + gnt_box_add_widget(GNT_BOX(box),cmbox); + gnt_box_add_widget(GNT_BOX(win),box); + + box = gnt_hbox_new(TRUE); + gnt_box_set_fill(GNT_BOX(box),FALSE); + gnt_box_add_widget(GNT_BOX(box),gnt_label_new("Volume(0-100):")); + entry = gnt_entry_new("50"); + gnt_box_add_widget(GNT_BOX(box),entry); + gnt_box_add_widget(GNT_BOX(win),box); + + + gnt_box_set_title(GNT_BOX(win),"Sound Preferences"); + gnt_widget_show(win); + +} + static PurpleSoundUiOps sound_ui_ops = { finch_sound_init,
--- a/finch/gntsound.h Wed Jun 27 02:51:00 2007 +0000 +++ b/finch/gntsound.h Wed Jun 27 20:19:09 2007 +0000 @@ -56,6 +56,11 @@ PurpleSoundUiOps *finch_sound_get_ui_ops(void); /** + * Show the sound settings dialog. + */ +void finch_sounds_show_all(void); + +/** * Get the handle for the GNT sound system. * * @return The handle to the sound system
--- a/finch/gntui.c Wed Jun 27 02:51:00 2007 +0000 +++ b/finch/gntui.c Wed Jun 27 20:19:09 2007 +0000 @@ -84,6 +84,7 @@ gnt_register_action(_("Debug Window"), finch_debug_window_show); gnt_register_action(_("File Transfers"), finch_xfer_dialog_show); gnt_register_action(_("Plugins"), finch_plugins_show_all); + gnt_register_action(_("Sounds"), finch_sounds_show_all); gnt_register_action(_("Preferences"), finch_prefs_show_all); gnt_register_action(_("Statuses"), finch_savedstatus_show_all);