comparison src/dialogs.c @ 6982:083d1e4a9c78

[gaim-migrate @ 7538] This is Mr. Holland's Opus. And by Mr. Holland I mean Robot101. He rewrote the coreish IM image support so that the binary data gets ripped out in the prpl and put in an imgstore instead of just being passed in the same huge as char string as the actual message. This is good because it's prpl agnostic, or something. It also means we don't have a silly length of "-1" with pretty much every send or receive IM function. It should be crash free, bug free, and memleak free, but additional testing is always a good thing. If you like good stuff then you'll love this patch. But don't take my word for it--ba dun dunt! committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 27 Sep 2003 19:17:21 +0000
parents 66dd420d3d23
children 57ea8be4ff4a
comparison
equal deleted inserted replaced
6981:abd3c684da31 6982:083d1e4a9c78
1872 options ^= GTK_IMHTML_NO_NEWLINE; 1872 options ^= GTK_IMHTML_NO_NEWLINE;
1873 options ^= GTK_IMHTML_NO_SCROLL; 1873 options ^= GTK_IMHTML_NO_SCROLL;
1874 1874
1875 if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_urls_as_links")) { 1875 if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_urls_as_links")) {
1876 linkifyinated = linkify_text(info); 1876 linkifyinated = linkify_text(info);
1877 gtk_imhtml_append_text(GTK_IMHTML(b->text), linkifyinated, -1, options); 1877 gtk_imhtml_append_text(GTK_IMHTML(b->text), linkifyinated, options);
1878 g_free(linkifyinated); 1878 g_free(linkifyinated);
1879 } else 1879 } else
1880 gtk_imhtml_append_text(GTK_IMHTML(b->text), info, -1, options); 1880 gtk_imhtml_append_text(GTK_IMHTML(b->text), info, options);
1881 1881
1882 va_start(ap, info); 1882 va_start(ap, info);
1883 while ((more_info = va_arg(ap, char *)) != NULL) { 1883 while ((more_info = va_arg(ap, char *)) != NULL) {
1884 if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_urls_as_links")) { 1884 if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_urls_as_links")) {
1885 linkifyinated = linkify_text(more_info); 1885 linkifyinated = linkify_text(more_info);
1886 gtk_imhtml_append_text(GTK_IMHTML(b->text), linkifyinated, -1, options); 1886 gtk_imhtml_append_text(GTK_IMHTML(b->text), linkifyinated, options);
1887 g_free(linkifyinated); 1887 g_free(linkifyinated);
1888 } else 1888 } else
1889 gtk_imhtml_append_text(GTK_IMHTML(b->text), more_info, -1, options); 1889 gtk_imhtml_append_text(GTK_IMHTML(b->text), more_info, options);
1890 } 1890 }
1891 va_end(ap); 1891 va_end(ap);
1892 1892
1893 if (away) 1893 if (away)
1894 info_dlgs = g_slist_remove(info_dlgs, b); 1894 info_dlgs = g_slist_remove(info_dlgs, b);
3268 3268
3269 /* don't lose the thirtieth line of conversation. thanks FeRD */ 3269 /* don't lose the thirtieth line of conversation. thanks FeRD */
3270 g_string_append(string, buf); 3270 g_string_append(string, buf);
3271 3271
3272 if (i == 30) { 3272 if (i == 30) {
3273 gtk_imhtml_append_text(GTK_IMHTML(view->layout), string->str, -1, view->options); 3273 gtk_imhtml_append_text(GTK_IMHTML(view->layout), string->str, view->options);
3274 g_string_free(string, TRUE); 3274 g_string_free(string, TRUE);
3275 string = g_string_new(""); 3275 string = g_string_new("");
3276 /* you can't have these anymore. if someone clicks on another item while one is 3276 /* you can't have these anymore. if someone clicks on another item while one is
3277 * drawing, it will try to move to that item, and that causes problems here. 3277 * drawing, it will try to move to that item, and that causes problems here.
3278 while (gtk_events_pending()) 3278 while (gtk_events_pending())
3280 */ 3280 */
3281 i = 0; 3281 i = 0;
3282 } 3282 }
3283 3283
3284 } 3284 }
3285 gtk_imhtml_append_text(GTK_IMHTML(view->layout), string->str, -1, view->options); 3285 gtk_imhtml_append_text(GTK_IMHTML(view->layout), string->str, view->options);
3286 gtk_imhtml_append_text(GTK_IMHTML(view->layout), "<BR>", -1, view->options); 3286 gtk_imhtml_append_text(GTK_IMHTML(view->layout), "<BR>", view->options);
3287 3287
3288 gtk_widget_set_sensitive(view->bbox, TRUE); 3288 gtk_widget_set_sensitive(view->bbox, TRUE);
3289 g_signal_handler_disconnect(G_OBJECT(view->window), block); 3289 g_signal_handler_disconnect(G_OBJECT(view->window), block);
3290 g_signal_connect(G_OBJECT(view->window), "delete_event", 3290 g_signal_connect(G_OBJECT(view->window), "delete_event",
3291 G_CALLBACK(destroy_dialog), view->window); 3291 G_CALLBACK(destroy_dialog), view->window);