changeset 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 db7b4fa85776
children df6981a51853
files ChangeLog src/buddy.c src/gaim.h src/prefs.c
diffstat 4 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Apr 29 13:15:41 2002 +0000
+++ b/ChangeLog	Mon Apr 29 18:07:27 2002 +0000
@@ -4,6 +4,7 @@
 	* Bulgarian translation added (Thanks, Igel Itzo)
 	* Taiwanese translation added (Thanks, Paladin Liu)
 	* Better applet transparency
+	* Option to raise buddy list on signons/signoffs
 
 version 0.57 (04/25/2002):
 	* New authorization method for Yahoo!
--- 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)
--- a/src/gaim.h	Mon Apr 29 13:15:41 2002 +0000
+++ b/src/gaim.h	Mon Apr 29 18:07:27 2002 +0000
@@ -211,6 +211,7 @@
 #define OPT_BLIST_SHOW_WARN		0x00000200
 #define OPT_BLIST_GREY_IDLERS		0x00000400
 #define OPT_BLIST_BOTTOM_TAB		0X00000800
+#define OPT_BLIST_POPUP                 0x00001000
 
 extern guint convo_options;
 #define OPT_CONVO_ENTER_SENDS		0x00000001
--- a/src/prefs.c	Mon Apr 29 13:15:41 2002 +0000
+++ b/src/prefs.c	Mon Apr 29 18:07:27 2002 +0000
@@ -596,6 +596,7 @@
 	if (blist_options & OPT_BLIST_NO_BUTTONS)
 		gtk_widget_set_sensitive(button2, FALSE);
 	gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), button2);
+	gaim_button(_("Raise Buddy List on Signons and Signoffs"), &blist_options, OPT_BLIST_POPUP, vbox);
 
 	frame = gtk_frame_new(_("Group Displays"));
 	gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);