• 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évisionf4dc25cdb0a8e4f21037fb8d1561849c2b44410b (tree)
l'heure2001-06-11 06:11:16
AuteurCyrille Chepelov <cyrille@src....>
CommiterCyrille Chepelov

Message de Log

a NULL point can be given to connpointline_adjust_count(), in case there's

* lib/connpoint_line.c: a NULL point can be given to
connpointline_adjust_count(), in case there's not really a clicked
point.
* lib/properties.[ch]: added support for CONNPOINT_LINE properties.

* objects/GRAFCET/vergent.c: dropped lazyprops for standard
properties.

* objects/UML/lifeline.c: pruned some legacy stuff (now pure
standard properties code). Grafted a dynamic number of connection
points (heavily inspired from what Vergent does). This is the real
fix for #55863.

Change Summary

Modification

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
1+2001-06-10 Cyrille Chepelov <chepelov@calixo.net>
2+
3+ * lib/connpoint_line.c: a NULL point can be given to
4+ connpointline_adjust_count(), in case there's not really a clicked
5+ point.
6+ * lib/properties.[ch]: added support for CONNPOINT_LINE properties.
7+
8+ * objects/GRAFCET/vergent.c: dropped lazyprops for standard
9+ properties.
10+
11+ * objects/UML/lifeline.c: pruned some legacy stuff (now pure
12+ standard properties code). Grafted a dynamic number of connection
13+ points (heavily inspired from what Vergent does). This is the real
14+ fix for #55863.
15+
116 2001-06-09 Cyrille Chepelov <chepelov@calixo.net>
217
318 * app/app_procs.c (app_init): added a call to
--- a/lib/connpoint_line.c
+++ b/lib/connpoint_line.c
@@ -363,6 +363,8 @@ cpl_get_pointbefore(ConnPointLine *cpl, Point *clickedpoint)
363363 real dist = 65536.0;
364364 real tmpdist;
365365
366+ if (!clickedpoint) return 0;
367+
366368 for (i=0,elem=cpl->connections;
367369 i<cpl->num_connections;
368370 i++,elem=g_slist_next(elem)) {
--- a/lib/connpoint_line.h
+++ b/lib/connpoint_line.h
@@ -1,5 +1,4 @@
1-/*
2- * SADT diagram support for dia
1+/* Dynamic container for connection points -*- c -*-
32 * Copyright(C) 2000 Cyrille Chepelov
43 *
54 * Connection point line is a helper struct, to hold a few connection points
--- a/lib/properties.c
+++ b/lib/properties.c
@@ -34,6 +34,7 @@
3434
3535 #include "intl.h"
3636 #include "widgets.h"
37+#include "connpoint_line.h"
3738
3839 #define LIBDIA_COMPILATION
3940 #undef G_INLINE_FUNC
@@ -183,6 +184,7 @@ prop_copy(Property *dest, Property *src)
183184 case PROP_TYPE_ARROW:
184185 case PROP_TYPE_COLOUR:
185186 case PROP_TYPE_FONT:
187+ case PROP_TYPE_CONNPOINT_LINE:
186188 case PROP_TYPE_ENDPOINTS:
187189 dest->d = src->d;
188190 break;
@@ -243,6 +245,7 @@ prop_free(Property *prop)
243245 case PROP_TYPE_ARROW:
244246 case PROP_TYPE_COLOUR:
245247 case PROP_TYPE_ENDPOINTS:
248+ case PROP_TYPE_CONNPOINT_LINE:
246249 case PROP_TYPE_FONT:
247250 break;
248251 case PROP_TYPE_STRING:
@@ -378,6 +381,7 @@ prop_get_widget(Property *prop)
378381 case PROP_TYPE_BEZPOINT:
379382 case PROP_TYPE_BEZPOINTARRAY:
380383 case PROP_TYPE_ENDPOINTS:
384+ case PROP_TYPE_CONNPOINT_LINE:
381385 case PROP_TYPE_RECT:
382386 ret = gtk_label_new(_("No edit widget"));
383387 break;
@@ -457,6 +461,7 @@ prop_set_from_widget(Property *prop, GtkWidget *widget)
457461 case PROP_TYPE_BEZPOINT:
458462 case PROP_TYPE_BEZPOINTARRAY:
459463 case PROP_TYPE_ENDPOINTS:
464+ case PROP_TYPE_CONNPOINT_LINE:
460465 case PROP_TYPE_RECT:
461466 /* nothing */
462467 break;
@@ -508,7 +513,13 @@ prop_load(Property *prop, ObjectNode obj_node)
508513 if (!PROP_IS_OTHER(prop->type)) {
509514 attr = object_find_attribute(obj_node, prop->name);
510515 if (!attr) {
511- g_warning("Could not find attribute %s", prop->name);
516+ switch(prop->type) {
517+ case PROP_TYPE_CONNPOINT_LINE:
518+ PROP_VALUE_CONNPOINT_LINE(*prop) = 1;
519+ break;
520+ default:
521+ g_warning("Could not find attribute %s", prop->name);
522+ }
512523 return;
513524 }
514525 data = attribute_first_data(attr);
@@ -622,6 +633,9 @@ prop_load(Property *prop, ObjectNode obj_node)
622633 g_free(PROP_VALUE_FILE(*prop));
623634 PROP_VALUE_FILE(*prop) = data_string(data);
624635 break;
636+ case PROP_TYPE_CONNPOINT_LINE:
637+ PROP_VALUE_CONNPOINT_LINE(*prop) = data_int(data);
638+ break;
625639 default:
626640 if (custom_props == NULL || prop->type - PROP_LAST >= custom_props->len) {
627641 g_warning("prop type id %d out of range!!!", prop->type);
@@ -675,6 +689,9 @@ prop_save(Property *prop, ObjectNode obj_node)
675689 case PROP_TYPE_INT:
676690 data_add_int(attr, PROP_VALUE_INT(*prop));
677691 break;
692+ case PROP_TYPE_CONNPOINT_LINE:
693+ data_add_int(attr,PROP_VALUE_CONNPOINT_LINE(*prop));
694+ break;
678695 case PROP_TYPE_ENUM:
679696 data_add_enum(attr, PROP_VALUE_ENUM(*prop));
680697 break;
@@ -859,6 +876,10 @@ object_get_props_from_offsets(Object *obj, PropOffset *offsets,
859876 PROP_VALUE_INT(props[i]) =
860877 struct_member(obj, offsets[j].offset, gint);
861878 break;
879+ case PROP_TYPE_CONNPOINT_LINE:
880+ PROP_VALUE_CONNPOINT_LINE(props[i]) =
881+ struct_member(obj,offsets[j].offset, ConnPointLine *)->num_connections;
882+ break;
862883 case PROP_TYPE_REAL:
863884 PROP_VALUE_REAL(props[i]) =
864885 struct_member(obj, offsets[j].offset, real);
@@ -968,6 +989,13 @@ object_set_props_from_offsets(Object *obj, PropOffset *offsets,
968989 struct_member(obj, offsets[j].offset, gint) =
969990 PROP_VALUE_INT(props[i]);
970991 break;
992+ case PROP_TYPE_CONNPOINT_LINE:
993+ connpointline_adjust_count(struct_member(obj,offsets[j].offset,
994+ ConnPointLine *),
995+ PROP_VALUE_CONNPOINT_LINE(props[i]),
996+ &struct_member(obj,offsets[j].offset,
997+ ConnPointLine *)->end);
998+ break;
971999 case PROP_TYPE_REAL:
9721000 struct_member(obj, offsets[j].offset, real) =
9731001 PROP_VALUE_REAL(props[i]);
--- a/lib/properties.h
+++ b/lib/properties.h
@@ -1,4 +1,4 @@
1-/* Dia -- a diagram creation/manipulation program
1+/* Dia -- a diagram creation/manipulation program -*- c -*-
22 * Copyright (C) 1998 Alexander Larsson
33 *
44 * properties.h: property system for dia objects/shapes.
@@ -61,6 +61,7 @@ typedef enum {
6161 PROP_TYPE_FONT,
6262 PROP_TYPE_FILE,
6363 PROP_TYPE_ENDPOINTS,
64+ PROP_TYPE_CONNPOINT_LINE,
6465
6566 PROP_LAST
6667 } PropType;
@@ -118,6 +119,7 @@ struct _Property {
118119 struct {
119120 Point endpoints[2];
120121 } endpoints_data;
122+ gint connpoint_line_data;
121123 gpointer other_data;
122124 } d;
123125 };
@@ -151,6 +153,7 @@ struct _PropEnumData {
151153 #define PROP_VALUE_FILE(prop) ((prop).d.string_data)
152154 #define PROP_VALUE_OTHER(prop) ((prop).d.other_data)
153155 #define PROP_VALUE_ENDPOINTS(prop) ((prop).d.endpoints_data)
156+#define PROP_VALUE_CONNPOINT_LINE(prop) ((prop).d.connpoint_line_data)
154157
155158 /* Copy the data member of the property
156159 * If NULL, then just copy data member straight */
--- a/objects/GRAFCET/vergent.c
+++ b/objects/GRAFCET/vergent.c
@@ -36,7 +36,7 @@
3636 #include "widgets.h"
3737 #include "message.h"
3838 #include "color.h"
39-#include "lazyprops.h"
39+#include "properties.h"
4040 #include "geometry.h"
4141 #include "connpoint_line.h"
4242
@@ -48,16 +48,6 @@
4848
4949 typedef enum { VERGENT_OR, VERGENT_AND } VergentType;
5050
51-typedef struct _VergentPropertiesDialog VergentPropertiesDialog;
52-typedef struct _VergentDefaultsDialog VergentDefaultsDialog;
53-typedef struct _VergentState VergentState;
54-
55-struct _VergentState {
56- ObjectState obj_state;
57-
58- VergentType type;
59-};
60-
6151 typedef struct _Vergent {
6252 Connection connection;
6353
@@ -67,30 +57,9 @@ typedef struct _Vergent {
6757 VergentType type;
6858 } Vergent;
6959
70-struct _VergentPropertiesDialog {
71- AttributeDialog dialog;
72- Vergent *parent;
73-
74- EnumAttribute type;
75-};
76-
77-typedef struct _VergentDefaults {
78- VergentType type;
79-} VergentDefaults;
80-
81-struct _VergentDefaultsDialog {
82- AttributeDialog dialog;
83- VergentDefaults *parent;
84-
85- EnumAttribute type;
86-};
87-
88-static VergentPropertiesDialog *vergent_properties_dialog;
89-static VergentDefaultsDialog *vergent_defaults_dialog;
90-static VergentDefaults defaults;
91-
9260 static void vergent_move_handle(Vergent *vergent, Handle *handle,
93- Point *to, HandleMoveReason reason, ModifierKeys modifiers);
61+ Point *to, HandleMoveReason reason,
62+ ModifierKeys modifiers);
9463 static void vergent_move(Vergent *vergent, Point *to);
9564 static void vergent_select(Vergent *vergent, Point *clicked_point,
9665 Renderer *interactive_renderer);
@@ -102,17 +71,13 @@ static Object *vergent_create(Point *startpoint,
10271 static real vergent_distance_from(Vergent *vergent, Point *point);
10372 static void vergent_update_data(Vergent *vergent);
10473 static void vergent_destroy(Vergent *vergent);
105-static Object *vergent_copy(Vergent *vergent);
106-static GtkWidget *vergent_get_properties(Vergent *vergent);
107-static ObjectChange *vergent_apply_properties(Vergent *vergent);
108-
109-static VergentState *vergent_get_state(Vergent *vergent);
110-static void vergent_set_state(Vergent *vergent, VergentState *state);
111-
112-static void vergent_save(Vergent *vergent, ObjectNode obj_node,
113- const char *filename);
11474 static Object *vergent_load(ObjectNode obj_node, int version,
115- const char *filename);
75+ const char *filename);
76+static PropDescription *vergent_describe_props(Vergent *vergent);
77+static void vergent_get_props(Vergent *vergent,
78+ Property *props, guint nprops);
79+static void vergent_set_props(Vergent *vergent,
80+ Property *props, guint nprops);
11681
11782 static DiaMenu *vergent_get_object_menu(Vergent *vergent,
11883 Point *clickedpoint);
@@ -120,8 +85,8 @@ static DiaMenu *vergent_get_object_menu(Vergent *vergent,
12085 static ObjectTypeOps vergent_type_ops =
12186 {
12287 (CreateFunc)vergent_create, /* create */
123- (LoadFunc) vergent_load, /* load */
124- (SaveFunc) vergent_save, /* save */
88+ (LoadFunc) vergent_load,/*using properties*/ /* load */
89+ (SaveFunc) object_save_using_properties, /* save */
12590 (GetDefaultsFunc) NULL,
12691 (ApplyDefaultsFunc) NULL
12792 };
@@ -141,70 +106,68 @@ static ObjectOps vergent_ops = {
141106 (DrawFunc) vergent_draw,
142107 (DistanceFunc) vergent_distance_from,
143108 (SelectFunc) vergent_select,
144- (CopyFunc) vergent_copy,
109+ (CopyFunc) object_copy_using_properties,
145110 (MoveFunc) vergent_move,
146111 (MoveHandleFunc) vergent_move_handle,
147- (GetPropertiesFunc) vergent_get_properties,
148- (ApplyPropertiesFunc) vergent_apply_properties,
149- (ObjectMenuFunc) vergent_get_object_menu
150-};
112+ (GetPropertiesFunc) object_create_props_dialog,
113+ (ApplyPropertiesFunc) object_apply_props_from_dialog,
114+ (ObjectMenuFunc) vergent_get_object_menu,
115+ (DescribePropsFunc) vergent_describe_props,
116+ (GetPropsFunc) vergent_get_props,
117+ (SetPropsFunc) vergent_set_props
151118
152-static ObjectChange *
153-vergent_apply_properties(Vergent *vergent)
154-{
155- ObjectState *old_state;
156- VergentPropertiesDialog *dlg = vergent_properties_dialog;
157-
158- PROPDLG_SANITY_CHECK(dlg,vergent);
159-
160- old_state = (ObjectState *)vergent_get_state(vergent);
119+};
161120
162- PROPDLG_APPLY_ENUM(dlg,type);
163-
164- vergent_update_data(vergent);
165- return new_object_state_change(&vergent->connection.object, old_state,
166- (GetStateFunc)vergent_get_state,
167- (SetStateFunc)vergent_set_state);
168-}
121+static PropEnumData prop_vtype_data[] = {
122+ { N_("OR"), VERGENT_OR },
123+ { N_("AND"), VERGENT_AND },
124+ { NULL, 0 }
125+};
169126
170-PropDlgEnumEntry vergent_type_enum[] = {
171- { N_("OR"),VERGENT_OR,NULL },
172- { N_("AND"),VERGENT_AND,NULL },
173- { NULL } };
127+static PropDescription vergent_props[] = {
128+ CONNECTION_COMMON_PROPERTIES,
129+ { "cpl_north",PROP_TYPE_CONNPOINT_LINE, 0,
130+ "cpl_north","cpl_north"},
131+ { "cpl_south",PROP_TYPE_CONNPOINT_LINE, 0,
132+ "cpl_south","cpl_south"},
133+ { "vtype", PROP_TYPE_ENUM, PROP_FLAG_VISIBLE,
134+ N_("Vergent type:"),NULL, prop_vtype_data},
135+ PROP_DESC_END
136+};
174137
175-static PROPDLG_TYPE
176-vergent_get_properties(Vergent *vergent)
138+static PropDescription *
139+vergent_describe_props(Vergent *vergent)
177140 {
178- VergentPropertiesDialog *dlg = vergent_properties_dialog;
179-
180- PROPDLG_CREATE(dlg,vergent);
181- PROPDLG_SHOW_ENUM(dlg,type,_("Vergent type:"),vergent_type_enum);
182- PROPDLG_READY(dlg);
183-
184- vergent_properties_dialog = dlg;
185-
186- PROPDLG_RETURN(dlg);
141+ if (vergent_props[0].quark == 0) {
142+ prop_desc_list_calculate_quarks(vergent_props);
143+ }
144+ return vergent_props;
187145 }
188146
189-static void
190-vergent_apply_defaults()
191-{
192- VergentDefaultsDialog *dlg = vergent_defaults_dialog;
147+static PropOffset vergent_offsets[] = {
148+ CONNECTION_COMMON_PROPERTIES_OFFSETS,
149+ {"cpl_north",PROP_TYPE_CONNPOINT_LINE,offsetof(Vergent,north)},
150+ {"cpl_south",PROP_TYPE_CONNPOINT_LINE,offsetof(Vergent,south)},
151+ {"vtype",PROP_TYPE_ENUM,offsetof(Vergent,type)},
152+ { NULL,0,0 }
153+};
193154
194- PROPDLG_APPLY_ENUM(dlg,type);
155+static void
156+vergent_get_props(Vergent *vergent, Property *props, guint nprops)
157+{
158+ object_get_props_from_offsets(&vergent->connection.object,
159+ vergent_offsets,props,nprops);
195160 }
196161
197162 static void
198-init_default_values() {
199- static int defaults_initialized = 0;
200-
201- if (!defaults_initialized) {
202- defaults.type = VERGENT_OR;
203-
204- defaults_initialized = 1;
205- }
163+vergent_set_props(Vergent *vergent, Property *props, guint nprops)
164+{
165+ object_set_props_from_offsets(&vergent->connection.object,
166+ vergent_offsets,props,nprops);
167+ vergent_update_data(vergent);
206168 }
207169
170+
208171 static real
209172 vergent_distance_from(Vergent *vergent, Point *point)
210173 {
@@ -227,26 +190,6 @@ vergent_distance_from(Vergent *vergent, Point *point)
227190 return distance_rectangle_point(&rectangle,point);
228191 }
229192
230-static VergentState *
231-vergent_get_state(Vergent *vergent)
232-{
233- VergentState *state = g_new0(VergentState, 1);
234-
235- state->obj_state.free = NULL;
236- state->type = vergent->type;
237-
238- return state;
239-}
240-
241-static void
242-vergent_set_state(Vergent *vergent, VergentState *state)
243-{
244- vergent->type = state->type;
245-
246- g_free(state);
247- vergent_update_data(vergent);
248-}
249-
250193 static void
251194 vergent_select(Vergent *vergent, Point *clicked_point,
252195 Renderer *interactive_renderer)
@@ -382,6 +325,8 @@ vergent_update_data(Vergent *vergent)
382325 connection_update_handles(conn);
383326 }
384327
328+/* Object menu handling */
329+
385330 typedef struct {
386331 ObjectChange obj_change;
387332
@@ -441,7 +386,6 @@ vergent_delete_cp_callback(Object *obj, Point *clicked, gpointer data)
441386 return vergent_create_change((Vergent *)obj,0,clicked);
442387 }
443388
444-
445389 static DiaMenuItem object_menu_items[] = {
446390 { N_("Add connection point"), vergent_add_cp_callback, NULL, 1 },
447391 { N_("Delete connection point"), vergent_delete_cp_callback, NULL, 1 },
@@ -466,9 +410,6 @@ vergent_get_object_menu(Vergent *vergent, Point *clickedpoint)
466410 return &object_menu;
467411 }
468412
469-
470-
471-
472413 static Object *
473414 vergent_create(Point *startpoint,
474415 void *user_data,
@@ -481,7 +422,6 @@ vergent_create(Point *startpoint,
481422 int i;
482423 Point defaultlen = {6.0,0.0};
483424
484- init_default_values();
485425 vergent = g_malloc0(sizeof(Vergent));
486426 conn = &vergent->connection;
487427 obj = &conn->object;
@@ -506,7 +446,6 @@ vergent_create(Point *startpoint,
506446
507447 vergent->north = connpointline_create(obj,1);
508448 vergent->south = connpointline_create(obj,1);
509-
510449
511450 switch(GPOINTER_TO_INT(user_data)) {
512451 case VERGENT_OR:
@@ -535,97 +474,10 @@ vergent_destroy(Vergent *vergent)
535474 }
536475
537476 static Object *
538-vergent_copy(Vergent *vergent)
539-{
540- Vergent *newvergent;
541- Connection *conn, *newconn;
542- Object *newobj;
543- int realconncount,i;
544-
545- conn = &vergent->connection;
546-
547- newvergent = g_malloc0(sizeof(Vergent));
548- newconn = &newvergent->connection;
549- newobj = &newconn->object;
550-
551- connection_copy(conn, newconn);
552-
553- realconncount = 4;
554- newobj->connections[0] = &newvergent->northeast;
555- newobj->connections[1] = &newvergent->northwest;
556- newobj->connections[2] = &newvergent->southwest;
557- newobj->connections[3] = &newvergent->southeast;
558- for (i=0; i<4; i++) {
559- newobj->connections[i]->object = newobj;
560- newobj->connections[i]->connected = NULL;
561- }
562-
563- newvergent->north = connpointline_copy(newobj,vergent->north,&realconncount);
564- newvergent->south = connpointline_copy(newobj,vergent->south,&realconncount);
565- g_assert(realconncount == newobj->num_connections);
566- newvergent->type = vergent->type;
567-
568- vergent_update_data(newvergent);
569-
570- return &newvergent->connection.object;
571-}
572-
573-
574-static void
575-vergent_save(Vergent *vergent, ObjectNode obj_node,
576- const char *filename)
577-{
578- connection_save(&vergent->connection, obj_node);
579-
580- save_enum(obj_node,"vtype",vergent->type);
581- connpointline_save(vergent->north,obj_node,"cpl_north");
582- connpointline_save(vergent->south,obj_node,"cpl_south");
583-}
584-
585-static Object *
586477 vergent_load(ObjectNode obj_node, int version, const char *filename)
587478 {
588- Vergent *vergent;
589- Connection *conn;
590- Object *obj;
591- int i,realconncount;
592-
593- init_default_values();
594- vergent = g_malloc0(sizeof(Vergent));
595-
596- conn = &vergent->connection;
597- obj = &conn->object;
598-
599- obj->type = &vergent_type;
600- obj->ops = &vergent_ops;
601-
602- connection_load(conn, obj_node);
603- connection_init(conn, 2, 4);
604-
605- obj->connections[0] = &vergent->northeast;
606- obj->connections[1] = &vergent->northwest;
607- obj->connections[2] = &vergent->southwest;
608- obj->connections[3] = &vergent->southeast;
609- for (i=0; i<4; i++) {
610- obj->connections[i]->object = obj;
611- obj->connections[i]->connected = NULL;
612- }
613-
614- realconncount = 4;
615- g_assert(realconncount == obj->num_connections);
616-
617- vergent->north = connpointline_load(obj,obj_node,
618- "cpl_north",2,&realconncount);
619- vergent->south = connpointline_load(obj,obj_node,
620- "cpl_south",2,&realconncount);
621-
622- g_assert(realconncount == obj->num_connections);
623-
624- vergent->type = load_enum(obj_node,"vtype",VERGENT_OR);
625-
626- vergent_update_data(vergent);
627-
628- return &vergent->connection.object;
479+ return object_load_using_properties(&vergent_type,
480+ obj_node,version,filename);
629481 }
630482
631483
--- a/objects/UML/lifeline.c
+++ b/objects/UML/lifeline.c
@@ -32,26 +32,18 @@
3232 #include "render.h"
3333 #include "handle.h"
3434 #include "properties.h"
35+#include "connpoint_line.h"
3536
3637 #include "pixmaps/lifeline.xpm"
3738
3839 typedef struct _Lifeline Lifeline;
39-typedef struct _LifelineState LifelineState;
4040
41-struct _LifelineState {
42- ObjectState obj_state;
43-
44- int draw_focuscontrol;
45- int draw_cross;
46-};
47-
48-#define CONNECTIONS 6 /* must be even */
4941
5042 struct _Lifeline {
5143 Connection connection;
5244
53- ConnectionPoint connections[CONNECTIONS];
54-
45+ ConnectionPoint connections[6]; /* the static ones. 6 is meant to
46+ be hardcoded. */
5547 Handle boxbot_handle;
5648 Handle boxtop_handle;
5749
@@ -59,6 +51,15 @@ struct _Lifeline {
5951
6052 int draw_focuscontrol;
6153 int draw_cross;
54+
55+ ConnPointLine *northwest,*southwest,*northeast,*southeast;
56+
57+ /* we're (almost) obliged to do this stupid gymnastic with twin
58+ connpoint_lines, because we really do want to reload older objects
59+ (those created before we had the CPLs) without funny side effects. And
60+ we don't want to have two connection points (one static, one dynamic) in
61+ the same place either.
62+ */
6263 };
6364
6465 #define LIFELINE_LINEWIDTH 0.05
@@ -74,10 +75,11 @@ struct _Lifeline {
7475 #define HANDLE_BOXBOT (HANDLE_CUSTOM2)
7576
7677 static void lifeline_move_handle(Lifeline *lifeline, Handle *handle,
77- Point *to, HandleMoveReason reason, ModifierKeys modifiers);
78+ Point *to, HandleMoveReason reason,
79+ ModifierKeys modifiers);
7880 static void lifeline_move(Lifeline *lifeline, Point *to);
7981 static void lifeline_select(Lifeline *lifeline, Point *clicked_point,
80- Renderer *interactive_renderer);
82+ Renderer *interactive_renderer);
8183 static void lifeline_draw(Lifeline *lifeline, Renderer *renderer);
8284 static Object *lifeline_create(Point *startpoint,
8385 void *user_data,
@@ -86,28 +88,24 @@ static Object *lifeline_create(Point *startpoint,
8688 static real lifeline_distance_from(Lifeline *lifeline, Point *point);
8789 static void lifeline_update_data(Lifeline *lifeline);
8890 static void lifeline_destroy(Lifeline *lifeline);
89-static Object *lifeline_copy(Lifeline *lifeline);
90-static void lifeline_save(Lifeline *lifeline, ObjectNode obj_node,
91- const char *filename);
9291 static Object *lifeline_load(ObjectNode obj_node, int version,
9392 const char *filename);
94-static ObjectChange *lifeline_apply_properties(Lifeline *lif, GtkWidget *widget);
9593 static PropDescription *lifeline_describe_props(Lifeline *lifeline);
9694
97-static LifelineState *lifeline_get_state(Lifeline *lif);
98-static void lifeline_set_state(Lifeline *lif,
99- LifelineState *state);
10095 static void lifeline_get_props(Lifeline * lifeline, Property *props,
10196 guint nprops);
10297 static void lifeline_set_props(Lifeline * lifeline, Property *props,
10398 guint nprops);
99+static DiaMenu *lifeline_get_object_menu(Lifeline *lifeline,
100+ Point *clickedpoint);
101+
104102
105103
106104 static ObjectTypeOps lifeline_type_ops =
107105 {
108106 (CreateFunc) lifeline_create,
109- (LoadFunc) lifeline_load,
110- (SaveFunc) lifeline_save
107+ (LoadFunc) lifeline_load,/* using properties */
108+ (SaveFunc) object_save_using_properties
111109 };
112110
113111 ObjectType lifeline_type =
@@ -123,24 +121,29 @@ static ObjectOps lifeline_ops = {
123121 (DrawFunc) lifeline_draw,
124122 (DistanceFunc) lifeline_distance_from,
125123 (SelectFunc) lifeline_select,
126- (CopyFunc) lifeline_copy,
124+ (CopyFunc) object_copy_using_properties,
127125 (MoveFunc) lifeline_move,
128126 (MoveHandleFunc) lifeline_move_handle,
129127 (GetPropertiesFunc) object_create_props_dialog,
130- (ApplyPropertiesFunc) lifeline_apply_properties,
131- (ObjectMenuFunc) NULL,
128+ (ApplyPropertiesFunc) object_apply_props_from_dialog,
129+ (ObjectMenuFunc) lifeline_get_object_menu,
132130 (DescribePropsFunc) lifeline_describe_props,
133131 (GetPropsFunc) lifeline_get_props,
134132 (SetPropsFunc) lifeline_set_props
135133 };
136134
137135 static PropDescription lifeline_props[] = {
138- OBJECT_COMMON_PROPERTIES,
139- { "focus_control", PROP_TYPE_BOOL, PROP_FLAG_VISIBLE,
136+ CONNECTION_COMMON_PROPERTIES,
137+ { "rtop", PROP_TYPE_REAL, 0, NULL,NULL,NULL},
138+ { "rbot", PROP_TYPE_REAL, 0, NULL,NULL,NULL},
139+ { "draw_focus", PROP_TYPE_BOOL, PROP_FLAG_VISIBLE,
140140 N_("Draw focus of control:"), NULL, NULL },
141- { "cross", PROP_TYPE_BOOL, PROP_FLAG_VISIBLE,
141+ { "draw_cross", PROP_TYPE_BOOL, PROP_FLAG_VISIBLE,
142142 N_("Draw destruction mark:"), NULL, NULL },
143-
143+ { "cpl_northwest",PROP_TYPE_CONNPOINT_LINE, 0, NULL, NULL },
144+ { "cpl_southwest",PROP_TYPE_CONNPOINT_LINE, 0, NULL, NULL },
145+ { "cpl_northeast",PROP_TYPE_CONNPOINT_LINE, 0, NULL, NULL },
146+ { "cpl_southeast",PROP_TYPE_CONNPOINT_LINE, 0, NULL, NULL },
144147 PROP_DESC_END
145148 };
146149
@@ -153,9 +156,15 @@ lifeline_describe_props(Lifeline *lifeline)
153156 }
154157
155158 static PropOffset lifeline_offsets[] = {
156- OBJECT_COMMON_PROPERTIES_OFFSETS,
157- { "focus_control", PROP_TYPE_BOOL, offsetof(Lifeline, draw_focuscontrol) },
158- { "cross", PROP_TYPE_BOOL, offsetof(Lifeline, draw_cross) },
159+ CONNECTION_COMMON_PROPERTIES_OFFSETS,
160+ { "draw_focus", PROP_TYPE_BOOL, offsetof(Lifeline, draw_focuscontrol) },
161+ { "draw_cross", PROP_TYPE_BOOL, offsetof(Lifeline, draw_cross) },
162+ { "rtop", PROP_TYPE_REAL, offsetof(Lifeline, rtop) },
163+ { "rbot", PROP_TYPE_REAL, offsetof(Lifeline, rbot) },
164+ { "cpl_northwest",PROP_TYPE_CONNPOINT_LINE,offsetof(Lifeline,northwest)},
165+ { "cpl_southwest",PROP_TYPE_CONNPOINT_LINE,offsetof(Lifeline,southwest)},
166+ { "cpl_northeast",PROP_TYPE_CONNPOINT_LINE,offsetof(Lifeline,northeast)},
167+ { "cpl_southeast",PROP_TYPE_CONNPOINT_LINE,offsetof(Lifeline,southeast)},
159168 { NULL, 0, 0 },
160169 };
161170
@@ -319,6 +328,108 @@ lifeline_draw(Lifeline *lifeline, Renderer *renderer)
319328 }
320329 }
321330
331+/* Object menu handling */
332+
333+typedef struct {
334+ ObjectChange obj_change;
335+
336+ ObjectChange *northeast,*southeast,*northwest,*southwest;
337+} LifelineChange;
338+
339+static void lifeline_change_apply(LifelineChange *change, Object *obj)
340+{
341+ change->northwest->apply(change->northwest,obj);
342+ change->southwest->apply(change->southwest,obj);
343+ change->northeast->apply(change->northeast,obj);
344+ change->southeast->apply(change->southeast,obj);
345+}
346+
347+static void lifeline_change_revert(LifelineChange *change, Object *obj)
348+{
349+ change->northwest->revert(change->northwest,obj);
350+ change->southwest->revert(change->southwest,obj);
351+ change->northeast->revert(change->northeast,obj);
352+ change->southeast->revert(change->southeast,obj);
353+}
354+
355+static void lifeline_change_free(LifelineChange *change)
356+{
357+ if (change->northeast->free) change->northeast->free(change->northeast);
358+ g_free(change->northeast);
359+ if (change->northwest->free) change->northwest->free(change->northwest);
360+ g_free(change->northwest);
361+ if (change->southeast->free) change->southeast->free(change->southeast);
362+ g_free(change->southeast);
363+ if (change->southwest->free) change->southwest->free(change->southwest);
364+ g_free(change->southwest);
365+}
366+
367+static ObjectChange *
368+lifeline_create_change(Lifeline *lifeline, int add, Point *clicked)
369+{
370+ LifelineChange *vc;
371+
372+ vc = g_new0(LifelineChange,1);
373+ vc->obj_change.apply = (ObjectChangeApplyFunc)lifeline_change_apply;
374+ vc->obj_change.revert = (ObjectChangeRevertFunc)lifeline_change_revert;
375+ vc->obj_change.free = (ObjectChangeFreeFunc)lifeline_change_free;
376+
377+ if (add) {
378+ vc->northeast = connpointline_add_point(lifeline->northeast,clicked);
379+ vc->northwest = connpointline_add_point(lifeline->northwest,clicked);
380+ vc->southeast = connpointline_add_point(lifeline->southeast,clicked);
381+ vc->southwest = connpointline_add_point(lifeline->southwest,clicked);
382+ } else {
383+ vc->northeast = connpointline_remove_point(lifeline->northeast,clicked);
384+ vc->southwest = connpointline_remove_point(lifeline->southwest,clicked);
385+ vc->southeast = connpointline_remove_point(lifeline->southeast,clicked);
386+ vc->northwest = connpointline_remove_point(lifeline->northwest,clicked);
387+ }
388+ lifeline_update_data(lifeline);
389+ return (ObjectChange *)vc;
390+}
391+
392+static ObjectChange *
393+lifeline_add_cp_callback(Object *obj, Point *clicked, gpointer data)
394+{
395+ return lifeline_create_change((Lifeline *)obj,1,clicked);
396+}
397+
398+static ObjectChange *
399+lifeline_delete_cp_callback(Object *obj, Point *clicked, gpointer data)
400+{
401+ return lifeline_create_change((Lifeline *)obj,0,clicked);
402+}
403+
404+static DiaMenuItem object_menu_items[] = {
405+ { N_("Add connection points"), lifeline_add_cp_callback, NULL, 1 },
406+ { N_("Remove connection points"), lifeline_delete_cp_callback, NULL, 1 },
407+};
408+
409+static DiaMenu object_menu = {
410+ N_("UML Lifeline"),
411+ sizeof(object_menu_items)/sizeof(DiaMenuItem),
412+ object_menu_items,
413+ NULL
414+};
415+
416+static DiaMenu *
417+lifeline_get_object_menu(Lifeline *lifeline, Point *clickedpoint)
418+{
419+ /* Set entries sensitive/selected etc here */
420+ g_assert( (lifeline->northwest->num_connections ==
421+ lifeline->northeast->num_connections) ||
422+ (lifeline->northwest->num_connections ==
423+ lifeline->southwest->num_connections) ||
424+ (lifeline->southwest->num_connections ==
425+ lifeline->southeast->num_connections) );
426+
427+ object_menu_items[0].active = 1;
428+ object_menu_items[1].active = (lifeline->northeast->num_connections > 1);
429+
430+ return &object_menu;
431+}
432+
322433 static Object *
323434 lifeline_create(Point *startpoint,
324435 void *user_data,
@@ -343,7 +454,7 @@ lifeline_create(Point *startpoint,
343454 obj->type = &lifeline_type;
344455 obj->ops = &lifeline_ops;
345456
346- connection_init(conn, 4, CONNECTIONS);
457+ connection_init(conn, 4, 6);
347458
348459 lifeline->rtop = LIFELINE_HEIGHT/3;
349460 lifeline->rbot = lifeline->rtop+0.7;
@@ -366,12 +477,17 @@ lifeline_create(Point *startpoint,
366477 obj->handles[1]->connect_type = HANDLE_NONCONNECTABLE;
367478
368479 /* Connection points */
369- for (i=0;i<CONNECTIONS;i++) {
480+ for (i=0;i<6;i++) {
370481 obj->connections[i] = &lifeline->connections[i];
371482 lifeline->connections[i].object = obj;
372483 lifeline->connections[i].connected = NULL;
373484 }
374485
486+ lifeline->northwest = connpointline_create(obj,1);
487+ lifeline->southwest = connpointline_create(obj,1);
488+ lifeline->northeast = connpointline_create(obj,1);
489+ lifeline->southeast = connpointline_create(obj,1);
490+
375491 lifeline_update_data(lifeline);
376492
377493 *handle1 = obj->handles[0];
@@ -380,84 +496,23 @@ lifeline_create(Point *startpoint,
380496 return &lifeline->connection.object;
381497 }
382498
383-
384499 static void
385500 lifeline_destroy(Lifeline *lifeline)
386501 {
502+ connpointline_destroy(lifeline->southeast);
503+ connpointline_destroy(lifeline->northwest);
504+ connpointline_destroy(lifeline->northeast);
505+ connpointline_destroy(lifeline->southwest);
387506 connection_destroy(&lifeline->connection);
388507 }
389508
390-static Object *
391-lifeline_copy(Lifeline *lifeline)
392-{
393- int i;
394- Lifeline *newlifeline;
395- Connection *conn, *newconn;
396- Object *newobj;
397-
398- conn = &lifeline->connection;
399-
400- newlifeline = g_malloc0(sizeof(Lifeline));
401- newconn = &newlifeline->connection;
402- newobj = &newconn->object;
403-
404- connection_copy(conn, newconn);
405-
406- for (i = 0; i < CONNECTIONS; i++) {
407- newobj->connections[i] = &newlifeline->connections[i];
408- newlifeline->connections[i].object = newobj;
409- newlifeline->connections[i].connected = NULL;
410- newlifeline->connections[i].pos = lifeline->connections[i].pos;
411- newlifeline->connections[i].last_pos = lifeline->connections[i].last_pos;
412- }
413-
414- newlifeline->boxbot_handle = lifeline->boxbot_handle;
415- newobj->handles[2] = &newlifeline->boxbot_handle;
416- newlifeline->boxtop_handle = lifeline->boxtop_handle;
417- newobj->handles[3] = &newlifeline->boxtop_handle;
418-
419- newlifeline->rtop = lifeline->rtop;
420- newlifeline->rbot = lifeline->rbot;
421-
422- newlifeline->draw_focuscontrol = lifeline->draw_focuscontrol;
423- newlifeline->draw_cross = lifeline->draw_cross;
424-
425- return &newlifeline->connection.object;
426-}
427-
428-static LifelineState *
429-lifeline_get_state(Lifeline *lif)
430-{
431- LifelineState *state = g_new0(LifelineState, 1);
432-
433- state->obj_state.free = NULL;
434-
435- state->draw_focuscontrol = lif->draw_focuscontrol;
436- state->draw_cross = lif->draw_cross;
437-
438- return state;
439-}
440-
441-static void
442-lifeline_set_state(Lifeline *lif, LifelineState *state)
443-{
444- lif->draw_focuscontrol = state->draw_focuscontrol;
445- lif->draw_cross = state->draw_cross;
446-
447- g_free(state);
448-
449- lifeline_update_data(lif);
450-}
451-
452509 static void
453510 lifeline_update_data(Lifeline *lifeline)
454511 {
455512 Connection *conn = &lifeline->connection;
456513 Object *obj = &conn->object;
457514 LineBBExtras *extra = &conn->extra_spacing;
458- Point p1, p2;
459- real r;
460- int i;
515+ Point p1, p2, pnw, psw, pne, pse, pmw,pme;
461516
462517 obj->position = conn->endpoints[0];
463518
@@ -489,122 +544,46 @@ lifeline_update_data(Lifeline *lifeline)
489544 if (lifeline->draw_focuscontrol) {
490545 p1.x -= LIFELINE_WIDTH/2.0;
491546 p2.x += LIFELINE_WIDTH/2.0;
492- /* Update connections: */
493- r = (p2.y - p1.y)/(float)(CONNECTIONS/2-1);
494- for (i = 0; i < CONNECTIONS/2; ++i) {
495- lifeline->connections[i*2].pos.x = p1.x;
496- lifeline->connections[i*2+1].pos.x = p2.x;
497- lifeline->connections[i*2+1].pos.y =
498- lifeline->connections[i*2].pos.y = p1.y + i*r;
499- }
500- } else {
501- /* without focus of control, the points are over the line */
502- r = (p2.y - p1.y)/(float)(CONNECTIONS-1);
503- for (i = 0; i < CONNECTIONS; i++) {
504- lifeline->connections[i].pos.x = p1.x;
505- lifeline->connections[i].pos.y = p1.y + i*r;
506- }
507547 }
508-}
509-
510-
511-static void
512-lifeline_save(Lifeline *lifeline, ObjectNode obj_node,
513- const char *filename)
514-{
515- connection_save(&lifeline->connection, obj_node);
516-
517- data_add_real(new_attribute(obj_node, "rtop"),
518- lifeline->rtop);
519- data_add_real(new_attribute(obj_node, "rbot"),
520- lifeline->rbot);
521- data_add_boolean(new_attribute(obj_node, "draw_focus"),
522- lifeline->draw_focuscontrol);
523- data_add_boolean(new_attribute(obj_node, "draw_cross"),
524- lifeline->draw_cross);
548+ /* Update connections: */
549+
550+ pnw.x = p1.x; pnw.y = p1.y;
551+ psw.x = p1.x; psw.y = p2.y;
552+ pne.x = p2.x; pne.y = p1.y;
553+ pse.x = p2.x; pse.y = p2.y;
554+ pmw.x = pnw.x;
555+ pme.x = pne.x;
556+ pmw.y = pme.y = (p1.y + p2.y)/2;
557+
558+ lifeline->connections[0].pos = pnw;
559+ lifeline->connections[1].pos = pne;
560+ lifeline->connections[2].pos = pmw;
561+ lifeline->connections[3].pos = pme;
562+ lifeline->connections[4].pos = psw;
563+ lifeline->connections[5].pos = pse;
564+
565+ connpointline_update(lifeline->northwest);
566+ connpointline_putonaline(lifeline->northwest,&pnw,&pmw);
567+ connpointline_update(lifeline->southwest);
568+ connpointline_putonaline(lifeline->southwest,&pmw,&psw);
569+ connpointline_update(lifeline->northeast);
570+ connpointline_putonaline(lifeline->northeast,&pne,&pme);
571+ connpointline_update(lifeline->southeast);
572+ connpointline_putonaline(lifeline->southeast,&pme,&pse);
525573 }
526574
527575 static Object *
528576 lifeline_load(ObjectNode obj_node, int version, const char *filename)
529577 {
530- Lifeline *lifeline;
531- AttributeNode attr;
532- Connection *conn;
533- Object *obj;
534- int i;
578+ return object_load_using_properties(&lifeline_type,
579+ obj_node,version,filename);
580+}
535581
536- lifeline = g_malloc0(sizeof(Lifeline));
537582
538- conn = &lifeline->connection;
539- obj = &conn->object;
540583
541- obj->type = &lifeline_type;
542- obj->ops = &lifeline_ops;
543584
544- connection_load(conn, obj_node);
545-
546- connection_init(conn, 4, CONNECTIONS);
547-
548- attr = object_find_attribute(obj_node, "rtop");
549- if (attr != NULL)
550- lifeline->rtop = data_real(attribute_first_data(attr));
551- else
552- lifeline->rtop = LIFELINE_HEIGHT/3;
553-
554- attr = object_find_attribute(obj_node, "rbot");
555- if (attr != NULL)
556- lifeline->rbot = data_real(attribute_first_data(attr));
557- else
558- lifeline->rbot = lifeline->rtop+0.7;
559-
560- attr = object_find_attribute(obj_node, "draw_focus");
561- if (attr != NULL)
562- lifeline->draw_focuscontrol = data_boolean(attribute_first_data(attr));
563- else
564- lifeline->draw_focuscontrol = 1;
565-
566- attr = object_find_attribute(obj_node, "draw_cross");
567- if (attr != NULL)
568- lifeline->draw_cross = data_boolean(attribute_first_data(attr));
569- else
570- lifeline->draw_cross = 0;
571585
572- /* Connection points */
573- for (i=0;i<CONNECTIONS;i++) {
574- obj->connections[i] = &lifeline->connections[i];
575- lifeline->connections[i].object = obj;
576- lifeline->connections[i].connected = NULL;
577- }
578586
579- lifeline->boxbot_handle.id = HANDLE_BOXBOT;
580- lifeline->boxbot_handle.type = HANDLE_MINOR_CONTROL;
581- lifeline->boxbot_handle.connect_type = HANDLE_NONCONNECTABLE;
582- lifeline->boxbot_handle.connected_to = NULL;
583- obj->handles[2] = &lifeline->boxbot_handle;
584-
585- lifeline->boxtop_handle.id = HANDLE_BOXTOP;
586- lifeline->boxtop_handle.type = HANDLE_MINOR_CONTROL;
587- lifeline->boxtop_handle.connect_type = HANDLE_NONCONNECTABLE;
588- lifeline->boxtop_handle.connected_to = NULL;
589- obj->handles[3] = &lifeline->boxtop_handle;
590-
591- lifeline_update_data(lifeline);
592-
593- return &lifeline->connection.object;
594-}
595587
596588
597-static ObjectChange *
598-lifeline_apply_properties(Lifeline *lif, GtkWidget *widget)
599-{
600- ObjectState *old_state;
601-
602- old_state = (ObjectState*) lifeline_get_state(lif);
603-
604- object_apply_props_from_dialog((Object *)lif, widget);
605-
606- lifeline_update_data(lif);
607- return new_object_state_change(&lif->connection.object, old_state,
608- (GetStateFunc)lifeline_get_state,
609- (SetStateFunc)lifeline_set_state);
610-}
589+
--- a/po/fr.po
+++ b/po/fr.po
@@ -10,7 +10,7 @@
1010 msgid ""
1111 msgstr ""
1212 "Project-Id-Version: dia 0.86\n"
13-"POT-Creation-Date: 2001-06-08 06:57+0200\n"
13+"POT-Creation-Date: 2001-06-10 23:09+0200\n"
1414 "PO-Revision-Date: 2001-05-17 13:31+0200\n"
1515 "Last-Translator: Christophe Merlet <redfox@eikonex.org>\n"
1616 "Language-Team: Gnome French Team <gnomefr@gnomefr.traduc.org>\n"
@@ -35,15 +35,15 @@ msgstr "Ne pas afficher l'
3535 msgid "Show this help message"
3636 msgstr "Afficher ce message d'aide"
3737
38-#: app/app_procs.c:182
38+#: app/app_procs.c:185
3939 msgid "Can't connect to session manager!\n"
4040 msgstr "Ne peut se connecter au gestionnaire de session !\n"
4141
42-#: app/app_procs.c:193
42+#: app/app_procs.c:196
4343 msgid "[OPTION...] [FILE...]"
4444 msgstr "[OPTION...] [FICHIER...]"
4545
46-#: app/app_procs.c:196
46+#: app/app_procs.c:199
4747 #, c-format
4848 msgid ""
4949 "Error on option %s: %s.\n"
@@ -53,20 +53,20 @@ msgstr ""
5353 "Tapez ォ %s --help サ pour voir une liste compl鑼e des options en ligne de "
5454 "commande.\n"
5555
56-#: app/app_procs.c:245 app/app_procs.c:247
56+#: app/app_procs.c:248 app/app_procs.c:250
5757 msgid ""
5858 "Couldn't find standard objects when looking for object-libs, exiting...\n"
5959 msgstr "Ne peut trouver les objets standards dans object-libs, termin?..\n"
6060
61-#: app/app_procs.c:272
61+#: app/app_procs.c:275
6262 msgid "Need valid input file\n"
6363 msgstr "N馗essite un fichier d'entr馥 valide\n"
6464
65-#: app/app_procs.c:338 app/app_procs.c:344
65+#: app/app_procs.c:341 app/app_procs.c:347
6666 msgid "Quit, are you sure?"
6767 msgstr "ハtes-vous s? de vouloir quitter ?"
6868
69-#: app/app_procs.c:351
69+#: app/app_procs.c:354
7070 msgid ""
7171 "Modified diagrams exists.\n"
7272 "Are you sure you want to quit?"
@@ -74,21 +74,21 @@ msgstr ""
7474 "Des diagrammes ont 騁 modifi駸.\n"
7575 "Voulez-vous vraiment quitter ?"
7676
77-#: app/app_procs.c:361 app/app_procs.c:366
77+#: app/app_procs.c:364 app/app_procs.c:369
7878 msgid "Quit"
7979 msgstr "Quitter"
8080
81-#: app/app_procs.c:378 app/display.c:958 app/layer_dialog.c:989
81+#: app/app_procs.c:381 app/display.c:958 app/layer_dialog.c:989
8282 #: app/lineprops_area.c:741 app/lineprops_area.c:941 app/linewidth_area.c:246
8383 #: app/paginate_psprint.c:264
8484 msgid "Cancel"
8585 msgstr "Annuler"
8686
87-#: app/app_procs.c:453 app/app_procs.c:460
87+#: app/app_procs.c:456 app/app_procs.c:463
8888 msgid "Could not create per-user Dia config directory"
8989 msgstr "Ne peut cr馥r le r駱ertoire de configuration personnel de Dia"
9090
91-#: app/app_procs.c:462
91+#: app/app_procs.c:465
9292 msgid ""
9393 "Could not create per-user Dia config directory. Please make sure that the "
9494 "environment variable HOME points to an existing directory."
@@ -97,7 +97,7 @@ msgstr ""
9797 "Veuillez v駻ifier que la variable d'environnement HOME pointe vers un \n"
9898 "r駱ertoire existant."
9999
100-#: app/app_procs.c:484
100+#: app/app_procs.c:487
101101 msgid "Objects and filters internal to dia"
102102 msgstr "Objets et filtres internes de Dia"
103103
@@ -320,12 +320,12 @@ msgstr ""
320320 "Enregistrer les changements maintenant ?"
321321
322322 #: app/display.c:937 app/filedlg.c:246 app/filedlg.c:435 app/preferences.c:503
323-#: lib/properties.c:288
323+#: lib/properties.c:291
324324 msgid "Yes"
325325 msgstr "Oui"
326326
327327 #: app/display.c:947 app/filedlg.c:259 app/filedlg.c:448 app/preferences.c:503
328-#: app/preferences.c:514 lib/properties.c:290 lib/properties.c:311
328+#: app/preferences.c:514 lib/properties.c:293 lib/properties.c:314
329329 msgid "No"
330330 msgstr "Non"
331331
@@ -429,8 +429,8 @@ msgstr "D
429429 msgid "Create Text"
430430 msgstr "Cr馥r du texte"
431431
432-#: app/interface.c:58 app/menus.c:197 lib/properties.c:1262
433-#: lib/properties.h:366
432+#: app/interface.c:58 app/menus.c:197 lib/properties.c:1290
433+#: lib/properties.h:369
434434 msgid "Text"
435435 msgstr "Texte"
436436
@@ -583,7 +583,7 @@ msgstr "D
583583 msgid "Line Style Properties"
584584 msgstr "Propri騁駸 du style de ligne"
585585
586-#: app/linewidth_area.c:216 lib/properties.h:342
586+#: app/linewidth_area.c:216 lib/properties.h:345
587587 msgid "Line width"
588588 msgstr "Largeur de ligne"
589589
@@ -793,17 +793,17 @@ msgstr "Transitif"
793793 msgid "Same Type"
794794 msgstr "M麥e type"
795795
796-#: app/menus.c:164 lib/properties.c:1247 lib/properties.h:330
796+#: app/menus.c:164 lib/properties.c:1275 lib/properties.h:333
797797 #: lib/widgets.c:199
798798 msgid "Left"
799799 msgstr "タ gauche"
800800
801-#: app/menus.c:165 app/menus.c:174 lib/properties.c:1248 lib/properties.h:331
801+#: app/menus.c:165 app/menus.c:174 lib/properties.c:1276 lib/properties.h:334
802802 #: lib/widgets.c:205
803803 msgid "Center"
804804 msgstr "Au centre"
805805
806-#: app/menus.c:166 lib/properties.c:1249 lib/properties.h:332
806+#: app/menus.c:166 lib/properties.c:1277 lib/properties.h:335
807807 #: lib/widgets.c:211
808808 msgid "Right"
809809 msgstr "タ droite"
@@ -1505,19 +1505,19 @@ msgstr "Chargement..."
15051505 msgid "Dia v %s"
15061506 msgstr "Dia v %s"
15071507
1508-#: lib/properties.c:1256 lib/properties.h:345
1508+#: lib/properties.c:1284 lib/properties.h:348
15091509 msgid "Line colour"
15101510 msgstr "Couleur de ligne :"
15111511
1512-#: lib/properties.c:1257 lib/properties.h:348
1512+#: lib/properties.c:1285 lib/properties.h:351
15131513 msgid "Line style"
15141514 msgstr "Style de ligne"
15151515
1516-#: lib/properties.c:1258 lib/properties.h:352
1516+#: lib/properties.c:1286 lib/properties.h:355
15171517 msgid "Fill colour"
15181518 msgstr "Couleur de remplissage"
15191519
1520-#: lib/properties.c:1259 lib/properties.h:355
1520+#: lib/properties.c:1287 lib/properties.h:358
15211521 #: objects/custom/custom_object.c:362 objects/flowchart/box.c:317
15221522 #: objects/flowchart/diamond.c:310 objects/flowchart/ellipse.c:310
15231523 #: objects/flowchart/parallelogram.c:321 objects/standard/beziergon.c:222
@@ -1526,29 +1526,29 @@ msgstr "Couleur de remplissage"
15261526 msgid "Draw background"
15271527 msgstr "Dessiner le fond"
15281528
1529-#: lib/properties.c:1260 lib/properties.h:359
1529+#: lib/properties.c:1288 lib/properties.h:362
15301530 msgid "Start arrow"
15311531 msgstr "Fl鐵he de d饕ut"
15321532
1533-#: lib/properties.c:1261 lib/properties.h:362
1533+#: lib/properties.c:1289 lib/properties.h:365
15341534 msgid "End arrow"
15351535 msgstr "Fl鐵he de fin"
15361536
1537-#: lib/properties.c:1263 lib/properties.h:369
1537+#: lib/properties.c:1291 lib/properties.h:372
15381538 msgid "Text alignment"
15391539 msgstr "Alignement"
15401540
1541-#: lib/properties.c:1264 lib/properties.h:372 objects/GRAFCET/condition.c:131
1541+#: lib/properties.c:1292 lib/properties.h:375 objects/GRAFCET/condition.c:131
15421542 #: objects/GRAFCET/transition.c:140
15431543 msgid "Font"
15441544 msgstr "Police"
15451545
1546-#: lib/properties.c:1265 lib/properties.h:375 objects/GRAFCET/condition.c:133
1546+#: lib/properties.c:1293 lib/properties.h:378 objects/GRAFCET/condition.c:133
15471547 #: objects/GRAFCET/transition.c:142
15481548 msgid "Font size"
15491549 msgstr "Taille de police"
15501550
1551-#: lib/properties.c:1266 lib/properties.h:378
1551+#: lib/properties.c:1294 lib/properties.h:381
15521552 msgid "Text colour"
15531553 msgstr "Couleur du texte"
15541554
@@ -1604,7 +1604,7 @@ msgstr ""
16041604 msgid "Font %s not found, using Courier instead.\n"
16051605 msgstr "Police %s non trouv馥, utilisation de la police Courier la place.\n"
16061606
1607-#: lib/properties.c:382 lib/properties.c:414
1607+#: lib/properties.c:386 lib/properties.c:418
16081608 msgid "No edit widget"
16091609 msgstr "Pas de widget d'馘ition"
16101610
@@ -2801,28 +2801,28 @@ msgstr "Point Sud"
28012801 msgid "Draw arrow heads on upward arcs:"
28022802 msgstr "Dessine les fl鐵hes sur les arcs montants :"
28032803
2804-#: objects/GRAFCET/vergent.c:171
2804+#: objects/GRAFCET/vergent.c:122
28052805 msgid "OR"
28062806 msgstr "OU"
28072807
2808-#: objects/GRAFCET/vergent.c:172
2808+#: objects/GRAFCET/vergent.c:123
28092809 msgid "AND"
28102810 msgstr "ET"
28112811
2812-#: objects/GRAFCET/vergent.c:181
2812+#: objects/GRAFCET/vergent.c:134
28132813 msgid "Vergent type:"
28142814 msgstr "Type de vergence :"
28152815
2816-#: objects/GRAFCET/vergent.c:446 objects/SADT/box.c:539
2816+#: objects/GRAFCET/vergent.c:390 objects/SADT/box.c:539
28172817 #: objects/standard/line.c:182
28182818 msgid "Add connection point"
28192819 msgstr "Ajouter un point de connexion"
28202820
2821-#: objects/GRAFCET/vergent.c:447
2821+#: objects/GRAFCET/vergent.c:391
28222822 msgid "Delete connection point"
28232823 msgstr "Supprimer un point de connexion"
28242824
2825-#: objects/GRAFCET/vergent.c:451
2825+#: objects/GRAFCET/vergent.c:395
28262826 msgid "GRAFCET OR/AND vergent"
28272827 msgstr "Vergence ET/OU de GRAFCET"
28282828
@@ -3119,14 +3119,26 @@ msgstr "Afficher la fl
31193119 msgid "Interface:"
31203120 msgstr "Interface :"
31213121
3122-#: objects/UML/lifeline.c:138
3122+#: objects/UML/lifeline.c:140
31233123 msgid "Draw focus of control:"
31243124 msgstr "Afficher le focus du contr?e :"
31253125
3126-#: objects/UML/lifeline.c:140
3126+#: objects/UML/lifeline.c:142
31273127 msgid "Draw destruction mark:"
31283128 msgstr "Montrer la marque de destruction :"
31293129
3130+#: objects/UML/lifeline.c:405
3131+msgid "Add connection points"
3132+msgstr "Ajouter des points de connexion"
3133+
3134+#: objects/UML/lifeline.c:406
3135+msgid "Remove connection points"
3136+msgstr "Supprimer des points de connexion"
3137+
3138+#: objects/UML/lifeline.c:410
3139+msgid "UML Lifeline"
3140+msgstr "Ligne de vie UML"
3141+
31303142 #: objects/UML/message.c:158
31313143 msgid "Call"
31323144 msgstr "Appel"
@@ -3526,8 +3538,8 @@ msgid "Fig Format import and export filter"
35263538 msgstr "Filtre d'import depuis le format Fig"
35273539
35283540 #: plug-ins/xfig/xfig-import.c:73
3529-msgid "Polygon import is not implemented yes"
3530-msgstr "Type d'objet %d pas encore impl駑ent?
3541+msgid "Polygon import is not implemented yet"
3542+msgstr "Import de polygones pas encore impl駑ent?
35313543
35323544 #: plug-ins/xfig/xfig-import.c:74
35333545 msgid "Patterns are not supported by Dia"