Mercurial > pidgin
comparison src/gtkconv.c @ 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 | 812e7aa7eafa |
children | f01eef2c264a |
comparison
equal
deleted
inserted
replaced
9047:14e1a86899b9 | 9048:f2f8a56acdb6 |
---|---|
218 | 218 |
219 static gboolean | 219 static gboolean |
220 size_allocate_cb(GtkWidget *w, GtkAllocation *allocation, GaimConversation *conv) | 220 size_allocate_cb(GtkWidget *w, GtkAllocation *allocation, GaimConversation *conv) |
221 { | 221 { |
222 GaimGtkConversation *gtkconv; | 222 GaimGtkConversation *gtkconv; |
223 GaimConvWindow *win = gaim_conversation_get_window(conv); | |
223 | 224 |
224 if (!GTK_WIDGET_VISIBLE(w)) | 225 if (!GTK_WIDGET_VISIBLE(w)) |
225 return FALSE; | 226 return FALSE; |
226 | 227 |
227 if (!GAIM_IS_GTK_CONVERSATION(conv)) | 228 if (!GAIM_IS_GTK_CONVERSATION(conv)) |
228 return FALSE; | 229 return FALSE; |
229 | 230 |
230 gtkconv = GAIM_GTK_CONVERSATION(conv); | 231 gtkconv = GAIM_GTK_CONVERSATION(conv); |
231 | 232 |
233 /* I find that I resize the window when it has a bunch of conversations in it, mostly so that the tab bar | |
234 * will fit, but then I don't want new windows taking up the entire screen. I check to see if there is only one | |
235 * conversation in the window. This way we'll be setting new windows to the size of the last resized new window. */ | |
236 | |
232 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) | 237 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) |
233 { | 238 { |
234 if (w == gtkconv->sw) | 239 if (w == gtkconv->sw && (gaim_conv_window_get_conversation_count(win) == 1)) |
235 { | 240 { |
236 gaim_prefs_set_int("/gaim/gtk/conversations/im/default_width", allocation->width); | 241 gaim_prefs_set_int("/gaim/gtk/conversations/im/default_width", allocation->width); |
237 gaim_prefs_set_int("/gaim/gtk/conversations/im/default_height", allocation->height); | 242 gaim_prefs_set_int("/gaim/gtk/conversations/im/default_height", allocation->height); |
238 } | 243 } |
239 if (w == gtkconv->entry) | 244 if (w == gtkconv->entry) |
240 gaim_prefs_set_int("/gaim/gtk/conversations/im/entry_height", allocation->height); | 245 gaim_prefs_set_int("/gaim/gtk/conversations/im/entry_height", allocation->height); |
241 } | 246 } |
242 else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) | 247 else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) |
243 { | 248 { |
244 if (w == gtkconv->sw) | 249 if (w == gtkconv->sw && (gaim_conv_window_get_conversation_count(win) == 1)) |
245 { | 250 { |
246 gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_width", allocation->width); | 251 gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_width", allocation->width); |
247 gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_height", allocation->height); | 252 gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_height", allocation->height); |
248 } | 253 } |
249 if (w == gtkconv->entry) | 254 if (w == gtkconv->entry) |