diff src/buddy.c @ 3510:e23909729192

[gaim-migrate @ 3576] A GNOME2 docklet. This follows the opendesktop.org specs used by GNOME2 and (I think) KDE in Redhat's null (I don't think vanilla KDE supports it yet) For GNOME--you will need to have the GNOME Panel Notification Area installed. This replaces the applet--thanks Robert McQueen. CVS: ---------------------------------------------------------------------- CVS: Enter Log. Lines beginning with `CVS:' are removed automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: CVS: configure.ac configure.in plugins/Makefile.am src/aim.c CVS: src/buddy.c src/core.h src/module.c src/multi.c src/perl.c CVS: src/server.c src/ui.h CVS: ---------------------------------------------------------------------- committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 14 Sep 2002 23:27:28 +0000
parents b8783a46e476
children 6b0cb60162f4
line wrap: on
line diff
--- a/src/buddy.c	Sat Sep 14 19:37:29 2002 +0000
+++ b/src/buddy.c	Sat Sep 14 23:27:28 2002 +0000
@@ -1995,40 +1995,26 @@
 
 /* used by this file, and by iconaway.so */
 void hide_buddy_list() {
-	if (!blist) return;
-	if (!connections || docklet_refcount) {
-		gtk_widget_hide(blist);
-	} else {
-		gtk_window_iconify(GTK_WINDOW(blist));
-	}
-	blist_hidden = TRUE;
-}
-
-/* shared code... not in lschiere/faceprint tree though. oh well */
-static void move_buddy_list() {
-	if (blist_options & OPT_BLIST_SAVED_WINDOWS) {
-		if (blist_pos.width != 0) {	/* Sanity check! */
-			gtk_widget_set_uposition(blist, blist_pos.x - blist_pos.xoff,
-						 blist_pos.y - blist_pos.yoff);
-			gtk_widget_set_usize(blist, blist_pos.width, blist_pos.height);
+	if (blist) {
+		if (!connections || docklet_refcount) {
+			gtk_widget_hide(blist);
+		} else {
+			gtk_window_iconify(GTK_WINDOW(blist));
 		}
 	}
 }
 
 /* mostly used by code in this file */
 void unhide_buddy_list() {
-	if (!blist) return;
-	gtk_window_present(GTK_WINDOW(blist));
-	move_buddy_list();
-	blist_hidden = FALSE;
-}
-
-/* used by the docklet */
-void toggle_buddy_list() {
-	if (blist_hidden) {
-		unhide_buddy_list();
-	} else {
-		hide_buddy_list();
+	if (blist) {
+		gtk_window_present(GTK_WINDOW(blist));
+		if (blist_options & OPT_BLIST_SAVED_WINDOWS) {
+			if (blist_pos.width != 0) {	/* Sanity check! */
+				gtk_widget_set_uposition(blist, blist_pos.x - blist_pos.xoff,
+							 blist_pos.y - blist_pos.yoff);
+				gtk_widget_set_usize(blist, blist_pos.width, blist_pos.height);
+			}
+		}
 	}
 }
 
@@ -2442,9 +2428,6 @@
 	gdk_window_get_position(blist->window, &x, &y);
 	gdk_window_get_size(blist->window, &width, &height);
 
-/* fixme: docklet		*
- *	if (applet_buddy_show){	*/
-
 	if (e->send_event) {	/* Is a position event */
 		if (blist_pos.x != x || blist_pos.y != y)
 			save = 1;
@@ -2910,8 +2893,9 @@
 
 
 	gtk_window_set_title(GTK_WINDOW(blist), _("Gaim - Buddy List"));
-	move_buddy_list();
-	blist_hidden = FALSE;
+
+	/* this conveniently moves it to the right place and stuff */
+	unhide_buddy_list();
 }
 
 void refresh_buddy_window()