rpms/dia/devel dia-export-crash.patch,NONE,1.1 dia.spec,1.43,1.44
Huzaifa Sidhpurwala
huzaifas at fedoraproject.org
Mon Nov 30 03:54:51 UTC 2009
Author: huzaifas
Update of /cvs/pkgs/rpms/dia/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15230
Modified Files:
dia.spec
Added Files:
dia-export-crash.patch
Log Message:
Fix crash in bz #541319
dia-export-crash.patch:
export_png.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- NEW FILE dia-export-crash.patch ---
diff --git a/plug-ins/libart/export_png.c b/plug-ins/libart/export_png.c
index 358df17..2dc5619 100644
--- a/plug-ins/libart/export_png.c
+++ b/plug-ins/libart/export_png.c
@@ -39,6 +39,8 @@
#include "message.h"
#include "dialogs.h"
+/* ugly, but better tahn crashin on non-interactive use */
+#include "../../app/app_procs.h"
/* parses a string of the form "[0-9]*x[0-9]*" and transforms it into
two long values width and height. */
@@ -320,7 +322,7 @@ export_png(DiagramData *data, const gchar *filename,
the same time will lead to confusion.
*/
- if (export_png_dialog == NULL && user_data == NULL) {
+ if (export_png_dialog == NULL && user_data == NULL && app_is_interactive()) {
/* Create a dialog */
export_png_dialog = dialog_make(_("PNG Export Options"),
_("Export"), NULL,
@@ -348,7 +350,7 @@ export_png(DiagramData *data, const gchar *filename,
cbdata->data = data;
cbdata->filename = g_strdup(filename);
- if (user_data == NULL) {
+ if (user_data == NULL && app_is_interactive()) {
/* Find the default size */
width = (guint32) ((ext->right - ext->left) * DPCM * data->paper.scaling);
height = (guint32) ((ext->bottom - ext->top) * DPCM * data->paper.scaling);
Index: dia.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dia/devel/dia.spec,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -p -r1.43 -r1.44
--- dia.spec 5 Aug 2009 08:43:05 -0000 1.43
+++ dia.spec 30 Nov 2009 03:54:51 -0000 1.44
@@ -1,12 +1,13 @@
Name: dia
Version: 0.97
-Release: 2%{?dist}
+Release: 3%{?dist}
Epoch: 1
Summary: Diagram drawing program
Group: Applications/Multimedia
License: GPLv2+
URL: http://www.gnome.org/projects/dia/
Source0: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/%{version}/%{name}-%{version}.tar.bz2
+Patch0: dia-export-crash.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libgnomeui-devel pygtk2-devel desktop-file-utils
BuildRequires: intltool docbook-utils docbook-style-dsssl docbook-style-xsl
@@ -23,6 +24,7 @@ and can export to PostScript(TM).
%prep
%setup -q
+%patch0 -p1
sed -i 's|libdia_la_LDFLAGS = -avoid-version|libdia_la_LDFLAGS = -avoid-version $(shell pkg-config gtk+-2.0 libxml-2.0 libart-2.0 libgnome-2.0 --libs)|' \
lib/Makefile.*
chmod -x `find objects/AADL -type f`
@@ -90,6 +92,9 @@ rm -fr $RPM_BUILD_ROOT
%changelog
+* Mon Nov 30 2009 Huzaifa Sidhpurwala <huzaifas at redhat.com> - 1:0.97-3
+- Fix crash in bz #541319
+
* Wed Aug 05 2009 Huzaifa Sidhpurwala <huzaifas at redhat.com> - 1:0.97-2
- Disable --with-python
More information about the scm-commits
mailing list