Mercurial > pidgin.yaz
comparison pidgin/gtkimhtmltoolbar.c @ 23133:9aa105267f46
Show the custom smileys only on accounts that support it. References
#1187.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 07 May 2008 18:13:14 +0000 |
parents | 9c0a47402f7a |
children | 85c595142be6 |
comparison
equal
deleted
inserted
replaced
23132:9c0a47402f7a | 23133:9aa105267f46 |
---|---|
716 insert_smiley_cb(GtkWidget *smiley, GtkIMHtmlToolbar *toolbar) | 716 insert_smiley_cb(GtkWidget *smiley, GtkIMHtmlToolbar *toolbar) |
717 { | 717 { |
718 GtkWidget *dialog; | 718 GtkWidget *dialog; |
719 GtkWidget *smiley_table = NULL; | 719 GtkWidget *smiley_table = NULL; |
720 GSList *smileys, *unique_smileys = NULL; | 720 GSList *smileys, *unique_smileys = NULL; |
721 GSList *custom_smileys = NULL; | |
722 | 721 |
723 if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(smiley))) { | 722 if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(smiley))) { |
724 destroy_smiley_dialog(toolbar); | 723 destroy_smiley_dialog(toolbar); |
725 gtk_widget_grab_focus(toolbar->imhtml); | 724 gtk_widget_grab_focus(toolbar->imhtml); |
726 return; | 725 return; |
738 unique_smileys = g_slist_append(unique_smileys, smiley); | 737 unique_smileys = g_slist_append(unique_smileys, smiley); |
739 } | 738 } |
740 smileys = smileys->next; | 739 smileys = smileys->next; |
741 } | 740 } |
742 | 741 |
743 custom_smileys = pidgin_smileys_get_all(); | 742 if (toolbar->imhtml && |
744 | 743 (gtk_imhtml_get_format_functions(GTK_IMHTML(toolbar->imhtml)) & GTK_IMHTML_CUSTOM_SMILEY)) { |
745 while (custom_smileys) { | 744 GSList *custom_smileys = NULL; |
746 GtkIMHtmlSmiley *smiley = custom_smileys->data; | 745 custom_smileys = pidgin_smileys_get_all(); |
747 unique_smileys = g_slist_append(unique_smileys, smiley); | 746 |
748 | 747 while (custom_smileys) { |
749 custom_smileys = custom_smileys->next; | 748 GtkIMHtmlSmiley *smiley = custom_smileys->data; |
749 unique_smileys = g_slist_append(unique_smileys, smiley); | |
750 | |
751 custom_smileys = custom_smileys->next; | |
752 } | |
750 } | 753 } |
751 | 754 |
752 dialog = pidgin_create_dialog(_("Smile!"), 0, "smiley_dialog", FALSE); | 755 dialog = pidgin_create_dialog(_("Smile!"), 0, "smiley_dialog", FALSE); |
753 | 756 |
754 gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); | 757 gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); |