comparison plugins/docklet/docklet.c @ 4561:9df99116840a

[gaim-migrate @ 4842] This is the new sound subsystem Lots of stuff got renamed, and everything sound-wise is documented. Gaim now uses libaudiofile and libao to play sounds. Lots of ugly hacks were removed, and now we support playing audio through anything that libao will support. If you need to (you shouldn't) you can force libao to use a specific output driver, by putting a line into ~/.libao like: default_driver=esd You shouldn't need to do this, libao is pretty good at figuring out what driver to use. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 09 Feb 2003 01:55:35 +0000
parents 3196d9044a45
children 493f050dc11a
comparison
equal deleted inserted replaced
4560:eb32b3acef97 4561:9df99116840a
28 - optional pop up notices when GNOME2's system-tray-applet supports it */ 28 - optional pop up notices when GNOME2's system-tray-applet supports it */
29 29
30 /* includes */ 30 /* includes */
31 #include <gtk/gtk.h> 31 #include <gtk/gtk.h>
32 #include "gaim.h" 32 #include "gaim.h"
33 #include "sound.h"
33 #include "eggtrayicon.h" 34 #include "eggtrayicon.h"
34 35
35 #ifndef GAIM_PLUGINS 36 #ifndef GAIM_PLUGINS
36 #define GAIM_PLUGINS 37 #define GAIM_PLUGINS
37 #endif 38 #endif
58 static GtkIconFactory *icon_factory = NULL; 59 static GtkIconFactory *icon_factory = NULL;
59 static enum docklet_status status; 60 static enum docklet_status status;
60 static enum docklet_status icon; 61 static enum docklet_status icon;
61 62
62 static void docklet_toggle_mute(GtkWidget *toggle, void *data) { 63 static void docklet_toggle_mute(GtkWidget *toggle, void *data) {
63 mute_sounds = GTK_CHECK_MENU_ITEM(toggle)->active; 64 gaim_sound_set_mute(GTK_CHECK_MENU_ITEM(toggle)->active);
64 } 65 }
65 66
66 static void docklet_toggle_queue(GtkWidget *widget, void *data) { 67 static void docklet_toggle_queue(GtkWidget *widget, void *data) {
67 away_options ^= OPT_AWAY_QUEUE_UNREAD; 68 away_options ^= OPT_AWAY_QUEUE_UNREAD;
68 save_prefs(); 69 save_prefs();
147 } 148 }
148 149
149 gaim_separator(menu); 150 gaim_separator(menu);
150 151
151 entry = gtk_check_menu_item_new_with_label(_("Mute Sounds")); 152 entry = gtk_check_menu_item_new_with_label(_("Mute Sounds"));
152 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(entry), mute_sounds); 153 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(entry), gaim_sound_get_mute());
153 g_signal_connect(G_OBJECT(entry), "toggled", G_CALLBACK(docklet_toggle_mute), NULL); 154 g_signal_connect(G_OBJECT(entry), "toggled", G_CALLBACK(docklet_toggle_mute), NULL);
154 gtk_menu_append(GTK_MENU(menu), entry); 155 gtk_menu_append(GTK_MENU(menu), entry);
155 156
156 gaim_new_item_from_pixbuf(menu, _("Accounts..."), "accounts-menu.png", G_CALLBACK(account_editor), NULL, 0, 0, 0); 157 gaim_new_item_from_pixbuf(menu, _("Accounts..."), "accounts-menu.png", G_CALLBACK(account_editor), NULL, 0, 0, 0);
157 gaim_new_item_from_stock(menu, _("Preferences..."), GTK_STOCK_PREFERENCES, G_CALLBACK(show_prefs), NULL, 0, 0, 0); 158 gaim_new_item_from_stock(menu, _("Preferences..."), GTK_STOCK_PREFERENCES, G_CALLBACK(show_prefs), NULL, 0, 0, 0);