| 796 GtkWidget *button; |
796 GtkWidget *button; |
| 797 GdkPixbuf *pixbuf; |
797 GdkPixbuf *pixbuf; |
| 798 GtkImage *image; |
798 GtkImage *image; |
| 799 guint width; |
799 guint width; |
| 800 const gchar *smiley_shortcut; |
800 const gchar *smiley_shortcut; |
| 801 const gchar *smiley_path; |
801 |
| 802 |
802 smiley_shortcut = purple_smiley_get_shortcut(smiley); |
| 803 smiley_path = purple_smiley_get_path(smiley); |
|
| 804 |
803 |
| 805 width = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(smiley), |
804 width = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(smiley), |
| 806 "pidgin-webviewtoolbar-button-width")); |
805 "pidgin-webviewtoolbar-button-width")); |
| 807 pixbuf = g_object_get_data(G_OBJECT(smiley), |
806 pixbuf = g_object_get_data(G_OBJECT(smiley), |
| 808 "pidgin-webviewtoolbar-button-image"); |
807 "pidgin-webviewtoolbar-button-image"); |
| 811 "not exists: %s", smiley_shortcut); |
810 "not exists: %s", smiley_shortcut); |
| 812 continue; |
811 continue; |
| 813 } |
812 } |
| 814 |
813 |
| 815 image = GTK_IMAGE(gtk_image_new_from_pixbuf(pixbuf)); |
814 image = GTK_IMAGE(gtk_image_new_from_pixbuf(pixbuf)); |
| 816 |
|
| 817 smiley_shortcut = purple_smiley_get_shortcut(smiley); |
|
| 818 |
815 |
| 819 button = gtk_button_new(); |
816 button = gtk_button_new(); |
| 820 gtk_container_add(GTK_CONTAINER(button), GTK_WIDGET(image)); |
817 gtk_container_add(GTK_CONTAINER(button), GTK_WIDGET(image)); |
| 821 g_object_set_data_full(G_OBJECT(button), "smiley_text", |
818 g_object_set_data_full(G_OBJECT(button), "smiley_text", |
| 822 g_strdup(smiley_shortcut), g_free); |
819 g_strdup(smiley_shortcut), g_free); |