changeset 9048:f2f8a56acdb6

[gaim-migrate @ 9824] A slight change in how we do default conversation sizes. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 24 May 2004 00:46:12 +0000
parents 14e1a86899b9
children f01eef2c264a
files src/gtkconv.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Mon May 24 00:45:48 2004 +0000
+++ b/src/gtkconv.c	Mon May 24 00:46:12 2004 +0000
@@ -220,6 +220,7 @@
 size_allocate_cb(GtkWidget *w, GtkAllocation *allocation, GaimConversation *conv)
 {
 	GaimGtkConversation *gtkconv;
+	GaimConvWindow *win = gaim_conversation_get_window(conv);
 
 	if (!GTK_WIDGET_VISIBLE(w))
 		return FALSE;
@@ -229,9 +230,13 @@
 
 	gtkconv = GAIM_GTK_CONVERSATION(conv);
 
+	/* I find that I resize the window when it has a bunch of conversations in it, mostly so that the tab bar
+	 * will fit, but then I don't want new windows taking up the entire screen.  I check to see if there is only one
+	 * conversation in the window.  This way we'll be setting new windows to the size of the last resized new window. */
+
 	if (gaim_conversation_get_type(conv) == GAIM_CONV_IM)
 	{
-		if (w == gtkconv->sw)
+		if (w == gtkconv->sw && (gaim_conv_window_get_conversation_count(win) == 1))
 		{
 			gaim_prefs_set_int("/gaim/gtk/conversations/im/default_width", allocation->width);
 			gaim_prefs_set_int("/gaim/gtk/conversations/im/default_height", allocation->height);
@@ -241,7 +246,7 @@
 	}
 	else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT)
 	{
-		if (w == gtkconv->sw)
+		if (w == gtkconv->sw && (gaim_conv_window_get_conversation_count(win) == 1))
 		{
 			gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_width", allocation->width);
 			gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_height", allocation->height);