| 365 GtkWidget *cancel; |
366 GtkWidget *cancel; |
| 366 GtkWidget *warn; |
367 GtkWidget *warn; |
| 367 GtkWidget *label; |
368 GtkWidget *label; |
| 368 GtkWidget *vbox; |
369 GtkWidget *vbox; |
| 369 GtkWidget *bbox; |
370 GtkWidget *bbox; |
| |
371 GtkWidget *button_box; |
| |
372 GtkWidget *icon_i; |
| |
373 GdkBitmap *mask; |
| |
374 GdkPixmap *icon; |
| |
375 GtkWidget *frame; |
| |
376 GtkWidget *fbox; |
| 370 |
377 |
| 371 struct warning *w = g_new0(struct warning, 1); |
378 struct warning *w = g_new0(struct warning, 1); |
| 372 |
379 |
| 373 char *buf = g_malloc(128); |
380 char *buf = g_malloc(128); |
| 374 w->window = gtk_window_new(GTK_WINDOW_DIALOG); |
381 w->window = gtk_window_new(GTK_WINDOW_DIALOG); |
| 375 dialogwindows = g_list_prepend(dialogwindows, w->window); |
382 gtk_window_set_policy(GTK_WINDOW(w->window), FALSE, FALSE, TRUE); |
| |
383 gtk_widget_show(w->window); |
| |
384 dialogwindows = g_list_prepend(dialogwindows, w->window); |
| 376 cancel = gtk_button_new_with_label(_("Cancel")); |
385 cancel = gtk_button_new_with_label(_("Cancel")); |
| 377 warn = gtk_button_new_with_label(_("Warn")); |
386 warn = gtk_button_new_with_label(_("Warn")); |
| 378 bbox = gtk_hbox_new(TRUE, 10); |
387 bbox = gtk_hbox_new(TRUE, 10); |
| 379 vbox = gtk_vbox_new(FALSE, 5); |
388 vbox = gtk_vbox_new(FALSE, 5); |
| 380 |
389 fbox = gtk_vbox_new(FALSE, 5); |
| |
390 |
| |
391 frame = gtk_frame_new(_("Warn")); |
| |
392 |
| |
393 /* Build Warn Button */ |
| |
394 |
| |
395 warn = gtk_button_new(); |
| |
396 |
| |
397 button_box = gtk_hbox_new(FALSE, 5); |
| |
398 icon = gdk_pixmap_create_from_xpm_d ( w->window->window, &mask, NULL, warn_xpm); |
| |
399 icon_i = gtk_pixmap_new(icon, mask); |
| |
400 |
| |
401 label = gtk_label_new(_("Warn")); |
| |
402 |
| |
403 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2); |
| |
404 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2); |
| |
405 |
| |
406 gtk_widget_show(label); |
| |
407 gtk_widget_show(icon_i); |
| |
408 |
| |
409 gtk_widget_show(button_box); |
| |
410 |
| |
411 gtk_container_add(GTK_CONTAINER(warn), button_box); |
| |
412 |
| |
413 /* End of OK Button */ |
| |
414 |
| |
415 /* Build Cancel Button */ |
| |
416 |
| |
417 cancel = gtk_button_new(); |
| |
418 |
| |
419 button_box = gtk_hbox_new(FALSE, 5); |
| |
420 icon = gdk_pixmap_create_from_xpm_d ( w->window->window, &mask, NULL, cancel_xpm); |
| |
421 |
| |
422 icon_i = gtk_pixmap_new(icon, mask); |
| |
423 |
| |
424 label = gtk_label_new(_("Cancel")); |
| |
425 |
| |
426 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2); |
| |
427 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2); |
| |
428 |
| |
429 gtk_widget_show(label); |
| |
430 gtk_widget_show(icon_i); |
| |
431 |
| |
432 gtk_widget_show(button_box); |
| |
433 |
| |
434 gtk_container_add(GTK_CONTAINER(cancel), button_box); |
| |
435 |
| |
436 /* End of Cancel Button */ |
| 381 /* Put the buttons in the box */ |
437 /* Put the buttons in the box */ |
| 382 gtk_box_pack_start(GTK_BOX(bbox), warn, TRUE, TRUE, 10); |
438 |
| 383 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10); |
439 gtk_box_pack_start(GTK_BOX(bbox), warn, TRUE, TRUE, 5); |
| |
440 gtk_box_pack_end(GTK_BOX(bbox), cancel, TRUE, TRUE, 5); |
| 384 |
441 |
| 385 g_snprintf(buf, 127, _("Do you really want to warn %s?"), who); |
442 g_snprintf(buf, 127, _("Do you really want to warn %s?"), who); |
| 386 label = gtk_label_new(buf); |
443 label = gtk_label_new(buf); |
| 387 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); |
444 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 5); |
| 388 gtk_widget_show(label); |
445 gtk_widget_show(label); |
| 389 w->anon = gtk_check_button_new_with_label(_("Warn anonymously?")); |
446 w->anon = gtk_check_button_new_with_label(_("Warn anonymously?")); |
| 390 gtk_box_pack_start(GTK_BOX(vbox), w->anon, TRUE, TRUE, 0); |
447 gtk_box_pack_start(GTK_BOX(vbox), w->anon, TRUE, TRUE, 5); |
| 391 |
448 |
| 392 label = gtk_label_new(_("Anonymous warnings are less harsh.")); |
449 label = gtk_label_new(_("Anonymous warnings are less harsh.")); |
| 393 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); |
450 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 5); |
| 394 gtk_widget_show(label); |
451 gtk_widget_show(label); |
| 395 |
452 |
| 396 w->who = who; |
453 w->who = who; |
| 397 |
454 |
| 398 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5); |
455 gtk_container_add(GTK_CONTAINER(frame), vbox); |
| |
456 |
| |
457 gtk_box_pack_start(GTK_BOX(fbox), frame, FALSE, FALSE, 5); |
| |
458 gtk_box_pack_start(GTK_BOX(fbox), bbox, FALSE, FALSE, 5); |
| 399 |
459 |
| 400 /* Handle closes right */ |
460 /* Handle closes right */ |
| 401 gtk_signal_connect(GTK_OBJECT(w->window), "delete_event", |
461 gtk_signal_connect(GTK_OBJECT(w->window), "delete_event", |
| 402 GTK_SIGNAL_FUNC(destroy_dialog), w->window); |
462 GTK_SIGNAL_FUNC(destroy_dialog), w->window); |
| 403 gtk_signal_connect(GTK_OBJECT(cancel), "clicked", |
463 gtk_signal_connect(GTK_OBJECT(cancel), "clicked", |
| 753 |
819 |
| 754 label = gtk_label_new(_("IM who: ")); |
820 label = gtk_label_new(_("IM who: ")); |
| 755 gtk_box_pack_start(GTK_BOX(ebox), label, TRUE, TRUE, 10); |
821 gtk_box_pack_start(GTK_BOX(ebox), label, TRUE, TRUE, 10); |
| 756 gtk_widget_show(label); |
822 gtk_widget_show(label); |
| 757 |
823 |
| 758 imentry = gtk_entry_new(); |
|
| 759 gtk_box_pack_start(GTK_BOX(ebox), imentry, TRUE, TRUE, 10); |
824 gtk_box_pack_start(GTK_BOX(ebox), imentry, TRUE, TRUE, 10); |
| 760 |
825 |
| 761 gtk_box_pack_start(GTK_BOX(vbox), ebox, FALSE, FALSE, 5); |
826 gtk_box_pack_start(GTK_BOX(vbox), ebox, FALSE, FALSE, 5); |
| 762 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5); |
827 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5); |
| 763 |
828 |