Mercurial > pidgin.yaz
comparison pidgin/gtkimhtmltoolbar.c @ 16483:5e47b3427b28
propagate from branch 'im.pidgin.rlaager.gaim_migration' (head dcc40d46afbe3f87cc674e4fb1526ac722bc35cb)
to branch 'im.pidgin.pidgin' (head 0ef5b6c44115778e329fd628324124f872f5253b)
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Fri, 27 Apr 2007 02:14:44 +0000 |
parents | 08db93bbd798 24bbd7e46bfe |
children | 9c7abb947af4 |
comparison
equal
deleted
inserted
replaced
16467:b2044e10915a | 16483:5e47b3427b28 |
---|---|
479 return; | 479 return; |
480 } | 480 } |
481 | 481 |
482 name = strrchr(filename, G_DIR_SEPARATOR) + 1; | 482 name = strrchr(filename, G_DIR_SEPARATOR) + 1; |
483 | 483 |
484 id = purple_imgstore_add(filedata, size, name); | 484 id = purple_imgstore_add_with_id(filedata, size, name); |
485 g_free(filedata); | |
486 | 485 |
487 if (id == 0) { | 486 if (id == 0) { |
488 buf = g_strdup_printf(_("Failed to store image: %s\n"), filename); | 487 buf = g_strdup_printf(_("Failed to store image: %s\n"), filename); |
489 purple_notify_error(NULL, NULL, buf, NULL); | 488 purple_notify_error(NULL, NULL, buf, NULL); |
490 | 489 |
498 | 497 |
499 ins = gtk_text_buffer_get_insert(gtk_text_view_get_buffer(GTK_TEXT_VIEW(toolbar->imhtml))); | 498 ins = gtk_text_buffer_get_insert(gtk_text_view_get_buffer(GTK_TEXT_VIEW(toolbar->imhtml))); |
500 gtk_text_buffer_get_iter_at_mark(gtk_text_view_get_buffer(GTK_TEXT_VIEW(toolbar->imhtml)), | 499 gtk_text_buffer_get_iter_at_mark(gtk_text_view_get_buffer(GTK_TEXT_VIEW(toolbar->imhtml)), |
501 &iter, ins); | 500 &iter, ins); |
502 gtk_imhtml_insert_image_at_iter(GTK_IMHTML(toolbar->imhtml), id, &iter); | 501 gtk_imhtml_insert_image_at_iter(GTK_IMHTML(toolbar->imhtml), id, &iter); |
503 purple_imgstore_unref(id); | 502 purple_imgstore_unref_by_id(id); |
504 } | 503 } |
505 | 504 |
506 | 505 |
507 static void | 506 static void |
508 insert_image_cb(GtkWidget *save, GtkIMHtmlToolbar *toolbar) | 507 insert_image_cb(GtkWidget *save, GtkIMHtmlToolbar *toolbar) |