dia r3964 - in trunk: . objects/custom
- From: hans svn gnome org
- To: svn-commits-list gnome org
- Subject: dia r3964 - in trunk: . objects/custom
- Date: Sun, 27 Apr 2008 15:28:56 +0100 (BST)
Author: hans
Date: Sun Apr 27 14:28:55 2008
New Revision: 3964
URL: http://svn.gnome.org/viewvc/dia?rev=3964&view=rev
Log:
2008-04-27 Hans Breuer <hans breuer org>
* objects/custom/custom_object.c : 'default_properties' were not
initialized as intended, e.g. show_backgound was random data
Modified:
trunk/ChangeLog
trunk/objects/custom/custom_object.c
Modified: trunk/objects/custom/custom_object.c
==============================================================================
--- trunk/objects/custom/custom_object.c (original)
+++ trunk/objects/custom/custom_object.c Sun Apr 27 14:28:55 2008
@@ -111,7 +111,17 @@
} CustomProperties;
-static CustomProperties default_properties;
+static CustomProperties default_properties = {
+ NULL,
+ NULL,
+ TRUE, /* show_background */
+ 0.0, /* border_width */
+ 0.5 * M_SQRT1_2, /* pading */
+ NULL, /* no font */
+ 0.8, /* it's size */
+ ALIGN_CENTER, /* it's alignment */
+ NULL, /* no font color */
+};
static real custom_distance_from(Custom *custom, Point *point);
static void custom_select(Custom *custom, Point *clicked_point,
@@ -401,18 +411,6 @@
}
static void
-init_default_values(void) {
- static int defaults_initialized = 0;
-
- if (!defaults_initialized) {
- default_properties.show_background = 1;
- default_properties.padding = 0.5 * M_SQRT1_2;
- default_properties.alignment = ALIGN_CENTER;
- defaults_initialized = 1;
- }
-}
-
-static void
transform_subshape_coord(Custom *custom, GraphicElementSubShape* subshape,
const Point *p1, Point *out)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]