comparison src/gtkimhtml.c @ 5015:a17a84895585

[gaim-migrate @ 5351] someone let me know if this makes things ok for gtk 2.0.x committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 05 Apr 2003 02:15:13 +0000
parents 3ee1b1409660
children eb1d45bffe66
comparison
equal deleted inserted replaced
5014:74dd2e4ed0c1 5015:a17a84895585
1531 static void write_img_to_file(GtkWidget *w, GtkFileSelection *sel) 1531 static void write_img_to_file(GtkWidget *w, GtkFileSelection *sel)
1532 { 1532 {
1533 const gchar *filename = gtk_file_selection_get_filename(sel); 1533 const gchar *filename = gtk_file_selection_get_filename(sel);
1534 gaim_im_image *image = g_object_get_data(G_OBJECT(sel), "gaim_im_image"); 1534 gaim_im_image *image = g_object_get_data(G_OBJECT(sel), "gaim_im_image");
1535 gchar *type = NULL; 1535 gchar *type = NULL;
1536 #if GTK_CHECK_VERSION(2,2,0)
1536 GSList *formats = gdk_pixbuf_get_formats(); 1537 GSList *formats = gdk_pixbuf_get_formats();
1537 GError *error = NULL; 1538 GError *error = NULL;
1538 1539
1539 while(formats){ 1540 while(formats){
1540 GdkPixbufFormat *format = formats->data; 1541 GdkPixbufFormat *format = formats->data;
1566 if(!type){ 1567 if(!type){
1567 gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, 1568 gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
1568 _("Gaim was unable to guess the image type base on the file extension supplied. Defaulting to PNG.")); 1569 _("Gaim was unable to guess the image type base on the file extension supplied. Defaulting to PNG."));
1569 type = g_strdup("png"); 1570 type = g_strdup("png");
1570 } 1571 }
1572 #else
1573 type = g_strdup("png");
1574 #endif
1571 1575
1572 gdk_pixbuf_save(gtk_image_get_pixbuf(image->image), filename, type, &error, NULL); 1576 gdk_pixbuf_save(gtk_image_get_pixbuf(image->image), filename, type, &error, NULL);
1573 1577
1574 if(error){ 1578 if(error){
1575 gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, 1579 gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,