dia r4197 - in trunk: . app lib objects/standard plug-ins/cgm plug-ins/vdx samples



Author: hans
Date: Sat Jan 17 16:15:08 2009
New Revision: 4197
URL: http://svn.gnome.org/viewvc/dia?rev=4197&view=rev

Log:
2009-01-17  Hans Breuer  <hans breuer org>

	* objects/standard/image.c : #include <time.h> to fix part of the issue
	with building with GLib < 2.10 (bug #567559,  Robert Young)

	* app/app_procs.c : don't dump built-with-cairo twice, instead
	inform about pangocairo, too.
	
	* INSTALL : improved consistency between configure.in and this file.
	Also remove trace of CVS.
	
	* lib/prop_geomtypes.c(fontsizeprop_set_from_offsets,
	  fontsizeprop_load) : implement clipping to min/max values to protect
	the Dia core against plug-ins playing havoc (see e.g. bug #488935)

	* plug-ins/cgm/cgm.c(CgmRenderer::set_font) : a second call with an 
	already set font (with refcount 1) would have destroyed the font before
	referencing it.

	* plug-ins/vdx/vdx-import.c : one instruction per line to allow putting
	a breakpoint on the g_debug() line

	* RELEASE-PROCESS : updated from CVS to SVN usage, also clarify the
	difference between tag and branch creation



Modified:
   trunk/ChangeLog
   trunk/INSTALL
   trunk/RELEASE-PROCESS
   trunk/app/app_procs.c
   trunk/lib/prop_geomtypes.c
   trunk/objects/standard/image.c
   trunk/plug-ins/cgm/cgm.c
   trunk/plug-ins/vdx/vdx-import.c
   trunk/samples/render-test.dia

Modified: trunk/INSTALL
==============================================================================
--- trunk/INSTALL	(original)
+++ trunk/INSTALL	Sat Jan 17 16:15:08 2009
@@ -38,7 +38,7 @@
 higher.  It can be found here:
   http://www.freetype.org
 
-As of version 0.91, Dia requires intltool version 0.21 or higher.  It is
+As of version 0.97, Dia requires intltool version 0.35 or higher.  It is
 also required for Gtk.  It can be found here:
   ftp://ftp.gnome.org/pub/gnome/sources/intltool/
 
@@ -49,7 +49,7 @@
 release. 
 
 pkg-config
-intltool 0.21
+intltool 0.35
 font-config 1.0.1
 GLib 2.1.3
 ATK 2.0.0
@@ -75,7 +75,7 @@
 Python scripting is possible by adding --with-python and having the
   following installed:
   Python: http://www.python.org
-  PyGtk: ftp://ftp.gtk.org/pub/gtk/python/v2.0
+  PyGtk(optional): ftp://ftp.gtk.org/pub/gtk/python/v2.0
 
 BUILDING:
 =========
@@ -113,10 +113,10 @@
 	bind_textdomain_codeset.  Use the gettext and libiconv from
 	ftp.gnu.org instead.
 
-COMPILING FROM CVS:
+COMPILING FROM SVN:
 ===================
 
-If you are using the cvs version of Dia you need to have the following programs:
+If you are using the SVN version of Dia you need to have the following programs:
 automake 1.4, autoconf 2.50, libtool 1.3, GNU gettext 0.10.38, intltool 0.21
 
 Then run ./autogen.sh instead of configure to create all needed files.

Modified: trunk/RELEASE-PROCESS
==============================================================================
--- trunk/RELEASE-PROCESS	(original)
+++ trunk/RELEASE-PROCESS	Sat Jan 17 16:15:08 2009
@@ -35,9 +35,10 @@
    to be updated.
 
 2) D+3: a release candidate tarball is made. It is called
-   $VERSION-pre1. Simultaneously, a SVN branch is made with the name
+   $VERSION-pre1. Simultaneously, a SVN "tag" is created with the name
    "DIA_$VERSION_RELEASE" (with the non-alphanumeric characters in $VERSION
-   replaced by underscores, e.g. cvs tag -b DIA_0_93_RELEASE).
+   replaced by underscores, e.g.: svn copy svn+ssh://hans svn gnome org/svn/dia/trunk \
+   svn+ssh://hans svn gnome org/svn/dia/tags/DIA_0_97_PRE1).
    $VERSION-pre1 is registered with the Bugzilla, however it is encouraged
    that bug reports are made directly (or simultaneously) to the mailing
    list.
@@ -64,6 +65,10 @@
    in SVN). $VERSION is registered with the Bugzilla, and all
    $VERSION-preX are removed (from now on, bugs against -preX are
    rejected as INVALID).
+   A real SVN branch is created with the name "dia-$VERSION" with the 
+   non-alphanumeric characters in $VERSION replaced by dashes, e.g.: 
+   svn copy svn+ssh://hans svn gnome org/svn/dia/trunk \
+   svn+ssh://hans svn gnome org/svn/dia/branches/dia-0-97).
 
 4) once the new release is complete and uploaded, announcements on
    freshmeat, the dia web site, the dia mailing list,

Modified: trunk/app/app_procs.c
==============================================================================
--- trunk/app/app_procs.c	(original)
+++ trunk/app/app_procs.c	Sat Jan 17 16:15:08 2009
@@ -412,8 +412,8 @@
 #ifdef HAVE_LIBART
   "libart "
 #endif
-#ifdef HAVE_CAIRO
-  "cairo "
+#ifdef HAVE_PANGOCAIRO
+  "pangocairo "
 #endif
   "\n");
 

Modified: trunk/lib/prop_geomtypes.c
==============================================================================
--- trunk/lib/prop_geomtypes.c	(original)
+++ trunk/lib/prop_geomtypes.c	Sat Jan 17 16:15:08 2009
@@ -316,7 +316,16 @@
 static void 
 fontsizeprop_load(FontsizeProperty *prop, AttributeNode attr, DataNode data)
 {
-  prop->fontsize_data = data_real(data);
+  PropNumData *numdata = prop->common.extra_data;
+  real value = data_real(data);
+
+  if (numdata) {
+    if (value < numdata->min)
+      value = numdata->min;
+    else if (value > numdata->max)
+      value = numdata->max;
+  }
+  prop->fontsize_data = value;
 }
 
 static void 
@@ -336,7 +345,16 @@
 fontsizeprop_set_from_offset(FontsizeProperty *prop,
                          void *base, guint offset, guint offset2)
 {
-  struct_member(base,offset,real) = prop->fontsize_data;
+  PropNumData *numdata = prop->common.extra_data;
+  real value = prop->fontsize_data;
+
+  if (numdata) {
+    if (value < numdata->min)
+      value = numdata->min;
+    else if (value > numdata->max)
+      value = numdata->max;
+  }
+  struct_member(base,offset,real) = value;
 }
 
 static int 

Modified: trunk/objects/standard/image.c
==============================================================================
--- trunk/objects/standard/image.c	(original)
+++ trunk/objects/standard/image.c	Sat Jan 17 16:15:08 2009
@@ -21,6 +21,7 @@
 #include <string.h>
 #include <math.h>
 #include <sys/stat.h>
+#include <time.h>
 #ifdef HAVE_UNIST_H
 #include <unistd.h>
 #endif

Modified: trunk/plug-ins/cgm/cgm.c
==============================================================================
--- trunk/plug-ins/cgm/cgm.c	(original)
+++ trunk/plug-ins/cgm/cgm.c	Sat Jan 17 16:15:08 2009
@@ -716,10 +716,11 @@
 set_font(DiaRenderer *self, DiaFont *font, real height)
 {
     CgmRenderer *renderer = CGM_RENDERER(self);
+    DiaFont *oldfont = renderer->font;
 
-    if (renderer->font != NULL)
-	dia_font_unref(renderer->font);
     renderer->font = dia_font_ref(font);
+    if (oldfont != NULL)
+	dia_font_unref(oldfont);
     renderer->tcurrent.font_num = FONT_NUM(font);
     renderer->tcurrent.font_height = height;
 }

Modified: trunk/plug-ins/vdx/vdx-import.c
==============================================================================
--- trunk/plug-ins/vdx/vdx-import.c	(original)
+++ trunk/plug-ins/vdx/vdx-import.c	Sat Jan 17 16:15:08 2009
@@ -1127,7 +1127,10 @@
     e = a*(P0.x + P3.x) + b*(P0.y + P3.y);
     f = c*(P0.x + P4.x) + d*(P0.y + P4.y);
     g = 2.0*(a*(P4.y - P3.y) - b*(P4.x - P3.x));
-    if (fabs(g) < EPSILON) { g_debug("g=%f too small", g); return FALSE; }
+    if (fabs(g) < EPSILON) { 
+      g_debug("g=%f too small", g); 
+      return FALSE; 
+    }
     Q.x = (d*e - b*f)/g;
     Q.y = (a*f - c*e)/g;
     R = sqrt((P0.x - Q.x)*(P0.x - Q.x) + (P0.y - Q.y)*(P0.y - Q.y));

Modified: trunk/samples/render-test.dia
==============================================================================
Binary files. No diff available.



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