dia r4117 - in trunk: . app lib plug-ins plug-ins/python samples samples/Self



Author: hans
Date: Sat Sep 20 14:30:01 2008
New Revision: 4117
URL: http://svn.gnome.org/viewvc/dia?rev=4117&view=rev

Log:
2008-09-20  Hans Breuer  <hans breuer org>

	* app/filedlg.c : global usage of GTK_DISABLE_DEPRECATED broke
	this file with gtk+-2-14

	* app/prefernces.c : avoid setting uninitialized (NULL) units, 
	fixes a crash when starting with an old configuation file

	* lib/text.c : also accept GDK_KP_Enter to ccreate a new line. 
	Fixes bug #539476

	* lib/makefile.msc : reflect renaming of libdia.c to dialib.c

	* NEWS : mention Find&Replace feature

	* plug-ins/python/autolayoutforce.py : more comment

	* samples/render-test.dia samples/Self/PyDiaObjects.dia : update



Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/app/filedlg.c
   trunk/app/preferences.c
   trunk/lib/makefile.msc
   trunk/plug-ins/makefile.msc
   trunk/plug-ins/python/autolayoutforce.py
   trunk/samples/Self/PyDiaObjects.dia
   trunk/samples/render-test.dia

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Sat Sep 20 14:30:01 2008
@@ -4,6 +4,8 @@
   * improved rendering with cairo (PS, PDF, SVG, PNG, EMF) and also some
     experimental print through Gtk+/cairo support
 
+  * simple Find & Replace for diagram objects names
+
   * dedicated text editing mode finally allows to use 'Del' while editing 
     text and/or for whole object removal
 

Modified: trunk/app/filedlg.c
==============================================================================
--- trunk/app/filedlg.c	(original)
+++ trunk/app/filedlg.c	Sat Sep 20 14:30:01 2008
@@ -21,7 +21,6 @@
 
 #include <config.h>
 
-#include "filedlg.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <string.h>
@@ -31,6 +30,7 @@
 #include <stdio.h>
 #include <glib/gstdio.h>
 
+#undef GTK_DISABLE_DEPRECATED /* gtk_file_chooser_dialog_new_with_backend */
 #include <gtk/gtk.h>
 #include "intl.h"
 #include "filter.h"
@@ -44,6 +44,8 @@
 #include "interface.h"
 #include "recent_files.h"
 
+#include "filedlg.h"
+
 static GtkWidget *opendlg = NULL;
 static GtkWidget *savedlg = NULL;
 static GtkWidget *exportdlg = NULL;

Modified: trunk/app/preferences.c
==============================================================================
--- trunk/app/preferences.c	(original)
+++ trunk/app/preferences.c	Sat Sep 20 14:30:01 2008
@@ -679,8 +679,10 @@
 static void
 update_internal_prefs(DiaPrefData *pref, char *ptr)
 {
-  prefs_set_length_unit(prefs.length_unit);
-  prefs_set_fontsize_unit(prefs.fontsize_unit);
+  if (prefs.length_unit)
+    prefs_set_length_unit(prefs.length_unit);
+  if (prefs.fontsize_unit)
+    prefs_set_fontsize_unit(prefs.fontsize_unit);
 }
 
 static void

Modified: trunk/lib/makefile.msc
==============================================================================
--- trunk/lib/makefile.msc	(original)
+++ trunk/lib/makefile.msc	Sat Sep 20 14:30:01 2008
@@ -74,7 +74,7 @@
 	geometry.obj \
 	group.obj \
 	intl.obj \
-	libdia.obj \
+	dialib.obj \
 	message.obj \
 	newgroup.obj \
 	neworth_conn.obj \

Modified: trunk/plug-ins/makefile.msc
==============================================================================
--- trunk/plug-ins/makefile.msc	(original)
+++ trunk/plug-ins/makefile.msc	Sat Sep 20 14:30:01 2008
@@ -2,7 +2,8 @@
 
 # dummy sissi
 PLUGINS = gprint cairo cgm dxf hpgl libart metapost pgf pixbuf \
-	postscript pstricks shape svg vdx wmf wpg xfig xslt 
+	postscript pstricks shape svg vdx wmf wpg xfig xslt \
+	autolayout
 
 #broken since StdProp overhaul : diaimport 
 
@@ -45,6 +46,14 @@
 #
 # Special object definitions for the various plugins, if needed
 #
+!IFDEF OBJ_autolayout
+PKG_CFLAGS = $(PKG_CFLAGS) -I $(PRJ_TOP)\app
+PKG_LINK = $(PKG_LINK) $(PRJ_TOP)\app\dia-app.lib
+OBJECTS = \
+	autolayout.obj \
+	autolayout-force.obj \
+	autolayout-register.obj
+!ENDIF
 
 !IFDEF OBJ_cairo
 PKG_CFLAGS = $(PKG_CFLAGS) $(CAIRO_CFLAGS) -DHAVE_PANGOCAIRO_H

Modified: trunk/plug-ins/python/autolayoutforce.py
==============================================================================
--- trunk/plug-ins/python/autolayoutforce.py	(original)
+++ trunk/plug-ins/python/autolayoutforce.py	Sat Sep 20 14:30:01 2008
@@ -5,6 +5,7 @@
 #
 #  Playground for the "force based autolayout" algorithm initially implemented
 # for Dia in C by Fred Morcos
+# See also: http://en.wikipedia.org/wiki/Force-based_algorithms
 
 #    This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
@@ -70,11 +71,12 @@
 			for co in cpt.connected : # connected objects in this point
 				edge = co
 				oo = None
-				for h in edge.handles :
-					cto = h.connected_to # the other objects connection point
-					if  cto and cto.object != o :
+				for h in edge.handles : # the edge handles are connected to ...
+					cto = h.connected_to # ... the other objects connection point
+					if  cto and cto.object != o : # ... one of it being the current
 						oo = cto.object
-						# we usually only find _one_ other handle
+						# we usually only find _one_ other handle but there are exception
+						# e.g. "Network - Bus"
 						a = attraction (aconst, o, oo)
 						netforce[0] += a[0]
 						netforce[1] += a[1]

Modified: trunk/samples/Self/PyDiaObjects.dia
==============================================================================
Binary files. No diff available.

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]