comparison src/buddy.c @ 4934:04ca72a25f75

[gaim-migrate @ 5268] Morten Brix Pedersen (mbrix) writes: " When a user has the icons at the bottom turned off, the buddy list is still resized to a fairly large width when starting gaim. When using an i18n version of gaim, the strings in the button box are usually longer, thus meaning that with many languages (e.g. Danish), the gaim window will grow *very* wide. The solution is to not show() the buttonbox before it's enabled. Right now it's being show()ed together with the rest of the buddy list." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 01 Apr 2003 00:01:19 +0000
parents 34448ffab4f1
children b89f7c450d6c
comparison
equal deleted inserted replaced
4933:34448ffab4f1 4934:04ca72a25f75
1214 g_signal_connect(G_OBJECT(gtkblist->treeview), "button-press-event", G_CALLBACK(gtk_blist_button_press_cb), NULL); 1214 g_signal_connect(G_OBJECT(gtkblist->treeview), "button-press-event", G_CALLBACK(gtk_blist_button_press_cb), NULL);
1215 1215
1216 gtk_box_pack_start(GTK_BOX(gtkblist->vbox), sw, TRUE, TRUE, 0); 1216 gtk_box_pack_start(GTK_BOX(gtkblist->vbox), sw, TRUE, TRUE, 0);
1217 gtk_container_add(GTK_CONTAINER(sw), gtkblist->treeview); 1217 gtk_container_add(GTK_CONTAINER(sw), gtkblist->treeview);
1218 gaim_gtk_blist_update_columns(); 1218 gaim_gtk_blist_update_columns();
1219
1220 /* OK... let's show this bad boy. */
1221 gaim_gtk_blist_refresh(list);
1222 gaim_gtk_blist_restore_position();
1223 gtk_widget_show_all(gtkblist->window);
1224
1225 /* the button box below is first added now, the reason is that if we
1226 * show() it immediately, the buddy list width will be dependent of
1227 * the button box even if the user turned the button box off. */
1228
1219 /**************************** Button Box **************************************/ 1229 /**************************** Button Box **************************************/
1220 1230
1221 sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); 1231 sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
1222 gtkblist->bbox = gtk_hbox_new(TRUE, 0); 1232 gtkblist->bbox = gtk_hbox_new(TRUE, 0);
1223 gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->bbox, FALSE, FALSE, 0); 1233 gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->bbox, FALSE, FALSE, 0);
1245 gtk_box_pack_start(GTK_BOX(gtkblist->bbox), button, FALSE, FALSE, 0); 1255 gtk_box_pack_start(GTK_BOX(gtkblist->bbox), button, FALSE, FALSE, 0);
1246 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); 1256 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
1247 gtk_size_group_add_widget(sg, button); 1257 gtk_size_group_add_widget(sg, button);
1248 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(gtk_blist_button_away_cb), NULL); 1258 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(gtk_blist_button_away_cb), NULL);
1249 1259
1250 /* OK... let's show this bad boy. */
1251 gaim_gtk_blist_refresh(list);
1252 gaim_gtk_blist_restore_position();
1253 gtk_widget_show_all(gtkblist->window);
1254
1255 gaim_gtk_blist_update_toolbar(); 1260 gaim_gtk_blist_update_toolbar();
1256
1257 } 1261 }
1258 1262
1259 void gaim_gtk_blist_refresh(struct gaim_buddy_list *list) 1263 void gaim_gtk_blist_refresh(struct gaim_buddy_list *list)
1260 { 1264 {
1261 GaimBlistNode *group = list->root; 1265 GaimBlistNode *group = list->root;