Mercurial > pidgin
comparison src/prefs.c @ 1757:3dfe4aefd366
[gaim-migrate @ 1767]
la la la
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 27 Apr 2001 00:33:38 +0000 |
parents | 300dcb2aa120 |
children | 6d1d9e988fd4 |
comparison
equal
deleted
inserted
replaced
1756:baf57b74e818 | 1757:3dfe4aefd366 |
---|---|
457 | 457 |
458 if (data & 0x1) | 458 if (data & 0x1) |
459 update_chat_button_pix(); | 459 update_chat_button_pix(); |
460 else | 460 else |
461 update_im_button_pix(); | 461 update_im_button_pix(); |
462 | |
463 save_prefs(); | |
462 } | 464 } |
463 | 465 |
464 /* i like everclear */ | 466 /* i like everclear */ |
465 static GtkWidget *am_radio(char *label, int which, GtkWidget *box, GtkWidget *set) | 467 static GtkWidget *am_radio(char *label, int which, GtkWidget *box, GtkWidget *set) |
466 { | 468 { |
510 } | 512 } |
511 | 513 |
512 return opt; | 514 return opt; |
513 } | 515 } |
514 | 516 |
517 static void set_tab_opt(GtkWidget *w, int data) | |
518 { | |
519 int mask; | |
520 if (data & 0x1) /* set the first bit if we're affecting chat buttons */ | |
521 mask = (OPT_DISP_CHAT_SIDE_TAB | OPT_DISP_CHAT_BR_TAB); | |
522 else | |
523 mask = (OPT_DISP_CONV_SIDE_TAB | OPT_DISP_CONV_BR_TAB); | |
524 display_options &= ~(mask); | |
525 display_options |= (data & mask); | |
526 | |
527 if (data & 0x1) | |
528 update_chat_tabs(); | |
529 else | |
530 update_im_tabs(); | |
531 | |
532 save_prefs(); | |
533 } | |
534 | |
535 static GtkWidget *tab_radio(char *label, int which, GtkWidget *box, GtkWidget *set) | |
536 { | |
537 GtkWidget *opt; | |
538 | |
539 if (!set) | |
540 opt = gtk_radio_button_new_with_label(NULL, label); | |
541 else | |
542 opt = | |
543 gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)), | |
544 label); | |
545 gtk_box_pack_start(GTK_BOX(box), opt, FALSE, FALSE, 0); | |
546 gtk_signal_connect(GTK_OBJECT(opt), "clicked", GTK_SIGNAL_FUNC(set_tab_opt), (void *)which); | |
547 gtk_widget_show(opt); | |
548 if (which & 1) { | |
549 if ((display_options & (OPT_DISP_CHAT_SIDE_TAB | OPT_DISP_CHAT_BR_TAB)) == (which ^ 1)) | |
550 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE); | |
551 if (!(display_options & OPT_DISP_ONE_CHAT_WINDOW)) | |
552 gtk_widget_set_sensitive(opt, FALSE); | |
553 } else { | |
554 if ((display_options & (OPT_DISP_CONV_SIDE_TAB | OPT_DISP_CONV_BR_TAB)) == which) | |
555 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE); | |
556 if (!(display_options & OPT_DISP_ONE_WINDOW)) | |
557 gtk_widget_set_sensitive(opt, FALSE); | |
558 } | |
559 | |
560 return opt; | |
561 } | |
562 | |
515 static void im_page() | 563 static void im_page() |
516 { | 564 { |
517 GtkWidget *parent; | 565 GtkWidget *parent; |
518 GtkWidget *box; | 566 GtkWidget *box; |
519 GtkWidget *label; | 567 GtkWidget *label; |
520 GtkWidget *frame; | 568 GtkWidget *frame; |
521 GtkWidget *hbox; | 569 GtkWidget *hbox; |
522 GtkWidget *vbox; | 570 GtkWidget *vbox; |
523 GtkWidget *opt; | 571 GtkWidget *opt; |
524 GtkWidget *sep; | 572 GtkWidget *sep; |
573 GtkWidget *button; | |
574 GtkWidget *button2; | |
575 GtkWidget *hbox2; | |
576 GtkWidget *vbox2; | |
525 | 577 |
526 parent = prefdialog->parent; | 578 parent = prefdialog->parent; |
527 gtk_widget_destroy(prefdialog); | 579 gtk_widget_destroy(prefdialog); |
528 | 580 |
529 prefdialog = gtk_frame_new(_("IM Options")); | 581 prefdialog = gtk_frame_new(_("IM Options")); |
564 | 616 |
565 vbox = gtk_vbox_new(TRUE, 5); | 617 vbox = gtk_vbox_new(TRUE, 5); |
566 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5); | 618 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5); |
567 gtk_widget_show(vbox); | 619 gtk_widget_show(vbox); |
568 | 620 |
569 gaim_button(_("Show all conversations in one tabbed window"), &display_options, OPT_DISP_ONE_WINDOW, vbox); | 621 button = gaim_button(_("Show all conversations in one tabbed window"), &display_options, OPT_DISP_ONE_WINDOW, vbox); |
570 gaim_button(_("Raise windows on events"), &general_options, OPT_GEN_POPUP_WINDOWS, vbox); | 622 gaim_button(_("Raise windows on events"), &general_options, OPT_GEN_POPUP_WINDOWS, vbox); |
571 gaim_button(_("Show logins in window"), &display_options, OPT_DISP_SHOW_LOGON, vbox); | 623 gaim_button(_("Show logins in window"), &display_options, OPT_DISP_SHOW_LOGON, vbox); |
572 gaim_button(_("Show larger entry box on new windows"), &display_options, OPT_DISP_CONV_BIG_ENTRY, vbox); | 624 gaim_button(_("Show larger entry box on new windows"), &display_options, OPT_DISP_CONV_BIG_ENTRY, vbox); |
573 | 625 |
574 frame = gtk_frame_new(_("Group Chat Window")); | 626 frame = gtk_frame_new(_("Group Chat Window")); |
597 | 649 |
598 vbox = gtk_vbox_new(TRUE, 5); | 650 vbox = gtk_vbox_new(TRUE, 5); |
599 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5); | 651 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5); |
600 gtk_widget_show(vbox); | 652 gtk_widget_show(vbox); |
601 | 653 |
602 gaim_button(_("Show all chats in one tabbed window"), &display_options, OPT_DISP_ONE_CHAT_WINDOW, vbox); | 654 button2 = gaim_button(_("Show all chats in one tabbed window"), &display_options, OPT_DISP_ONE_CHAT_WINDOW, vbox); |
603 gaim_button(_("Raise windows on events"), &general_options, OPT_GEN_POPUP_CHAT, vbox); | 655 gaim_button(_("Raise windows on events"), &general_options, OPT_GEN_POPUP_CHAT, vbox); |
604 gaim_button(_("Show people joining/leaving in window"), &display_options, OPT_DISP_CHAT_LOGON, vbox); | 656 gaim_button(_("Show people joining/leaving in window"), &display_options, OPT_DISP_CHAT_LOGON, vbox); |
605 gaim_button(_("Show larger entry box on new windows"), &display_options, OPT_DISP_CHAT_BIG_ENTRY, vbox); | 657 gaim_button(_("Show larger entry box on new windows"), &display_options, OPT_DISP_CHAT_BIG_ENTRY, vbox); |
658 | |
659 frame = gtk_frame_new(_("Tabbed Window Options")); | |
660 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5); | |
661 gtk_widget_show(frame); | |
662 | |
663 hbox = gtk_hbox_new(FALSE, 5); | |
664 gtk_container_add(GTK_CONTAINER(frame), hbox); | |
665 gtk_widget_show(hbox); | |
666 | |
667 vbox = gtk_vbox_new(FALSE, 5); | |
668 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5); | |
669 gtk_widget_show(vbox); | |
670 | |
671 label = gtk_label_new(_("IM Tab Placement:")); | |
672 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 5); | |
673 gtk_widget_show(label); | |
674 | |
675 hbox2 = gtk_hbox_new(TRUE, 5); | |
676 gtk_box_pack_start(GTK_BOX(vbox), hbox2, TRUE, TRUE, 5); | |
677 gtk_widget_show(hbox2); | |
678 | |
679 vbox2 = gtk_vbox_new(TRUE, 5); | |
680 gtk_box_pack_start(GTK_BOX(hbox2), vbox2, TRUE, TRUE, 5); | |
681 gtk_widget_show(vbox2); | |
682 | |
683 opt = tab_radio(_("Top"), 0, vbox2, NULL); | |
684 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); | |
685 opt = tab_radio(_("Bottom"), OPT_DISP_CONV_BR_TAB, vbox2, opt); | |
686 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); | |
687 | |
688 vbox2 = gtk_vbox_new(TRUE, 5); | |
689 gtk_box_pack_start(GTK_BOX(hbox2), vbox2, TRUE, TRUE, 5); | |
690 gtk_widget_show(vbox2); | |
691 | |
692 opt = tab_radio(_("Left"), OPT_DISP_CONV_SIDE_TAB, vbox2, opt); | |
693 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); | |
694 opt = tab_radio(_("Right"), OPT_DISP_CONV_SIDE_TAB | OPT_DISP_CONV_BR_TAB, vbox2, opt); | |
695 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); | |
696 | |
697 sep = gtk_vseparator_new(); | |
698 gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 5); | |
699 gtk_widget_show(sep); | |
700 | |
701 vbox = gtk_vbox_new(FALSE, 5); | |
702 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5); | |
703 gtk_widget_show(vbox); | |
704 | |
705 label = gtk_label_new(_("Chat Tab Placement:")); | |
706 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 5); | |
707 gtk_widget_show(label); | |
708 | |
709 hbox2 = gtk_hbox_new(TRUE, 5); | |
710 gtk_box_pack_start(GTK_BOX(vbox), hbox2, TRUE, TRUE, 5); | |
711 gtk_widget_show(hbox2); | |
712 | |
713 vbox2 = gtk_vbox_new(TRUE, 5); | |
714 gtk_box_pack_start(GTK_BOX(hbox2), vbox2, TRUE, TRUE, 5); | |
715 gtk_widget_show(vbox2); | |
716 | |
717 opt = tab_radio(_("Top"), 1, vbox2, NULL); | |
718 gtk_signal_connect(GTK_OBJECT(button2), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); | |
719 opt = tab_radio(_("Bottom"), OPT_DISP_CHAT_BR_TAB | 1, vbox2, opt); | |
720 gtk_signal_connect(GTK_OBJECT(button2), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); | |
721 | |
722 vbox2 = gtk_vbox_new(TRUE, 5); | |
723 gtk_box_pack_start(GTK_BOX(hbox2), vbox2, TRUE, TRUE, 5); | |
724 gtk_widget_show(vbox2); | |
725 | |
726 opt = tab_radio(_("Left"), OPT_DISP_CHAT_SIDE_TAB | 1, vbox2, opt); | |
727 gtk_signal_connect(GTK_OBJECT(button2), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); | |
728 opt = tab_radio(_("Right"), OPT_DISP_CHAT_SIDE_TAB | OPT_DISP_CHAT_BR_TAB | 1, vbox2, opt); | |
729 gtk_signal_connect(GTK_OBJECT(button2), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); | |
606 | 730 |
607 gtk_widget_show(prefdialog); | 731 gtk_widget_show(prefdialog); |
608 } | 732 } |
609 | 733 |
610 struct chat_page { | 734 struct chat_page { |