Mercurial > pidgin
comparison src/dialogs.c @ 3325:a6367446950d
[gaim-migrate @ 3343]
Tie pixmaps and text labels together so when windows are expanded
vertically they stay together--the labels and pixmaps, that is. (Thanks,
Daniel Walls)
committer: Tailor Script <tailor@pidgin.im>
| author | Jim Seymour <jseymour> |
|---|---|
| date | Tue, 18 Jun 2002 00:35:23 +0000 |
| parents | 26130b6a04db |
| children | 220c9f1fc75e |
comparison
equal
deleted
inserted
replaced
| 3324:edc8511fddff | 3325:a6367446950d |
|---|---|
| 4286 gtk_container_add(GTK_CONTAINER(button), button_box); | 4286 gtk_container_add(GTK_CONTAINER(button), button_box); |
| 4287 | 4287 |
| 4288 button_box_2 = gtk_vbox_new(FALSE, 0); | 4288 button_box_2 = gtk_vbox_new(FALSE, 0); |
| 4289 | 4289 |
| 4290 gtk_box_pack_start(GTK_BOX(button_box), button_box_2, TRUE, TRUE, 0); | 4290 gtk_box_pack_start(GTK_BOX(button_box), button_box_2, TRUE, TRUE, 0); |
| 4291 | |
| 4291 gtk_widget_show(button_box_2); | 4292 gtk_widget_show(button_box_2); |
| 4292 gtk_widget_show(button_box); | 4293 gtk_widget_show(button_box); |
| 4293 if (dispstyle == 2 || dispstyle == 0) { | 4294 |
| 4294 pm = gdk_pixmap_create_from_xpm_d(window->window, &mask, NULL, xpm); | 4295 switch(dispstyle) { |
| 4295 pixmap = gtk_pixmap_new(pm, mask); | 4296 case 0: |
| 4296 gtk_box_pack_start(GTK_BOX(button_box_2), pixmap, FALSE, FALSE, 0); | 4297 /* Display just pixmap */ |
| 4297 | 4298 pm = gdk_pixmap_create_from_xpm_d(window->window, &mask, NULL, xpm); |
| 4298 gtk_widget_show(pixmap); | 4299 pixmap = gtk_pixmap_new(pm, mask); |
| 4299 | 4300 gtk_box_pack_start(GTK_BOX(button_box_2), pixmap, FALSE, FALSE, 0); |
| 4300 gdk_pixmap_unref(pm); | 4301 |
| 4301 gdk_bitmap_unref(mask); | 4302 gtk_widget_show(pixmap); |
| 4302 } | 4303 |
| 4303 | 4304 gdk_pixmap_unref(pm); |
| 4304 if (dispstyle == 2 || dispstyle == 1) { | 4305 gdk_bitmap_unref(mask); |
| 4305 label = gtk_label_new(text); | 4306 break; |
| 4306 gtk_widget_show(label); | 4307 |
| 4307 gtk_box_pack_end(GTK_BOX(button_box_2), label, FALSE, FALSE, 0); | 4308 case 1: |
| 4309 /* Display just label */ | |
| 4310 label = gtk_label_new(text); | |
| 4311 gtk_widget_show(label); | |
| 4312 gtk_box_pack_start(GTK_BOX(button_box_2), label, FALSE, FALSE, 0); | |
| 4313 break; | |
| 4314 | |
| 4315 case 2: | |
| 4316 /* Display pixmap and label */ | |
| 4317 { | |
| 4318 GtkWidget *button_box_top = gtk_vbox_new(FALSE, 0); | |
| 4319 GtkWidget *button_box_bottom = gtk_vbox_new(FALSE, 0); | |
| 4320 | |
| 4321 pm = gdk_pixmap_create_from_xpm_d(window->window, &mask, NULL, xpm); | |
| 4322 pixmap = gtk_pixmap_new(pm, mask); | |
| 4323 gtk_box_pack_end(GTK_BOX(button_box_top), pixmap, FALSE, FALSE, 0); | |
| 4324 | |
| 4325 gtk_widget_show(pixmap); | |
| 4326 | |
| 4327 gdk_pixmap_unref(pm); | |
| 4328 gdk_bitmap_unref(mask); | |
| 4329 | |
| 4330 label = gtk_label_new(text); | |
| 4331 gtk_widget_show(label); | |
| 4332 gtk_box_pack_start(GTK_BOX(button_box_bottom), label, FALSE, FALSE, 0); | |
| 4333 | |
| 4334 gtk_box_pack_start(GTK_BOX(button_box_2), button_box_top, TRUE, | |
| 4335 TRUE, 0); | |
| 4336 gtk_box_pack_start(GTK_BOX(button_box_2), button_box_bottom, TRUE, | |
| 4337 TRUE, 0); | |
| 4338 gtk_widget_show(button_box_top); | |
| 4339 gtk_widget_show(button_box_bottom); | |
| 4340 } | |
| 4341 break; | |
| 4342 | |
| 4343 default: | |
| 4344 break; | |
| 4308 } | 4345 } |
| 4309 | 4346 |
| 4310 gtk_tooltips_set_tip(button_tips, button, text, "Gaim"); | 4347 gtk_tooltips_set_tip(button_tips, button, text, "Gaim"); |
| 4311 gtk_widget_show(button); | 4348 gtk_widget_show(button); |
| 4312 return button; | 4349 return button; |
