Mercurial > pidgin.yaz
diff pidgin/gtkutils.c @ 31821:17a4b32f4d46
propagate from branch 'im.pidgin.pidgin' (head 8480ab9498b0e22b164f3a40c100f59e2d6dd916)
to branch 'im.pidgin.pidgin.next.minor' (head 490036a7b4ce807cb851ded91af7d959fe1c029e)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sun, 30 Jan 2011 17:52:06 +0000 |
parents | 917c597beb97 85d5f1e37fdb |
children | d72d728226dc |
line wrap: on
line diff
--- a/pidgin/gtkutils.c Sun Jan 09 04:40:07 2011 +0000 +++ b/pidgin/gtkutils.c Sun Jan 30 17:52:06 2011 +0000 @@ -1458,6 +1458,7 @@ static void dnd_image_ok_callback(_DndData *data, int choice) { + const gchar *shortname; gchar *filedata; size_t size; struct stat st; @@ -1512,7 +1513,9 @@ break; } - id = purple_imgstore_add_with_id(filedata, size, data->filename); + shortname = strrchr(data->filename, G_DIR_SEPARATOR); + shortname = shortname ? shortname + 1 : data->filename; + id = purple_imgstore_add_with_id(filedata, size, shortname); gtk_text_buffer_get_iter_at_mark(GTK_IMHTML(gtkconv->entry)->text_buffer, &iter, gtk_text_buffer_get_insert(GTK_IMHTML(gtkconv->entry)->text_buffer));