Mercurial > pidgin
comparison finch/gntsound.c @ 31086:a8cc50c2279f
Remove trailing whitespace
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 04 Jan 2011 06:55:30 +0000 |
parents | 9bd9ef37354f |
children | 1d09b9077181 |
comparison
equal
deleted
inserted
replaced
31085:44f53d3fc54f | 31086:a8cc50c2279f |
---|---|
552 purple_debug_error("sound", "Unknown sound method '%s'\n", method); | 552 purple_debug_error("sound", "Unknown sound method '%s'\n", method); |
553 return; | 553 return; |
554 } | 554 } |
555 | 555 |
556 play = gst_element_factory_make("playbin", "play"); | 556 play = gst_element_factory_make("playbin", "play"); |
557 | 557 |
558 if (play == NULL) { | 558 if (play == NULL) { |
559 return; | 559 return; |
560 } | 560 } |
561 | 561 |
562 uri = g_strdup_printf("file://%s", filename); | 562 uri = g_strdup_printf("file://%s", filename); |
563 | 563 |
564 g_object_set(G_OBJECT(play), "uri", uri, | 564 g_object_set(G_OBJECT(play), "uri", uri, |
565 "volume", volume, | 565 "volume", volume, |
566 "audio-sink", sink, NULL); | 566 "audio-sink", sink, NULL); |
686 g_free(event->file); | 686 g_free(event->file); |
687 event->file = g_strdup(path); | 687 event->file = g_strdup(path); |
688 | 688 |
689 gnt_tree_change_text(GNT_TREE(pref_dialog->events), GINT_TO_POINTER(event->id), 1, file); | 689 gnt_tree_change_text(GNT_TREE(pref_dialog->events), GINT_TO_POINTER(event->id), 1, file); |
690 gnt_tree_set_choice(GNT_TREE(pref_dialog->events), GINT_TO_POINTER(event->id), TRUE); | 690 gnt_tree_set_choice(GNT_TREE(pref_dialog->events), GINT_TO_POINTER(event->id), TRUE); |
691 | 691 |
692 gnt_widget_destroy(GNT_WIDGET(w)); | 692 gnt_widget_destroy(GNT_WIDGET(w)); |
693 } | 693 } |
694 | 694 |
695 static void | 695 static void |
696 test_cb(GntWidget *button, gpointer null) | 696 test_cb(GntWidget *button, gpointer null) |
729 | 729 |
730 static void | 730 static void |
731 reset_cb(GntWidget *button, gpointer null) | 731 reset_cb(GntWidget *button, gpointer null) |
732 { | 732 { |
733 /* Don't dereference this pointer ! */ | 733 /* Don't dereference this pointer ! */ |
734 gpointer key = gnt_tree_get_selection_data(GNT_TREE(pref_dialog->events)); | 734 gpointer key = gnt_tree_get_selection_data(GNT_TREE(pref_dialog->events)); |
735 | 735 |
736 FinchSoundEvent * event = &sounds[GPOINTER_TO_INT(key)]; | 736 FinchSoundEvent * event = &sounds[GPOINTER_TO_INT(key)]; |
737 g_free(event->file); | 737 g_free(event->file); |
738 event->file = NULL; | 738 event->file = NULL; |
739 gnt_tree_change_text(GNT_TREE(pref_dialog->events), key, 1, _("(default)")); | 739 gnt_tree_change_text(GNT_TREE(pref_dialog->events), key, 1, _("(default)")); |
879 row, | 879 row, |
880 NULL, NULL); | 880 NULL, NULL); |
881 gnt_entry_set_text(entry, ""); | 881 gnt_entry_set_text(entry, ""); |
882 gnt_tree_set_selected(GNT_TREE(pref_dialog->profiles), key); | 882 gnt_tree_set_selected(GNT_TREE(pref_dialog->profiles), key); |
883 finch_sound_set_active_profile(key); | 883 finch_sound_set_active_profile(key); |
884 } else | 884 } else |
885 reload_pref_window(profile); | 885 reload_pref_window(profile); |
886 } | 886 } |
887 | 887 |
888 static void | 888 static void |
889 prof_load_cb(GntTree *tree, gpointer oldkey, gpointer newkey, gpointer null) | 889 prof_load_cb(GntTree *tree, gpointer oldkey, gpointer newkey, gpointer null) |
980 gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox), "beep", _("Console Beep")); | 980 gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox), "beep", _("Console Beep")); |
981 gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox), "custom", _("Command")); | 981 gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox), "custom", _("Command")); |
982 gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox), "nosound", _("No Sound")); | 982 gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox), "nosound", _("No Sound")); |
983 | 983 |
984 label = gnt_label_new_with_format(_("Sound Method"), GNT_TEXT_FLAG_BOLD); | 984 label = gnt_label_new_with_format(_("Sound Method"), GNT_TEXT_FLAG_BOLD); |
985 gnt_box_add_widget(GNT_BOX(box), label); | 985 gnt_box_add_widget(GNT_BOX(box), label); |
986 tmpbox = gnt_hbox_new(TRUE); | 986 tmpbox = gnt_hbox_new(TRUE); |
987 gnt_box_set_fill(GNT_BOX(tmpbox), FALSE); | 987 gnt_box_set_fill(GNT_BOX(tmpbox), FALSE); |
988 gnt_box_set_pad(GNT_BOX(tmpbox), 0); | 988 gnt_box_set_pad(GNT_BOX(tmpbox), 0); |
989 gnt_box_add_widget(GNT_BOX(tmpbox), gnt_label_new(_("Method: "))); | 989 gnt_box_add_widget(GNT_BOX(tmpbox), gnt_label_new(_("Method: "))); |
990 gnt_box_add_widget(GNT_BOX(tmpbox), cmbox); | 990 gnt_box_add_widget(GNT_BOX(tmpbox), cmbox); |
991 gnt_box_add_widget(GNT_BOX(box), tmpbox); | 991 gnt_box_add_widget(GNT_BOX(box), tmpbox); |
992 | 992 |
993 tmpbox = gnt_hbox_new(TRUE); | 993 tmpbox = gnt_hbox_new(TRUE); |
994 gnt_box_set_pad(GNT_BOX(tmpbox), 0); | 994 gnt_box_set_pad(GNT_BOX(tmpbox), 0); |
995 gnt_box_set_fill(GNT_BOX(tmpbox), FALSE); | 995 gnt_box_set_fill(GNT_BOX(tmpbox), FALSE); |
996 gnt_box_add_widget(GNT_BOX(tmpbox), gnt_label_new(_("Sound Command\n(%s for filename)"))); | 996 gnt_box_add_widget(GNT_BOX(tmpbox), gnt_label_new(_("Sound Command\n(%s for filename)"))); |
999 gnt_box_add_widget(GNT_BOX(box), tmpbox); | 999 gnt_box_add_widget(GNT_BOX(box), tmpbox); |
1000 | 1000 |
1001 gnt_box_add_widget(GNT_BOX(box), gnt_line_new(FALSE)); | 1001 gnt_box_add_widget(GNT_BOX(box), gnt_line_new(FALSE)); |
1002 | 1002 |
1003 /* Sound options */ | 1003 /* Sound options */ |
1004 gnt_box_add_widget(GNT_BOX(box), gnt_label_new_with_format(_("Sound Options"), GNT_TEXT_FLAG_BOLD)); | 1004 gnt_box_add_widget(GNT_BOX(box), gnt_label_new_with_format(_("Sound Options"), GNT_TEXT_FLAG_BOLD)); |
1005 pref_dialog->conv_focus = chkbox = gnt_check_box_new(_("Sounds when conversation has focus")); | 1005 pref_dialog->conv_focus = chkbox = gnt_check_box_new(_("Sounds when conversation has focus")); |
1006 gnt_box_add_widget(GNT_BOX(box), chkbox); | 1006 gnt_box_add_widget(GNT_BOX(box), chkbox); |
1007 | 1007 |
1008 tmpbox = gnt_hbox_new(TRUE); | 1008 tmpbox = gnt_hbox_new(TRUE); |
1009 gnt_box_set_pad(GNT_BOX(tmpbox), 0); | 1009 gnt_box_set_pad(GNT_BOX(tmpbox), 0); |
1036 gnt_box_add_widget(GNT_BOX(win), splitbox); | 1036 gnt_box_add_widget(GNT_BOX(win), splitbox); |
1037 | 1037 |
1038 gnt_box_add_widget(GNT_BOX(win), gnt_hline_new()); | 1038 gnt_box_add_widget(GNT_BOX(win), gnt_hline_new()); |
1039 | 1039 |
1040 /* Sound events */ | 1040 /* Sound events */ |
1041 gnt_box_add_widget(GNT_BOX(win), gnt_label_new_with_format(_("Sound Events"), GNT_TEXT_FLAG_BOLD)); | 1041 gnt_box_add_widget(GNT_BOX(win), gnt_label_new_with_format(_("Sound Events"), GNT_TEXT_FLAG_BOLD)); |
1042 pref_dialog->events = tree = gnt_tree_new_with_columns(2); | 1042 pref_dialog->events = tree = gnt_tree_new_with_columns(2); |
1043 gnt_tree_set_column_titles(GNT_TREE(tree), _("Event"), _("File")); | 1043 gnt_tree_set_column_titles(GNT_TREE(tree), _("Event"), _("File")); |
1044 gnt_tree_set_show_title(GNT_TREE(tree), TRUE); | 1044 gnt_tree_set_show_title(GNT_TREE(tree), TRUE); |
1045 | 1045 |
1046 for (i = 0; i < PURPLE_NUM_SOUNDS; i++) { | 1046 for (i = 0; i < PURPLE_NUM_SOUNDS; i++) { |