作図ソフト dia の改良版
Revision | d91dbf3ca984722463db8d5e27bcef08a584b991 (tree) |
---|---|
Time | 2004-05-26 16:09:34 |
Author | Lars Clausen <lclausen@src....> |
Commiter | Lars Clausen |
Fix shape bug, help bug, and man page generation bug.
@@ -1,3 +1,34 @@ | ||
1 | +2004-05-26 Lars Clausen <lars@raeder.dk> | |
2 | + | |
3 | + * config.h.win32: | |
4 | + * NEWS: | |
5 | + * configure.in: | |
6 | + * dia.spec (Release): | |
7 | + * doc/pl/dia.xml: | |
8 | + * doc/en/dia.xml: | |
9 | + Brown-bag release 0.93.1 | |
10 | + | |
11 | + * app/Makefile.am (run_dia.sh$(EXEEXT)): Use $@ instead of $* to | |
12 | + allow more than one argument along with arguments with spaces. | |
13 | + | |
14 | +2004-05-25 Lars Clausen <lars@raeder.dk> | |
15 | + | |
16 | + * app/app_procs.c (app_init): Make --help and other options work | |
17 | + without popt installed. | |
18 | + | |
19 | + * doc/pl/Makefile.am (EXTRA_DIST): Distribute all the xml pages. | |
20 | + | |
21 | + * doc/en/Makefile.am (dia.1): Make the manpages automagically. | |
22 | + Also distribute all of the xml pages. | |
23 | + | |
24 | + * configure.in (DB2MAN): Check for docbook.xsl in several | |
25 | + different places where itøs been known to appear, in lieu of a | |
26 | + proper way to ask for its presence. | |
27 | + | |
28 | + * objects/custom/custom_object.c (custom_load_using_properties): | |
29 | + Up the version and handle reading old version diagrams. Now uses | |
30 | + correct names for the standard properties. | |
31 | + | |
1 | 32 | 2004-05-17 Hans Breuer <hans@breuer.org> |
2 | 33 | |
3 | 34 | * lib/object_defaults.c : don't 'failed to load external |
@@ -1,3 +1,12 @@ | ||
1 | +dia-0.93.1: 25-May-2004 | |
2 | + | |
3 | +Brown bag release due to shapes properties bug. Also fixes problems | |
4 | +with options when no popt is present, and distribution of docs. | |
5 | + | |
6 | +dia-0.93: 29-Apr-2004 | |
7 | + | |
8 | +Ready for release. | |
9 | + | |
1 | 10 | dia-0.93-pre2: 04-Apr-2004 |
2 | 11 | |
3 | 12 | Fixed crash bug in ellipse, plus various compilation problems. Also |
@@ -244,9 +244,9 @@ run_dia.sh$(EXEEXT): Makefile.am | ||
244 | 244 | echo " echo \"please run \$$0 once without a debugger.\"" >> run_dia.sh |
245 | 245 | echo " exit 1" >> run_dia.sh |
246 | 246 | echo " fi" >> run_dia.sh |
247 | - echo " \$$DEBUGGER \"\$$DIA_LIBS_PATH/lt-dia\" \"\$$*\"" >> run_dia.sh | |
247 | + echo " \$$DEBUGGER \"\$$DIA_LIBS_PATH/lt-dia\" \"\$$@\"" >> run_dia.sh | |
248 | 248 | echo "else" >> run_dia.sh |
249 | - echo " \"\$$DIA_APP_PATH/dia\" \"\$$*\"" >> run_dia.sh | |
249 | + echo " \"\$$DIA_APP_PATH/dia\" \"\$$@\"" >> run_dia.sh | |
250 | 250 | echo "fi" >> run_dia.sh |
251 | 251 | chmod a+x run_dia.sh |
252 | 252 |
@@ -102,6 +102,9 @@ static PluginInitResult internal_plugin_init(PluginInfo *info); | ||
102 | 102 | static void process_opts(int argc, char **argv, |
103 | 103 | #ifdef HAVE_POPT |
104 | 104 | poptContext poptCtx, struct poptOption options[], |
105 | +#else | |
106 | + gboolean *nosplash, gboolean *credits, | |
107 | + gboolean *version, gboolean *logtostderr, | |
105 | 108 | #endif |
106 | 109 | GSList **files, char **export_file_name, |
107 | 110 | char **export_file_format, char **size); |
@@ -428,6 +431,9 @@ app_init (int argc, char **argv) | ||
428 | 431 | process_opts(argc, argv, |
429 | 432 | #ifdef HAVE_POPT |
430 | 433 | poptCtx, options, |
434 | +#else | |
435 | + &nosplash, &credits, | |
436 | + &version, &log_to_stderr, | |
431 | 437 | #endif |
432 | 438 | &files, |
433 | 439 | &export_file_name, &export_file_format, &size); |
@@ -737,6 +743,9 @@ static void | ||
737 | 743 | process_opts(int argc, char **argv, |
738 | 744 | #ifdef HAVE_POPT |
739 | 745 | poptContext poptCtx, struct poptOption options[], |
746 | +#else | |
747 | + gboolean *nosplash, gboolean *credits, | |
748 | + gboolean *version, gboolean *logtostderr, | |
740 | 749 | #endif |
741 | 750 | GSList **files, char **export_file_name, |
742 | 751 | char **export_file_format, char **size) |
@@ -774,26 +783,69 @@ process_opts(int argc, char **argv, | ||
774 | 783 | |
775 | 784 | for (i=1; i<argc; i++) { |
776 | 785 | char *in_file_name = argv[i]; /* unless it's an option... */ |
777 | - | |
786 | + printf("Arg %i: `%s'\n", i, argv[i]); | |
778 | 787 | if (0==strcmp(argv[i],"-t")) { |
779 | 788 | if (i < (argc-1)) { |
780 | 789 | i++; |
781 | 790 | *export_file_format = argv[i]; |
782 | 791 | continue; |
783 | 792 | } |
793 | + } else if (0==strncmp(argv[i],"--export-to-format=",19)) { | |
794 | + *export_file_format = &argv[i][19]; | |
795 | + continue; | |
784 | 796 | } else if (0 == strcmp(argv[i],"-e")) { |
785 | 797 | if (i < (argc-1)) { |
786 | 798 | i++; |
787 | 799 | *export_file_name = argv[i]; |
788 | 800 | continue; |
789 | 801 | } |
802 | + } else if (0==strncmp(argv[i],"--export=", 9)) { | |
803 | + *export_file_name = &argv[i][9]; | |
804 | + continue; | |
790 | 805 | } else if (0 == strcmp(argv[i],"-s")) { |
791 | 806 | if (i < (argc-1)) { |
792 | 807 | i++; |
793 | 808 | *size = argv[i]; |
794 | 809 | continue; |
795 | 810 | } |
796 | - } | |
811 | + } else if (0==strncmp(argv[i],"--size=",7)) { | |
812 | + *size = &argv[i][7]; | |
813 | + continue; | |
814 | + } else if (0 == strcmp(argv[i],"-n") || | |
815 | + 0 == strcmp(argv[i],"--nosplash")) { | |
816 | + *nosplash = TRUE; | |
817 | + continue; | |
818 | + } else if (0 == strcmp(argv[i],"-l") || | |
819 | + 0 == strcmp(argv[i],"--log-to-stderr")) { | |
820 | + *logtostderr = TRUE; | |
821 | + continue; | |
822 | + } else if (0 == strcmp(argv[i],"-c") || | |
823 | + 0 == strcmp(argv[i],"--credits")) { | |
824 | + *credits = TRUE; | |
825 | + continue; | |
826 | + } else if (0 == strcmp(argv[i],"-v") || | |
827 | + 0 == strcmp(argv[i],"--version")) { | |
828 | + *version = TRUE; | |
829 | + continue; | |
830 | + } else if (0 == strcmp(argv[i],"-h") || | |
831 | + 0==strcmp(argv[i],"--help")) { | |
832 | + /* Taken by running dia --help with popt enabled */ | |
833 | + printf("Usage: dia [OPTION...] [FILE...] | |
834 | + -e, --export=OUTPUT Export loaded file and exit | |
835 | + -t, --export-to-format=FORMAT Export to file format and exit. Supported | |
836 | + formats are: cgm, dia, dxf, eps, | |
837 | + eps-pango, fig, mp, plt, hpgl, png, shape, | |
838 | + svg, tex, wpg | |
839 | + -s, --size=WxH Export graphics size | |
840 | + -n, --nosplash Don't show the splash screen | |
841 | + -l, --log-to-stderr Send error messages to stderr instead of | |
842 | + showing dialogs. | |
843 | + -c, --credits Display credits list and exit | |
844 | + -v, --version Display version and exit | |
845 | + -h, --help Show this help message | |
846 | +"); | |
847 | + exit(0); | |
848 | + } | |
797 | 849 | *files = g_slist_append(*files, in_file_name); |
798 | 850 | } |
799 | 851 | #endif |
@@ -15,7 +15,7 @@ | ||
15 | 15 | #define GETTEXT_PACKAGE "dia" |
16 | 16 | #define LOCALEDIR "../lib/locale" |
17 | 17 | |
18 | -#define VERSION "0.93-pre2" | |
18 | +#define VERSION "0.93.1" | |
19 | 19 | |
20 | 20 | /* |
21 | 21 | * We are linking libxml as DLL with either msvc or mingw, but this |
@@ -1,6 +1,6 @@ | ||
1 | 1 | dnl Process this -*- autoconf -*- file with autoconf to produce a |
2 | 2 | dnl configure script. |
3 | -AC_INIT(dia, 0.93-pre2, http://bugzilla.gnome.org/enter_bug.cgi?product=dia) | |
3 | +AC_INIT(dia, 0.93.1, http://bugzilla.gnome.org/enter_bug.cgi?product=dia) | |
4 | 4 | AC_CONFIG_SRCDIR(app/diagram.c) |
5 | 5 | AM_INIT_AUTOMAKE(AC_PACKAGE_NAME,AC_PACKAGE_VERSION) |
6 | 6 |
@@ -148,10 +148,10 @@ dnl | ||
148 | 148 | dnl Popt |
149 | 149 | dnl |
150 | 150 | |
151 | -AC_CHECK_LIB(popt, poptSetOtherOptionHelp, [ | |
151 | +AC_CHECK_LIB(popt, potSetOtherOptionHelp, [ | |
152 | 152 | AC_DEFINE(HAVE_LIBPOPT,,[popt library available]) |
153 | 153 | POPT_LIBS="-lpopt"]) |
154 | -AC_CHECK_HEADERS(popt.h) | |
154 | +AC_CHECK_HEADERS(pot.h) | |
155 | 155 | AC_SUBST(POPT_LIBS) |
156 | 156 | APP_LIBS="$APP_LIBS $POPT_LIBS" |
157 | 157 |
@@ -369,6 +369,20 @@ AC_PATH_PROG(DB2HTML, db2html, no) | ||
369 | 369 | AM_CONDITIONAL(HAVE_DB2HTML, |
370 | 370 | test "x$enable_db2html" != xno && test "x$DB2HTML" != xno) |
371 | 371 | |
372 | +dnl Only enable man page generation if we have db2man | |
373 | + | |
374 | +AC_SUBST(DB2MAN) | |
375 | +dnl Have to have the nwalsh docbook.xsl, which does manpages. | |
376 | +dnl RedHat installs it in a version-numbered place. Grumpf. | |
377 | +db2man_file= | |
378 | +for file in \ | |
379 | + /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl \ | |
380 | + /usr/share/sgml/docbook/xsl-stylesheets-\*/manpages/docbook.xsl; do | |
381 | + if test -f $file; then db2man_file=$file; break; fi | |
382 | +done | |
383 | +AM_CONDITIONAL(HAVE_DB2MAN, test "x$db2man_file" != x) | |
384 | +AC_SUBST(DB2MAN, "$db2man_file") | |
385 | + | |
372 | 386 | dnl Handling for Python |
373 | 387 | AC_ARG_WITH(python, |
374 | 388 | [ --with-python compile python plug-in],,with_python=no) |
@@ -1,12 +1,12 @@ | ||
1 | 1 | %define name dia |
2 | 2 | # This is the full Dia version |
3 | -%define ver 0.93 | |
3 | +%define ver 0.93.1 | |
4 | 4 | |
5 | 5 | Summary: A gtk+ based diagram creation program. |
6 | 6 | Name: %name |
7 | 7 | Version: %ver |
8 | 8 | # This indicates changes to the spec file after last time %ver has changed. |
9 | -Release: pre2 | |
9 | +Release: 1 | |
10 | 10 | Copyright: GPL |
11 | 11 | Group: Applications/ |
12 | 12 | Source: ftp://ftp.gnome.org/pub/GNOME/stable/sources/dia/%{name}-%{ver}.tar.gz |
@@ -9,10 +9,30 @@ dist-hook: app-dist-hook | ||
9 | 9 | |
10 | 10 | EXTRA_DIST += \ |
11 | 11 | dia.1 \ |
12 | + dia.dbk \ | |
13 | + authors.xml \ | |
12 | 14 | dia.xml \ |
15 | + entities.xml \ | |
16 | + intro.xml \ | |
17 | + license.xml \ | |
18 | + usage-canvas.xml \ | |
19 | + usage-customization.xml \ | |
20 | + usage-layers.xml \ | |
21 | + usage-loadsave.xml \ | |
22 | + usage-objects-basic.xml \ | |
23 | + usage-objects-selecting.xml \ | |
24 | + usage-objects-special.xml \ | |
25 | + usage-objects.xml \ | |
26 | + usage-quickstart.xml \ | |
13 | 27 | graphics/line_props.png \ |
14 | 28 | graphics/home_network.png \ |
15 | 29 | graphics/line_icon.png \ |
16 | 30 | graphics/greendots.png |
17 | 31 | |
18 | 32 | man_MANS = dia.1 |
33 | + | |
34 | +# Can't have dia.1 automatically created from dia.dbk if we have no DB2MAN | |
35 | +if HAVE_DB2MAN | |
36 | +dia.1: dia.dbk | |
37 | + xsltproc --nonet --novalid $(DB2MAN) dia.dbk >dia.1 | |
38 | +endif |
@@ -21,13 +21,12 @@ | ||
21 | 21 | .SH NAME |
22 | 22 | dia \- a diagram drawing program |
23 | 23 | .SH "SYNOPSIS" |
24 | - | |
25 | -.nf | |
26 | -\fBdia\fR [\fB-c\fR] [\fB--credits\fR] [\fB-e \fIOUTPUT\fR\fR] [\fB--export=\fIOUTPUT\fR\fR] | |
27 | - [\fB-h\fR] [\fB--help\fR] [\fB-n\fR] [\fB--nosplash\fR] [\fB-t \fIFORMAT\fR\fR] | |
28 | - [\fB--export-to-format=\fIFORMAT\fR\fR] [\fB-v\fR] [\fB--version\fR] [file | |
29 | - \&.\&.\&.] | |
30 | -.fi | |
24 | +.ad l | |
25 | +.hy 0 | |
26 | +.HP 4 | |
27 | +\fBdia\fR [\fB\-c\fR] [\fB\-\-credits\fR] [\fB\-e\ \fIOUTPUT\fR\fR] [\fB\-\-export=\fIOUTPUT\fR\fR] [\fB\-h\fR] [\fB\-\-help\fR] [\fB\-n\fR] [\fB\-\-nosplash\fR] [\fB\-s\ \fIWxH\fR\fR] [\fB\-\-size=\fIWxH\fR\fR] [\fB\-t\ \fIFORMAT\fR\fR] [\fB\-\-export\-to\-format=\fIFORMAT\fR\fR] [\fB\-v\fR] [\fB\-\-version\fR] [file\ \&.\&.\&.] | |
28 | +.ad | |
29 | +.hy | |
31 | 30 | |
32 | 31 | .SH "DESCRIPTION" |
33 | 32 |
@@ -46,27 +45,32 @@ Diagrams drawn in \fBDia\fR can be exported PostScript\&. | ||
46 | 45 | \fBDia\fR accepts the following options: |
47 | 46 | |
48 | 47 | .TP |
49 | -\fB-c\fR \fB--credits\fR | |
48 | +\fB\-c\fR \fB\-\-credits\fR | |
50 | 49 | Display credits list and exit\&. |
51 | 50 | |
52 | 51 | .TP |
53 | -\fB-e \fIOUTPUT\fR\fR \fB--export=\fIOUTPUT\fR\fR | |
52 | +\fB\-e \fIOUTPUT\fR\fR \fB\-\-export=\fIOUTPUT\fR\fR | |
54 | 53 | Export loaded file to OUTPUT and exit\&. |
55 | 54 | |
56 | 55 | .TP |
57 | -\fB-h\fR \fB--help\fR | |
56 | +\fB\-h\fR \fB\-\-help\fR | |
58 | 57 | Display a list of all commandline options\&. |
59 | 58 | |
60 | 59 | .TP |
61 | -\fB-n\fR \fB--nosplash\fR | |
60 | +\fB\-n\fR \fB\-\-nosplash\fR | |
62 | 61 | Do not show the splash screen\&. |
63 | 62 | |
64 | 63 | .TP |
65 | -\fB-t \fIFORMAT\fR\fR \fB--export-to-format=\fIFORMAT\fR\fR | |
64 | +\fB\-s \fIWxH\fR\fR \fB\-\-size=\fIWxH\fR\fR | |
65 | +Export loaded file in decimal given width and/or height\&. It is allowed to only select width or height\&. E\&.g\&. \fB\-\-size=\fI520x\fR\fR exports an image that is 520 pixels wide, while \fB\-\-size=\fIx900\fR\fR exports an image of 900 pixels height\&. | |
66 | +This option is currently only implemented for the PNG export filter\&. | |
67 | + | |
68 | +.TP | |
69 | +\fB\-t \fIFORMAT\fR\fR \fB\-\-export\-to\-format=\fIFORMAT\fR\fR | |
66 | 70 | Export loaded file in FORMAT and exit\&. Format are described below\&. |
67 | 71 | |
68 | 72 | .TP |
69 | -\fB-v\fR \fB--version\fR | |
73 | +\fB\-v\fR \fB\-\-version\fR | |
70 | 74 | Display \fBdia\fR version and exit\&. |
71 | 75 | |
72 | 76 | .SH "EXPORT FORMATS" |
@@ -85,9 +89,9 @@ dia (Native dia diagram) | ||
85 | 89 | dxf (Drawing Interchange File) |
86 | 90 | .TP |
87 | 91 | \(bu |
88 | -eps or epsi or eps-builtin or eps-pango (Encapsulated PostScript) | |
92 | +eps or epsi or eps\-builtin or eps\-pango (Encapsulated PostScript) | |
89 | 93 | |
90 | -The format specifications eps, epsi, and eps-pango all use the font renderer of the Pango library, while eps-builtin uses a dia specific font renderer\&. If you have problems with Pango rendering, e\&.g\&. Unicode, try eps-builtin instead\&. | |
94 | +The format specifications eps, epsi, and eps\-pango all use the font renderer of the Pango library, while eps\-builtin uses a dia specific font renderer\&. If you have problems with Pango rendering, e\&.g\&. Unicode, try eps\-builtin instead\&. | |
91 | 95 | .TP |
92 | 96 | \(bu |
93 | 97 | fig (XFig format) |
@@ -8,7 +8,7 @@ | ||
8 | 8 | |
9 | 9 | [ |
10 | 10 | |
11 | - <!ENTITY VERSION "0.93-pre2"> | |
11 | + <!ENTITY VERSION "0.93.1"> | |
12 | 12 | |
13 | 13 | <!ENTITY INTRODUCTION SYSTEM "intro.xml"> |
14 | 14 |
@@ -8,7 +8,18 @@ include $(top_srcdir)/xmldocs.make | ||
8 | 8 | dist-hook: app-dist-hook |
9 | 9 | |
10 | 10 | EXTRA_DIST += \ |
11 | + authors.xml \ | |
11 | 12 | dia.xml \ |
13 | + intro.xml \ | |
14 | + license.xml \ | |
15 | + usage-canvas.xml \ | |
16 | + usage-customization.xml \ | |
17 | + usage-layers.xml \ | |
18 | + usage-loadsave.xml \ | |
19 | + usage-objects-selecting.xml \ | |
20 | + usage-objects-special.xml \ | |
21 | + usage-objects.xml \ | |
22 | + usage-quickstart.xml \ | |
12 | 23 | graphics/line_props.png \ |
13 | 24 | graphics/home_network.png \ |
14 | 25 | graphics/greendots.png |
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
2 | 2 | |
3 | 3 | <!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "../../dtd/docbookx.dtd"[ |
4 | -<!ENTITY VERSION "0.93-pre2"> | |
4 | +<!ENTITY VERSION "0.93.1"> | |
5 | 5 | <!ENTITY INTRODUCTION SYSTEM "intro.sgml"> |
6 | 6 | <!ENTITY QUICKSTART SYSTEM "usage-quickstart.sgml"> |
7 | 7 | <!ENTITY CANVAS SYSTEM "usage-canvas.sgml"> |
@@ -138,6 +138,13 @@ static ObjectTypeOps custom_type_ops = | ||
138 | 138 | (ApplyDefaultsFunc) NULL |
139 | 139 | }; |
140 | 140 | |
141 | +/* Version history for save file format for custom objects: | |
142 | +0: Initial version | |
143 | +1: Changed to use standard names for standard properties | |
144 | + (border_width -> line_width, inner_color->fill_colour, | |
145 | + border_color -> line_colour, line_style+dashlength -> line_style) | |
146 | +*/ | |
147 | + | |
141 | 148 | /* This looks like it could be static, but it can't because we key |
142 | 149 | on it to determine if an ObjectType is a custom/SVG shape */ |
143 | 150 |
@@ -145,7 +152,7 @@ G_MODULE_EXPORT | ||
145 | 152 | ObjectType custom_type = |
146 | 153 | { |
147 | 154 | "Custom - Generic", /* name */ |
148 | - 0, /* version */ | |
155 | + 1, /* version */ | |
149 | 156 | (char **) custom_xpm, /* pixmap */ |
150 | 157 | |
151 | 158 | &custom_type_ops /* ops */ |
@@ -1340,10 +1347,39 @@ custom_load_using_properties(ObjectNode obj_node, int version, const char *filen | ||
1340 | 1347 | Point startpoint = {0.0,0.0}; |
1341 | 1348 | Handle *handle1,*handle2; |
1342 | 1349 | Text *init_text; |
1343 | - | |
1350 | + AttributeNode attr; | |
1351 | + | |
1344 | 1352 | obj = custom_type.ops->create(&startpoint, shape_info_get(obj_node), &handle1, &handle2); |
1345 | 1353 | custom = (Custom*)obj; |
1346 | 1354 | object_load_props(obj,obj_node); |
1355 | + | |
1356 | + if (version < 1) { | |
1357 | + /* Version 0 misnamed the standard attributes in the savefile. */ | |
1358 | + custom->border_width = 0.1; | |
1359 | + attr = object_find_attribute(obj_node, "border_width"); | |
1360 | + if (attr != NULL) | |
1361 | + custom->border_width = data_real( attribute_first_data(attr) ); | |
1362 | + | |
1363 | + custom->border_color = color_black; | |
1364 | + attr = object_find_attribute(obj_node, "border_color"); | |
1365 | + if (attr != NULL) | |
1366 | + data_color(attribute_first_data(attr), &custom->border_color); | |
1367 | + | |
1368 | + custom->inner_color = color_white; | |
1369 | + attr = object_find_attribute(obj_node, "inner_color"); | |
1370 | + if (attr != NULL) | |
1371 | + data_color(attribute_first_data(attr), &custom->inner_color); | |
1372 | + | |
1373 | + custom->line_style = LINESTYLE_SOLID; | |
1374 | + attr = object_find_attribute(obj_node, "line_style"); | |
1375 | + if (attr != NULL) | |
1376 | + custom->line_style = data_enum( attribute_first_data(attr) ); | |
1377 | + | |
1378 | + custom->dashlength = DEFAULT_LINESTYLE_DASHLEN; | |
1379 | + attr = object_find_attribute(obj_node, "dashlength"); | |
1380 | + if (attr != NULL) | |
1381 | + custom->dashlength = data_real(attribute_first_data(attr)); | |
1382 | + } | |
1347 | 1383 | |
1348 | 1384 | custom_update_data(custom, ANCHOR_MIDDLE, ANCHOR_MIDDLE); |
1349 | 1385 |