changeset 9459:dbeca8eca296

[gaim-migrate @ 10283] (08:24:24) LSchiere: nosnilmot: https://sourceforge.net/tracker/?func=detail&atid=100235&aid=972285&group_id=235 (08:37:39) nosnilmot: LSchiere: the only way I can reproduce anything like what's reported in that bug is by having the formatting toolbar disabled in prefs, and manually enabling it each time I start a new conversation (08:38:12) LSchiere: nosnilmot: can you fix that case? ;-) (08:38:34) nosnilmot: LSchiere: I doubt it (08:38:42) LSchiere: :-/ (08:39:00) nosnilmot: that would seem to be a stupid case to support, if the user really wants the formatting toolbar then they should just enable it in prefs! (08:39:51) LSchiere: now that's not quite so true. i've got it globally disabled and i've been known to enable it just long enough to remember the code to a smiley i've forgotten (08:40:52) nosnilmot: actually... how about if I try to check if the formatting toolbar is present, and if it's presence doesn't match preferences, don't save the conv size? (08:41:10) LSchiere: that works committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 06 Jul 2004 12:58:29 +0000
parents 3c92ae9fde5e
children eae7e049d639
files src/gtkconv.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Tue Jul 06 12:43:03 2004 +0000
+++ b/src/gtkconv.c	Tue Jul 06 12:58:29 2004 +0000
@@ -217,6 +217,7 @@
 {
 	GaimGtkConversation *gtkconv;
 	GaimConvWindow *win = gaim_conversation_get_window(conv);
+	gboolean saveheight;
 
 	if (!GTK_WIDGET_VISIBLE(w))
 		return FALSE;
@@ -226,6 +227,9 @@
 
 	gtkconv = GAIM_GTK_CONVERSATION(conv);
 
+	/* we only save the new height if the formatting toolbar visibility matches the pref */
+	saveheight = (gtkconv->show_formatting_toolbar == gaim_prefs_get_bool("/gaim/gtk/conversations/show_formatting_toolbar"));
+
 	/* 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. */
@@ -235,7 +239,8 @@
 		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);
+			if (saveheight)
+				gaim_prefs_set_int("/gaim/gtk/conversations/im/default_height", allocation->height);
 		}
 		if (w == gtkconv->entry)
 			gaim_prefs_set_int("/gaim/gtk/conversations/im/entry_height", allocation->height);
@@ -245,7 +250,8 @@
 		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);
+			if (saveheight)
+				gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_height", allocation->height);
 		}
 		if (w == gtkconv->entry)
 			gaim_prefs_set_int("/gaim/gtk/conversations/chat/entry_height", allocation->height);