• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

Révision0f26afb57706eb668e56241390a0925ad761a659 (tree)
l'heure2001-06-13 06:11:42
AuteurCyrille Chepelov <cyrille@src....>
CommiterCyrille Chepelov

Message de Log

minor non-conformance with IEC-848 fixed (in the transition from step 100

* samples/grafcet.dia: minor non-conformance with IEC-848
fixed (in the transition from step 100 to step 101).

* lib/properties.[ch]: added a flag (PROP_FLAG_DONT_MERGE) to
disallow editing of properties if the object is part of a group.

* objects/chronogram/chronoline.c:
* objects/SADT/annotation.c:
* objects/SADT/box.c:
* objects/GRAFCET/step.c:
* objects/GRAFCET/transition.c:
* objects/GRAFCET/condition.c: took advantage of PROP_FLAG_DONT_MERGE.

Change Summary

Modification

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
1+2001-06-12 Cyrille Chepelov <chepelov@calixo.net>
2+
3+ * objects/boolequation.h (<save|load>_boolequation): made the
4+ prototypes for match the .c file.
5+
6+ * samples/grafcet.dia: minor non-conformance with IEC-848
7+ fixed (in the transition from step 100 to step 101).
8+
9+ * lib/properties.[ch]: added a flag (PROP_FLAG_DONT_MERGE) to
10+ disallow editing of properties if the object is part of a group.
11+
12+ * objects/chronogram/chronoline.c:
13+ * objects/SADT/annotation.c:
14+ * objects/SADT/box.c:
15+ * objects/GRAFCET/step.c:
16+ * objects/GRAFCET/transition.c:
17+ * objects/GRAFCET/condition.c: took advantage of PROP_FLAG_DONT_MERGE.
18+
119 2001-06-12 Hans Breuer <hans@breuer.org>
220
321 * lib/libdia.def : removed lazyprop exports
--- a/lib/properties.c
+++ b/lib/properties.c
@@ -148,9 +148,14 @@ prop_desc_lists_intersection(GList *plists)
148148 for (i = arr->len - 1; i >= 0; i--) {
149149 gint j;
150150
151- for (j = 0; ret[j].name != NULL; j++)
152- if (g_array_index(arr, PropDescription, i).quark == ret[j].quark)
153- break;
151+ for (j = 0; ret[j].name != NULL; j++) {
152+ if (g_array_index(arr, PropDescription, i).quark == ret[j].quark) {
153+ if (!((ret[j].flags|g_array_index(arr, PropDescription, i).flags)
154+ & PROP_FLAG_DONT_MERGE))
155+ break; /* otherwise, one of the props doesn't want to be merged,
156+ so we won't keep it. */
157+ }
158+ }
154159 if (ret[j].name == NULL)
155160 g_array_remove_index(arr, i);
156161 }
--- a/lib/properties.h
+++ b/lib/properties.h
@@ -96,6 +96,7 @@ struct _PropDescription {
9696
9797 #define PROP_FLAG_VISIBLE 0x0001
9898 #define PROP_FLAG_DONT_SAVE 0x0002
99+#define PROP_FLAG_DONT_MERGE 0x0004 /* in case group properties are edited */
99100
100101 #define PROP_DESC_END { NULL, 0, 0, NULL, NULL, NULL, 0 }
101102
--- a/objects/GRAFCET/action.c
+++ b/objects/GRAFCET/action.c
@@ -2,7 +2,7 @@
22 * Copyright (C) 1998 Alexander Larsson
33 *
44 * GRAFCET chart support
5- * Copyright(C) 2000 Cyrille Chepelov
5+ * Copyright(C) 2000,2001 Cyrille Chepelov
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
--- a/objects/GRAFCET/boolequation.h
+++ b/objects/GRAFCET/boolequation.h
@@ -56,10 +56,10 @@ extern Boolequation *boolequation_create(const utfchar *value, Font *font,
5656 extern void boolequation_destroy(Boolequation *rcep);
5757 extern void boolequation_set_value(Boolequation *rcep, const utfchar *value);
5858
59-extern void save_boolequation(ObjectNode *obj_node, const gchar *attrname,
59+extern void save_boolequation(ObjectNode obj_node, const gchar *attrname,
6060 Boolequation *rcep);
6161
62-extern Boolequation *load_boolequation(ObjectNode *obj_node,
62+extern Boolequation *load_boolequation(ObjectNode obj_node,
6363 const gchar *attrname,
6464 const utfchar *defaultvalue,
6565 Font *font,
--- a/objects/GRAFCET/condition.c
+++ b/objects/GRAFCET/condition.c
@@ -2,7 +2,7 @@
22 * Copyright (C) 1998 Alexander Larsson
33 *
44 * GRAFCET chart support
5- * Copyright (C) 2000 Cyrille Chepelov
5+ * Copyright (C) 2000,2001 Cyrille Chepelov
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
@@ -125,7 +125,7 @@ static ObjectOps condition_ops = {
125125
126126 static PropDescription condition_props[] = {
127127 CONNECTION_COMMON_PROPERTIES,
128- { "condition",PROP_TYPE_STRING, PROP_FLAG_VISIBLE,
128+ { "condition",PROP_TYPE_STRING, PROP_FLAG_VISIBLE|PROP_FLAG_DONT_MERGE,
129129 N_("Condition"),N_("The boolean equation of the condition")},
130130 { "cond_font",PROP_TYPE_FONT, PROP_FLAG_VISIBLE,
131131 N_("Font"),N_("The condition's font") },
--- a/objects/GRAFCET/step.c
+++ b/objects/GRAFCET/step.c
@@ -2,7 +2,7 @@
22 * Copyright (C) 1998 Alexander Larsson
33 *
44 * GRAFCET charts support for Dia
5- * Copyright (C) 2000 Cyrille Chepelov
5+ * Copyright (C) 2000, 2001 Cyrille Chepelov
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
@@ -153,7 +153,7 @@ PropEnumData step_style[] = {
153153
154154 static PropDescription step_props[] = {
155155 ELEMENT_COMMON_PROPERTIES,
156- { "id", PROP_TYPE_STRING, PROP_FLAG_VISIBLE,
156+ { "id", PROP_TYPE_STRING, PROP_FLAG_VISIBLE|PROP_FLAG_DONT_MERGE,
157157 N_("Step name"),N_("The name of the step")},
158158 { "type", PROP_TYPE_ENUM, PROP_FLAG_VISIBLE,
159159 N_("Step type"),N_("The kind of step"),step_style},
--- a/objects/GRAFCET/transition.c
+++ b/objects/GRAFCET/transition.c
@@ -2,7 +2,7 @@
22 * Copyright (C) 1998 Alexander Larsson
33 *
44 * GRAFCET chart support
5- * Copyright(C) 2000 Cyrille Chepelov
5+ * Copyright(C) 2000,2001 Cyrille Chepelov
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
@@ -134,7 +134,7 @@ static ObjectOps transition_ops = {
134134
135135 static PropDescription transition_props[] = {
136136 ELEMENT_COMMON_PROPERTIES,
137- { "receptivity",PROP_TYPE_STRING, PROP_FLAG_VISIBLE,
137+ { "receptivity",PROP_TYPE_STRING, PROP_FLAG_VISIBLE|PROP_FLAG_DONT_MERGE,
138138 N_("Receptivity"),N_("The boolean equation of the receptivity")},
139139 { "rcep_font",PROP_TYPE_FONT, PROP_FLAG_VISIBLE,
140140 N_("Font"),N_("The receptivity's font") },
--- a/objects/SADT/box.c
+++ b/objects/SADT/box.c
@@ -2,7 +2,7 @@
22 * Copyright (C) 1998 Alexander Larsson
33 *
44 * SADT Activity/Data box -- objects for drawing SADT diagrams.
5- * Copyright (C) 2000 Cyrille Chepelov
5+ * Copyright (C) 2000, 2001 Cyrille Chepelov
66 *
77 * Forked from Flowchart toolbox -- objects for drawing flowcharts.
88 * Copyright (C) 1999 James Henstridge.
@@ -142,7 +142,7 @@ static PropDescription box_props[] = {
142142 PROP_STD_TEXT_FONT,
143143 PROP_STD_TEXT_HEIGHT,
144144 PROP_STD_TEXT_COLOUR,
145- { "id", PROP_TYPE_STRING, PROP_FLAG_VISIBLE,
145+ { "id", PROP_TYPE_STRING, PROP_FLAG_VISIBLE|PROP_FLAG_DONT_MERGE,
146146 N_("Activity/Data identifier"),
147147 N_("The identifier which appears in the lower right corner of the Box")},
148148 { "cpl_north",PROP_TYPE_CONNPOINT_LINE, 0, NULL, NULL},
--- a/objects/chronogram/chronoline.c
+++ b/objects/chronogram/chronoline.c
@@ -147,18 +147,20 @@ static PropDescription chronoline_props[] = {
147147 { "nbook", PROP_TYPE_NOTEBOOK_BEGIN,
148148 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE, NULL, NULL},
149149 { "data", PROP_TYPE_NOTEBOOK_PAGE,
150- PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE,
150+ PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE|PROP_FLAG_DONT_MERGE,
151151 N_("Data"), NULL},
152- { "name", PROP_TYPE_STRING,PROP_FLAG_VISIBLE,N_("Data name"),NULL },
153- { "events", PROP_TYPE_MULTISTRING,PROP_FLAG_VISIBLE,N_("Events"),
154- NULL,GINT_TO_POINTER(5) },
155- { "help", PROP_TYPE_STATIC,PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE,
152+ { "name", PROP_TYPE_STRING,PROP_FLAG_VISIBLE|PROP_FLAG_DONT_MERGE,
153+ N_("Data name"),NULL },
154+ { "events", PROP_TYPE_MULTISTRING,PROP_FLAG_VISIBLE|PROP_FLAG_DONT_MERGE,
155+ N_("Events"), NULL,GINT_TO_POINTER(5) },
156+ { "help", PROP_TYPE_STATIC,
157+ PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE|PROP_FLAG_DONT_MERGE,
156158 N_("Event specification"),N_(
157- "@ time set the pointer at an absolute time.\n"
158- "( duration sets the signal up, then wait 'duration'.\n"
159- ") duration sets the signal down, then wait 'duration'.\n"
160- "u duration sets the signal to \"unknown\" state, then wait 'duration'.\n"
161- "example : @ 1.0 (2.0)1.0(2.0)\n" )},
159+ "@ time set the pointer at an absolute time.\n"
160+ "( duration sets the signal up, then wait 'duration'.\n"
161+ ") duration sets the signal down, then wait 'duration'.\n"
162+ "u duration sets the signal to \"unknown\" state, then wait 'duration'.\n"
163+ "example : @ 1.0 (2.0)1.0(2.0)\n" )},
162164
163165 { "parameters",PROP_TYPE_NOTEBOOK_PAGE,
164166 PROP_FLAG_VISIBLE|PROP_FLAG_DONT_SAVE,
Binary files a/samples/grafcet.dia and b/samples/grafcet.dia differ