comparison src/gtkconv.c @ 10953:e8e535ad720b

[gaim-migrate @ 12753] sf patch #1211718, from Richard Laager "Set Extension for Saving Buddy Icons" committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 31 May 2005 23:48:54 +0000
parents 61ae1ee53a94
children 42769b481935
comparison
equal deleted inserted replaced
10952:98225b573c9d 10953:e8e535ad720b
2541 2541
2542 static void 2542 static void
2543 icon_menu_save_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) 2543 icon_menu_save_cb(GtkWidget *widget, GaimGtkConversation *gtkconv)
2544 { 2544 {
2545 GaimConversation *conv = gtkconv->active_conv; 2545 GaimConversation *conv = gtkconv->active_conv;
2546 const gchar *ext;
2546 gchar *buf; 2547 gchar *buf;
2547 2548
2548 g_return_if_fail(conv != NULL); 2549 g_return_if_fail(conv != NULL);
2549 2550
2550 /* 2551 ext = gaim_buddy_icon_get_type(gaim_conv_im_get_icon(GAIM_CONV_IM(conv)));
2551 * XXX - The file extension needs to be set to something that doesn't suck... 2552 if (ext == NULL)
2552 * Maybe do what gtkimhtml.c does when saving an image? 2553 ext = "icon";
2553 */ 2554
2554 buf = g_strdup_printf("%s.icon", gaim_normalize(conv->account, conv->name)); 2555 buf = g_strdup_printf("%s.%s", gaim_normalize(conv->account, conv->name), ext);
2555 2556
2556 gaim_request_file(conv, _("Save Icon"), buf, TRUE, 2557 gaim_request_file(conv, _("Save Icon"), buf, TRUE,
2557 G_CALLBACK(saveicon_writefile_cb), NULL, conv); 2558 G_CALLBACK(saveicon_writefile_cb), NULL, conv);
2558 2559
2559 g_free(buf); 2560 g_free(buf);