diff src/gtksound.c @ 11581:9b3833da6840

[gaim-migrate @ 13851] goodbye GaimConvWindow. Still some problems with this patch: - Scarey warnings console with gaim -d when closing tab - I tried to seperate gtkconv and gtkconvwin, but failed, as a result it has its own header, but the code is in the same file, which is rather weird. Also some code got moved around for no good reason. Feel free to move it back or reorganize it. - I broke the gesters plugin, and just disabled it. Hopefully someone with more time will fix it, it shouldn't take long, but I didn't feel like bothering. - This list is incomplete. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Sun, 02 Oct 2005 00:32:49 +0000
parents 11d30825c1bb
children 58bc500cf226
line wrap: on
line diff
--- a/src/gtksound.c	Fri Sep 30 05:07:03 2005 +0000
+++ b/src/gtksound.c	Sun Oct 02 00:32:49 2005 +0000
@@ -116,22 +116,20 @@
 play_conv_event(GaimConversation *conv, GaimSoundEventID event)
 {
 	GaimGtkConversation *gtkconv;
-	GaimConvWindow *gaimwin;
-	GaimGtkWindow *gtkwin;
+	GaimGtkWindow *win;
 	gboolean has_focus;
 
 	if (conv==NULL)
 		gaim_sound_play_event(event);
 
 	gtkconv = GAIM_GTK_CONVERSATION(conv);
-	gaimwin = gaim_conversation_get_window(conv);
-	gtkwin = GAIM_GTK_WINDOW(gaimwin);
+	win = gtkconv->win;
 
-	g_object_get(G_OBJECT(gtkwin->window), "has-toplevel-focus", 
+	g_object_get(G_OBJECT(win->window), "has-toplevel-focus",
 				 &has_focus, NULL);
 
-	if (gtkconv->make_sound && 
-		!((gaim_conv_window_get_active_conversation(gaimwin) == conv) &&
+	if (gtkconv->make_sound &&
+		!((gaim_gtk_conv_window_get_active_conversation(win) == conv) &&
 		!gaim_prefs_get_bool("/gaim/gtk/sound/conv_focus") && has_focus)) {
 
 		gaim_sound_play_event(event);
@@ -146,7 +144,7 @@
 
 static void
 im_msg_received_cb(GaimAccount *account, char *sender,
-				   char *message, GaimConversation *conv, 
+				   char *message, GaimConversation *conv,
 				   int flags, GaimSoundEventID event)
 {
 	if (conv==NULL)
@@ -168,7 +166,7 @@
 chat_buddy_join_cb(GaimConversation *conv, const char *name,
 				   GaimConvChatBuddyFlags flags, GaimSoundEventID event)
 {
-	if (!chat_nick_matches_name(conv, name)) 
+	if (!chat_nick_matches_name(conv, name))
 		play_conv_event(conv, event);
 }
 
@@ -176,7 +174,7 @@
 chat_buddy_left_cb(GaimConversation *conv, const char *name,
 				   const char *reason, GaimSoundEventID event)
 {
-	if (!chat_nick_matches_name(conv, name)) 
+	if (!chat_nick_matches_name(conv, name))
 		play_conv_event(conv, event);
 }
 
@@ -187,7 +185,7 @@
 	GaimConnection *conn = gaim_account_get_connection(account);
 	GaimConversation *conv = NULL;
 
-	if (conn!=NULL) 
+	if (conn!=NULL)
 		conv = gaim_find_chat(conn,id);
 
 	play_conv_event(conv, event);