[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Saving files from gpaint



Hi,

0.2.3-7 still doesn't work.

To fix this, I  add the following patch.

#!/bin/sh -e
## by Emily Dai emily.dai@linspireinc.com>
##
## DP: Fixed file/image saving problem

if [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"

case "$1" in
-patch) patch $patch_opts -p1 -unpatch) patch $patch_opts -p1 -R *)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac

exit 0

@DPATCH@
diff -uN gpaint-0.2.3.orig/src/fileio.c gpaint-0.2.3/src/fileio.c
--- gpaint-0.2.3.orig/src/fileio.c 2002-11-14 00:50:57.000000000 -0800
+++ gpaint-0.2.3/src/fileio.c 2004-09-16 15:21:45.000000000 -0700
@@ -34,6 +34,7 @@
char type[200];
GError *gerr = 0;

+ g_assert(ibuf);
if (!ctype)
{
/* file type unknown */
@@ -44,9 +45,20 @@
for (i = 0; i type[i] = tolower(type[i]);

- if (!strcmp(ctype, "jpg"))
+ if (!strcmp(type, "jpg"))
strncpy(type, "jpeg", sizeof(type));
-
+ else
+ strncpy(type, "png", sizeof(type));
+
+
+ ibuf->rgbbuf = gdk_pixbuf_get_from_drawable(NULL,
+ GDK_DRAWABLE(ibuf->pixmap),
+ NULL,
+ 0, 0,
+ 0, 0,
+ image_buf_width(ibuf),
+ image_buf_height(ibuf));
+
if (!strcmp(type, "jpeg"))
i = gdk_pixbuf_save(ibuf->rgbbuf, name, type, &gerr, "quality", "100", 0);
else




-- Emily

===================


Hello. I just installed gpaint in my sid system (version  0.2.3-6),
and I notice I can't save any graphs. Is there something additional I
should install to make it work, or it's just the way it is for now?
(I didn't find any bug report for gpaint package).

Regards,

						Victor



--

This message contains information which may be confidential and privileged. Unless you are the 
addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone 
the message or any information contained in the message. If you have received the message in error, 
please advise the sender and delete the message.  Thank you.


Reply to: