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

Re: "crash due to a fatal error"



> > I can create a patch and send it to you, but you'll
> > definitely have to work through it, but it should be easy.
>
> Yes, please.  It's good to have those places identified.

Ok, enclosed. It's certainly far not complete a list of such places, but
with it it should be easy enough to extend it.

> > Ideally, as I said before, I would like to see defaults set in a config
> > file AND be dynamically modifiable at run-time, e.g. with a fall-down
> > list of font-sizes, line-widths, fonts, etc. - as is done in most
> > text-processors, or selectable from preferences dialog.
>
> For some objects, the line width selector in the toolbox determines the
> line width.  This should be used by more objects.

BUT - would be nice to have (along with per-object settings) a possibility
to set these parameters globally.

Guennadi
---------------------------------
Guennadi Liakhovetski, Ph.D.
DSA Daten- und Systemtechnik GmbH
Pascalstr. 28
D-52076 Aachen
Germany
diff -urN dia-cvs-snapshot/app/linewidth_area.c dia-cvs-snapshot.clean/app/linewidth_area.c
--- dia-cvs-snapshot/app/linewidth_area.c	Sat Feb 24 09:51:12 2001
+++ dia-cvs-snapshot.clean/app/linewidth_area.c	Wed Apr 24 14:34:03 2002
@@ -19,6 +19,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <dia_defaults.h>
 
 #include "linewidth_area.h"
 #include "attributes.h"
@@ -29,7 +30,7 @@
 # define rint(x) floor ((x) + 0.5)
 #endif
 
-#define BASE_WIDTH 0.05
+#define BASE_WIDTH DEFAULT_LINE_WIDTH / 2
 #define PIXELS_BETWEEN_LINES 6
 #define NUMLINES 5
 
diff -urN dia-cvs-snapshot/dia_defaults.h dia-cvs-snapshot.clean/dia_defaults.h
--- dia-cvs-snapshot/dia_defaults.h	Thu Jan  1 01:00:00 1970
+++ dia-cvs-snapshot.clean/dia_defaults.h	Wed Apr 24 14:43:26 2002
@@ -0,0 +1,12 @@
+#ifndef DIA_DEFAULTS_H
+#define DIA_DEFAULTS_H
+
+#define DEFAULT_LINE_WIDTH 0.01 // 0.1
+#define DEFAULT_ARROW_LENGTH 0.4 // 0.8
+#define DEFAULT_ARROW_WIDTH 0.2 // 0.8
+#define DEFAULT_FONT_HEIGHT 0.3 // 0.8
+#define DEFAULT_LINESTYLE LINESTYLE_SOLID
+#define DEFAULT_LINESTYLE_DASHLEN 1.0
+#define DEFAULT_TEXT_PADDING 0.2 // 0.5
+
+#endif
diff -urN dia-cvs-snapshot/lib/attributes.c dia-cvs-snapshot.clean/lib/attributes.c
--- dia-cvs-snapshot/lib/attributes.c	Wed Jan 30 09:23:09 2002
+++ dia-cvs-snapshot.clean/lib/attributes.c	Wed Apr 24 11:47:34 2002
@@ -16,6 +16,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 #include <config.h>
+#include <dia_defaults.h>
 
 #include "attributes.h"
 #include "intl.h"
@@ -23,16 +24,16 @@
 static Color attributes_foreground = { 0.0f, 0.0f, 0.0f };
 static Color attributes_background = { 1.0f, 1.0f, 1.0f };
 
-static real attributes_default_linewidth = 0.1;
+static real attributes_default_linewidth = DEFAULT_LINE_WIDTH;
 
-static Arrow attributes_start_arrow = { ARROW_NONE, 0.8, 0.8 };
-static Arrow attributes_end_arrow = { ARROW_NONE, 0.8, 0.8 };
+static Arrow attributes_start_arrow = { ARROW_NONE, DEFAULT_ARROW_LENGTH, DEFAULT_ARROW_WIDTH };
+static Arrow attributes_end_arrow = { ARROW_NONE, DEFAULT_ARROW_LENGTH, DEFAULT_ARROW_WIDTH };
 
 static LineStyle attributes_linestyle = LINESTYLE_SOLID;
 static real attributes_dash_length = 1.0;
 
 static DiaFont *attributes_font = NULL;
-static real attributes_font_height = 0.8;
+static real attributes_font_height = DEFAULT_FONT_HEIGHT;
 
 Color 
 attributes_get_foreground(void)
diff -urN dia-cvs-snapshot/lib/widgets.c dia-cvs-snapshot.clean/lib/widgets.c
--- dia-cvs-snapshot/lib/widgets.c	Tue Apr 23 09:23:08 2002
+++ dia-cvs-snapshot.clean/lib/widgets.c	Wed Apr 24 12:15:12 2002
@@ -17,6 +17,7 @@
  */
 
 #include <config.h>
+#include <dia_defaults.h>
 #include "intl.h"
 #include "widgets.h"
 #include "message.h"
diff -urN dia-cvs-snapshot/lib/widgets.h dia-cvs-snapshot.clean/lib/widgets.h
--- dia-cvs-snapshot/lib/widgets.h	Tue Apr 23 09:23:08 2002
+++ dia-cvs-snapshot.clean/lib/widgets.h	Wed Apr 24 12:16:43 2002
@@ -19,6 +19,7 @@
 #define WIDGETS_H
 
 #include <config.h>
+#include <dia_defaults.h>
 
 #include <gdk/gdk.h>
 #include <gtk/gtkmenu.h>
@@ -103,9 +104,6 @@
 #define DIALINESTYLESELECTOR_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, dia_line_style_selector_get_type (), DiaLineStyleSelectorClass)
 #define IS_DIALINESTYLESELECTOR(obj)       GTK_CHECK_TYPE (obj, dia_line_style_selector_get_type ())
 
-#define DEFAULT_LINESTYLE LINESTYLE_SOLID
-#define DEFAULT_LINESTYLE_DASHLEN 1.0
-
 typedef struct _DiaLineStyleSelector       DiaLineStyleSelector;
 typedef struct _DiaLineStyleSelectorClass  DiaLineStyleSelectorClass;
 
@@ -176,8 +174,8 @@
 #define IS_DIAARROWSELECTOR(obj)       GTK_CHECK_TYPE (obj, dia_arrow_selector_get_type ())
 
 #define DEFAULT_ARROW ARROW_NONE
-#define DEFAULT_ARROW_LENGTH 0.8 
-#define DEFAULT_ARROW_WIDTH 0.8
+//#define DEFAULT_ARROW_LENGTH 0.8 
+//#define DEFAULT_ARROW_WIDTH 0.8
 
 typedef struct _DiaArrowSelector       DiaArrowSelector;
 typedef struct _DiaArrowSelectorClass  DiaArrowSelectorClass;
@@ -238,6 +236,6 @@
 
 #define DEFAULT_ALIGNMENT ALIGN_LEFT
 /* This is defined in app/linewidth_area.c.  Aw, bummer */
-#define DEFAULT_LINE_WIDTH 2*0.05
+//#define DEFAULT_LINE_WIDTH 2*0.05
 
 #endif /* WIDGETS_H */
diff -urN dia-cvs-snapshot/objects/FS/flow-poly.c dia-cvs-snapshot.clean/objects/FS/flow-poly.c
--- dia-cvs-snapshot/objects/FS/flow-poly.c	Thu Jan 31 09:23:12 2002
+++ dia-cvs-snapshot.clean/objects/FS/flow-poly.c	Wed Apr 24 12:45:12 2002
@@ -69,12 +69,12 @@
   GtkWidget *m_signal;
 };
   
-#define FLOW_WIDTH 0.1
-#define FLOW_MATERIAL_WIDTH 0.2
+#define FLOW_WIDTH 0.01 //0.1
+#define FLOW_MATERIAL_WIDTH 0.02 //0.2
 #define FLOW_DASHLEN 0.4
-#define FLOW_FONTHEIGHT 0.6
-#define FLOW_ARROWLEN 0.8
-#define FLOW_ARROWWIDTH 0.5
+#define FLOW_FONTHEIGHT 0.3 //0.6
+#define FLOW_ARROWLEN 0.4 //0.8
+#define FLOW_ARROWWIDTH 0.2 //0.5
 #define HANDLE_MOVE_TEXT (HANDLE_CUSTOM1)
 
 static DiaFont *flow_font = NULL;
diff -urN dia-cvs-snapshot/objects/flowchart/box.c dia-cvs-snapshot.clean/objects/flowchart/box.c
--- dia-cvs-snapshot/objects/flowchart/box.c	Fri Aug 10 15:52:56 2001
+++ dia-cvs-snapshot.clean/objects/flowchart/box.c	Fri Apr 26 09:23:39 2002
@@ -22,6 +22,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <dia_defaults.h>
 
 #include <assert.h>
 #include <gtk/gtk.h>
@@ -235,7 +236,7 @@
 
   if (!defaults_initialized) {
     default_properties.show_background = 1;
-    default_properties.padding = 0.5;
+    default_properties.padding = DEFAULT_TEXT_PADDING;
     defaults_initialized = 1;
   }
 }
@@ -682,7 +683,8 @@
   elem->width = DEFAULT_WIDTH;
   elem->height = DEFAULT_WIDTH;
 
-  box->border_width =  attributes_get_default_linewidth();
+  box->border_width = attributes_get_default_linewidth();
+//  fprintf( stderr, "== Default border width %g\n", box->border_width );
   box->border_color = attributes_get_foreground();
   box->inner_color = attributes_get_background();
   box->show_background = default_properties.show_background;
@@ -777,10 +779,11 @@
 
   element_load(elem, obj_node);
 
-  box->border_width = 0.1;
+  box->border_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "border_width");
   if (attr != NULL)
     box->border_width =  data_real( attribute_first_data(attr) );
+//  fprintf( stderr, "== Calculated border width %g\n", box->border_width );
   box->border_color = color_black;
   attr = object_find_attribute(obj_node, "border_color");
   if (attr != NULL)
diff -urN dia-cvs-snapshot/objects/flowchart/diamond.c dia-cvs-snapshot.clean/objects/flowchart/diamond.c
--- dia-cvs-snapshot/objects/flowchart/diamond.c	Wed Aug 15 09:23:15 2001
+++ dia-cvs-snapshot.clean/objects/flowchart/diamond.c	Wed Apr 24 13:59:16 2002
@@ -22,6 +22,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <dia_defaults.h>
 
 #include <assert.h>
 #include <gtk/gtk.h>
@@ -678,7 +679,7 @@
 
   element_load(elem, obj_node);
   
-  diamond->border_width = 0.1;
+  diamond->border_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "border_width");
   if (attr != NULL)
     diamond->border_width =  data_real( attribute_first_data(attr) );
diff -urN dia-cvs-snapshot/objects/flowchart/ellipse.c dia-cvs-snapshot.clean/objects/flowchart/ellipse.c
--- dia-cvs-snapshot/objects/flowchart/ellipse.c	Fri Aug 10 15:53:41 2001
+++ dia-cvs-snapshot.clean/objects/flowchart/ellipse.c	Wed Apr 24 13:59:47 2002
@@ -22,6 +22,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <dia_defaults.h>
 
 #include <assert.h>
 #include <gtk/gtk.h>
@@ -657,7 +658,7 @@
 
   element_load(elem, obj_node);
   
-  ellipse->border_width = 0.1;
+  ellipse->border_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "border_width");
   if (attr != NULL)
     ellipse->border_width =  data_real( attribute_first_data(attr) );
diff -urN dia-cvs-snapshot/objects/flowchart/parallelogram.c dia-cvs-snapshot.clean/objects/flowchart/parallelogram.c
--- dia-cvs-snapshot/objects/flowchart/parallelogram.c	Fri Aug 10 15:03:37 2001
+++ dia-cvs-snapshot.clean/objects/flowchart/parallelogram.c	Wed Apr 24 14:02:05 2002
@@ -22,6 +22,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <dia_defaults.h>
 
 #include <assert.h>
 #include <gtk/gtk.h>
@@ -742,7 +743,7 @@
 
   element_load(elem, obj_node);
   
-  pgram->border_width = 0.1;
+  pgram->border_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "border_width");
   if (attr != NULL)
     pgram->border_width =  data_real( attribute_first_data(attr) );
diff -urN dia-cvs-snapshot/objects/standard/arc.c dia-cvs-snapshot.clean/objects/standard/arc.c
--- dia-cvs-snapshot/objects/standard/arc.c	Fri Aug 10 13:27:49 2001
+++ dia-cvs-snapshot.clean/objects/standard/arc.c	Wed Apr 24 11:56:19 2002
@@ -19,6 +19,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <dia_defaults.h>
 
 #include <assert.h>
 #include <gtk/gtk.h>
@@ -608,7 +609,7 @@
   if (attr != NULL)
     arc->curve_distance = data_real(attribute_first_data(attr));
 
-  arc->line_width = 0.1;
+  arc->line_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "line_width");
   if (attr != NULL)
     arc->line_width = data_real(attribute_first_data(attr));
@@ -625,8 +626,8 @@
 
 
   arc->start_arrow.type = ARROW_NONE;
-  arc->start_arrow.length = 0.8;
-  arc->start_arrow.width = 0.8;
+  arc->start_arrow.length = DEFAULT_ARROW_LENGTH;
+  arc->start_arrow.width = DEFAULT_ARROW_WIDTH;
   attr = object_find_attribute(obj_node, "start_arrow");
   if (attr != NULL)
     arc->start_arrow.type = data_enum(attribute_first_data(attr));
@@ -638,8 +639,8 @@
     arc->start_arrow.width = data_real(attribute_first_data(attr));
 
   arc->end_arrow.type = ARROW_NONE;
-  arc->end_arrow.length = 0.8;
-  arc->end_arrow.width = 0.8;
+  arc->end_arrow.length = DEFAULT_ARROW_LENGTH;
+  arc->end_arrow.width = DEFAULT_ARROW_WIDTH;
   attr = object_find_attribute(obj_node, "end_arrow");
   if (attr != NULL)
     arc->end_arrow.type = data_enum(attribute_first_data(attr));
diff -urN dia-cvs-snapshot/objects/standard/bezier.c dia-cvs-snapshot.clean/objects/standard/bezier.c
--- dia-cvs-snapshot/objects/standard/bezier.c	Sun Sep  2 09:23:15 2001
+++ dia-cvs-snapshot.clean/objects/standard/bezier.c	Wed Apr 24 11:56:03 2002
@@ -22,6 +22,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <dia_defaults.h>
 
 #include <assert.h>
 #include <gtk/gtk.h>
@@ -431,7 +432,7 @@
   if (attr != NULL)
     data_color(attribute_first_data(attr), &bezierline->line_color);
 
-  bezierline->line_width = 0.1;
+  bezierline->line_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "line_width");
   if (attr != NULL)
     bezierline->line_width = data_real(attribute_first_data(attr));
@@ -447,8 +448,8 @@
     bezierline->dashlength = data_real(attribute_first_data(attr));
 
   bezierline->start_arrow.type = ARROW_NONE;
-  bezierline->start_arrow.length = 0.8;
-  bezierline->start_arrow.width = 0.8;
+  bezierline->start_arrow.length = DEFAULT_ARROW_LENGTH;
+  bezierline->start_arrow.width = DEFAULT_ARROW_WIDTH;
   attr = object_find_attribute(obj_node, "start_arrow");
   if (attr != NULL)
     bezierline->start_arrow.type = data_enum(attribute_first_data(attr));
@@ -460,8 +461,8 @@
     bezierline->start_arrow.width = data_real(attribute_first_data(attr));
 
   bezierline->end_arrow.type = ARROW_NONE;
-  bezierline->end_arrow.length = 0.8;
-  bezierline->end_arrow.width = 0.8;
+  bezierline->end_arrow.length = DEFAULT_ARROW_LENGTH;
+  bezierline->end_arrow.width = DEFAULT_ARROW_WIDTH;
   attr = object_find_attribute(obj_node, "end_arrow");
   if (attr != NULL)
     bezierline->end_arrow.type = data_enum(attribute_first_data(attr));
diff -urN dia-cvs-snapshot/objects/standard/beziergon.c dia-cvs-snapshot.clean/objects/standard/beziergon.c
--- dia-cvs-snapshot/objects/standard/beziergon.c	Fri Aug 10 13:48:39 2001
+++ dia-cvs-snapshot.clean/objects/standard/beziergon.c	Wed Apr 24 11:57:25 2002
@@ -22,6 +22,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <dia_defaults.h>
 
 #include <assert.h>
 #include <gtk/gtk.h>
@@ -466,7 +467,7 @@
   if (attr != NULL)
     data_color(attribute_first_data(attr), &beziergon->line_color);
 
-  beziergon->line_width = 0.1;
+  beziergon->line_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "line_width");
   if (attr != NULL)
     beziergon->line_width = data_real(attribute_first_data(attr));
diff -urN dia-cvs-snapshot/objects/standard/box.c dia-cvs-snapshot.clean/objects/standard/box.c
--- dia-cvs-snapshot/objects/standard/box.c	Sat Mar 16 09:23:09 2002
+++ dia-cvs-snapshot.clean/objects/standard/box.c	Wed Apr 24 11:57:53 2002
@@ -19,6 +19,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <dia_defaults.h>
 
 #include <assert.h>
 #include <gtk/gtk.h>
@@ -642,7 +643,7 @@
 
   element_load(elem, obj_node);
   
-  box->border_width = 0.1;
+  box->border_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "border_width");
   if (attr != NULL)
     box->border_width =  data_real( attribute_first_data(attr) );
diff -urN dia-cvs-snapshot/objects/standard/ellipse.c dia-cvs-snapshot.clean/objects/standard/ellipse.c
--- dia-cvs-snapshot/objects/standard/ellipse.c	Fri Aug 10 13:29:48 2001
+++ dia-cvs-snapshot.clean/objects/standard/ellipse.c	Wed Apr 24 11:58:26 2002
@@ -19,6 +19,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <dia_defaults.h>
 
 #include <assert.h>
 #include <gtk/gtk.h>
@@ -478,7 +479,7 @@
 
   element_load(elem, obj_node);
 
-  ellipse->border_width = 0.1;
+  ellipse->border_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "border_width");
   if (attr != NULL)
     ellipse->border_width =  data_real( attribute_first_data(attr) );
diff -urN dia-cvs-snapshot/objects/standard/image.c dia-cvs-snapshot.clean/objects/standard/image.c
--- dia-cvs-snapshot/objects/standard/image.c	Mon Apr  8 09:23:42 2002
+++ dia-cvs-snapshot.clean/objects/standard/image.c	Wed Apr 24 11:59:45 2002
@@ -16,6 +16,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 #include <config.h>
+#include <dia_defaults.h>
 
 #include <assert.h>
 #include <string.h>
@@ -770,7 +771,7 @@
 
   element_load(elem, obj_node);
   
-  image->border_width = 0.1;
+  image->border_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "border_width");
   if (attr != NULL)
     image->border_width =  data_real( attribute_first_data(attr) );
diff -urN dia-cvs-snapshot/objects/standard/line.c dia-cvs-snapshot.clean/objects/standard/line.c
--- dia-cvs-snapshot/objects/standard/line.c	Fri Aug 10 13:35:54 2001
+++ dia-cvs-snapshot.clean/objects/standard/line.c	Wed Apr 24 11:53:10 2002
@@ -19,6 +19,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <dia_defaults.h>
 
 #include <assert.h>
 #include <gtk/gtk.h>
@@ -454,7 +455,7 @@
   if (attr != NULL)
     data_color(attribute_first_data(attr), &line->line_color);
 
-  line->line_width = 0.1;
+  line->line_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "line_width");
   if (attr != NULL)
     line->line_width = data_real(attribute_first_data(attr));
@@ -465,8 +466,8 @@
     line->line_style = data_enum(attribute_first_data(attr));
 
   line->start_arrow.type = ARROW_NONE;
-  line->start_arrow.length = 0.8;
-  line->start_arrow.width = 0.8;
+  line->start_arrow.length = DEFAULT_ARROW_LENGTH;
+  line->start_arrow.width = DEFAULT_ARROW_WIDTH;
   attr = object_find_attribute(obj_node, "start_arrow");
   if (attr != NULL)
     line->start_arrow.type = data_enum(attribute_first_data(attr));
@@ -478,8 +479,8 @@
     line->start_arrow.width = data_real(attribute_first_data(attr));
 
   line->end_arrow.type = ARROW_NONE;
-  line->end_arrow.length = 0.8;
-  line->end_arrow.width = 0.8;
+  line->end_arrow.length = DEFAULT_ARROW_LENGTH;
+  line->end_arrow.width = DEFAULT_ARROW_WIDTH;
   attr = object_find_attribute(obj_node, "end_arrow");
   if (attr != NULL)
     line->end_arrow.type = data_enum(attribute_first_data(attr));
diff -urN dia-cvs-snapshot/objects/standard/polygon.c dia-cvs-snapshot.clean/objects/standard/polygon.c
--- dia-cvs-snapshot/objects/standard/polygon.c	Sun Aug 12 10:48:36 2001
+++ dia-cvs-snapshot.clean/objects/standard/polygon.c	Wed Apr 24 12:00:31 2002
@@ -19,6 +19,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <dia_defaults.h>
 
 #include <assert.h>
 #include <gtk/gtk.h>
@@ -457,7 +458,7 @@
   if (attr != NULL)
     data_color(attribute_first_data(attr), &polygon->line_color);
 
-  polygon->line_width = 0.1;
+  polygon->line_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "line_width");
   if (attr != NULL)
     polygon->line_width = data_real(attribute_first_data(attr));
diff -urN dia-cvs-snapshot/objects/standard/polyline.c dia-cvs-snapshot.clean/objects/standard/polyline.c
--- dia-cvs-snapshot/objects/standard/polyline.c	Sun Aug 12 10:48:36 2001
+++ dia-cvs-snapshot.clean/objects/standard/polyline.c	Wed Apr 24 12:01:23 2002
@@ -415,7 +415,7 @@
   if (attr != NULL)
     data_color(attribute_first_data(attr), &polyline->line_color);
 
-  polyline->line_width = 0.1;
+  polyline->line_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "line_width");
   if (attr != NULL)
     polyline->line_width = data_real(attribute_first_data(attr));
@@ -431,8 +431,8 @@
     polyline->dashlength = data_real(attribute_first_data(attr));
 
   polyline->start_arrow.type = ARROW_NONE;
-  polyline->start_arrow.length = 0.8;
-  polyline->start_arrow.width = 0.8;
+  polyline->start_arrow.length = DEFAULT_ARROW_LENGTH;
+  polyline->start_arrow.width = DEFAULT_ARROW_WIDTH;
   attr = object_find_attribute(obj_node, "start_arrow");
   if (attr != NULL)
     polyline->start_arrow.type = data_enum(attribute_first_data(attr));
@@ -444,8 +444,8 @@
     polyline->start_arrow.width = data_real(attribute_first_data(attr));
 
   polyline->end_arrow.type = ARROW_NONE;
-  polyline->end_arrow.length = 0.8;
-  polyline->end_arrow.width = 0.8;
+  polyline->end_arrow.length = DEFAULT_ARROW_LENGTH;
+  polyline->end_arrow.width = DEFAULT_ARROW_WIDTH;
   attr = object_find_attribute(obj_node, "end_arrow");
   if (attr != NULL)
     polyline->end_arrow.type = data_enum(attribute_first_data(attr));
diff -urN dia-cvs-snapshot/objects/standard/zigzagline.c dia-cvs-snapshot.clean/objects/standard/zigzagline.c
--- dia-cvs-snapshot/objects/standard/zigzagline.c	Thu Apr  4 09:23:52 2002
+++ dia-cvs-snapshot.clean/objects/standard/zigzagline.c	Wed Apr 24 12:03:37 2002
@@ -19,6 +19,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <dia_defaults.h>
 
 #include <assert.h>
 #include <gtk/gtk.h>
@@ -429,7 +430,7 @@
   if (attr != NULL)
     data_color(attribute_first_data(attr), &zigzagline->line_color);
 
-  zigzagline->line_width = 0.1;
+  zigzagline->line_width = DEFAULT_LINE_WIDTH;
   attr = object_find_attribute(obj_node, "line_width");
   if (attr != NULL)
     zigzagline->line_width = data_real(attribute_first_data(attr));
@@ -440,8 +441,8 @@
     zigzagline->line_style = data_enum(attribute_first_data(attr));
 
   zigzagline->start_arrow.type = ARROW_NONE;
-  zigzagline->start_arrow.length = 0.8;
-  zigzagline->start_arrow.width = 0.8;
+  zigzagline->start_arrow.length = DEFAULT_ARROW_LENGTH;
+  zigzagline->start_arrow.width = DEFAULT_ARROW_WIDTH;
   attr = object_find_attribute(obj_node, "start_arrow");
   if (attr != NULL)
     zigzagline->start_arrow.type = data_enum(attribute_first_data(attr));
@@ -453,8 +454,8 @@
     zigzagline->start_arrow.width = data_real(attribute_first_data(attr));
 
   zigzagline->end_arrow.type = ARROW_NONE;
-  zigzagline->end_arrow.length = 0.8;
-  zigzagline->end_arrow.width = 0.8;
+  zigzagline->end_arrow.length = DEFAULT_ARROW_LENGTH;
+  zigzagline->end_arrow.width = DEFAULT_ARROW_WIDTH;
   attr = object_find_attribute(obj_node, "end_arrow");
   if (attr != NULL)
     zigzagline->end_arrow.type = data_enum(attribute_first_data(attr));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK