作図ソフト dia の改良版
Revision | eeaf2ddb3bc5cf2583c19864fcbb6c3566ec0ff3 (tree) |
---|---|
Zeit | 2003-10-15 06:51:12 |
Autor | Lars Clausen <lclausen@src....> |
Commiter | Lars Clausen |
pre[67]
@@ -1,5 +1,43 @@ | ||
1 | +2003-10-14 Lars Clausen <lrclause@cs.uiuc.edu> | |
2 | + | |
3 | + * doc/pl/dia-manual.sgml: | |
4 | + * doc/en/dia-manual.xml: | |
5 | + * config.h.win32: | |
6 | + * NEWS: | |
7 | + * configure.in: | |
8 | + * dia.spec (Release): Pre7. | |
9 | + | |
10 | + * app/diapsrenderer.c (draw_string): Convert string to print based | |
11 | + on current locale. If conversion fails, fall back to UTF-8 (which | |
12 | + is almost certain to be messy). | |
13 | + | |
14 | +2003-10-13 Lars Clausen <lrclause@cs.uiuc.edu> | |
15 | + | |
16 | + * doc/pl/dia-manual.sgml: | |
17 | + * dia.spec (Release): | |
18 | + * configure.in: | |
19 | + * NEWS: | |
20 | + * config.h.win32: | |
21 | + * doc/en/dia-manual.xml: Pre6. | |
22 | + | |
23 | + * plug-ins/pstricks/render_pstricks.c (draw_string): Don't escape | |
24 | + TeX chars in strings -- must be possible to use TeX text in there. | |
25 | + Also avoids infinite loop bug (#124464) Will get option for this | |
26 | + later. | |
27 | + | |
1 | 28 | 2003-10-11 Lars Clausen <lrclause@cs.uiuc.edu> |
2 | 29 | |
30 | + * shapes/Cisco/Makefile.am: Cisco shapes now install correctly. | |
31 | + | |
32 | + * doc/en/dia-manual.xml: | |
33 | + * doc/pl/dia-manual.sgml: | |
34 | + * dia.spec (Release): | |
35 | + * configure.in: | |
36 | + * config.h.win32: | |
37 | + * NEWS: pre5. | |
38 | + | |
39 | + * app/authors.h: Removed duplicate of M. C. Nelson. | |
40 | + | |
3 | 41 | * plug-ins/pixbuf/pixbuf.c: Unique name for pixbuf export: gdkpixbuf. |
4 | 42 | |
5 | 43 | * app/export_png.c: Unique name for libart PNG export: png-libart. |
@@ -1,3 +1,16 @@ | ||
1 | +dia-0.92-pre7: 14-Oct-2003 | |
2 | + | |
3 | +* EPS output with built-in fonts now does locale conversion. The PS still | |
4 | + thinks it's Latin-1. | |
5 | + | |
6 | +dia-0.92-pre6: 11-Oct-2003 | |
7 | + | |
8 | +* Cisco sheets install fix. | |
9 | + | |
10 | +dia-0.92-pre5: 11-Oct-2003 | |
11 | + | |
12 | +* Allow choosing the export format explicitly when in doubt. | |
13 | + | |
1 | 14 | dia-0.92-pre4: 27-Sep-2003 |
2 | 15 | |
3 | 16 | * Use Win32 PS font EPS rendering on Unix as well, to allow the various |
@@ -74,7 +74,6 @@ static const gchar *authors[] = { | ||
74 | 74 | "Fredrik Hallenberg <hallon@debian.org>", |
75 | 75 | "Francis J. Lacoste <francis@contre.com>", |
76 | 76 | "Steffen Macke <sdteffen@web.de>", |
77 | - "M. C. Nelson <mcn@mani.kobayashimaru.org>", | |
78 | 77 | "Jacek Pliszka <Jacek@Pliszka.fuw.edu.pl>", |
79 | 78 | "Henk Jan Priester <hj@justcroft.com>", |
80 | 79 | "Alejandro Aguilar Sierra <asierra@servidor.unam.mx>", |
@@ -500,6 +500,8 @@ draw_string(DiaRenderer *self, | ||
500 | 500 | char *buffer; |
501 | 501 | const char *str; |
502 | 502 | int len; |
503 | + gchar *localestr; | |
504 | + GError * error = NULL; | |
503 | 505 | |
504 | 506 | if (1 > strlen(text)) |
505 | 507 | return; |
@@ -508,10 +510,17 @@ draw_string(DiaRenderer *self, | ||
508 | 510 | |
509 | 511 | /* TODO: Use latin-1 encoding */ |
510 | 512 | |
513 | + localestr = g_locale_from_utf8(text, -1, NULL, NULL, &error); | |
514 | + | |
515 | + if (localestr == NULL) { | |
516 | + message_error("Can't convert string %s: %s\n", text, error->message); | |
517 | + localestr = g_strdup(text); | |
518 | + } | |
519 | + | |
511 | 520 | /* Escape all '(' and ')': */ |
512 | - buffer = g_malloc(2*strlen(text)+1); | |
521 | + buffer = g_malloc(2*strlen(localestr)+1); | |
513 | 522 | *buffer = 0; |
514 | - str = text; | |
523 | + str = localestr; | |
515 | 524 | while (*str != 0) { |
516 | 525 | len = strcspn(str,"()\\"); |
517 | 526 | strncat(buffer, str, len); |
@@ -524,7 +533,8 @@ draw_string(DiaRenderer *self, | ||
524 | 533 | } |
525 | 534 | fprintf(renderer->file, "(%s) ", buffer); |
526 | 535 | g_free(buffer); |
527 | - | |
536 | + g_free(localestr); | |
537 | + | |
528 | 538 | switch (alignment) { |
529 | 539 | case ALIGN_LEFT: |
530 | 540 | fprintf(renderer->file, "%f %f m", pos->x, pos->y); |
@@ -14,7 +14,7 @@ | ||
14 | 14 | #define GETTEXT_PACKAGE "dia" |
15 | 15 | #define LOCALEDIR "../lib/locale" |
16 | 16 | |
17 | -#define VERSION "0.92-pre4" | |
17 | +#define VERSION "0.92-pre7" | |
18 | 18 | |
19 | 19 | /* |
20 | 20 | * 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.92-pre4, http://bugzilla.gnome.org/enter_bug.cgi?product=dia) | |
3 | +AC_INIT(dia, 0.92-pre7, 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 |
@@ -4,7 +4,7 @@ | ||
4 | 4 | Summary: A gtk+ based diagram creation program. |
5 | 5 | Name: %name |
6 | 6 | Version: %ver |
7 | -Release: pre4 | |
7 | +Release: pre7 | |
8 | 8 | Copyright: GPL |
9 | 9 | Group: Applications/ |
10 | 10 | Source: ftp://ftp.gnome.org/pub/GNOME/stable/sources/dia/%{name}-%{ver}.tar.gz |
@@ -9,7 +9,7 @@ | ||
9 | 9 | <!ENTITY % entities SYSTEM "entities.xml"> |
10 | 10 | %entities; |
11 | 11 | |
12 | - <!ENTITY VERSION "0.92-pre4"> | |
12 | + <!ENTITY VERSION "0.92-pre7"> | |
13 | 13 | <!ENTITY INTRODUCTION SYSTEM "intro.xml"> |
14 | 14 | <!ENTITY QUICKSTART SYSTEM "usage-quickstart.xml"> |
15 | 15 | <!ENTITY CANVAS SYSTEM "usage-canvas.xml"> |
@@ -1,5 +1,5 @@ | ||
1 | 1 | <!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook V4.1//EN"[ |
2 | -<!ENTITY VERSION "0.92-pre4"> | |
2 | +<!ENTITY VERSION "0.92-pre7"> | |
3 | 3 | <!ENTITY INTRODUCTION SYSTEM "intro.sgml"> |
4 | 4 | <!ENTITY QUICKSTART SYSTEM "usage-quickstart.sgml"> |
5 | 5 | <!ENTITY CANVAS SYSTEM "usage-canvas.sgml"> |
@@ -638,7 +638,10 @@ fill_bezier(DiaRenderer *self, | ||
638 | 638 | } |
639 | 639 | |
640 | 640 | /* Do I really want to do this? What if the text is intended as |
641 | - * TeX text? | |
641 | + * TeX text? Jacek says leave it as a TeX string. TeX uses should know | |
642 | + * how to escape stuff anyway. Later versions will get an export option. | |
643 | + * | |
644 | + * Besides, it seems to be broken. | |
642 | 645 | */ |
643 | 646 | static gchar * |
644 | 647 | tex_escape_string(gchar *src) |
@@ -682,7 +685,7 @@ draw_string(DiaRenderer *self, | ||
682 | 685 | Color *color) |
683 | 686 | { |
684 | 687 | PstricksRenderer *renderer = PSTRICKS_RENDERER(self); |
685 | - gchar *escaped = tex_escape_string(text); | |
688 | + /* gchar *escaped = tex_escape_string(text);*/ | |
686 | 689 | |
687 | 690 | set_line_color(renderer,color); |
688 | 691 |
@@ -697,8 +700,8 @@ draw_string(DiaRenderer *self, | ||
697 | 700 | fprintf(renderer->file,"[r]"); |
698 | 701 | break; |
699 | 702 | } |
700 | - fprintf(renderer->file,"(%f,%f){\\scalebox{1 -1}{%s}}\n",pos->x, pos->y,escaped); | |
701 | - g_free(escaped); | |
703 | + fprintf(renderer->file,"(%f,%f){\\scalebox{1 -1}{%s}}\n",pos->x, pos->y, text); | |
704 | + /* g_free(escaped);*/ | |
702 | 705 | } |
703 | 706 | |
704 | 707 | static void |
@@ -1,8 +1,8 @@ | ||
1 | 1 | |
2 | - shapedir = $(pkgdatadir)/shapes | |
3 | - | |
4 | - ciscodir = $(shapedir)/Cisco | |
5 | - SHAPES = \ | |
2 | +shapedir = $(pkgdatadir)/shapes | |
3 | + | |
4 | +ciscodir = $(shapedir)/Cisco | |
5 | +SHAPES = \ | |
6 | 6 | 1000.shape\ |
7 | 7 | 1000.png\ |
8 | 8 | 100baset_hub.shape\ |
@@ -445,8 +445,7 @@ | ||
445 | 445 | workstation.png\ |
446 | 446 | www_server.shape\ |
447 | 447 | www_server.png |
448 | - | |
449 | - | |
450 | - EXTRA_DIST = $(SHAPES) | |
451 | - | |
452 | - cisco_DATA = $(SHAPES) | |
448 | + | |
449 | +EXTRA_DIST = $(SHAPES) | |
450 | + | |
451 | +cisco_DATA = $(SHAPES) |