Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 12682:d495909dcdc9
[gaim-migrate @ 15025]
Stop using __FUNCTION__. It's not standardized and does not exist on
Solaris. __func__ is specified in C99, but we try not to require C99.
See
http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Function-Names.html
for details.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 30 Dec 2005 19:33:48 +0000 |
parents | a614eb6c7d9d |
children | 2d326453b33d |
comparison
equal
deleted
inserted
replaced
12681:4ad0d587aac4 | 12682:d495909dcdc9 |
---|---|
5004 } | 5004 } |
5005 | 5005 |
5006 static void gaim_gtkconv_custom_smiley_allocated(GdkPixbufLoader *loader, gpointer user_data) | 5006 static void gaim_gtkconv_custom_smiley_allocated(GdkPixbufLoader *loader, gpointer user_data) |
5007 { | 5007 { |
5008 GtkIMHtmlSmiley *smiley; | 5008 GtkIMHtmlSmiley *smiley; |
5009 | 5009 |
5010 smiley = (GtkIMHtmlSmiley *)user_data; | 5010 smiley = (GtkIMHtmlSmiley *)user_data; |
5011 smiley->icon = gdk_pixbuf_loader_get_animation(loader); | 5011 smiley->icon = gdk_pixbuf_loader_get_animation(loader); |
5012 | 5012 |
5013 if (smiley->icon) | 5013 if (smiley->icon) |
5014 g_object_ref(G_OBJECT(smiley->icon)); | 5014 g_object_ref(G_OBJECT(smiley->icon)); |
5015 #ifdef DEBUG_CUSTOM_SMILEY | 5015 #ifdef DEBUG_CUSTOM_SMILEY |
5016 gaim_debug_info("custom-smiley", "%s(): got GdkPixbufAnimation %p for smiley '%s'\n", __FUNCTION__, smiley->icon, smiley->smile); | 5016 gaim_debug_info("custom-smiley", "gaim_gtkconv_custom_smiley_allocated(): got GdkPixbufAnimation %p for smiley '%s'\n", smiley->icon, smiley->smile); |
5017 #endif | 5017 #endif |
5018 } | 5018 } |
5019 | 5019 |
5020 static void gaim_gtkconv_custom_smiley_closed(GdkPixbufLoader *loader, gpointer user_data) | 5020 static void gaim_gtkconv_custom_smiley_closed(GdkPixbufLoader *loader, gpointer user_data) |
5021 { | 5021 { |
5022 GtkIMHtmlSmiley *smiley; | 5022 GtkIMHtmlSmiley *smiley; |
5023 GtkWidget *icon = NULL; | 5023 GtkWidget *icon = NULL; |
5024 GtkTextChildAnchor *anchor = NULL; | 5024 GtkTextChildAnchor *anchor = NULL; |
5025 GSList *current = NULL; | 5025 GSList *current = NULL; |
5026 | 5026 |
5027 smiley = (GtkIMHtmlSmiley *)user_data; | 5027 smiley = (GtkIMHtmlSmiley *)user_data; |
5028 if (!smiley->imhtml) { | 5028 if (!smiley->imhtml) { |
5029 #ifdef DEBUG_CUSTOM_SMILEY | 5029 #ifdef DEBUG_CUSTOM_SMILEY |
5030 gaim_debug_error("custom-smiley", "%s(): orphan smiley found: %p\n", __FUNCTION__, smiley); | 5030 gaim_debug_error("custom-smiley", "gaim_gtkconv_custom_smiley_closed(): orphan smiley found: %p\n", smiley); |
5031 #endif | 5031 #endif |
5032 g_object_unref(G_OBJECT(loader)); | 5032 g_object_unref(G_OBJECT(loader)); |
5033 smiley->loader = NULL; | 5033 smiley->loader = NULL; |
5034 return; | 5034 return; |
5035 } | 5035 } |
5036 | 5036 |
5037 for (current = smiley->anchors; current; current = g_slist_next(current)) { | 5037 for (current = smiley->anchors; current; current = g_slist_next(current)) { |
5038 | 5038 |
5039 icon = gtk_image_new_from_animation(smiley->icon); | 5039 icon = gtk_image_new_from_animation(smiley->icon); |
5040 | 5040 |
5041 #ifdef DEBUG_CUSTOM_SMILEY | 5041 #ifdef DEBUG_CUSTOM_SMILEY |
5042 gaim_debug_info("custom-smiley", "%s(): got GtkImage %p from GtkPixbufAnimation %p for smiley '%s'\n", | 5042 gaim_debug_info("custom-smiley", "gaim_gtkconv_custom_smiley_closed(): got GtkImage %p from GtkPixbufAnimation %p for smiley '%s'\n", |
5043 __FUNCTION__, icon, smiley->icon, smiley->smile); | 5043 icon, smiley->icon, smiley->smile); |
5044 #endif | 5044 #endif |
5045 if (icon) { | 5045 if (icon) { |
5046 gtk_widget_show(icon); | 5046 gtk_widget_show(icon); |
5047 | 5047 |
5048 anchor = GTK_TEXT_CHILD_ANCHOR(current->data); | 5048 anchor = GTK_TEXT_CHILD_ANCHOR(current->data); |
5049 | 5049 |
5050 g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_plaintext", g_strdup(gaim_unescape_html(smiley->smile)), g_free); | 5050 g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_plaintext", g_strdup(gaim_unescape_html(smiley->smile)), g_free); |
5051 g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_htmltext", g_strdup(smiley->smile), g_free); | 5051 g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_htmltext", g_strdup(smiley->smile), g_free); |
5052 | 5052 |
5053 if (smiley->imhtml) | 5053 if (smiley->imhtml) |
5054 gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(smiley->imhtml), icon, anchor); | 5054 gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(smiley->imhtml), icon, anchor); |
5055 } | 5055 } |
5056 | 5056 |
5057 } | 5057 } |
5058 | 5058 |
5059 g_slist_free(smiley->anchors); | 5059 g_slist_free(smiley->anchors); |
5060 smiley->anchors = NULL; | 5060 smiley->anchors = NULL; |
5061 | 5061 |
5062 g_object_unref(G_OBJECT(loader)); | 5062 g_object_unref(G_OBJECT(loader)); |
5063 smiley->loader = NULL; | 5063 smiley->loader = NULL; |
5064 } | 5064 } |
5065 | 5065 |
5066 static gboolean | 5066 static gboolean |