Mercurial > pidgin
comparison gtk/gtkconv.c @ 14701:f063e0bc1f20
[gaim-migrate @ 17453]
Fix chat userlist width saving (use the VBox alloc. width for both saving and loading).
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 10 Oct 2006 00:45:14 +0000 |
parents | 7fb8a8583c73 |
children | 90882b641dda |
comparison
equal
deleted
inserted
replaced
14700:7fb8a8583c73 | 14701:f063e0bc1f20 |
---|---|
200 | 200 |
201 return TRUE; | 201 return TRUE; |
202 } | 202 } |
203 | 203 |
204 static gboolean | 204 static gboolean |
205 lbox_size_allocate_cb(GtkWidget *w, GtkAllocation *allocation, gpointer data) | |
206 { | |
207 gaim_prefs_set_int("/gaim/gtk/conversations/chat/userlist_width", allocation->width == 1 ? 0 : allocation->width); | |
208 | |
209 return FALSE; | |
210 } | |
211 | |
212 static gboolean | |
205 size_allocate_cb(GtkWidget *w, GtkAllocation *allocation, GaimGtkConversation *gtkconv) | 213 size_allocate_cb(GtkWidget *w, GtkAllocation *allocation, GaimGtkConversation *gtkconv) |
206 { | 214 { |
207 GaimConversation *conv = gtkconv->active_conv; | 215 GaimConversation *conv = gtkconv->active_conv; |
208 | 216 |
209 if (!GTK_WIDGET_VISIBLE(w)) | 217 if (!GTK_WIDGET_VISIBLE(w)) |
237 gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_width", allocation->width); | 245 gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_width", allocation->width); |
238 gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_height", allocation->height); | 246 gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_height", allocation->height); |
239 } | 247 } |
240 if (w == gtkconv->lower_hbox) | 248 if (w == gtkconv->lower_hbox) |
241 gaim_prefs_set_int("/gaim/gtk/conversations/chat/entry_height", allocation->height); | 249 gaim_prefs_set_int("/gaim/gtk/conversations/chat/entry_height", allocation->height); |
242 if (w == gtkconv->u.chat->list) | |
243 gaim_prefs_set_int("/gaim/gtk/conversations/chat/userlist_width", allocation->width == 1 ? 0 : allocation->width); | |
244 } | 250 } |
245 | 251 |
246 return FALSE; | 252 return FALSE; |
247 } | 253 } |
248 | 254 |
4003 | 4009 |
4004 g_signal_connect(G_OBJECT(list), "button_press_event", | 4010 g_signal_connect(G_OBJECT(list), "button_press_event", |
4005 G_CALLBACK(right_click_chat_cb), gtkconv); | 4011 G_CALLBACK(right_click_chat_cb), gtkconv); |
4006 g_signal_connect(G_OBJECT(list), "popup-menu", | 4012 g_signal_connect(G_OBJECT(list), "popup-menu", |
4007 G_CALLBACK(gtkconv_chat_popup_menu_cb), gtkconv); | 4013 G_CALLBACK(gtkconv_chat_popup_menu_cb), gtkconv); |
4008 g_signal_connect(G_OBJECT(list), "size-allocate", G_CALLBACK(size_allocate_cb), gtkconv); | 4014 g_signal_connect(G_OBJECT(lbox), "size-allocate", G_CALLBACK(lbox_size_allocate_cb), gtkconv); |
4009 | 4015 |
4010 | 4016 |
4011 rend = gtk_cell_renderer_text_new(); | 4017 rend = gtk_cell_renderer_text_new(); |
4012 | 4018 |
4013 g_object_set(rend, | 4019 g_object_set(rend, |