| 298 |
298 |
| 299 GtkWidget * |
299 GtkWidget * |
| 300 gaim_pixbuf_button_from_stock(const char *text, const char *icon, |
300 gaim_pixbuf_button_from_stock(const char *text, const char *icon, |
| 301 GaimButtonOrientation style) |
301 GaimButtonOrientation style) |
| 302 { |
302 { |
| 303 GtkWidget *button, *image, *label, *bbox, *ibox, *lbox; |
303 GtkWidget *button, *image, *label, *bbox, *ibox, *lbox = NULL; |
| 304 |
304 |
| 305 button = gtk_button_new(); |
305 button = gtk_button_new(); |
| 306 |
306 |
| 307 if (style == GAIM_BUTTON_HORIZONTAL) { |
307 if (style == GAIM_BUTTON_HORIZONTAL) { |
| 308 bbox = gtk_hbox_new(FALSE, 0); |
308 bbox = gtk_hbox_new(FALSE, 0); |
| 309 ibox = gtk_hbox_new(FALSE, 0); |
309 ibox = gtk_hbox_new(FALSE, 0); |
| 310 lbox = gtk_hbox_new(FALSE, 0); |
310 if (text) |
| |
311 lbox = gtk_hbox_new(FALSE, 0); |
| 311 } else { |
312 } else { |
| 312 bbox = gtk_vbox_new(FALSE, 0); |
313 bbox = gtk_vbox_new(FALSE, 0); |
| 313 ibox = gtk_vbox_new(FALSE, 0); |
314 ibox = gtk_vbox_new(FALSE, 0); |
| 314 lbox = gtk_vbox_new(FALSE, 0); |
315 if (text) |
| |
316 lbox = gtk_vbox_new(FALSE, 0); |
| 315 } |
317 } |
| 316 |
318 |
| 317 gtk_container_add(GTK_CONTAINER(button), bbox); |
319 gtk_container_add(GTK_CONTAINER(button), bbox); |
| 318 |
320 |
| 319 if (icon) { |
321 if (icon) { |