changeset 4378:194507c83612

[gaim-migrate @ 4644] - Removed some debug_printf statements. - Added GAIM_CONV_UPDATE_AWAY. - Couple other things I'll be making use of later. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 21 Jan 2003 06:16:42 +0000
parents 0ffdb9b6a5e9
children c0bb8c760416
files src/conversation.c src/conversation.h src/gtkconv.c
diffstat 3 files changed, 6 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Tue Jan 21 05:40:14 2003 +0000
+++ b/src/conversation.c	Tue Jan 21 06:16:42 2003 +0000
@@ -750,9 +750,6 @@
 	ops = gaim_window_get_ops(win);
 
 	if (ops != NULL && ops->get_active_index != NULL)
-		debug_printf("Active index = %d\n", ops->get_active_index(win));
-
-	if (ops != NULL && ops->get_active_index != NULL)
 		return gaim_window_get_conversation_at(win, ops->get_active_index(win));
 
 	return NULL;
--- a/src/conversation.h	Tue Jan 21 05:40:14 2003 +0000
+++ b/src/conversation.h	Tue Jan 21 06:16:42 2003 +0000
@@ -44,7 +44,8 @@
 {
 	GAIM_CONV_UNKNOWN = 0, /**< Unknown conversation type. */
 	GAIM_CONV_IM,          /**< Instant Message.           */
-	GAIM_CONV_CHAT         /**< Chat room.                 */
+	GAIM_CONV_CHAT,        /**< Chat room.                 */
+	GAIM_CONV_MISC         /**< A misc. conversation.      */
 };
 
 /**
@@ -77,8 +78,9 @@
 	 * XXX These need to go when we implement a more generic core/UI event
 	 * system.
 	 */
-	GAIM_CONV_ACCOUNT_ONLINE, /**< One of the user's accounts went online.  */
-	GAIM_CONV_ACCOUNT_OFFLINE /**< One of the user's accounts went offline. */
+	GAIM_CONV_ACCOUNT_ONLINE,  /**< One of the user's accounts went online.  */
+	GAIM_CONV_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */
+	GAIM_CONV_UPDATE_AWAY      /**< The other user went away.                */
 };
 
 /* Yeah, this has to be included here. Ugh. */
@@ -220,6 +222,7 @@
 	{
 		struct gaim_im   *im;   /**< IM-specific data.                  */
 		struct gaim_chat *chat; /**< Chat-specific data.                */
+		void *misc;             /**< Misc. data.                        */
 
 	} u;
 };
--- a/src/gtkconv.c	Tue Jan 21 05:40:14 2003 +0000
+++ b/src/gtkconv.c	Tue Jan 21 06:16:42 2003 +0000
@@ -101,10 +101,6 @@
 int fontsize = 3;
 
 static GtkWidget *invite_dialog = NULL;
-#if 0
-static GtkWidget *invite_entry;
-static GtkWidget *invite_mess;
-#endif
 
 static volatile gboolean state_lock = FALSE;
 
@@ -1497,13 +1493,11 @@
 	GList *l;
 	int tab_clicked;
 
-	debug_printf("notebook_press_cb\n");
 	if (e->button != 1 || e->type != GDK_BUTTON_PRESS)
 		return FALSE;
 
 	gtkwin = GAIM_GTK_WINDOW(win);
 
-	debug_printf("notebook_press_cb: 1\n");
 	if (gtkwin->in_drag) {
 		debug_printf("Already in the middle of a window "
 					 "drag at tab_press_cb\n");
@@ -1516,8 +1510,6 @@
 	 */
 	tab_clicked = gaim_gtkconv_get_tab_at_xy(win, e->x_root, e->y_root);
 
-	printf("tab_clicked == %d\n", tab_clicked);
-
 	if (tab_clicked == -1)
 		return FALSE;
 
@@ -1541,11 +1533,9 @@
 		struct gaim_conversation *conv = l->data;
 		GtkWidget *tab = GAIM_GTK_CONVERSATION(conv)->tabby;
 
-		debug_printf("Tab: %d\n", gaim_conversation_get_index(conv));
 		if (!GTK_WIDGET_VISIBLE(tab))
 			continue;
 
-		debug_printf("Tab Visible.\n");
 		if (tab->allocation.x > x_rel || tab->allocation.y > y_rel)
 			break;
 
@@ -1556,19 +1546,15 @@
 		gtkwin->drag_max_y = tab->allocation.height + gtkwin->drag_min_y;
 	}
 
-	debug_printf("notebook_press_cb: 3\n");
-
 	/* Make sure the click occurred in the tab. */
 	if (e->x_root <  gtkwin->drag_min_x ||
 		e->x_root >= gtkwin->drag_max_x ||
 		e->y_root <  gtkwin->drag_min_y ||
 		e->y_root >= gtkwin->drag_max_y) {
 
-		debug_printf("Passing this down.\n");
 		return FALSE;
 	}
 
-	debug_printf("notebook_press_cb: 4\n");
 	gtkwin->in_predrag = TRUE;
 
 	/* Connect the new motion signals. */
@@ -1580,7 +1566,6 @@
 		g_signal_connect(G_OBJECT(widget), "leave_notify_event",
 						 G_CALLBACK(notebook_leave_cb), win);
 
-	debug_printf("notebook_press_cb: 5\n");
 	return FALSE;
 }
 
@@ -1611,7 +1596,6 @@
 	gtkwin = GAIM_GTK_WINDOW(win);
 
 	if (!gtkwin->in_predrag && !gtkwin->in_drag) {
-		printf("Not in predrag.\n");
 		return TRUE;
 	}
 
@@ -1641,7 +1625,6 @@
 	/* If we're not in drag...        */
 	/* We're perfectly normal people! */
 	if (!gtkwin->in_drag) {
-		debug_printf("Not in drag.\n");
 		return FALSE;
 	}
 
@@ -1699,7 +1682,6 @@
 
 	gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry);
 
-	debug_printf("release cb returning.\n");
 	return TRUE;
 }
 
@@ -1716,8 +1698,6 @@
 	if (gaim_gtk_is_state_locked())
 		return;
 
-	debug_printf("Switching conversation\n");
-
 	win = (struct gaim_window *)user_data;
 
 	conv    = gaim_window_get_conversation_at(win, page_num);
@@ -3390,9 +3370,6 @@
 	if (gaim_window_get_conversation_count(win) == 1)
 		gtk_notebook_set_current_page(GTK_NOTEBOOK(gtkwin->notebook), 0);
 
-	debug_printf("*** Current page = %d\n",
-				 gtk_notebook_get_current_page(GTK_NOTEBOOK(gtkwin->notebook)));
-
 	if ((gtk_notebook_get_current_page(GTK_NOTEBOOK(gtkwin->notebook)) == 0) ||
 		(conv == g_list_nth_data(gaim_window_get_conversations(win), 0))) {
 
@@ -3592,8 +3569,6 @@
 
 	gtkconv = GAIM_GTK_CONVERSATION(conv);
 
-	debug_printf("Write IM\n");
-
 	if (gtkconv->make_sound) {
 		if (flags & WFLAG_RECV) {
 			if (gtkconv->u.im->a_virgin &&
@@ -3605,7 +3580,6 @@
 				play_sound(SND_RECEIVE);
 		}
 		else {
-			debug_printf("Playing SND_SEND\n");
 			play_sound(SND_SEND);
 		}
 	}