comparison src/prefs.c @ 678:c72f58814e9f

[gaim-migrate @ 688] permit/deny stuff moved to prefs; permit/deny stuff works *properly* now, permit/deny stuff much more logical in preferences. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 15 Aug 2000 01:29:35 +0000
parents ddc3fd0dcd51
children 71b2477033cb
comparison
equal deleted inserted replaced
677:05f6f7dabb7e 678:c72f58814e9f
57 57
58 static GtkWidget *prefdialog = NULL; 58 static GtkWidget *prefdialog = NULL;
59 static GtkWidget *debugbutton = NULL; 59 static GtkWidget *debugbutton = NULL;
60 GtkWidget *prefs_away_list = NULL; 60 GtkWidget *prefs_away_list = NULL;
61 61
62 static void destdeb(GtkWidget *m, gpointer n)
63 {
64 gtk_widget_destroy(debugbutton);
65 debugbutton = NULL;
66 }
67
62 static void general_page() 68 static void general_page()
63 { 69 {
64 GtkWidget *parent; 70 GtkWidget *parent;
65 GtkWidget *box; 71 GtkWidget *box;
66 GtkWidget *label; 72 GtkWidget *label;
67 GtkWidget *sep; 73 GtkWidget *sep;
68 GtkWidget *idle; 74 GtkWidget *idle;
69 75
70 parent = prefdialog->parent; 76 parent = prefdialog->parent;
71 gtk_widget_destroy(prefdialog); 77 gtk_widget_destroy(prefdialog);
72 debugbutton = NULL;
73 prefs_away_list = NULL;
74 78
75 prefdialog = gtk_frame_new(_("General Options")); 79 prefdialog = gtk_frame_new(_("General Options"));
76 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 80 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
77 81
78 box = gtk_vbox_new(FALSE, 5); 82 box = gtk_vbox_new(FALSE, 5);
94 gaim_button(_("Show Buddy Ticker after restart"), &display_options, OPT_DISP_SHOW_BUDDYTICKER, box); 98 gaim_button(_("Show Buddy Ticker after restart"), &display_options, OPT_DISP_SHOW_BUDDYTICKER, box);
95 if (!dw && (general_options & OPT_GEN_DEBUG)) 99 if (!dw && (general_options & OPT_GEN_DEBUG))
96 general_options = general_options ^ OPT_GEN_DEBUG; 100 general_options = general_options ^ OPT_GEN_DEBUG;
97 debugbutton = gaim_button(_("Show Debug Window"), &general_options, OPT_GEN_DEBUG, box); 101 debugbutton = gaim_button(_("Show Debug Window"), &general_options, OPT_GEN_DEBUG, box);
98 gtk_signal_connect_object(GTK_OBJECT(debugbutton), "clicked", GTK_SIGNAL_FUNC(show_debug), 0); 102 gtk_signal_connect_object(GTK_OBJECT(debugbutton), "clicked", GTK_SIGNAL_FUNC(show_debug), 0);
103 gtk_signal_connect(GTK_OBJECT(debugbutton), "destroy", GTK_SIGNAL_FUNC(destdeb), 0);
99 104
100 sep = gtk_hseparator_new(); 105 sep = gtk_hseparator_new();
101 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); 106 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5);
102 gtk_widget_show(sep); 107 gtk_widget_show(sep);
103 108
179 GtkWidget *opt; 184 GtkWidget *opt;
180 char buffer[1024]; 185 char buffer[1024];
181 186
182 parent = prefdialog->parent; 187 parent = prefdialog->parent;
183 gtk_widget_destroy(prefdialog); 188 gtk_widget_destroy(prefdialog);
184 debugbutton = NULL;
185 prefs_away_list = NULL;
186 189
187 prefdialog = gtk_frame_new(_("Connection Options")); 190 prefdialog = gtk_frame_new(_("Connection Options"));
188 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 191 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
189 gtk_signal_connect(GTK_OBJECT(prefdialog), "destroy", GTK_SIGNAL_FUNC(connect_destroy), 0); 192 gtk_signal_connect(GTK_OBJECT(prefdialog), "destroy", GTK_SIGNAL_FUNC(connect_destroy), 0);
190 193
307 GtkWidget *box; 310 GtkWidget *box;
308 GtkWidget *label; 311 GtkWidget *label;
309 312
310 parent = prefdialog->parent; 313 parent = prefdialog->parent;
311 gtk_widget_destroy(prefdialog); 314 gtk_widget_destroy(prefdialog);
312 debugbutton = NULL;
313 prefs_away_list = NULL;
314 315
315 prefdialog = gtk_frame_new(_("Buddy List Options")); 316 prefdialog = gtk_frame_new(_("Buddy List Options"));
316 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 317 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
317 318
318 box = gtk_vbox_new(FALSE, 5); 319 box = gtk_vbox_new(FALSE, 5);
330 gaim_button(_("Use Daemon pictures"), &display_options, OPT_DISP_DEVIL_PIXMAPS, box); 331 gaim_button(_("Use Daemon pictures"), &display_options, OPT_DISP_DEVIL_PIXMAPS, box);
331 332
332 gtk_widget_show(prefdialog); 333 gtk_widget_show(prefdialog);
333 } 334 }
334 335
335 static void convo_page() 336 static GtkWidget *permtree = NULL;
337
338 void build_permit_tree()
339 {
340 GtkWidget *ti;
341 GtkWidget *sub;
342 GList *plist = permit;
343 GList *dlist = deny;
344
345 if (!permtree) return;
346
347 gtk_tree_clear_items(GTK_TREE(permtree), 0, -1);
348
349 ti = gtk_tree_item_new_with_label(_("Permit"));
350 sub = gtk_tree_new();
351 gtk_widget_show(ti);
352 gtk_widget_show(sub);
353 gtk_tree_prepend(GTK_TREE(permtree), ti);
354 gtk_tree_item_set_subtree(GTK_TREE_ITEM(ti), sub);
355 gtk_tree_item_expand(GTK_TREE_ITEM(ti));
356
357 while(plist) {
358 ti = gtk_tree_item_new_with_label((char *)plist->data);
359 gtk_widget_show(ti);
360 gtk_tree_prepend(GTK_TREE(sub), ti);
361 plist = plist->next;
362 }
363
364
365 ti = gtk_tree_item_new_with_label(_("Deny"));
366 sub = gtk_tree_new();
367 gtk_widget_show(ti);
368 gtk_widget_show(sub);
369 gtk_tree_prepend(GTK_TREE(permtree), ti);
370 gtk_tree_item_set_subtree(GTK_TREE_ITEM(ti), sub);
371 gtk_tree_item_expand(GTK_TREE_ITEM(ti));
372
373 while(dlist) {
374 ti = gtk_tree_item_new_with_label((char *)dlist->data);
375 gtk_widget_show(ti);
376 gtk_tree_prepend(GTK_TREE(sub), ti);
377 dlist = dlist->next;
378 }
379 }
380
381 static void do_del_perm(GtkWidget *w, GtkTree *ptree)
382 {
383 GtkLabel *label, *plabel;
384 GtkWidget *item, *pitem;
385 char *c, *d;
386 GList *i;
387
388 GList *plist;
389 GList *dlist;
390 int level;
391
392 plist = permit;
393 dlist = deny;
394
395 i = GTK_TREE_SELECTION(ptree);
396 if (i) {
397 item = GTK_WIDGET(i->data);
398 gtk_tree_unselect_child(GTK_TREE(ptree), item);
399 label = GTK_LABEL(GTK_BIN(item)->child);
400 gtk_label_get(label, &c);
401 level = GTK_TREE(item->parent)->level;
402 if (level > 0) {
403 pitem = GTK_WIDGET(GTK_TREE(item->parent)->tree_owner);
404 plabel = GTK_LABEL(GTK_BIN(pitem)->child);
405 gtk_label_get(plabel, &d);
406 if (!strcasecmp(d, _("Permit"))) {
407 while(plist) {
408 if (!strcasecmp((char *)(plist->data), c)) {
409 permit = g_list_remove(permit, plist->data);
410 break;
411 }
412
413 plist = plist->next;
414 }
415
416 } else {
417 while(dlist) {
418 if (!strcasecmp((char *)(dlist->data), c)) {
419 deny = g_list_remove(deny, dlist->data);
420
421 break;
422 }
423 dlist = dlist->next;
424 }
425
426 }
427
428
429 } else {
430 /* Can't delete groups here! :) */
431 return;
432 }
433 serv_set_permit_deny();
434 gtk_tree_clear_items(GTK_TREE(ptree), 0, -1);
435 build_permit_tree();
436 serv_save_config();
437 }
438 }
439
440
441 static void set_permit(GtkWidget *w, int *data)
442 {
443 permdeny = (int)data;
444 if (blist) {
445 /* We don't save this 'at home', it's on the server.
446 * So, we gotta resend the config to the server. */
447 serv_save_config();
448 /* we do this here because we can :) */
449 serv_set_permit_deny();
450 }
451 }
452
453 static GtkWidget *deny_radio(char *label, int which, GtkWidget *box, GtkWidget *set)
454 {
455 GtkWidget *opt;
456
457 if (!set)
458 opt = gtk_radio_button_new_with_label(NULL, label);
459 else
460 opt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)), label);
461 gtk_box_pack_start(GTK_BOX(box), opt, FALSE, FALSE, 0);
462 gtk_signal_connect(GTK_OBJECT(opt), "clicked", GTK_SIGNAL_FUNC(set_permit), (void *)which);
463 gtk_widget_show(opt);
464 if (permdeny == which)
465 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
466
467 return opt;
468 }
469
470 static void permdest(GtkWidget *m, gpointer n)
471 {
472 gtk_widget_destroy(permtree);
473 permtree = NULL;
474 }
475
476 static void add_perm_callback(GtkWidget *widget, void *dummy)
477 {
478 if (!blist)
479 do_error_dialog(_("Please sign on before editing the permit/deny lists."),
480 _("Please sign on"));
481 else
482 show_add_perm(NULL);
483 }
484
485 static void deny_page()
336 { 486 {
337 GtkWidget *parent; 487 GtkWidget *parent;
338 GtkWidget *box; 488 GtkWidget *box;
339 GtkWidget *label; 489 GtkWidget *label;
340 GtkWidget *sep; 490 GtkWidget *sep;
491 GtkWidget *hbox;
492 GtkWidget *vbox;
493 GtkWidget *xbox;
494 GtkWidget *opt;
495 GtkWidget *button;
341 496
342 parent = prefdialog->parent; 497 parent = prefdialog->parent;
343 gtk_widget_destroy(prefdialog); 498 gtk_widget_destroy(prefdialog);
344 debugbutton = NULL; 499
345 prefs_away_list = NULL; 500 prefdialog = gtk_frame_new(_("Permit/Deny List Options"));
501 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
502
503 box = gtk_vbox_new(FALSE, 5);
504 gtk_container_add(GTK_CONTAINER(prefdialog), box);
505 gtk_widget_show(box);
506
507 label = gtk_label_new(_("All options take effect immediately unless otherwise noted."));
508 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
509 gtk_widget_show(label);
510
511 sep = gtk_hseparator_new();
512 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5);
513 gtk_widget_show(sep);
514
515 label = gtk_label_new(_("The permit/deny configuration will change between users,\n"
516 "and changes while you are signed off will not be saved."));
517 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
518 gtk_widget_show(label);
519
520 hbox = gtk_hbox_new(FALSE, 0);
521 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5);
522 gtk_widget_show(hbox);
523
524 vbox = gtk_vbox_new(FALSE, 0);
525 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 5);
526 gtk_widget_show(vbox);
527
528 opt = deny_radio(_("Allow Anyone"), PERMIT_ALL, vbox, NULL);
529 #if 0
530 /* This doesn't work because TOC doesn't have a PERMIT_BUDDY setting
531 * and merging the two would be very difficult at best, most likely
532 * impossible. If we can guarantee only Oscar than this is easy */
533 opt = deny_radio(_("Allow only users on Buddy List"), PERMIT_BUDDY, vbox, opt);
534 #endif
535 opt = deny_radio(_("Allow only the users in \"Permit\""), PERMIT_SOME, vbox, opt);
536
537 vbox = gtk_vbox_new(FALSE, 0);
538 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 5);
539 gtk_widget_show(vbox);
540
541 opt = deny_radio(_("Block all users"), PERMIT_NONE, vbox, opt);
542 opt = deny_radio(_("Block the users in \"Deny\""), DENY_SOME, vbox, opt);
543
544 xbox = gtk_scrolled_window_new(NULL, NULL);
545 gtk_box_pack_start(GTK_BOX(box), xbox, TRUE, TRUE, 5);
546 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(xbox),
547 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
548 gtk_widget_show(xbox);
549
550 permtree = gtk_tree_new();
551 build_permit_tree();
552 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(xbox), permtree);
553 gtk_signal_connect(GTK_OBJECT(permtree), "destroy", GTK_SIGNAL_FUNC(permdest), 0);
554 gtk_widget_show(permtree);
555
556 hbox = gtk_hbox_new(TRUE, 10);
557 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5);
558 gtk_widget_show(hbox);
559
560 button = picture_button(prefs, _("Add"), gnome_add_xpm);
561 gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 10);
562 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(add_perm_callback), NULL);
563
564 button = picture_button(prefs, _("Remove"), gnome_remove_xpm);
565 gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 10);
566 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(do_del_perm), permtree);
567
568 gtk_widget_show(prefdialog);
569 }
570
571 static void convo_page()
572 {
573 GtkWidget *parent;
574 GtkWidget *box;
575 GtkWidget *label;
576 GtkWidget *sep;
577
578 parent = prefdialog->parent;
579 gtk_widget_destroy(prefdialog);
346 580
347 prefdialog = gtk_frame_new(_("Conversation Window Options")); 581 prefdialog = gtk_frame_new(_("Conversation Window Options"));
348 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 582 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
349 583
350 box = gtk_vbox_new(FALSE, 5); 584 box = gtk_vbox_new(FALSE, 5);
384 GtkWidget *box; 618 GtkWidget *box;
385 GtkWidget *label; 619 GtkWidget *label;
386 620
387 parent = prefdialog->parent; 621 parent = prefdialog->parent;
388 gtk_widget_destroy(prefdialog); 622 gtk_widget_destroy(prefdialog);
389 debugbutton = NULL;
390 prefs_away_list = NULL;
391 623
392 prefdialog = gtk_frame_new(_("IM Options")); 624 prefdialog = gtk_frame_new(_("IM Options"));
393 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 625 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
394 626
395 box = gtk_vbox_new(FALSE, 5); 627 box = gtk_vbox_new(FALSE, 5);
413 GtkWidget *box; 645 GtkWidget *box;
414 GtkWidget *label; 646 GtkWidget *label;
415 647
416 parent = prefdialog->parent; 648 parent = prefdialog->parent;
417 gtk_widget_destroy(prefdialog); 649 gtk_widget_destroy(prefdialog);
418 debugbutton = NULL;
419 prefs_away_list = NULL;
420 650
421 prefdialog = gtk_frame_new(_("Chat Options")); 651 prefdialog = gtk_frame_new(_("Chat Options"));
422 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 652 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
423 653
424 box = gtk_vbox_new(FALSE, 5); 654 box = gtk_vbox_new(FALSE, 5);
601 g_free(cp); 831 g_free(cp);
602 cp = g_new0(struct chat_page, 1); 832 cp = g_new0(struct chat_page, 1);
603 833
604 parent = prefdialog->parent; 834 parent = prefdialog->parent;
605 gtk_widget_destroy(prefdialog); 835 gtk_widget_destroy(prefdialog);
606 debugbutton = NULL;
607 prefs_away_list = NULL;
608 836
609 prefdialog = gtk_frame_new(_("Chat Options")); 837 prefdialog = gtk_frame_new(_("Chat Options"));
610 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 838 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
611 839
612 box = gtk_vbox_new(FALSE, 5); 840 box = gtk_vbox_new(FALSE, 5);
711 GtkWidget *button; 939 GtkWidget *button;
712 GtkWidget *select; 940 GtkWidget *select;
713 941
714 parent = prefdialog->parent; 942 parent = prefdialog->parent;
715 gtk_widget_destroy(prefdialog); 943 gtk_widget_destroy(prefdialog);
716 debugbutton = NULL;
717 prefs_away_list = NULL;
718 944
719 prefdialog = gtk_frame_new(_("Font Options")); 945 prefdialog = gtk_frame_new(_("Font Options"));
720 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 946 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
721 947
722 box = gtk_vbox_new(FALSE, 5); 948 box = gtk_vbox_new(FALSE, 5);
794 GtkWidget *box; 1020 GtkWidget *box;
795 GtkWidget *label; 1021 GtkWidget *label;
796 1022
797 parent = prefdialog->parent; 1023 parent = prefdialog->parent;
798 gtk_widget_destroy(prefdialog); 1024 gtk_widget_destroy(prefdialog);
799 debugbutton = NULL;
800 prefs_away_list = NULL;
801 1025
802 prefdialog = gtk_frame_new(_("Sound Options")); 1026 prefdialog = gtk_frame_new(_("Sound Options"));
803 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 1027 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
804 1028
805 box = gtk_vbox_new(FALSE, 5); 1029 box = gtk_vbox_new(FALSE, 5);
826 GtkWidget *label; 1050 GtkWidget *label;
827 GtkWidget *sep; 1051 GtkWidget *sep;
828 1052
829 parent = prefdialog->parent; 1053 parent = prefdialog->parent;
830 gtk_widget_destroy(prefdialog); 1054 gtk_widget_destroy(prefdialog);
831 debugbutton = NULL;
832 prefs_away_list = NULL;
833 1055
834 prefdialog = gtk_frame_new(_("Sound Events")); 1056 prefdialog = gtk_frame_new(_("Sound Events"));
835 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 1057 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
836 1058
837 box = gtk_vbox_new(FALSE, 5); 1059 box = gtk_vbox_new(FALSE, 5);
898 i = GTK_LIST(prefs_away_list)->selection; 1120 i = GTK_LIST(prefs_away_list)->selection;
899 1121
900 a = gtk_object_get_user_data(GTK_OBJECT(i->data)); 1122 a = gtk_object_get_user_data(GTK_OBJECT(i->data));
901 1123
902 rem_away_mess(NULL, a); 1124 rem_away_mess(NULL, a);
1125 }
1126
1127 static void paldest(GtkWidget *m, gpointer n)
1128 {
1129 gtk_widget_destroy(prefs_away_list);
1130 prefs_away_list = NULL;
903 } 1131 }
904 1132
905 static void away_page() 1133 static void away_page()
906 { 1134 {
907 GtkWidget *parent; 1135 GtkWidget *parent;
917 struct away_message *a; 1145 struct away_message *a;
918 char buffer[BUF_LONG]; 1146 char buffer[BUF_LONG];
919 1147
920 parent = prefdialog->parent; 1148 parent = prefdialog->parent;
921 gtk_widget_destroy(prefdialog); 1149 gtk_widget_destroy(prefdialog);
922 debugbutton = NULL;
923 prefs_away_list = NULL;
924 1150
925 prefdialog = gtk_frame_new(_("Away Messages")); 1151 prefdialog = gtk_frame_new(_("Away Messages"));
926 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 1152 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
927 1153
928 box = gtk_vbox_new(FALSE, 5); 1154 box = gtk_vbox_new(FALSE, 5);
939 gtk_box_pack_start(GTK_BOX(top), sw, TRUE, TRUE, 0); 1165 gtk_box_pack_start(GTK_BOX(top), sw, TRUE, TRUE, 0);
940 gtk_widget_show(sw); 1166 gtk_widget_show(sw);
941 1167
942 prefs_away_list = gtk_list_new(); 1168 prefs_away_list = gtk_list_new();
943 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), prefs_away_list); 1169 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), prefs_away_list);
1170 gtk_signal_connect(GTK_OBJECT(prefs_away_list), "destroy", GTK_SIGNAL_FUNC(paldest), 0);
944 gtk_widget_show(prefs_away_list); 1171 gtk_widget_show(prefs_away_list);
945 1172
946 sw2 = gtk_scrolled_window_new(NULL, NULL); 1173 sw2 = gtk_scrolled_window_new(NULL, NULL);
947 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2), 1174 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2),
948 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); 1175 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
1049 GtkWidget *label; 1276 GtkWidget *label;
1050 GtkWidget *opt; 1277 GtkWidget *opt;
1051 1278
1052 parent = prefdialog->parent; 1279 parent = prefdialog->parent;
1053 gtk_widget_destroy(prefdialog); 1280 gtk_widget_destroy(prefdialog);
1054 debugbutton = NULL;
1055 prefs_away_list = NULL; 1281 prefs_away_list = NULL;
1056 1282
1057 prefdialog = gtk_frame_new(_("Browser Options")); 1283 prefdialog = gtk_frame_new(_("Browser Options"));
1058 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 1284 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
1059 1285
1342 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, connect_page); 1568 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, connect_page);
1343 } 1569 }
1344 1570
1345 void prefs_build_buddy(GtkWidget *preftree) 1571 void prefs_build_buddy(GtkWidget *preftree)
1346 { 1572 {
1347 GtkCTreeNode *parent; 1573 GtkCTreeNode *parent, *node;
1348 char *text[1]; 1574 char *text[1];
1349 1575
1350 text[0] = _("Buddy List"); 1576 text[0] = _("Buddy List");
1351 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL, 1577 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL,
1352 text, 5, NULL, NULL, NULL, NULL, 0, 1); 1578 text, 5, NULL, NULL, NULL, NULL, 0, 1);
1353 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, buddy_page); 1579 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, buddy_page);
1580
1581 /* FIXME ! We shouldn't be showing this if we're not signed on */
1582 text[0] = _("Permit/Deny");
1583 node = gtk_ctree_insert_node(GTK_CTREE(preftree), parent, NULL,
1584 text, 5, NULL, NULL, NULL, NULL, 0, 1);
1585 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node, deny_page);
1354 } 1586 }
1355 1587
1356 void prefs_build_convo(GtkWidget *preftree) 1588 void prefs_build_convo(GtkWidget *preftree)
1357 { 1589 {
1358 GtkCTreeNode *parent, *node, *node2; 1590 GtkCTreeNode *parent, *node, *node2;