diff src/buddy.c @ 3192:3d2d57dba56b

[gaim-migrate @ 3209] A new preference! Raise your buddy list when someone signs on or off committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 29 Apr 2002 18:07:27 +0000
parents dd03116e0f8d
children 50ba71cbcfbb
line wrap: on
line diff
--- a/src/buddy.c	Mon Apr 29 13:15:41 2002 +0000
+++ b/src/buddy.c	Mon Apr 29 18:07:27 2002 +0000
@@ -1987,7 +1987,7 @@
 }
 
 void hide_buddy_list() {
-	#ifdef USE_APPLET
+#ifdef USE_APPLET
 	applet_destroy_buddy(NULL, NULL, NULL);
 #else
 	XIconifyWindow(GDK_DISPLAY(),
@@ -1996,6 +1996,16 @@
 #endif
 }
 
+void unhide_buddy_list() {
+#ifdef USE_APPLET
+	if (!applet_buddy_show) {
+		applet_buddy_show = TRUE;
+		createOnlinePopup();
+	}
+#endif /* USE_APPLET */
+	gdk_window_show(blist->window);
+}
+
 static gint log_timeout(struct buddy_show *b)
 {
 	/* this part is really just a bad hack because of a bug I can't find */
@@ -2279,6 +2289,8 @@
 		if (b->present == 1) {
 			if (bs->sound != 2)
 				play_sound(SND_BUDDY_ARRIVE);
+			if (blist_options & OPT_BLIST_POPUP)
+				unhide_buddy_list();
 			pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
 							  NULL, (char **)login_icon_xpm);
 			gtk_widget_hide(bs->pix);
@@ -2342,7 +2354,8 @@
 				   off */
 		if (bs->sound != 1)
 			play_sound(SND_BUDDY_LEAVE);
-
+		if (blist_options & OPT_BLIST_POPUP)
+			unhide_buddy_list();
 		bs->connlist = g_slist_remove(bs->connlist, gc);
 		update_num_group(gs);
 		if (bs->log_timer > 0)