Mercurial > pidgin.yaz
comparison pidgin/gtkimhtmltoolbar.c @ 23113:8c3444f04709
propagate from branch 'im.pidgin.pidgin' (head d7144f5dbbde09137aff1ceadfd419e25303bf7d)
to branch 'im.pidgin.pidgin.next.minor' (head b6f1c6f279a87ac4b59426eea116c349eb31fe8c)
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Wed, 07 May 2008 12:14:28 +0000 |
parents | 28005860d2c9 |
children | b8f861d7b540 ac567757d236 f9fd7ddf6996 |
comparison
equal
deleted
inserted
replaced
23112:bb41bdce8981 | 23113:8c3444f04709 |
---|---|
618 GtkWidget *button; | 618 GtkWidget *button; |
619 GtkRequisition size; | 619 GtkRequisition size; |
620 struct smiley_button_list *cur; | 620 struct smiley_button_list *cur; |
621 struct smiley_button_list *it, *it_last; | 621 struct smiley_button_list *it, *it_last; |
622 | 622 |
623 cur = malloc(sizeof(struct smiley_button_list)); | 623 cur = g_new0(struct smiley_button_list, 1); |
624 it = ls; | 624 it = ls; |
625 it_last = ls; /* list iterators*/ | 625 it_last = ls; /* list iterators*/ |
626 image = gtk_image_new_from_file(filename); | 626 image = gtk_image_new_from_file(filename); |
627 | 627 |
628 gtk_widget_size_request(image, &size); | 628 gtk_widget_size_request(image, &size); |
730 | 730 |
731 /* create list of smileys sorted by height */ | 731 /* create list of smileys sorted by height */ |
732 while (unique_smileys) { | 732 while (unique_smileys) { |
733 GtkIMHtmlSmiley *smiley = unique_smileys->data; | 733 GtkIMHtmlSmiley *smiley = unique_smileys->data; |
734 if (!smiley->hidden) { | 734 if (!smiley->hidden) { |
735 fflush(stdout); | |
736 ls = sort_smileys(ls, toolbar, &max_line_width, smiley->file, smiley->smile); | 735 ls = sort_smileys(ls, toolbar, &max_line_width, smiley->file, smiley->smile); |
737 } | 736 } |
738 unique_smileys = unique_smileys->next; | 737 unique_smileys = g_slist_delete_link(unique_smileys, unique_smileys); |
739 } | 738 } |
740 /* pack buttons of the list */ | 739 /* pack buttons of the list */ |
741 max_line_width = max_line_width / num_lines; | 740 max_line_width = max_line_width / num_lines; |
742 it = ls; | 741 it = ls; |
743 while (it != NULL) | 742 while (it != NULL) |
752 line_width = 0; | 751 line_width = 0; |
753 col = 0; | 752 col = 0; |
754 } | 753 } |
755 col++; | 754 col++; |
756 it = it->next; | 755 it = it->next; |
757 free(it_tmp); | 756 g_free(it_tmp); |
758 } | 757 } |
759 gtk_box_pack_start(GTK_BOX(smiley_table), line, FALSE, TRUE, 0); | 758 gtk_box_pack_start(GTK_BOX(smiley_table), line, FALSE, TRUE, 0); |
760 | 759 |
761 gtk_widget_add_events(dialog, GDK_KEY_PRESS_MASK); | 760 gtk_widget_add_events(dialog, GDK_KEY_PRESS_MASK); |
762 } | 761 } |