Mercurial > pidgin.yaz
comparison src/gtkutils.c @ 9750:4f8476beabf5
[gaim-migrate @ 10617]
Fix chat buttons and make a few more tweaks
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 15 Aug 2004 15:45:35 +0000 |
parents | a2fd9abea23a |
children | c31e64c2bd85 |
comparison
equal
deleted
inserted
replaced
9749:a2fd9abea23a | 9750:4f8476beabf5 |
---|---|
230 GtkWidget *button, *image, *label, *bbox, *ibox, *lbox; | 230 GtkWidget *button, *image, *label, *bbox, *ibox, *lbox; |
231 | 231 |
232 button = gtk_button_new(); | 232 button = gtk_button_new(); |
233 | 233 |
234 if (style == GAIM_BUTTON_HORIZONTAL) { | 234 if (style == GAIM_BUTTON_HORIZONTAL) { |
235 bbox = gtk_hbox_new(FALSE, 5); | 235 bbox = gtk_hbox_new(FALSE, 0); |
236 ibox = gtk_hbox_new(FALSE, 0); | 236 ibox = gtk_hbox_new(FALSE, 0); |
237 lbox = gtk_hbox_new(FALSE, 0); | 237 lbox = gtk_hbox_new(FALSE, 0); |
238 } | 238 } else { |
239 else { | 239 bbox = gtk_vbox_new(FALSE, 0); |
240 bbox = gtk_vbox_new(FALSE, 5); | 240 ibox = gtk_vbox_new(FALSE, 0); |
241 ibox = gtk_vbox_new(FALSE, 0); | 241 lbox = gtk_vbox_new(FALSE, 0); |
242 lbox = gtk_vbox_new(FALSE, 0); | 242 } |
243 } | 243 |
244 | 244 gtk_container_add(GTK_CONTAINER(button), bbox); |
245 gtk_container_add (GTK_CONTAINER(button), bbox); | |
246 | |
247 gtk_box_pack_start_defaults(GTK_BOX(bbox), ibox); | |
248 gtk_box_pack_start_defaults(GTK_BOX(bbox), lbox); | |
249 | 245 |
250 if (icon) { | 246 if (icon) { |
247 gtk_box_pack_start_defaults(GTK_BOX(bbox), ibox); | |
251 image = gtk_image_new_from_stock(icon, GTK_ICON_SIZE_BUTTON); | 248 image = gtk_image_new_from_stock(icon, GTK_ICON_SIZE_BUTTON); |
252 gtk_box_pack_end(GTK_BOX(ibox), image, FALSE, FALSE, 0); | 249 gtk_box_pack_end(GTK_BOX(ibox), image, TRUE, TRUE, 0); |
253 } | 250 } |
254 | 251 |
255 if (text) { | 252 if (text) { |
253 gtk_box_pack_start_defaults(GTK_BOX(bbox), lbox); | |
256 label = gtk_label_new(NULL); | 254 label = gtk_label_new(NULL); |
257 gtk_label_set_text_with_mnemonic(GTK_LABEL(label), text); | 255 gtk_label_set_text_with_mnemonic(GTK_LABEL(label), text); |
258 gtk_label_set_mnemonic_widget(GTK_LABEL(label), button); | 256 gtk_label_set_mnemonic_widget(GTK_LABEL(label), button); |
259 gtk_box_pack_start(GTK_BOX(lbox), label, FALSE, FALSE, 0); | 257 gtk_box_pack_start(GTK_BOX(lbox), label, TRUE, TRUE, 0); |
260 gaim_set_accessible_label (button, label); | 258 gaim_set_accessible_label (button, label); |
261 } | 259 } |
262 | 260 |
263 gtk_widget_show_all(bbox); | 261 gtk_widget_show_all(bbox); |
264 | 262 |