comparison src/dialogs.c @ 2613:6f7e1fc3e132

[gaim-migrate @ 2626] just some style changes committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 25 Oct 2001 20:24:00 +0000
parents 7938953630fa
children f8b02cf4af94
comparison
equal deleted inserted replaced
2612:7938953630fa 2613:6f7e1fc3e132
3426 return; 3426 return;
3427 } 3427 }
3428 3428
3429 gtk_widget_set_sensitive(bbox, FALSE); 3429 gtk_widget_set_sensitive(bbox, FALSE);
3430 gtk_signal_disconnect_by_func(GTK_OBJECT(window), GTK_SIGNAL_FUNC(destroy_dialog), window); 3430 gtk_signal_disconnect_by_func(GTK_OBJECT(window), GTK_SIGNAL_FUNC(destroy_dialog), window);
3431 block = gtk_signal_connect(GTK_OBJECT(window), "delete_event", GTK_SIGNAL_FUNC(dont_destroy), window); 3431 block = gtk_signal_connect(GTK_OBJECT(window), "delete_event",
3432 GTK_SIGNAL_FUNC(dont_destroy), window);
3432 3433
3433 fseek(fp, offset, SEEK_SET); 3434 fseek(fp, offset, SEEK_SET);
3434 gtk_imhtml_clear(GTK_IMHTML(layout)); 3435 gtk_imhtml_clear(GTK_IMHTML(layout));
3435 while (gtk_events_pending()) 3436 while (gtk_events_pending())
3436 gtk_main_iteration(); 3437 gtk_main_iteration();
3487 guint block; 3488 guint block;
3488 char convo_start[32]; 3489 char convo_start[32];
3489 long offset = 0; 3490 long offset = 0;
3490 unsigned int i = 0; 3491 unsigned int i = 0;
3491 3492
3492
3493 options = GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_TITLE | GTK_IMHTML_NO_SCROLL; 3493 options = GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_TITLE | GTK_IMHTML_NO_SCROLL;
3494 if (convo_options & OPT_CONVO_IGNORE_COLOUR) 3494 if (convo_options & OPT_CONVO_IGNORE_COLOUR)
3495 options ^= GTK_IMHTML_NO_COLOURS; 3495 options ^= GTK_IMHTML_NO_COLOURS;
3496 if (convo_options & OPT_CONVO_IGNORE_FONTS) 3496 if (convo_options & OPT_CONVO_IGNORE_FONTS)
3497 options ^= GTK_IMHTML_NO_FONTS; 3497 options ^= GTK_IMHTML_NO_FONTS;
3514 aol_icon(window->window); 3514 aol_icon(window->window);
3515 3515
3516 layout = gtk_imhtml_new(NULL, NULL); 3516 layout = gtk_imhtml_new(NULL, NULL);
3517 bbox = gtk_hbox_new(FALSE, 0); 3517 bbox = gtk_hbox_new(FALSE, 0);
3518 3518
3519
3520 box = gtk_vbox_new(FALSE, 5); 3519 box = gtk_vbox_new(FALSE, 5);
3521 gtk_container_add(GTK_CONTAINER(window), box); 3520 gtk_container_add(GTK_CONTAINER(window), box);
3522 3521
3523 hbox = gtk_hbox_new(FALSE, 5); 3522 hbox = gtk_hbox_new(FALSE, 5);
3524 gtk_box_pack_start(GTK_BOX(box), hbox, TRUE, TRUE, 0); 3523 gtk_box_pack_start(GTK_BOX(box), hbox, TRUE, TRUE, 0);
3539 gtk_widget_show(frame); 3538 gtk_widget_show(frame);
3540 3539
3541 sw = gtk_scrolled_window_new(NULL, NULL); 3540 sw = gtk_scrolled_window_new(NULL, NULL);
3542 gtk_container_set_border_width(GTK_CONTAINER(sw), 5); 3541 gtk_container_set_border_width(GTK_CONTAINER(sw), 5);
3543 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), list); 3542 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), list);
3544 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); 3543 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
3544 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
3545 gtk_widget_set_usize(sw, 220, 220); 3545 gtk_widget_set_usize(sw, 220, 220);
3546 gtk_container_add(GTK_CONTAINER(frame), sw); 3546 gtk_container_add(GTK_CONTAINER(frame), sw);
3547 gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); 3547 gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0);
3548 3548
3549 while (fgets(buf, BUF_LONG, fp)) { 3549 while (fgets(buf, BUF_LONG, fp)) {
3552 char *temp = strchr(buf, '@'); 3552 char *temp = strchr(buf, '@');
3553 3553
3554 if (temp == NULL || strlen(temp) < 2) 3554 if (temp == NULL || strlen(temp) < 2)
3555 continue; 3555 continue;
3556 3556
3557 if (i == 1) { 3557 if (i == 1 && item_list) {
3558 if (item_list) { 3558 item_list = g_list_remove(item_list, last);
3559 item_list = g_list_remove(item_list, last); 3559 last = NULL;
3560 last = NULL;
3561 }
3562 } 3560 }
3563
3564 3561
3565 i = 0; 3562 i = 0;
3566 3563
3567 temp++; 3564 temp++;
3568 length = strcspn(temp, "-"); 3565 length = strcspn(temp, "-");
3574 gtk_object_set_user_data(GTK_OBJECT(item), (gpointer)offset); 3571 gtk_object_set_user_data(GTK_OBJECT(item), (gpointer)offset);
3575 gtk_object_set_data(GTK_OBJECT(item), "options", (gpointer)options); 3572 gtk_object_set_data(GTK_OBJECT(item), "options", (gpointer)options);
3576 gtk_object_set_data(GTK_OBJECT(item), "name", (gpointer)name); 3573 gtk_object_set_data(GTK_OBJECT(item), "name", (gpointer)name);
3577 gtk_object_set_data(GTK_OBJECT(item), "box", (gpointer)bbox); 3574 gtk_object_set_data(GTK_OBJECT(item), "box", (gpointer)bbox);
3578 gtk_object_set_data(GTK_OBJECT(item), "window", (gpointer)window); 3575 gtk_object_set_data(GTK_OBJECT(item), "window", (gpointer)window);
3579 gtk_signal_connect(GTK_OBJECT(item), "select", GTK_SIGNAL_FUNC(log_show_convo), layout); 3576 gtk_signal_connect(GTK_OBJECT(item), "select",
3577 GTK_SIGNAL_FUNC(log_show_convo), layout);
3580 last = item; 3578 last = item;
3581 item_list = g_list_append(item_list, item); 3579 item_list = g_list_append(item_list, item);
3582 3580
3583 gtk_widget_show(item); 3581 gtk_widget_show(item);
3584 } 3582 }
3585 i++; 3583 i++;
3586 } 3584 }
3587 fclose(fp); 3585 fclose(fp);
3588 } 3586 if (i == 1 && item_list)
3589 3587 item_list = g_list_remove(item_list, item);
3590 if (i == 1) { 3588
3591 if (item_list) 3589 if (item_list)
3592 item_list = g_list_remove(item_list, item); 3590 gtk_list_insert_items(GTK_LIST(list), item_list, 0 );
3593 } 3591 }
3594
3595 gtk_list_insert_items(GTK_LIST(list), item_list, 0 );
3596 3592
3597 gtk_signal_disconnect(GTK_OBJECT(window), block); 3593 gtk_signal_disconnect(GTK_OBJECT(window), block);
3598 gtk_signal_connect(GTK_OBJECT(window), "delete_event", GTK_SIGNAL_FUNC(destroy_dialog), window); 3594 gtk_signal_connect(GTK_OBJECT(window), "delete_event", GTK_SIGNAL_FUNC(destroy_dialog), window);
3599 3595
3600 frame = gtk_frame_new(_("Conversation")); 3596 frame = gtk_frame_new(_("Conversation"));