From 22347d69c9de13ab97638931b4b9032fc123a54d Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 2 Jul 2002 06:11:23 +0000 Subject: [PATCH] Update to pgaccess 0.91. --- src/bin/pgaccess/Makefile | 4 +- src/bin/pgaccess/README | 96 +- src/bin/pgaccess/copyright.html | 7 +- src/bin/pgaccess/doc/html/copyright.html | 2 +- .../pgaccess/doc/html/tutorial/copyright.html | 2 +- .../pgaccess/doc/html/tutorial/newtable.tga | Bin 44583 -> 1 bytes .../pgaccess/doc/html/tutorial/tut_edit.html | 2 +- src/bin/pgaccess/lib/database.tcl | 11 +- src/bin/pgaccess/lib/help/copy.hlp | 11 +- src/bin/pgaccess/lib/help/copyrights.hlp | 2 +- src/bin/pgaccess/lib/help/reports.hlp | 37 +- src/bin/pgaccess/lib/languages/chinese_big5 | 1174 ++++++++--------- src/bin/pgaccess/lib/languages/euskara | 1064 +++++++-------- src/bin/pgaccess/lib/mainlib.tcl | 39 +- src/bin/pgaccess/lib/preferences.tcl | 4 +- src/bin/pgaccess/lib/reports.tcl | 846 ++++++++---- src/bin/pgaccess/lib/schema.tcl | 166 ++- src/bin/pgaccess/lib/tables.tcl | 14 +- src/bin/pgaccess/main.tcl | 30 +- 19 files changed, 1980 insertions(+), 1531 deletions(-) diff --git a/src/bin/pgaccess/Makefile b/src/bin/pgaccess/Makefile index d55fb62023..c8a524dbbb 100644 --- a/src/bin/pgaccess/Makefile +++ b/src/bin/pgaccess/Makefile @@ -2,10 +2,10 @@ # # Makefile for src/bin/pgaccess # -# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group +# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/pgaccess/Attic/Makefile,v 1.17 2002/06/20 20:29:42 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/pgaccess/Attic/Makefile,v 1.18 2002/07/02 06:11:23 momjian Exp $ # #------------------------------------------------------------------------- diff --git a/src/bin/pgaccess/README b/src/bin/pgaccess/README index db926dab3a..50a2fcd443 100644 --- a/src/bin/pgaccess/README +++ b/src/bin/pgaccess/README @@ -1,82 +1,28 @@ ---------------------------------------------------------------------------- +Hi, -Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group -Portions Copyright (c) 1994, Regents of the University of California +I've made a few changes in the pgaccess source to make it work with overloaded functions too. -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose, without fee, and without a written agreement -is hereby granted, provided that the above copyright notice and this -paragraph and the following two paragraphs appear in all copies. +The files that I changed are: -IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR -DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING -LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS -DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. + pgaccess: to run the modified version from the actual directory + /lib/functions.old: bugfix for working with overloaded functions, and another one: if somebody has made a mistake + in the editing process, the function was deleted, and recreation was not possibble, because the + program returned an error message. Now the error message is still persists, but the procedure + doesn't take this into consideration. + Added "Save as" button to create a new function with the same source. Very usefull when one needs + a new function with slight modification to the source code. + Then default window size is increased to let the larger source code visible without resizing. + /lib/mainlib.tcl: for the same bugfix, now the functionnames are represented with the parameters too, I think, that + the structure is more visible now. Bugfix for the introduced functionalities, at deleteing object + (function). + /lib/tables.tcl: I don't know how, but there is a difference. Maybe this is one of the misteries of the universe :) -THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS -ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO -PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +So, in spite of the fact that this "hacking" is my first juorney in the tcl scripting language, I think +I've made a good job after all. I hope, this changes will be reflected in the future release of the pgaccess. ---------------------------------------------------------------------------- +There can be several hidden bugs introduced by the changes, if you find one of them please let me know. +At this time I am using the changed software that helps me much more in the actual project. -PGACCESS 0.98.7 27 January 2001 -================================ -I dedicate this program to my little daughters Ana-Maria and Emilia and to my -wife for their understanding. I hope they will forgive me for spending so many -time far from them. - - - -1. How to INSTALL ? - -You will need a Tcl/Tk package greater than 8.0 - -For Unix users, unpack the pgaccess-xxx.tar.gz archieve in you preferred -directory (usually /usr/local). - -Check where your "wish" program is and modify (if needed) the file -/usr/local/pgaccess/pgaccess and set variables PGACCESS_HOME and -PATH_TO_WISH to the appropriate directories. - -Include the /usr/local/pgaccess directory into your PATH or make a -symbolic link to it wherever you want (in PATH directories). -Example: - -$ ln -s /usr/local/pgaccess/pgaccess /usr/bin/pgaccess - -You will find also some documentation and FAQ in the doc directory. - - - -2. Usage - -You run it with the command: - - pgaccess [database] - -[database] is optional. - - - -3. Bug reporting - -First of all : operating system, PostgreSQL version,Tcl/Tk version. -A more detailed story of what have you done when error occurred. -Tcl/Tk stops usually with a error message and there is a button there -"Stack Trace" and if you press it, you will see a detailed information -about the procedure containing the error. Please send it to me. -Some information about table structure, no. of fields, records would -be also good. - -=========================================================================== -You would find always the latest version at http://www.flex.ro/pgaccess - -Please feel free to e-mail me with any suggestion or bug description -that will help to improve it. - -Constantin Teodorescu - +Best regards, +Bartus Levente (bartus.l at bitel.hu) \ No newline at end of file diff --git a/src/bin/pgaccess/copyright.html b/src/bin/pgaccess/copyright.html index ef47ce1147..d67654b88e 100644 --- a/src/bin/pgaccess/copyright.html +++ b/src/bin/pgaccess/copyright.html @@ -9,8 +9,7 @@
 
  -

Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group -

Portions Copyright (c) 1994, Regents of the University of California +

Copyright (c) 1994-7 Regents of the University of California

Permission to use, copy, modify, and distribute this software and its @@ -18,7 +17,7 @@ its agreement
is hereby granted, provided that the above copyright notice and this -
paragraph and the following two paragraphs appear in all copies. +
paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR @@ -27,7 +26,7 @@ INCLUDING
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE -
POSSIBILITY OF SUCH DAMAGE. +
POSSIBILITY OF SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY diff --git a/src/bin/pgaccess/doc/html/copyright.html b/src/bin/pgaccess/doc/html/copyright.html index 0a388620a0..b624786e1a 100644 --- a/src/bin/pgaccess/doc/html/copyright.html +++ b/src/bin/pgaccess/doc/html/copyright.html @@ -9,7 +9,7 @@
 
  -

Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group +

Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group

Portions Copyright (c) 1994, Regents of the University of California

Permission to use, copy, modify, and distribute this software and diff --git a/src/bin/pgaccess/doc/html/tutorial/copyright.html b/src/bin/pgaccess/doc/html/tutorial/copyright.html index 0a388620a0..b624786e1a 100644 --- a/src/bin/pgaccess/doc/html/tutorial/copyright.html +++ b/src/bin/pgaccess/doc/html/tutorial/copyright.html @@ -9,7 +9,7 @@
 
  -

Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group +

Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group

Portions Copyright (c) 1994, Regents of the University of California

Permission to use, copy, modify, and distribute this software and diff --git a/src/bin/pgaccess/doc/html/tutorial/newtable.tga b/src/bin/pgaccess/doc/html/tutorial/newtable.tga index 6104f58bd85cd0aa417e75334f0fbc963cd6a611..f59ec20aabf5842d237244ece8c81ab184faeac1 100644 GIT binary patch literal 1 IcmdM_001ihD*ylh literal 44583 zcmeI5--|8TRmb~uM<4tPe7tXh4}w1Wv zW-w}u(L@ONFp3FRNAU;v14L!688G^2A|VhB?fUGhPxtCIRp-<>r|R^b_B5Qk&f0tJ zwZ7{|?Y(PPb>AO6`Mwi>e(Cg?)%V}}@uz>{sb_xX=^wrI%+Ec0>)k)~)9?9#58Qg@ z-A~>6$@l*JFFyPJTR;2k`#-qED;BODK|8KP4 ziT2yb-@Sb|f4&p^A^W}>_Fnkjg#|_ z1Yrnn15-Fs(=1=9ZcD3M@>0jo;V$k`V)q8z{9xygZoZV<#9gv}zjrsHam8)gbq6{6 zD|~q<@^iR@8(_OX;109RsxuQ=x{@{Bfo{syhe8cw2$9k^-Z^X z`ghRvv3%Hzf^iBqRsV94pN#Dvr(?PoqQrrC#F|Xiv8KQR)i6D{+D%zG>a-gb|BBn* zUqwlY{i>@#2Cq6Bn#d-B(07x_1WesXk6ZpNdM~Q~H-ak$Lw|!ip!w4n?5>qR=?7vg zN#bYG2V0~-iXSMMSRf1mnW4ZCDxkDisvI#IlCxhuW_Q);Q=MW=JvCokE6P>sxY`a6 zoS9&KHq>1v(@RpL8N|96Fs@JQALD2IY#OQw=~Vfqf7+DbbTwoGh_&5mO(^opjZx+2 zO0oL1U->Z{wktn9w>4pz-;moZDu7A_WP9cRl$x2AQ>Ik*;bW?3=Pt9x4wHGD<1=O4 zHaSE-j}P{u?02=lK4)4pfKu8)vtX_;#T2mTjGJSmH_{J7oQk%~MOEEWb-fx=Yi81+@HkXjRmyYeFn)^}be}bI2&zzo zI!2Y-=4u?Wm-V}74#{aR%Oh8L<%X|Pdaq{qfNSQETf*NW<8E2s)fLOdzj&heQ1)aG zy56_7pIwX^2_b`r_OC-1tH!c%z^pnW^;%VY5{9cgStifyCdI!BOMNpez&CGU!H^&d zDSHrlTG$YqFrz*WjYBgV?UysnYe>ZpNTI(Iw4X~J^-cc@UBA*!v-N7P&`D)UTd(xC z%=MDC%FXYjkuDtc0c{b(w*+2-M zrKiYRGW z1JvSCdEAk`sc3iM_2v&oyr85`Lowa`eSUnds8 z;=OJBciA8uZFEl)TaCr!GG{*6K7S)VOuD?U*6MrDYYd%y+Vy?Z)lID}u)~|?W4yLo ze~$6GzId^d=N|q)?ry~l0-J9L{r@OWs>TymYcrDm=ed%}DgecfIEv_}s0`fc-26z`lzp*O|G zrmeW^^OwpzyF^Uge%3AebzpFh<=O>x;bTo-bv$>eESEj26wz6A>mkDK*?Eb}$uvJ2 zr$59lHWKaLH!8lVyT&~|m|CI}Hh6rpU8?K+%Efi~xX&iP`ml+=E+5HSUoz z;n9Yh1fc6U)7vWe-rr5L;SwIS_ca27Gwp8&mZ4c{&Mm_4VrdNdK|Fnmc!eC&qvJj96iSq z5_Q*Gj3u8qxMSO}Y9f|bO|}P|);jDn3x-38ZcSXd&a?7qN9<40%apnZo}}T`HyY zuR^XD%fo?QS3AS$aQmOf)dk)K0fU&TZF#Af#(3M^8BLWRlWR98*W|N4=u^dLyK?r+ z+b^}h@`v&<@2bI)-+QUp#K>0bH0p!W>y8TZD5dgfCx}B;YK?ZrLS-RZ-xx`G25kP;hQ^N?om zb<}d!jq3gdei{pl=2>RZfwutIXv|&nN1ewTgwv?2;|&78_;vXU*>m0?9CdA1Utf!Q z{BYbsaK^=a>RFfTaC^KK?egsfkKmcggPeR8+OM3u-iUyKU$|_x zlhO+2vIE6^Xj+w&W^HB^-K(IzRAH4OmPoViC26}+nwqoe7<7?|Lu5o7QnAQqN?5F# zDwlcW>bT6~W0r?UZylHAHuYEiOIC5UReiDFc4Ou(aqXYVt4FN zr_Mt|d9HdZPpmf0LqmGSm2o0>h?wDnYm?aUVHNE`xU}eY^*QUByML?y@>wUk)~saF zdoi6eESWw;G}s^J-!j>E&%*yhGMCQd-gUdZ>oH!(c)e48xq8l8WhFlT(TUxDDSgg7 z9Ch7{`G-G#_~)?^U_0`+LD{|hWzZLb?t8Y;{$G^P^$1ROg)KacAAygDQ_+ZZqW7+xQr- zPmCKH@5>3^GiZ0t>xXAcr-3m@{OhTtNTv0ZQY2pKj^l^6tR#TE=^*&eZ)FaitywvukbLyO{U8(WdDVGCp4K#iI{)JUb|D@WLAIc-+l#?ni z-o}sQuZ|z$x3xPZKSOrJ52c@7Lq4~+U%z(BL-~W!=AhBAxv92|?NCf&_}k`B<;A=% z7enK#ow3@ia@w7ei*4+x*IY>T?+`h`<{{QD_fGmO)o1CZ_L`eb9<3T_=B&ju`$TzR%&?@i_SA z90&h*T>mV}-wZlOZ8)d2zrGOl))xHG{a*`QTSptykB)CjtbT<$iXZno{BcnBIc-A| z)NR*q_Vs4{wYr=z&YP517N}RSvu9&Z2mJ&#;>Sagb=aqjJ0$j@?JU07jxXe8)%j>M zR54uYyY<{|c9N^;4uVwsa}jAWA(=TKL)x_hi0!~oS_zxV!K6~@S$yf5`!Ow*GcB`D zrIgL-g(2Wvauw7j-asoS&4I@`+o8n5aaoRb<=UBi$&2`OV!et+kD#mYsCQW5 zmV_IWP~9C$Xn22dkoP1dbSh?ZHb&L6R8EN>wl536A`t=fQVNcnZ*!7I(Vls1s6}~s z<>ZHQ$av%~tvgEUXy~OB+!7eIIz~nFB<74*y5?5==EipYuwB0P&z-X+FoOAeLvfJu zZ}n!$tQkRRwcU1pflsQO8BktozkH^738dYnPfC=>GN)dtdga9@wS7*U;8X7=ddQrC zcGu>q~_FpStjz zwD-W%?re#h@tbPvrrbE+6hFS1>i8QoZOo4cnm6Y_GtL^%UycvU=iKkMQYX%(ZFvqm zOFT3<+S#ri+uBLuZ&-dlAO7$bN!!5$^$p5;*!jhf?T^+6KMm{i;VqBJ+b(MOf7i7rKGy@~k@e;MEPF&Yd%%avO9^Fe z$57f+=G_}&EgC5U{!v;oMSmHtRjKOMIll^3Vd3GUuRPkp^L(eGHGB2DVMaU-u zRbE~@>al%YM9#W8iZY6raFI-Zh?FlS!^5Ev=Ih&T`LL+=SGd4Nek=@JMOl9xPZ$_K z#r;!s-M$;{-wyvdzFBplXi9f0kFhj}rydej{FQgy7Xn?L*PT^{E*$d#b-cKw>&jx) z#pQNCy%6%#E>6=fow^=~LEogcU0$l3m}@)yE|X64Jz~R@n`5NCAv?%z>Yo@>ijA}x z-==nbwYmC>z{Ns(+If=V!Aj#<2>!so>q07+URI6Jq1DU%gO<*+jyhN&+b0C%PG4m0 zm?w&CC@5=QI^K4hw+i@S1*@ci$`U~Xy*>>)T4RP`oo+{4z4eLf_8u1TkA!G_IsfkU z{xu8X-(f7`AC-N@`Xc$eAO4+&wXSv!V{b+FVjG`ByTQ2-|2RVeCe=0eidTOLJV5g_ z3pk!XZ($*ZZrDlXA$ZIB>sS0);ae5 IyJ7490AYHxkpKVy diff --git a/src/bin/pgaccess/doc/html/tutorial/tut_edit.html b/src/bin/pgaccess/doc/html/tutorial/tut_edit.html index a4e75b1779..8282fb9a42 100644 --- a/src/bin/pgaccess/doc/html/tutorial/tut_edit.html +++ b/src/bin/pgaccess/doc/html/tutorial/tut_edit.html @@ -29,7 +29,7 @@ a text file named newref.txt that starts like this:

Notice that there are two consecutive tildes to allow for the fact that this particular entry doesn't have anything in the Editor field. You can then perform a Query as follows:

-COPY psyref FROM '/home/jim/newref.txt' WITH DELIMITER +COPY psyref FROM '/home/jim/newref.txt' USING DELIMITERS '~';

This will read the records from newref.txt and insert them into the table psyref. See the PostgreSQL documentation under the headings diff --git a/src/bin/pgaccess/lib/database.tcl b/src/bin/pgaccess/lib/database.tcl index fb4395bc2f..0cb115e573 100644 --- a/src/bin/pgaccess/lib/database.tcl +++ b/src/bin/pgaccess/lib/database.tcl @@ -1,5 +1,10 @@ namespace eval Database { +# i have no idea why views were being discriminated against here +# when i first touched the code you could only make reports from tables +# i just commented out two lines below +# -cmaj + proc {getTablesList} {} { global CurrentDB PgAcVar set tlist {} @@ -16,10 +21,10 @@ global CurrentDB PgAcVar } else { set sysconstraint "" } - wpg_select $CurrentDB "select relname from pg_class where (relkind='r') $sysconstraint order by relname" rec { - if {![info exists itsaview($rec(relname))]} { + wpg_select $CurrentDB "select relname from pg_class where (relkind='r') or (relkind='v') $sysconstraint order by relname" rec { + # if {![info exists itsaview($rec(relname))]} { lappend tlist $rec(relname) - } + # } } } gterrmsg]} { showError $gterrmsg diff --git a/src/bin/pgaccess/lib/help/copy.hlp b/src/bin/pgaccess/lib/help/copy.hlp index 88dd77e255..eaf77a3cca 100644 --- a/src/bin/pgaccess/lib/help/copy.hlp +++ b/src/bin/pgaccess/lib/help/copy.hlp @@ -5,10 +5,10 @@ and the name must be specified from the viewpoint of the backend. If stdin or st " {} " COPY \[ BINARY \] table \[ WITH OIDS \] FROM { 'filename' | stdin } - \[ WITH DELIMITER 'delimiter' \] + \[ USING DELIMITERS 'delimiter' \] COPY \[ BINARY \] table \[ WITH OIDS \] TO { 'filename' | stdout } - \[ WITH DELIMITER 'delimiter' \] + \[ USING DELIMITERS 'delimiter' \] " {code} "Inputs" {bold} " @@ -44,7 +44,7 @@ COPY \[ BINARY \] table \[ WITH OIDS \] " {} "Usage" {bold} " The following example copies a table to standard output, using a vertical bar \(\"|\"\) as the field delimiter: -COPY country TO stdout WITH DELIMITER '|'; +COPY country TO stdout USING DELIMITERS '|'; To copy data from a Unix file into a table \"country\": COPY country FROM '/usr1/proj/bray/sql/country_data'; @@ -93,12 +93,13 @@ The format for each instance in the file is as follows. Note that this format mu The " {} "BINARY" {bold} " keyword will force all data to be stored/read as binary objects rather than as text. It is somewhat faster than the normal copy command, but is not generally portable, and the files \ generated are somewhat larger, although this factor is highly dependent on the data itself. By default, a text copy uses a tab \ -\(\"\\t\"\) character as a delimiter. The delimiter may also be changed to any other single character with the keyword phrase WITH DELIMITER. Characters in data fields which happen to match the delimiter character will be quoted. +\(\"\\t\"\) character as a delimiter. The delimiter may also be changed to any other single character with the keyword phrase USING DELIMITERS. Characters in data fields which happen to match the delimiter character will be quoted. You must have select access on any table whose values are read by " {} "COPY" {bold} ", and either insert or update access to a table into which values are being inserted by \ " {} "COPY" {bold} ". The backend also needs appropriate Unix permissions for any file read or written by \ " {} "COPY" {bold} ". -The keyword phrase " {} "WITH DELIMITER" {bold} " specifies a single character to be used for all delimiters between columns. +The keyword phrase " {} "USING DELIMITERS" {bold} " specifies a single character to be used for all delimiters between columns. If multiple characters are specified in the delimiter string, only the first \ +character is used. Tip: Do not confuse " {} "COPY" {bold} " with the psql instruction \\copy. " diff --git a/src/bin/pgaccess/lib/help/copyrights.hlp b/src/bin/pgaccess/lib/help/copyrights.hlp index e63802d4ef..ffa49c7b2c 100644 --- a/src/bin/pgaccess/lib/help/copyrights.hlp +++ b/src/bin/pgaccess/lib/help/copyrights.hlp @@ -1,7 +1,7 @@ .pgaw:Help.f.t insert end \ "Copyrights\n\n" {title} \ " -PostgreSQL is Copyright © 1996-2002, PostgreSQL Global Development Group. +PostgreSQL is Copyright © 1996-2001, PostgreSQL Global Development Group. Postgres95 is Copyright © 1994, Regents of the University of California. diff --git a/src/bin/pgaccess/lib/help/reports.hlp b/src/bin/pgaccess/lib/help/reports.hlp index 2f23513bcf..c8ea4db9e5 100644 --- a/src/bin/pgaccess/lib/help/reports.hlp +++ b/src/bin/pgaccess/lib/help/reports.hlp @@ -1,10 +1,37 @@ .pgaw:Help.f.t insert end "The Reports module is still in alpha stage. -The module should be able to design and execute a report based on a table\ -or from an existing query. +DONE: +# Allows for reports based on tables or views. +# Formulas are just Tcl evals, where column names are available as variables. + Try: concat \$colname1 \$colname2 +# Pictures must be gif or bmp files (and not stored in the database). +# Page header is the first record on a page, page footer is the last. +# Detail section is all the records that can fit on a page, row by row. +# Multiple pages. +# Printing puts the report into a Postscript file.\ + The pages printed are the ones in and between the boxes on preview mode. + You can also pipe the output by entering it in the dialog when prompted.\ + Try: |lpr +# Page resizing can be done by typing in the Page size boxes. +# Report resizing can be done by typing in the Report size boxes and hitting\ +enter or dragging the window and clicking in it with the mouse. -Grouping, sorting, subtotals, expressions should be implemented. -Report output can be printed as a Postscript file. +DOING: +# Allow for reports based on queries. +# Report headers and footers. +# Grouping, sorting, subtotals. +# Drawing simple shapes like lines or circles. +# Font choice needs expanding. +# Putting stuff into columns when the page is wider than the report. -For the moment I have no time to do that so volunteers are welcome. +Also, there are a couple Postscript items to be addressed: +# Since the Tk canvas widget outputs Encapsulated Postscript,\ +each page printed is a separate piece of Encapsulated Postscript.\ +Putting all those pieces together into one Postscript file was\ +a bit of a kluge, so right now you get every other page blank. Doh. +# Each time a picture is displayed, the Postscript grows by about 10 times\ +the size of the picture. It seems in general Postscript gets enormous\ +fast, at least with the Tk canvas widget's method of outputting it. + +Please send patches, proposals, problems, pickles, etc., to Chris Maj or visit pgaccess.org " diff --git a/src/bin/pgaccess/lib/languages/chinese_big5 b/src/bin/pgaccess/lib/languages/chinese_big5 index 1eec92332d..0238a907e9 100644 --- a/src/bin/pgaccess/lib/languages/chinese_big5 +++ b/src/bin/pgaccess/lib/languages/chinese_big5 @@ -1,587 +1,587 @@ -array set Messages { -"Label" "¼ÐÅÒ" - -"Save schema" "Àx¦sºõ­n" - -"Is unique ?" "¬O§_°ß¤@?" - -"Report builder" "³øªí»s§@¾¹" - -"Criteria" "¼Ð·Ç" - -"FATAL ERROR upgrading PgAccess table" " PgAccess ªí®æ¦b¤É¯Å®Éµo¥Í­P©R¿ù»~" - -"Page header" "­¶­º" - -"Query name" "¬d¸ß¦W¦r" - -"Please select an object first!" "½Ð¥ý¿ï¾Ü¤@­Óª«¥ó!" - -"Fields :" "Äæ¦ì :" - -"Name" "¦W¦r" - -"File name" "ÀɮצW" - -"Detail record" "°O¿ý©ú²Ó" - -"Auto-load the last opened database at startup" "±Ò°Ê®É¦Û°Ê¸ü¤J¤W¦¸¥´¶}ªº¸ê®Æ®w" - -"Maxvalue" "³Ì¤j­È" - -"Start value" "ªì©l­È" - -"Report fields" "³øªíÄæ¦ì" - -"Test form" "´ú¸Õªí³æ" - -"Error trying to connect to database '%s' on host %s \n\nPostgreSQL error message:%s" "¸Õ¹ÏÁp±µ¥D¾÷ %s \n\nPostgreSQL ¤Wªº¸ê®Æ®w '%s' ®É¥X¿ù, ¿ù»~°T®§:%s" - -"No field type ?" "µLÄæ¦ì«¬§O?" - -"User without name?" "¥Î¤á¨S¦³¦W¦r?" - -"You have to supply a name for this schema!" "§A¥²¶·µ¹³o­Óºõ­n«ü©w¤@­Ó¦W¦r!" - -"Last value" "³Ì«á­È" - -"Preferences" " ­Ó¤H³]©w" - -"View '%s' already exists!\nOverwrite ?" "¾\Äýªí '%s' ¤w¸g¦s¦b!\n Âл\?" - -"You have to select an index!" "§A¥²¶·¿ï©w¤@­Ó¯Á¤Þ!" - -"Field type" "Äæ¦ì«¬§O" - -"Script name" "¸}¥»¦W¦r" - -"Reload" "­«·s¸ü¤J" - -"Remove table %s from query?" "±q¬d¸ß¤¤§R°£ªí®æ %s?" - -"SQL window" " SQL µøµ¡" - -"Allow user to create other users" "¤¹³\¥Î¤á·s¼W¨ä¥¦¥Î¤á" - -"Delete current record ?" "§R°£¥Ø«e°O¿ý?" - -"List box" "¦Cªí®Ø" - -"Save to query builder" "Àx¦s¨ì¬d¸ß»s§@¾¹" - -"fixed width" "©w¼e" - -"Scripts" "¸}¥»" - -"Yes" "¬O" - -"Add label" "¼W¥[¼ÐÅÒ" - -"Sequence created!" "§Ç¦C¤w·s¼W!" - -"Field information" "Äæ¦ì¸ê°T" - -"Design" "³]­p" - -"Field" "Äæ¦ì" - -"You have to supply an external file name!" "§A¥²¶·´£¨Ñ¤@­Ó¥~³¡ÀɮצW!" - -"Increment" "¼W¥[" - -"No" "§_" - -"List box" "¦Cªí®Ø" - -"Save to query builder" "Àx¦s¨ì¬d¸ß»s§@¾¹" - -"fixed width" "©w¼e" - -"Scripts" "¸}¥»" - -"Yes" "¬O" - -"Add label" "¼W¥[¼ÐÅÒ" - -"Sequence created!" "§Ç¦C¤w·s¼W!" - -"Field information" "Äæ¦ì¸ê°T" - -"Design" "³]­p" - -"Field" "Äæ¦ì" - -"You have to supply an external file name!" "§A¥²¶·´£¨Ñ¤@­Ó¥~³¡ÀɮצW!" - -"Increment" "¼W¥[" - -"No" "§_" - -"Form design" "ªí³æ³]­p" - -"You must supply a return type!" "§A¥²¶·´£¨Ñ¤@ºØ¶Ç¦^«¬§O!" - -"Remove field from result ?" "±qµ²ªG¤¤§R°£Äæ¦ì?" - -"There is another object (a %s) with the same name.\nPlease change it!" "¦s¦b¥t¥~¤@­Ó¦P¦Wª«¥ó (%s).\n ½Ð§ï¦W!" - -"This query has no commands?" "³o±ø¬d¸ß¨S¦³©R¥O?" - -"Execute query" "°õ¦æ¬d¸ß" - -"field cannot be null" "Äæ¦ì¤£¯à¬°ªÅ" - -"Help" "»¡©ú" - -"Rename column" "­«·s©R¦WÄæ¦ì" - -"Database" "¸ê®Æ®w" - -"Information" "¸ê°T" - -"Close" "Ãö³¬ " - -"Command" "©R¥O" - -"Table" "ªí®æ" - -"verify password" "ÅçÃÒ±K½X" - -"Vacuum" "²M²z" - -"Default value" "¹w³]­È" - -"Import" "¶×¤J" - -"Delete index" "§R°£¯Á¤Þ" - -"Move up" "¦V¤W²¾" - -"index properties" "¯Á¤ÞÄÝ©Ê" - -"check" "Àˬd" - -"Create new table" "«Ø¥ß·sªí®æ" - -"Visual query designer" "µøı¤Æ¬d¸ß³]­p¾¹" - -"Delete all" "¥þ³¡§R°£" - -"You are going to delete\n\n %s \n\nProceed?" "§A¥¿·Ç³Æ§R°£\n\n %s \n\nÄ~Äò?" - -"Schema name" "ºõ­n¦W" - -"Error executing query" "°õ¦æ¬d¸ß¥X¿ù" - -"Report name" "³øªí¦W¦r" - -"Add field" "¼W¥[Äæ¦ì" - -"Field name" "Äæ¦ì¦W" - -"FATAL ERROR searching for PgAccess system tables" "·j¯Á PgAccess ¨t²Îªí®æ®Éµo¥Í­P©R¿ù»~" - -"A big number of rows displayed in table view will take a lot of memory!" "¦b¾\Äýªí¸ÌÅã¥Ü¤j¶qªº°O¿ý¦C±N·|¨Ï¥Î¤j¶q°O¾ÐÅé!" - -"Preview" "¹wÄý" - -"Users" "¥Î¤á" - -"Owner" "©Ò¦³ªÌ" - -"Form's window internal name" "ªí³æªºµøµ¡¤º³¡¦W¦r" - -"Sort field" "±Æ§ÇÄæ¦ì" - -"New name is the same as the old one!" "·s¡B¦W¦r¬Û¦P!" - -"Warning" "ĵ§i" - -"Suggestions at" "½Ð§â«Øijµoµ¹" - -"Functions" "¨ç¼Æ" - -"Schema" "ºõ­n" - -"Open" "¶}±Ò " - -"size" "¤Ø¤o" - -"Delete" "§R°£" - -"Returns" "¶Ç¦^­È" - -"Define new user" "©w¸q·s¥Î¤á" - -"Move down" "¦V¤U²¾" - -"Design script" "³]­p¸}¥»" - -"Check box" "¦h¿ï®Ø" - -"FINAL WARNING" "³Ì«áĵ§i" - -"Add table" "¼W¥[ªí®æ" - -"Table viewer font" "ªí®æ¬d¬Ý¾¹¦rÅé" - -"The field type is not specified!" "Äæ¦ì«¬§O¥¼«ü©w!" - -"Close test form" "Ãö³¬´ú¸Õªí³æ" - -"Export table" " ¶×¥Xªí®æ " - -"Add new index" "¼W¥[·s¯Á¤Þ" - -"Left" "¥ª" - -"Field delimiter" "Äæ¦ì¤À¹j²Å" - -"Add formula" "¼W¥[¤½¦¡" - -"Open database" "¶}±Ò¸ê®Æ®w" - -"Return" "¶Ç¦^" - -"Changed fonts may appear in the next working session!" "¦rÅé­×§ï±N¦b¤U­Ó¤u§@·|´Á¤¤¥Í®Ä!" - -"Error" "¿ù»~" - -"Enter a field name" "¿é¤JÄæ¦ì¦W" - -"field name" "Äæ¦ì¦W" - -"Forms" "ªí³æ" - -"Cannot add column" "µLªk°l¥[Äæ¦ì" - -"Clean" "²MªÅ" - -"Delete all objects ?" "§R°£©Ò¦³ª«¥ó?" - -"Preferred language" "°¾¦n»y¨¥" - -"Execute SQL" "°õ¦æ SQL" - -"Sequences" "§Ç¦C" - -"Button" "«ö¶s" - -"Language" "»y¨¥" - -"Query '%s' was not found!" "¨S¦³§ä¨ì¬d¸ß '%s'" - -"Object" "ª«¥ó" - -"Font fixed" "©T©w¦rÅé" - -"Table name" "ªí®æ¦W" - -"Export" "¶×¥X" - -"Change user" "§ó§ï¥Î¤á" - -"You must give object a new name!" "§A¥²¶·µ¹ª«¥ó¤@­Ó·s¦W¦r!" - -"Query" "¬d¸ß" - -"User name" "¥Î¤á¦W" - -"Font normal" "¥¿±`¦rÅé" - -"Import table" " ¶×¤Jªí®æ " - -"Toolbar" "¤u¨ã¦C" - -"Radio btn" "³æ¿ï«ö¶s" - -"You must supply a name for this function!" "§A¥²¶·µ¹³o­Ó¨ç¼Æ´£¨Ñ¤@­Ó¦W¦r!" - -"You have to select index fields!" "§A¥²¶·¿ï¾Ü¯Á¤ÞÄæ¦ì!" - -"Constraint" "­­¨î" - -"The script must have a name" "¸}¥»¥²¶·¦³¤@­Ó¦W¦r" - -"Save" "Àx¦s" - -"Exit" " °h¥X " - -"Inherits" "Ä~©Ó" - -"Delete field" "§R°£Äæ¦ì" - -"About" " Ãö©ó " - -"Empty field name ?" "ªÅÄæ¦ì¦W?" - -"All report information will be deleted.\n\nProceed ?" "©Ò¦³³øªí¸ê°T³£±N§R°£\n\nÄ~Äò?" - -"Host" "¥D¾÷" - -"vacuuming database %s ..." "¥¿¦b²M²z¸ê®Æ®w %s ..." - -"Indexes defined" "¯Á¤Þ¤w©w¸q" - -"You must specify field size!" "§A¥²¶·«ü©wÄæ¦ì¤j¤p!" - -"Schema '%s' already exists!" "ºõ­n '%s' ¤w¸g¦s¦b!" - -"There is another field with the same name: '%s'!\n\nReplace it ?" "¦s¦b¥t¥~¤@­ÓÄæ¦ì '%s' »P¦¹¦P¦W!\n\n´À´«¥¦?" - -"Contents" " ¤º®e " - -"Views" "¾\Äýªí" - -"Variable" "ÅܼÆ" - -"Error executing query\n\n%s\n\nPostgreSQL error message:\n%s\nPostgreSQL status:%s" "°õ¦æ¬d¸ß\n\n %s\n\n ®É¥X¿ù\n\nPostgreSQL ¿ù»~¸ê°T:\n%s \n PostgreSQL ª¬ºA :%s" - -"Filter conditions" "¹LÂo±ø¥ó" - -"Error retrieving query definition" "À˯Á¬d¸ß©w¸q¥X¿ù" - -"Error deleting view" "§R°£¾\Äýªí¥X¿ù" - -"New" "·s«Ø" - -"Tables" "ªí®æ" - -"Create" "«Ø¥ß" - -"Forms need an internal name, only literals, low case" "ªí³æ»Ý­n¤@­Ó¤º³¡¦W¦r, ­­¥Î¤p¼g¤å¦r" - -"Do you want to save the form into the database?" "§A·Q§â¸Óªí³æÀx¦s¨ì¸ê®Æ®w¤¤¶Ü?" - -"Schema '%s' was not found!" "¨S¦³§ä¨ìºõ­n '%s'!" - -"proportional" "¤ñ¨Ò" - -"Function saved!" "¨ç¼Æ¤wÀx¦s!" - -"with OIDs" "±a OID" - -"Table information" "ªí®æ©ú²Ó" - -"Error inserting new record" "´¡¤J·s°O¿ý®É¥X¿ù" - -"Error inserting new record" "´¡¤J·s°O¿ý®É¥X¿ù" - -"Column name '%s' already exists in this table!" "Äæ¦ì '%s' ¤w¦s¦b©ó¦¹ªí®æ¤¤!" - -"File" "ÀÉ®×" - -"Your table has no fields!" "§Aªºªí®æ¨S¦³Äæ¦ì!" - -"Height" "°ª«×" - -"You will always get the latest version at:" "§A¥i¥H¦b³o¸Ì§ä¨ì³Ì·sª©¥»:" - -"Form must have a name" "ªí³æ¥²¶·¦³¦W¦r" - -"Password" "±K½X" - -"Valid until (date)" "¦³®Ä¦Ü" - -"Report source" "³øªí­ì©l¸ê®Æ" - -"Allow user to create databases" "¤¹³\¥Î¤á·s¼W¸ê®Æ®w" - -"Cancel" "¨ú®ø" - -"Is clustered ?" "¦³µL«Ø¸s?" - -"Add new column" "¼W¥[·sÄæ¦ì" - -"Show SQL" "Åã¥Ü SQL" - -"New name" "·s¦W¦r" - -"Table '%s' not found!" "¨S¦³§ä¨ìªí®æ '%s'!" - -"Form name" "ªí³æ¦W" - -"Visual designer" "µøı¤Æ³]­p¾¹" - -"You choose to delete index\n\n %s \n\nProceed?" "§A±N­n§R°£¯Á¤Þ\n\n %s \n\nÄ~Äò?" - -"Error retrieving from" "À˯Á¥X¿ù" - -"Save query definition" "Àx¦s¬d¸ß©w¸q" - -"A Tcl/Tk interface to\nPostgreSQL\nby Constantin Teodorescu" "Constantin Teodorescu »s§@ªº\nPostgreSQL\n Tcl/TK ¬É­±" - -"Operation completed!" "¾Þ§@§¹¦¨!" - -"Max rows displayed in table/query view" "¦bªí®æ/¬d¸ß¾\Äýªí¤¤Åã¥Üªº³Ì¤j¦æ¼Æ" - -"Passwords do not match!" "±K½X¤£²Å!" - -"Rename" "­«·s©R¦W" - -"Entry" "°O¿ý" - -"Error retrieving schema definition" "À˯Áºõ­n©w¸q¥X¿ù" - -"This is an action query!\n\nExecute it?" "³o¬O¤@±ø°Ê§@¬d¸ß!\n\n°õ¦æ?" - -"Error retrieving view definition for" "¬°¤U­±ª«¥óÀ˯Á¾\Äýªí©w¸q¥X¿ù" - -"options" "¿ï¶µ" - -"Sequence '%s' not found!" "¥¼µo²{§Ç¦C '%s'!" - -"Text" "¤å¥»" - -"Tcl error executing pg_exec %s\n\n%s" "Tcl ¦b°õ¦æpg_exec %s\n\n%s®Éµo¥Í¿ù»~" - -"Width" "¼e" - -"You have to supply a name for this query!" "§A¥²¶·µ¹³o­Ó¬d¸ß´£¨Ñ¦W¦r!" - -"Accessing data. Please wait ..." "Ū¨ú¸ê®Æ¤¤. ½Ðµy­Ô..." - -"Report footer" "³øªíµù¸}" - -"Parameters" "°Ñ¼Æ" - -"Queries" "¬d¸ß" - -"Query '%s' already exists!" "¬d¸ß '%s' ¤w¸g¦s¦b!" - -"Font bold" "¼eÅé" - -"Query builder" "¬d¸ß»s§@¾¹" - -"Error defining view" "©w¸q¾\Äýªí¥X¿ù" - -"Top" "³»" - -"You must supply a name for your table!" "§A¥²¶·µ¹§Aªºªí®æ´£¨Ñ¤@­Ó¦W¦r!" - -"Page footer" "­¶§À" - -"Font italic" "±×Åé" - -"Field name not entered!" "¥¼¿é¤JÄæ¦ì¦W!" - -"Index name cannot be null!" "¯Á¤Þ¦W¤£¯à¬°ªÅ!" - -"Sort" "±Æ§Ç" - -"Import-Export table" "¶×¤J-¶×¥Xªí®æ" - -"Point" "ÂI" - -"type" "«¬§O" - -"You should supply a name for this sequence" "§AÀ³¸Óµ¹³o­Ó§Ç¦C´£¨Ñ¤@­Ó¦W¦r" - -"Remove link ?" "§R°£Ãì±µ?" - -"You have to supply a table name!" "§A¥²¶·´£¨Ñ¤@­Óªí®æ¦W¦r!" - -"Report header" "³øªíÀY" - -"Attributes" "ÄÝ©Ê" - -"Table '%s' already in schema" "ªí®æ '%s' ¤w¸g¦bºõ­n¤¤" - -"Username" "¥Î¤á¦W" - -"Minvalue" "³Ì¤p­È" - -"Sequence name" "§Ç¦C¦W" - -"Define sequence" "©w¸q§Ç¦C" - -"Function" "¨ç¼Æ" - -"Sorting and filtering not (yet) available from queries!\n\nPlease enter them in the query definition!" "¬d¸ß¤¤©|µLªk°µ±Æ§Ç©M¹LÂo!\n\n½Ð¦b¬d¸ß©w¸q¤¤¿é¤J¥¦­Ì!" - -"Reports" "³øªí" - -"Columns" "¦æ" - -"Indexes" "¯Á¤Þ" - -"Index" "¯Á¤Þ" - -"Permissions" "Åv­­" - -"not null" "«DªÅ" - -"Cluster index" "¸s¯Á¤Þ" - -"index columns" "¯Á¤ÞÄæ¦ì" - -"Add user" "¼W¥[¥Î¤á" - -"Change permissions" "­×§ïÅv­­" - -"select" "¿ï¾Ü" - -"update" "§ó·s" - -"insert" "´¡¤J" - -"rule" "³W«h" - -"Identification" "¼ÐÃÑ" - -"Owner ID" "©Ò¦³ªÌ ID" - -"Has primary key ?" "¦³¥DÁä¶Ü?" - -"Has rules ?" "¦³³W«h¶Ü?" - -"Statistics" "²Î­p" - -"Number of tuples" "°O¿ý¼Æ" - -"Number of pages" "­¶¼Æ" - -"Index name" "¯Á¤Þ¦W¦r" - -"Index fields" "¯Á¤ÞÄæ¦ì" - -"Index name" "¯Á¤Þ¦W¦r" - -"Index fields" "¯Á¤ÞÄæ¦ì" - -"Table OID" "ªí®æ OID" - -"View system tables" "¹î¬Ý¨t²Îªí®æ" - -"Back" "°h¦^" - -"primary key" "¥DÁä" - -"Comments" "µùÄÀ" - -"Print" "¦C¦L" - -"Class" "Ãþ§O" - -"Report preview" "³øªí¹wÄý" - -"Delete current report object?" "§R°£¥Ø«eªº³øªíª«¥ó ?" - -"Your query has been executed without error!" "§Aªº¬d¸ß¤w³Q°õ¦æ-µL¿ù»~!" - -"Visual schema designer" "µøı¤Æ¸ê®Æ®wºõ­n³]­p" - -"Query result:%s" "¬d¸ßµ²ªG; %s" - -"Loading maximum %s" "¸ü¤J³Ì¤jªº %s" - -"records..." "¬ö¿ý..." - -"Startup script" "±Ò°Ê¸}¥»" - -"Table information - %s" "ªí®æ©ú²Ó - %s" - -"Loading maximum %s records ..." "¸ü¤J¦Ü¦h %s µ§¸ê®Æ..." - -} - +array set Messages { +"Label" "¼ÐÅÒ" + +"Save schema" "Àx¦sºõ­n" + +"Is unique ?" "¬O§_°ß¤@?" + +"Report builder" "³øªí»s§@¾¹" + +"Criteria" "¼Ð·Ç" + +"FATAL ERROR upgrading PgAccess table" " PgAccess ªí®æ¦b¤É¯Å®Éµo¥Í­P©R¿ù»~" + +"Page header" "­¶­º" + +"Query name" "¬d¸ß¦W¦r" + +"Please select an object first!" "½Ð¥ý¿ï¾Ü¤@­Óª«¥ó!" + +"Fields :" "Äæ¦ì :" + +"Name" "¦W¦r" + +"File name" "ÀɮצW" + +"Detail record" "°O¿ý©ú²Ó" + +"Auto-load the last opened database at startup" "±Ò°Ê®É¦Û°Ê¸ü¤J¤W¦¸¥´¶}ªº¸ê®Æ®w" + +"Maxvalue" "³Ì¤j­È" + +"Start value" "ªì©l­È" + +"Report fields" "³øªíÄæ¦ì" + +"Test form" "´ú¸Õªí³æ" + +"Error trying to connect to database '%s' on host %s \n\nPostgreSQL error message:%s" "¸Õ¹ÏÁp±µ¥D¾÷ %s \n\nPostgreSQL ¤Wªº¸ê®Æ®w '%s' ®É¥X¿ù, ¿ù»~°T®§:%s" + +"No field type ?" "µLÄæ¦ì«¬§O?" + +"User without name?" "¥Î¤á¨S¦³¦W¦r?" + +"You have to supply a name for this schema!" "§A¥²¶·µ¹³o­Óºõ­n«ü©w¤@­Ó¦W¦r!" + +"Last value" "³Ì«á­È" + +"Preferences" " ­Ó¤H³]©w" + +"View '%s' already exists!\nOverwrite ?" "¾\Äýªí '%s' ¤w¸g¦s¦b!\n Âл\?" + +"You have to select an index!" "§A¥²¶·¿ï©w¤@­Ó¯Á¤Þ!" + +"Field type" "Äæ¦ì«¬§O" + +"Script name" "¸}¥»¦W¦r" + +"Reload" "­«·s¸ü¤J" + +"Remove table %s from query?" "±q¬d¸ß¤¤§R°£ªí®æ %s?" + +"SQL window" " SQL µøµ¡" + +"Allow user to create other users" "¤¹³\¥Î¤á·s¼W¨ä¥¦¥Î¤á" + +"Delete current record ?" "§R°£¥Ø«e°O¿ý?" + +"List box" "¦Cªí®Ø" + +"Save to query builder" "Àx¦s¨ì¬d¸ß»s§@¾¹" + +"fixed width" "©w¼e" + +"Scripts" "¸}¥»" + +"Yes" "¬O" + +"Add label" "¼W¥[¼ÐÅÒ" + +"Sequence created!" "§Ç¦C¤w·s¼W!" + +"Field information" "Äæ¦ì¸ê°T" + +"Design" "³]­p" + +"Field" "Äæ¦ì" + +"You have to supply an external file name!" "§A¥²¶·´£¨Ñ¤@­Ó¥~³¡ÀɮצW!" + +"Increment" "¼W¥[" + +"No" "§_" + +"List box" "¦Cªí®Ø" + +"Save to query builder" "Àx¦s¨ì¬d¸ß»s§@¾¹" + +"fixed width" "©w¼e" + +"Scripts" "¸}¥»" + +"Yes" "¬O" + +"Add label" "¼W¥[¼ÐÅÒ" + +"Sequence created!" "§Ç¦C¤w·s¼W!" + +"Field information" "Äæ¦ì¸ê°T" + +"Design" "³]­p" + +"Field" "Äæ¦ì" + +"You have to supply an external file name!" "§A¥²¶·´£¨Ñ¤@­Ó¥~³¡ÀɮצW!" + +"Increment" "¼W¥[" + +"No" "§_" + +"Form design" "ªí³æ³]­p" + +"You must supply a return type!" "§A¥²¶·´£¨Ñ¤@ºØ¶Ç¦^«¬§O!" + +"Remove field from result ?" "±qµ²ªG¤¤§R°£Äæ¦ì?" + +"There is another object (a %s) with the same name.\nPlease change it!" "¦s¦b¥t¥~¤@­Ó¦P¦Wª«¥ó (%s).\n ½Ð§ï¦W!" + +"This query has no commands?" "³o±ø¬d¸ß¨S¦³©R¥O?" + +"Execute query" "°õ¦æ¬d¸ß" + +"field cannot be null" "Äæ¦ì¤£¯à¬°ªÅ" + +"Help" "»¡©ú" + +"Rename column" "­«·s©R¦WÄæ¦ì" + +"Database" "¸ê®Æ®w" + +"Information" "¸ê°T" + +"Close" "Ãö³¬ " + +"Command" "©R¥O" + +"Table" "ªí®æ" + +"verify password" "ÅçÃÒ±K½X" + +"Vacuum" "²M²z" + +"Default value" "¹w³]­È" + +"Import" "¶×¤J" + +"Delete index" "§R°£¯Á¤Þ" + +"Move up" "¦V¤W²¾" + +"index properties" "¯Á¤ÞÄÝ©Ê" + +"check" "Àˬd" + +"Create new table" "«Ø¥ß·sªí®æ" + +"Visual query designer" "µøı¤Æ¬d¸ß³]­p¾¹" + +"Delete all" "¥þ³¡§R°£" + +"You are going to delete\n\n %s \n\nProceed?" "§A¥¿·Ç³Æ§R°£\n\n %s \n\nÄ~Äò?" + +"Schema name" "ºõ­n¦W" + +"Error executing query" "°õ¦æ¬d¸ß¥X¿ù" + +"Report name" "³øªí¦W¦r" + +"Add field" "¼W¥[Äæ¦ì" + +"Field name" "Äæ¦ì¦W" + +"FATAL ERROR searching for PgAccess system tables" "·j¯Á PgAccess ¨t²Îªí®æ®Éµo¥Í­P©R¿ù»~" + +"A big number of rows displayed in table view will take a lot of memory!" "¦b¾\Äýªí¸ÌÅã¥Ü¤j¶qªº°O¿ý¦C±N·|¨Ï¥Î¤j¶q°O¾ÐÅé!" + +"Preview" "¹wÄý" + +"Users" "¥Î¤á" + +"Owner" "©Ò¦³ªÌ" + +"Form's window internal name" "ªí³æªºµøµ¡¤º³¡¦W¦r" + +"Sort field" "±Æ§ÇÄæ¦ì" + +"New name is the same as the old one!" "·s¡B¦W¦r¬Û¦P!" + +"Warning" "ĵ§i" + +"Suggestions at" "½Ð§â«Øijµoµ¹" + +"Functions" "¨ç¼Æ" + +"Schema" "ºõ­n" + +"Open" "¶}±Ò " + +"size" "¤Ø¤o" + +"Delete" "§R°£" + +"Returns" "¶Ç¦^­È" + +"Define new user" "©w¸q·s¥Î¤á" + +"Move down" "¦V¤U²¾" + +"Design script" "³]­p¸}¥»" + +"Check box" "¦h¿ï®Ø" + +"FINAL WARNING" "³Ì«áĵ§i" + +"Add table" "¼W¥[ªí®æ" + +"Table viewer font" "ªí®æ¬d¬Ý¾¹¦rÅé" + +"The field type is not specified!" "Äæ¦ì«¬§O¥¼«ü©w!" + +"Close test form" "Ãö³¬´ú¸Õªí³æ" + +"Export table" " ¶×¥Xªí®æ " + +"Add new index" "¼W¥[·s¯Á¤Þ" + +"Left" "¥ª" + +"Field delimiter" "Äæ¦ì¤À¹j²Å" + +"Add formula" "¼W¥[¤½¦¡" + +"Open database" "¶}±Ò¸ê®Æ®w" + +"Return" "¶Ç¦^" + +"Changed fonts may appear in the next working session!" "¦rÅé­×§ï±N¦b¤U­Ó¤u§@·|´Á¤¤¥Í®Ä!" + +"Error" "¿ù»~" + +"Enter a field name" "¿é¤JÄæ¦ì¦W" + +"field name" "Äæ¦ì¦W" + +"Forms" "ªí³æ" + +"Cannot add column" "µLªk°l¥[Äæ¦ì" + +"Clean" "²MªÅ" + +"Delete all objects ?" "§R°£©Ò¦³ª«¥ó?" + +"Preferred language" "°¾¦n»y¨¥" + +"Execute SQL" "°õ¦æ SQL" + +"Sequences" "§Ç¦C" + +"Button" "«ö¶s" + +"Language" "»y¨¥" + +"Query '%s' was not found!" "¨S¦³§ä¨ì¬d¸ß '%s'" + +"Object" "ª«¥ó" + +"Font fixed" "©T©w¦rÅé" + +"Table name" "ªí®æ¦W" + +"Export" "¶×¥X" + +"Change user" "§ó§ï¥Î¤á" + +"You must give object a new name!" "§A¥²¶·µ¹ª«¥ó¤@­Ó·s¦W¦r!" + +"Query" "¬d¸ß" + +"User name" "¥Î¤á¦W" + +"Font normal" "¥¿±`¦rÅé" + +"Import table" " ¶×¤Jªí®æ " + +"Toolbar" "¤u¨ã¦C" + +"Radio btn" "³æ¿ï«ö¶s" + +"You must supply a name for this function!" "§A¥²¶·µ¹³o­Ó¨ç¼Æ´£¨Ñ¤@­Ó¦W¦r!" + +"You have to select index fields!" "§A¥²¶·¿ï¾Ü¯Á¤ÞÄæ¦ì!" + +"Constraint" "­­¨î" + +"The script must have a name" "¸}¥»¥²¶·¦³¤@­Ó¦W¦r" + +"Save" "Àx¦s" + +"Exit" " °h¥X " + +"Inherits" "Ä~©Ó" + +"Delete field" "§R°£Äæ¦ì" + +"About" " Ãö©ó " + +"Empty field name ?" "ªÅÄæ¦ì¦W?" + +"All report information will be deleted.\n\nProceed ?" "©Ò¦³³øªí¸ê°T³£±N§R°£\n\nÄ~Äò?" + +"Host" "¥D¾÷" + +"vacuuming database %s ..." "¥¿¦b²M²z¸ê®Æ®w %s ..." + +"Indexes defined" "¯Á¤Þ¤w©w¸q" + +"You must specify field size!" "§A¥²¶·«ü©wÄæ¦ì¤j¤p!" + +"Schema '%s' already exists!" "ºõ­n '%s' ¤w¸g¦s¦b!" + +"There is another field with the same name: '%s'!\n\nReplace it ?" "¦s¦b¥t¥~¤@­ÓÄæ¦ì '%s' »P¦¹¦P¦W!\n\n´À´«¥¦?" + +"Contents" " ¤º®e " + +"Views" "¾\Äýªí" + +"Variable" "ÅܼÆ" + +"Error executing query\n\n%s\n\nPostgreSQL error message:\n%s\nPostgreSQL status:%s" "°õ¦æ¬d¸ß\n\n %s\n\n ®É¥X¿ù\n\nPostgreSQL ¿ù»~¸ê°T:\n%s \n PostgreSQL ª¬ºA :%s" + +"Filter conditions" "¹LÂo±ø¥ó" + +"Error retrieving query definition" "À˯Á¬d¸ß©w¸q¥X¿ù" + +"Error deleting view" "§R°£¾\Äýªí¥X¿ù" + +"New" "·s«Ø" + +"Tables" "ªí®æ" + +"Create" "«Ø¥ß" + +"Forms need an internal name, only literals, low case" "ªí³æ»Ý­n¤@­Ó¤º³¡¦W¦r, ­­¥Î¤p¼g¤å¦r" + +"Do you want to save the form into the database?" "§A·Q§â¸Óªí³æÀx¦s¨ì¸ê®Æ®w¤¤¶Ü?" + +"Schema '%s' was not found!" "¨S¦³§ä¨ìºõ­n '%s'!" + +"proportional" "¤ñ¨Ò" + +"Function saved!" "¨ç¼Æ¤wÀx¦s!" + +"with OIDs" "±a OID" + +"Table information" "ªí®æ©ú²Ó" + +"Error inserting new record" "´¡¤J·s°O¿ý®É¥X¿ù" + +"Error inserting new record" "´¡¤J·s°O¿ý®É¥X¿ù" + +"Column name '%s' already exists in this table!" "Äæ¦ì '%s' ¤w¦s¦b©ó¦¹ªí®æ¤¤!" + +"File" "ÀÉ®×" + +"Your table has no fields!" "§Aªºªí®æ¨S¦³Äæ¦ì!" + +"Height" "°ª«×" + +"You will always get the latest version at:" "§A¥i¥H¦b³o¸Ì§ä¨ì³Ì·sª©¥»:" + +"Form must have a name" "ªí³æ¥²¶·¦³¦W¦r" + +"Password" "±K½X" + +"Valid until (date)" "¦³®Ä¦Ü" + +"Report source" "³øªí­ì©l¸ê®Æ" + +"Allow user to create databases" "¤¹³\¥Î¤á·s¼W¸ê®Æ®w" + +"Cancel" "¨ú®ø" + +"Is clustered ?" "¦³µL«Ø¸s?" + +"Add new column" "¼W¥[·sÄæ¦ì" + +"Show SQL" "Åã¥Ü SQL" + +"New name" "·s¦W¦r" + +"Table '%s' not found!" "¨S¦³§ä¨ìªí®æ '%s'!" + +"Form name" "ªí³æ¦W" + +"Visual designer" "µøı¤Æ³]­p¾¹" + +"You choose to delete index\n\n %s \n\nProceed?" "§A±N­n§R°£¯Á¤Þ\n\n %s \n\nÄ~Äò?" + +"Error retrieving from" "À˯Á¥X¿ù" + +"Save query definition" "Àx¦s¬d¸ß©w¸q" + +"A Tcl/Tk interface to\nPostgreSQL\nby Constantin Teodorescu" "Constantin Teodorescu »s§@ªº\nPostgreSQL\n Tcl/TK ¬É­±" + +"Operation completed!" "¾Þ§@§¹¦¨!" + +"Max rows displayed in table/query view" "¦bªí®æ/¬d¸ß¾\Äýªí¤¤Åã¥Üªº³Ì¤j¦æ¼Æ" + +"Passwords do not match!" "±K½X¤£²Å!" + +"Rename" "­«·s©R¦W" + +"Entry" "°O¿ý" + +"Error retrieving schema definition" "À˯Áºõ­n©w¸q¥X¿ù" + +"This is an action query!\n\nExecute it?" "³o¬O¤@±ø°Ê§@¬d¸ß!\n\n°õ¦æ?" + +"Error retrieving view definition for" "¬°¤U­±ª«¥óÀ˯Á¾\Äýªí©w¸q¥X¿ù" + +"options" "¿ï¶µ" + +"Sequence '%s' not found!" "¥¼µo²{§Ç¦C '%s'!" + +"Text" "¤å¥»" + +"Tcl error executing pg_exec %s\n\n%s" "Tcl ¦b°õ¦æpg_exec %s\n\n%s®Éµo¥Í¿ù»~" + +"Width" "¼e" + +"You have to supply a name for this query!" "§A¥²¶·µ¹³o­Ó¬d¸ß´£¨Ñ¦W¦r!" + +"Accessing data. Please wait ..." "Ū¨ú¸ê®Æ¤¤. ½Ðµy­Ô..." + +"Report footer" "³øªíµù¸}" + +"Parameters" "°Ñ¼Æ" + +"Queries" "¬d¸ß" + +"Query '%s' already exists!" "¬d¸ß '%s' ¤w¸g¦s¦b!" + +"Font bold" "¼eÅé" + +"Query builder" "¬d¸ß»s§@¾¹" + +"Error defining view" "©w¸q¾\Äýªí¥X¿ù" + +"Top" "³»" + +"You must supply a name for your table!" "§A¥²¶·µ¹§Aªºªí®æ´£¨Ñ¤@­Ó¦W¦r!" + +"Page footer" "­¶§À" + +"Font italic" "±×Åé" + +"Field name not entered!" "¥¼¿é¤JÄæ¦ì¦W!" + +"Index name cannot be null!" "¯Á¤Þ¦W¤£¯à¬°ªÅ!" + +"Sort" "±Æ§Ç" + +"Import-Export table" "¶×¤J-¶×¥Xªí®æ" + +"Point" "ÂI" + +"type" "«¬§O" + +"You should supply a name for this sequence" "§AÀ³¸Óµ¹³o­Ó§Ç¦C´£¨Ñ¤@­Ó¦W¦r" + +"Remove link ?" "§R°£Ãì±µ?" + +"You have to supply a table name!" "§A¥²¶·´£¨Ñ¤@­Óªí®æ¦W¦r!" + +"Report header" "³øªíÀY" + +"Attributes" "ÄÝ©Ê" + +"Table '%s' already in schema" "ªí®æ '%s' ¤w¸g¦bºõ­n¤¤" + +"Username" "¥Î¤á¦W" + +"Minvalue" "³Ì¤p­È" + +"Sequence name" "§Ç¦C¦W" + +"Define sequence" "©w¸q§Ç¦C" + +"Function" "¨ç¼Æ" + +"Sorting and filtering not (yet) available from queries!\n\nPlease enter them in the query definition!" "¬d¸ß¤¤©|µLªk°µ±Æ§Ç©M¹LÂo!\n\n½Ð¦b¬d¸ß©w¸q¤¤¿é¤J¥¦­Ì!" + +"Reports" "³øªí" + +"Columns" "¦æ" + +"Indexes" "¯Á¤Þ" + +"Index" "¯Á¤Þ" + +"Permissions" "Åv­­" + +"not null" "«DªÅ" + +"Cluster index" "¸s¯Á¤Þ" + +"index columns" "¯Á¤ÞÄæ¦ì" + +"Add user" "¼W¥[¥Î¤á" + +"Change permissions" "­×§ïÅv­­" + +"select" "¿ï¾Ü" + +"update" "§ó·s" + +"insert" "´¡¤J" + +"rule" "³W«h" + +"Identification" "¼ÐÃÑ" + +"Owner ID" "©Ò¦³ªÌ ID" + +"Has primary key ?" "¦³¥DÁä¶Ü?" + +"Has rules ?" "¦³³W«h¶Ü?" + +"Statistics" "²Î­p" + +"Number of tuples" "°O¿ý¼Æ" + +"Number of pages" "­¶¼Æ" + +"Index name" "¯Á¤Þ¦W¦r" + +"Index fields" "¯Á¤ÞÄæ¦ì" + +"Index name" "¯Á¤Þ¦W¦r" + +"Index fields" "¯Á¤ÞÄæ¦ì" + +"Table OID" "ªí®æ OID" + +"View system tables" "¹î¬Ý¨t²Îªí®æ" + +"Back" "°h¦^" + +"primary key" "¥DÁä" + +"Comments" "µùÄÀ" + +"Print" "¦C¦L" + +"Class" "Ãþ§O" + +"Report preview" "³øªí¹wÄý" + +"Delete current report object?" "§R°£¥Ø«eªº³øªíª«¥ó ?" + +"Your query has been executed without error!" "§Aªº¬d¸ß¤w³Q°õ¦æ-µL¿ù»~!" + +"Visual schema designer" "µøı¤Æ¸ê®Æ®wºõ­n³]­p" + +"Query result:%s" "¬d¸ßµ²ªG; %s" + +"Loading maximum %s" "¸ü¤J³Ì¤jªº %s" + +"records..." "¬ö¿ý..." + +"Startup script" "±Ò°Ê¸}¥»" + +"Table information - %s" "ªí®æ©ú²Ó - %s" + +"Loading maximum %s records ..." "¸ü¤J¦Ü¦h %s µ§¸ê®Æ..." + +} + diff --git a/src/bin/pgaccess/lib/languages/euskara b/src/bin/pgaccess/lib/languages/euskara index b5a33d1986..9fc30d1f85 100644 --- a/src/bin/pgaccess/lib/languages/euskara +++ b/src/bin/pgaccess/lib/languages/euskara @@ -1,532 +1,532 @@ -array set Messages { - -"Label" "Etiketa" - -"Save schema" "Salbatu Eskema" - -"Is unique ?" "Indice bakarra da?" - -"Report builder" "Txostenen Sorgailua" - -"Criteria" "Erizpide" - -"FATAL ERROR upgrading PgAccess table" "HALABEHARREZKO ERROREA gaurkotzen PgAccess-aren taula" - -"Save this query as a view" "Salbazu kontsulta hau bista bezala" - -"Page header" "Orrialdearen burua" - -"Query name" "Izen" - -"Please select an object first!" "Mesedez, aukeratu helburu bat" - -"Fields :" "Arloak" - -"Name" "Izen" - -"File name" "Artxiboaren izena" - -"Detail record" "Erregistroaren Xehetasuna" - -"Auto-load the last opened database at startup" "Hasieran base-datuen azkena automatikoki kargatzen du" - -"Maxvalue" "Balio Maximoa" - -"Start value" "Hasierako balioa" - -"Report fields" "Informearen arloak" - -"Test form" "Formulario gauzatze" - -"Error trying to connect to database '%s' on host %s \n\nPostgreSQL error -message:%s" "Errorea konektatzean base-datu '%s' %s -n serbitzailean \n\nPostgresSQL-ren mezu errorea:%s" - -"No field type ?" "Arlo-Mota ez?" - -"User without name?" "¿Izen gabeko erabiltzailea?" - -"You have to supply a name for this schema!" "Eskema honetarako izen bat hornitu behar duzu!" - -"Last value" "Azken balioa" - -"Preferences" "Lehentasunak" - -"View '%s' already exists!\nOverwrite ?" "Bista '%s' existitzen da jadanik.\nGainean idatzi?" - -"You have to select an index!" "Zuk ez duzu indizea aukeratu!" - -"Field type" "Mota" - -"Script name" "Script-aren izena" - -"Reload" "Gaurkotu" - -"Remove table %s from query?" "Ezabatu taula %s kontsultatik?" - -"SQL window" "SQL Lehioa" - -"Allow user to create other users" "Beste erabiltzaile batzuk sortzen utzi erabiltzaileari" - -"Delete current record ?" "Ezabatu oraingo erregistroa?" - -"List box" "Zerrenda" - -"Save to query builder" "Salbatu Kontsulten sorgailuan" - -"fixed width" "Zabalera fixoa" - -"Scripts" "Script" - -"Yes" "Bai" - -"Add label" "Gehitu etiketa" - -"Sequence created!" "Sekuentzia sortua!" - -"Field information" "Arloaren informazioa" - -"Design" "Diseinua" - -"Field" "Arlo" - -"You have to supply an external file name!" "Idatzi artxibo berriaren izena!" - -"Increment" "Gehikuntza" - -"No" "Ez" - -"Form design" "Formulario diseinua" - -"You must supply a return type!" "Itzultzeko mota bat hornitu behar duzu!" - -"Remove field from result ?" "Ezabatu arloa emaitzatik?" - -"There is another object (a %s) with the same name.\nPlease change it!" "Beste objektu, (%s), izen berberaz\nMesedez, aldatu izena" - -"This query has no commands?" "Kontsulta honek ez du komandorik?" - -"Execute query" "Exekutatu kontsulta" - -"field cannot be null" "Baliogabeko Arloa ezin da izan" - -"Help" "Laguntza" - -"Rename column" "Renombrar columna" - -"Database" "Datutegi" - -"Information" "Informazioa" - -"Close" "Itxi" - -"Command" "Komando" - -"Table" "Taula" - -"verify password" "Egiaztatu Pasahitza" - -"Vacuum" "Hustu" - -"Default value" "Berezko balioa" - -"Import" "Importatu" - -"Delete index" "Ezabatu Indizea" - -"Move up" "Mugi Gora" - -"index properties" "Indizearen Propietateak" - -"check" "Egiaztatu" - -"Create new table" "Sortu taula berria" - -"Visual query designer" "Kontsulten sorgailu bisuala" - -"Delete all" "Ezabatu oro" - -"You are going to delete\n\n %s \n\nProceed?" "Zuk ezabatu (ote) duzu\n\n %s -\n\nJarraitu?" - -"Schema name" "Eskemaren izena" - -"Error executing query" "Errorea Kontsulta exekutatzen" - -"Report name" "Izena" - -"Add field" "Gehitu arlo bat" - -"Field name" "Arloaren izena" - -"FATAL ERROR searching for PgAccess system tables" "HALABEHARREZKO ERROREA PgAccess-en Taula Sisteman bilatzen" - -"A big number of rows displayed in table view will take a lot of memory!" -"Oroimen handia okupatuko du zabaldutako ilada kopuru handiak" - -"Preview" "Aurretiko" - -"Users" "Erabiltzaileak" - -"Owner" "Jabea" - -"Form's window internal name" "Formulario lehioaren barne izena" - -"Sort field" "Ordenatu ...gatik" - -"New name is the same as the old one!" "Izen berria aurreko berbera da!" - -"Warning" "Oharra" - -"Suggestions at" "Iradokizuna" - -"Functions" "Funtzioak" - -"Schema" "Eskema" - -"Open" "Ireki" - -"size" "Neurria" - -"Delete" "Ezabatu" - -"Returns" "Itzuli" - -"Define new user" "Erabiltzaile berria" - -"Move down" "Mugi behera" - -"Design script" "Scripts-en Diseinua" - -"Check box" "Txekeo Kutxa" - -"FINAL WARNING" "BUKAERAKO OHARRA" - -"Add table" "Gehitu taula" - -"Table viewer font" "Letra-mota Taula" - -"The field type is not specified!" "Arlo-mota ez da zehaztua izan!" - -"Close test form" "Itxi formularioaren froga" - -"Export table" "Exportatu taula" - -"Add new index" "Gehitu indize berria" - -"Left" "Ezkerra" - -"Field delimiter" "Mugagailu" - -"Add formula" "Gehitu formula" - -"Open database" "Ireki datutegi" - -"Return" "Itzuli" - -"Changed fonts may appear in the next working session!" "Iturrien aldaketa hurrengo saioan azalduko da" - -"Error" "Errore" - -"Enter a field name" "Arlo-izena eman" - -"field name" "Arloaren izena" - -"Forms" "Formularioak" - -"Cannot add column" "Ezin dut gehitu zutabea" - -"Clean" "Garbitu" - -"Delete all objects ?" "Ezabatu objektu oro?" - -"Preferred language" "Lengoaia hobetsia" - -"Execute SQL" "SQL exekutatu" - -"Sequences" "Sekuentziak" - -"Button" "Botoi" - -"Language" "Lengoaia" - -"Query '%s' was not found!" "Kontsulta '%s' ez zen aurkitu" - -"Object" "Objektu" - -"Font fixed" "Iturri fixoa" - -"Table name" "Taularen izena" - -"Export" "Exportatu" - -"Change user" "Aldatu erabiltzailea" - -"You must give object a new name!" "Zuk izen berri bat eman behar diozu objektuari!" - -"Query" "Kontsulta" - -"User name" "Erabiltzailearen izena" - -"Font normal" "Iturri normala" - -"Import table" "Importatu Taula" - -"Toolbar" "Tresnen barra" - -"Radio btn" "Radio Botio" - -"You must supply a name for this function!" "Zuk izen bat eman behar diozu Funtzio honi!" - -"You have to select index fields!" "Indize arloa aukeratu behar duzu!" - -"Constraint" "Coacción" - -"The script must have a name" "Script-ak izen bat behar du izan" - -"Save" "Gorde" - -"Exit" "Irten" - -"Inherits" "Heredatu" - -"Delete field" "Ezabatu arloa" - -"About" "PGaccess-i buruz" - -"Empty field name ?" "Arlo izenik ez?" - -"All report information will be deleted.\n\nProceed ?" "Txostenaren informazio oro ezabatuko da.\n\nJarraitu?" - -"Host" "Zerbitzari" - -"vacuuming database %s ..." "Datutegi %s hustutzen..." - -"Indexes defined" "Definitu indizeak" - -"You must specify field size!" "Arloaren neurria zehaztu behar duzu" - -"Schema '%s' already exists!" "Eskema '%s' existitzen da!" - -"There is another field with the same name: '%s'!\n\nReplace it ?" "Beste arlo bat dago izen berberaz: '%s' \n\nOrdezkatu nahi?" - -"Contents" "Edukina" - -"Views" "Bistak" - -"Variable" "Aldagai" - -"Error executing query\n\n%s\n\nPostgreSQL error message:\n%s\nPostgreSQL -status:%s" "Errorea kontsulta exekutatzen:\n\n%s\n\nPostgreSQL-aren mezu errorea:\n%s\nStatus:%s" - -"Filter conditions" "Iragazkiaren baldintzak" - -"Error retrieving query definition" "Errorea errekuperatzen kontsultaren definizioa" -"Error deleting view" "Errorea ezabatzen bista" - -"New" "Berri" - -"Tables" "Taulak" - -"Create" "Sortu" - -"Forms need an internal name, only literals, low case" "Formularioak barne izena behar du, letrak soilik, letra xehez" - -"Do you want to save the form into the database?" "Datutegian formularioa gorde nahi duzu?" - -"Schema '%s' was not found!" "Eskema '%s' ez zen aurkitu!" - -"proportional" "Proportzional" - -"Function saved!" "Funtzio gordeta!" - -"with OIDs" " OID-ekin" - -"Table information" "Taularen informazioa" - -"Error inserting new record" "Errorea txertxatzen erregistro berria" - -"Column name '%s' already exists in this table!" "Taula honetan existitzen da zutabearen izena '%s'!" - -"File" "Artxibo" - -"Your table has no fields!" "Taulak ez du arlorik!" - -"Height" "Garaiera" - -"You will always get the latest version at:" "Beti azken bertsioa eskuratuko duzu hemen:" - -"Form must have a name" "Formularioak izen bat behar du!" - -"Password" "Pasahitz" - -"Valid until (date)" "Balioduna ...arte (data)" - -"Report source" "Datuen jatorria" - -"Allow user to create databases" "Baimendu erabiltzaileari datutegi sortzeko" - -"Cancel" "Ezeztatu" - -"Is clustered ?" "Multzokaturik dago?" - -"Add new column" "Gehitu zutabe berria" - -"Show SQL" "Erakutsi SQL" - -"New name" "Izen berria" - -"Table '%s' not found!" "Taula '%s' ez da aurkitzen!" - -"Form name" "Formularioaren izena" - -"Visual designer" "Diseinagailu Bisuala" - -"You choose to delete index\n\n %s \n\nProceed?" "Hautatu duzu indize\n\n %s ezabatu\n\nJarraitu?" - -"Error retrieving from" "Errorea kargatzen" - -"Save query definition" "Salbatu kontsultaren definizioa" - -"A Tcl/Tk interface to\nPostgreSQL\nby Constantin Teodorescu" "Tcl/Tk interfaze bat\nPostgreSQL-rako\nConstantin Teodorescu-ren eskutik" - -"Operation completed!" "Eragiketa Osatua!" - -"Max rows displayed in table/query view" "Ilada maximoak taula/kontsultan erakutsiak" - -"Passwords do not match!" "Pasahitz ez baliozkoa!" - -"Rename" "Berrizendu" - -"Entry" "Sarrera" - -"Error retrieving schema definition" "Errorea errekuperatzen eskemaren definizioa" - -"This is an action query!\n\nExecute it?" "Hau kontsulta ekintza da!\n\nExekutatu?" - -"Error retrieving view definition for" "Errorea errekuperatzen definizioa ...(ta)rako" - -"options" "Hautabideak" - -"Sequence '%s' not found!" "¡Sekuentzia '%s' ez aurkitua!" - -"Text" "Testu" - -"Tcl error executing pg_exec %s\n\n%s" "Tcl Errorea exekutatzen pg_exec -%s\n\n%s" - -"Width" "Zabalera" - -"You have to supply a name for this query!" "Izen bat eman behar diozu kontsulta honi" - -"Accessing data. Please wait ..." "Datuen sarbidea. Itxaron, mesedez..." - -"Report footer" "Txostenaren oina" - -"Parameters" "Parametroak" - -"Queries" "Kontsultak" - -"Query '%s' already exists!" "Konsulta '%s' existitzen da jadanik!" - -"Font bold" "Iturria lodiz" - -"Query builder" "Kontsulten sorgailua" - -"Error defining view" "Errorea bistaren definizioan" - -"Top" "Gora" - -"You must supply a name for your table!" "Zure taularako izen bat eman behar duzu!" - -"Page footer" "Orrialdearen oina" - -"Font italic" "Iturri Italikoa" - -"Field name not entered!" "Arlo-izena ez metatua!" - -"Index name cannot be null!" "Indizearen izena ezin da izan nulu!" - -"Sort" "Ordenatu" - -"Import-Export table" "Inportatu/Exportatu taula" - -"Point" "Puntu" - -"type" "Mota" - -"You should supply a name for this sequence" "Izen bat eman beharko zenuke sekuentzia honetarako" - -"Remove link ?" "Ezabatu lotura?" - -"You have to supply a table name!" "Taula-izen bat eman behar duzu!" - -"Report header" "Txostenaren burua" - -"Attributes" "Atributuak" - -"Table '%s' already in schema" "Taula '%s' eskeman existitzen da jadanik!" - -"Username" "Erabiltzaile" - -"Minvalue" "Balio minimoa" - -"Sequence name" "Sekuentziaren Izena" - -"Define sequence" "Definitu sekuentzia" - -"Function" "Funtzio" - -"Sorting and filtering not (yet) available from queries!\n\nPlease enter -them in the query definition!" "Ordenatzen eta iragazten, kontsultak egiteko prest ez!\n\nMesedez, sartu kontsultaren definizioan" - -"Reports" "Txostenak" - -"primary key" "Lehen gakoa" - -"Back" "Atzean" - -"Columns" "Zutabeak" - -"Indexes" "Indizeak" - -"Permissions" "Baimenak" - -"not null" "Ez nulu" - -"Cluster index" "Indize multzokaturik" - -"index columns" "Zutabe indize" - -"Add user" "Gehitu erabiltzailea" - -"Change permissions" "Aldatu baimenak" - -"select" "Aukeratu" - -"update" "Gaurkotu" - -"insert" "Txertatu" - -"rule" "Arau" - -"Identification" "Identifikazio" - -"Owner ID" "Jabearen ID" - -"Has primary key ?" "Gako primarioa du?" - -"Has rules ?" "Arauak ditu?" - -"Statistics" "Estatika" - -"Number of tuples" "Tupleen kopurua" - -"Number of pages" "Orrialde kopurua" - -"Index name" "Indizearen izena" - -"Index fields" "Arlo indize" - -"Table OID" "Taularen OID" -} - +array set Messages { + +"Label" "Etiketa" + +"Save schema" "Salbatu Eskema" + +"Is unique ?" "Indice bakarra da?" + +"Report builder" "Txostenen Sorgailua" + +"Criteria" "Erizpide" + +"FATAL ERROR upgrading PgAccess table" "HALABEHARREZKO ERROREA gaurkotzen PgAccess-aren taula" + +"Save this query as a view" "Salbazu kontsulta hau bista bezala" + +"Page header" "Orrialdearen burua" + +"Query name" "Izen" + +"Please select an object first!" "Mesedez, aukeratu helburu bat" + +"Fields :" "Arloak" + +"Name" "Izen" + +"File name" "Artxiboaren izena" + +"Detail record" "Erregistroaren Xehetasuna" + +"Auto-load the last opened database at startup" "Hasieran base-datuen azkena automatikoki kargatzen du" + +"Maxvalue" "Balio Maximoa" + +"Start value" "Hasierako balioa" + +"Report fields" "Informearen arloak" + +"Test form" "Formulario gauzatze" + +"Error trying to connect to database '%s' on host %s \n\nPostgreSQL error +message:%s" "Errorea konektatzean base-datu '%s' %s -n serbitzailean \n\nPostgresSQL-ren mezu errorea:%s" + +"No field type ?" "Arlo-Mota ez?" + +"User without name?" "¿Izen gabeko erabiltzailea?" + +"You have to supply a name for this schema!" "Eskema honetarako izen bat hornitu behar duzu!" + +"Last value" "Azken balioa" + +"Preferences" "Lehentasunak" + +"View '%s' already exists!\nOverwrite ?" "Bista '%s' existitzen da jadanik.\nGainean idatzi?" + +"You have to select an index!" "Zuk ez duzu indizea aukeratu!" + +"Field type" "Mota" + +"Script name" "Script-aren izena" + +"Reload" "Gaurkotu" + +"Remove table %s from query?" "Ezabatu taula %s kontsultatik?" + +"SQL window" "SQL Lehioa" + +"Allow user to create other users" "Beste erabiltzaile batzuk sortzen utzi erabiltzaileari" + +"Delete current record ?" "Ezabatu oraingo erregistroa?" + +"List box" "Zerrenda" + +"Save to query builder" "Salbatu Kontsulten sorgailuan" + +"fixed width" "Zabalera fixoa" + +"Scripts" "Script" + +"Yes" "Bai" + +"Add label" "Gehitu etiketa" + +"Sequence created!" "Sekuentzia sortua!" + +"Field information" "Arloaren informazioa" + +"Design" "Diseinua" + +"Field" "Arlo" + +"You have to supply an external file name!" "Idatzi artxibo berriaren izena!" + +"Increment" "Gehikuntza" + +"No" "Ez" + +"Form design" "Formulario diseinua" + +"You must supply a return type!" "Itzultzeko mota bat hornitu behar duzu!" + +"Remove field from result ?" "Ezabatu arloa emaitzatik?" + +"There is another object (a %s) with the same name.\nPlease change it!" "Beste objektu, (%s), izen berberaz\nMesedez, aldatu izena" + +"This query has no commands?" "Kontsulta honek ez du komandorik?" + +"Execute query" "Exekutatu kontsulta" + +"field cannot be null" "Baliogabeko Arloa ezin da izan" + +"Help" "Laguntza" + +"Rename column" "Renombrar columna" + +"Database" "Datutegi" + +"Information" "Informazioa" + +"Close" "Itxi" + +"Command" "Komando" + +"Table" "Taula" + +"verify password" "Egiaztatu Pasahitza" + +"Vacuum" "Hustu" + +"Default value" "Berezko balioa" + +"Import" "Importatu" + +"Delete index" "Ezabatu Indizea" + +"Move up" "Mugi Gora" + +"index properties" "Indizearen Propietateak" + +"check" "Egiaztatu" + +"Create new table" "Sortu taula berria" + +"Visual query designer" "Kontsulten sorgailu bisuala" + +"Delete all" "Ezabatu oro" + +"You are going to delete\n\n %s \n\nProceed?" "Zuk ezabatu (ote) duzu\n\n %s +\n\nJarraitu?" + +"Schema name" "Eskemaren izena" + +"Error executing query" "Errorea Kontsulta exekutatzen" + +"Report name" "Izena" + +"Add field" "Gehitu arlo bat" + +"Field name" "Arloaren izena" + +"FATAL ERROR searching for PgAccess system tables" "HALABEHARREZKO ERROREA PgAccess-en Taula Sisteman bilatzen" + +"A big number of rows displayed in table view will take a lot of memory!" +"Oroimen handia okupatuko du zabaldutako ilada kopuru handiak" + +"Preview" "Aurretiko" + +"Users" "Erabiltzaileak" + +"Owner" "Jabea" + +"Form's window internal name" "Formulario lehioaren barne izena" + +"Sort field" "Ordenatu ...gatik" + +"New name is the same as the old one!" "Izen berria aurreko berbera da!" + +"Warning" "Oharra" + +"Suggestions at" "Iradokizuna" + +"Functions" "Funtzioak" + +"Schema" "Eskema" + +"Open" "Ireki" + +"size" "Neurria" + +"Delete" "Ezabatu" + +"Returns" "Itzuli" + +"Define new user" "Erabiltzaile berria" + +"Move down" "Mugi behera" + +"Design script" "Scripts-en Diseinua" + +"Check box" "Txekeo Kutxa" + +"FINAL WARNING" "BUKAERAKO OHARRA" + +"Add table" "Gehitu taula" + +"Table viewer font" "Letra-mota Taula" + +"The field type is not specified!" "Arlo-mota ez da zehaztua izan!" + +"Close test form" "Itxi formularioaren froga" + +"Export table" "Exportatu taula" + +"Add new index" "Gehitu indize berria" + +"Left" "Ezkerra" + +"Field delimiter" "Mugagailu" + +"Add formula" "Gehitu formula" + +"Open database" "Ireki datutegi" + +"Return" "Itzuli" + +"Changed fonts may appear in the next working session!" "Iturrien aldaketa hurrengo saioan azalduko da" + +"Error" "Errore" + +"Enter a field name" "Arlo-izena eman" + +"field name" "Arloaren izena" + +"Forms" "Formularioak" + +"Cannot add column" "Ezin dut gehitu zutabea" + +"Clean" "Garbitu" + +"Delete all objects ?" "Ezabatu objektu oro?" + +"Preferred language" "Lengoaia hobetsia" + +"Execute SQL" "SQL exekutatu" + +"Sequences" "Sekuentziak" + +"Button" "Botoi" + +"Language" "Lengoaia" + +"Query '%s' was not found!" "Kontsulta '%s' ez zen aurkitu" + +"Object" "Objektu" + +"Font fixed" "Iturri fixoa" + +"Table name" "Taularen izena" + +"Export" "Exportatu" + +"Change user" "Aldatu erabiltzailea" + +"You must give object a new name!" "Zuk izen berri bat eman behar diozu objektuari!" + +"Query" "Kontsulta" + +"User name" "Erabiltzailearen izena" + +"Font normal" "Iturri normala" + +"Import table" "Importatu Taula" + +"Toolbar" "Tresnen barra" + +"Radio btn" "Radio Botio" + +"You must supply a name for this function!" "Zuk izen bat eman behar diozu Funtzio honi!" + +"You have to select index fields!" "Indize arloa aukeratu behar duzu!" + +"Constraint" "Coacción" + +"The script must have a name" "Script-ak izen bat behar du izan" + +"Save" "Gorde" + +"Exit" "Irten" + +"Inherits" "Heredatu" + +"Delete field" "Ezabatu arloa" + +"About" "PGaccess-i buruz" + +"Empty field name ?" "Arlo izenik ez?" + +"All report information will be deleted.\n\nProceed ?" "Txostenaren informazio oro ezabatuko da.\n\nJarraitu?" + +"Host" "Zerbitzari" + +"vacuuming database %s ..." "Datutegi %s hustutzen..." + +"Indexes defined" "Definitu indizeak" + +"You must specify field size!" "Arloaren neurria zehaztu behar duzu" + +"Schema '%s' already exists!" "Eskema '%s' existitzen da!" + +"There is another field with the same name: '%s'!\n\nReplace it ?" "Beste arlo bat dago izen berberaz: '%s' \n\nOrdezkatu nahi?" + +"Contents" "Edukina" + +"Views" "Bistak" + +"Variable" "Aldagai" + +"Error executing query\n\n%s\n\nPostgreSQL error message:\n%s\nPostgreSQL +status:%s" "Errorea kontsulta exekutatzen:\n\n%s\n\nPostgreSQL-aren mezu errorea:\n%s\nStatus:%s" + +"Filter conditions" "Iragazkiaren baldintzak" + +"Error retrieving query definition" "Errorea errekuperatzen kontsultaren definizioa" +"Error deleting view" "Errorea ezabatzen bista" + +"New" "Berri" + +"Tables" "Taulak" + +"Create" "Sortu" + +"Forms need an internal name, only literals, low case" "Formularioak barne izena behar du, letrak soilik, letra xehez" + +"Do you want to save the form into the database?" "Datutegian formularioa gorde nahi duzu?" + +"Schema '%s' was not found!" "Eskema '%s' ez zen aurkitu!" + +"proportional" "Proportzional" + +"Function saved!" "Funtzio gordeta!" + +"with OIDs" " OID-ekin" + +"Table information" "Taularen informazioa" + +"Error inserting new record" "Errorea txertxatzen erregistro berria" + +"Column name '%s' already exists in this table!" "Taula honetan existitzen da zutabearen izena '%s'!" + +"File" "Artxibo" + +"Your table has no fields!" "Taulak ez du arlorik!" + +"Height" "Garaiera" + +"You will always get the latest version at:" "Beti azken bertsioa eskuratuko duzu hemen:" + +"Form must have a name" "Formularioak izen bat behar du!" + +"Password" "Pasahitz" + +"Valid until (date)" "Balioduna ...arte (data)" + +"Report source" "Datuen jatorria" + +"Allow user to create databases" "Baimendu erabiltzaileari datutegi sortzeko" + +"Cancel" "Ezeztatu" + +"Is clustered ?" "Multzokaturik dago?" + +"Add new column" "Gehitu zutabe berria" + +"Show SQL" "Erakutsi SQL" + +"New name" "Izen berria" + +"Table '%s' not found!" "Taula '%s' ez da aurkitzen!" + +"Form name" "Formularioaren izena" + +"Visual designer" "Diseinagailu Bisuala" + +"You choose to delete index\n\n %s \n\nProceed?" "Hautatu duzu indize\n\n %s ezabatu\n\nJarraitu?" + +"Error retrieving from" "Errorea kargatzen" + +"Save query definition" "Salbatu kontsultaren definizioa" + +"A Tcl/Tk interface to\nPostgreSQL\nby Constantin Teodorescu" "Tcl/Tk interfaze bat\nPostgreSQL-rako\nConstantin Teodorescu-ren eskutik" + +"Operation completed!" "Eragiketa Osatua!" + +"Max rows displayed in table/query view" "Ilada maximoak taula/kontsultan erakutsiak" + +"Passwords do not match!" "Pasahitz ez baliozkoa!" + +"Rename" "Berrizendu" + +"Entry" "Sarrera" + +"Error retrieving schema definition" "Errorea errekuperatzen eskemaren definizioa" + +"This is an action query!\n\nExecute it?" "Hau kontsulta ekintza da!\n\nExekutatu?" + +"Error retrieving view definition for" "Errorea errekuperatzen definizioa ...(ta)rako" + +"options" "Hautabideak" + +"Sequence '%s' not found!" "¡Sekuentzia '%s' ez aurkitua!" + +"Text" "Testu" + +"Tcl error executing pg_exec %s\n\n%s" "Tcl Errorea exekutatzen pg_exec +%s\n\n%s" + +"Width" "Zabalera" + +"You have to supply a name for this query!" "Izen bat eman behar diozu kontsulta honi" + +"Accessing data. Please wait ..." "Datuen sarbidea. Itxaron, mesedez..." + +"Report footer" "Txostenaren oina" + +"Parameters" "Parametroak" + +"Queries" "Kontsultak" + +"Query '%s' already exists!" "Konsulta '%s' existitzen da jadanik!" + +"Font bold" "Iturria lodiz" + +"Query builder" "Kontsulten sorgailua" + +"Error defining view" "Errorea bistaren definizioan" + +"Top" "Gora" + +"You must supply a name for your table!" "Zure taularako izen bat eman behar duzu!" + +"Page footer" "Orrialdearen oina" + +"Font italic" "Iturri Italikoa" + +"Field name not entered!" "Arlo-izena ez metatua!" + +"Index name cannot be null!" "Indizearen izena ezin da izan nulu!" + +"Sort" "Ordenatu" + +"Import-Export table" "Inportatu/Exportatu taula" + +"Point" "Puntu" + +"type" "Mota" + +"You should supply a name for this sequence" "Izen bat eman beharko zenuke sekuentzia honetarako" + +"Remove link ?" "Ezabatu lotura?" + +"You have to supply a table name!" "Taula-izen bat eman behar duzu!" + +"Report header" "Txostenaren burua" + +"Attributes" "Atributuak" + +"Table '%s' already in schema" "Taula '%s' eskeman existitzen da jadanik!" + +"Username" "Erabiltzaile" + +"Minvalue" "Balio minimoa" + +"Sequence name" "Sekuentziaren Izena" + +"Define sequence" "Definitu sekuentzia" + +"Function" "Funtzio" + +"Sorting and filtering not (yet) available from queries!\n\nPlease enter +them in the query definition!" "Ordenatzen eta iragazten, kontsultak egiteko prest ez!\n\nMesedez, sartu kontsultaren definizioan" + +"Reports" "Txostenak" + +"primary key" "Lehen gakoa" + +"Back" "Atzean" + +"Columns" "Zutabeak" + +"Indexes" "Indizeak" + +"Permissions" "Baimenak" + +"not null" "Ez nulu" + +"Cluster index" "Indize multzokaturik" + +"index columns" "Zutabe indize" + +"Add user" "Gehitu erabiltzailea" + +"Change permissions" "Aldatu baimenak" + +"select" "Aukeratu" + +"update" "Gaurkotu" + +"insert" "Txertatu" + +"rule" "Arau" + +"Identification" "Identifikazio" + +"Owner ID" "Jabearen ID" + +"Has primary key ?" "Gako primarioa du?" + +"Has rules ?" "Arauak ditu?" + +"Statistics" "Estatika" + +"Number of tuples" "Tupleen kopurua" + +"Number of pages" "Orrialde kopurua" + +"Index name" "Indizearen izena" + +"Index fields" "Arlo indize" + +"Table OID" "Taularen OID" +} + diff --git a/src/bin/pgaccess/lib/mainlib.tcl b/src/bin/pgaccess/lib/mainlib.tcl index 5021d021db..1a625d72ca 100644 --- a/src/bin/pgaccess/lib/mainlib.tcl +++ b/src/bin/pgaccess/lib/mainlib.tcl @@ -105,18 +105,12 @@ global CurrentDB proc {cmd_Functions} {} { -global PgAcVar CurrentDB +global CurrentDB set maxim 16384 setCursor CLOCK - set dbname $PgAcVar(opendb,dbname) - if [catch {wpg_select $CurrentDB "select datlastsysoid from pg_database where datname='$dbname'" rec { - set maxim $rec(datlastsysoid) - } - }] { - catch { - wpg_select $CurrentDB "select oid from pg_database where datname='template1'" rec { - set maxim $rec(oid) - } + catch { + wpg_select $CurrentDB "select oid from pg_database where datname='template1'" rec { + set maxim $rec(oid) } } .pgaw:Main.lb delete 0 end @@ -301,17 +295,19 @@ catch { } proc {cmd_Views} {} { -global CurrentDB PgAcVar +global CurrentDB setCursor CLOCK .pgaw:Main.lb delete 0 end catch { - if {! $PgAcVar(pref,systemtables)} { - set sysconstraint "where (viewname !~ '^pg_') and (viewname !~ '^pga_')" - } else { - set sysconstraint "" + wpg_select $CurrentDB "select c.relname,count(c.relname) from pg_class C, pg_rewrite R where (relname !~ '^pg_') and (r.ev_class = C.oid) and (r.ev_type = '1') group by relname" rec { + if {$rec(count)!=0} { + set itsaview($rec(relname)) 1 + } } - wpg_select $CurrentDB "select viewname from pg_views $sysconstraint order by viewname" rec { - .pgaw:Main.lb insert end $rec(viewname) + wpg_select $CurrentDB "select relname from pg_class where (relname !~ '^pg_') and (relkind='r') and (relhasrules) order by relname" rec { + if {[info exists itsaview($rec(relname))]} { + .pgaw:Main.lb insert end $rec(relname) + } } } setCursor DEFAULT @@ -636,8 +632,6 @@ proc vTclWindow.pgaw:ImportExport {base} { if {$PgAcVar(impexp,delimiter)==""} { set sup "" } else { - # now we use WITH DELIMITER, but keep old syntax for - # backward compatibility. 2002-06-15 set sup " USING DELIMITERS '$PgAcVar(impexp,delimiter)'" } if {[.pgaw:ImportExport.expbtn cget -text]=="Import"} { @@ -695,6 +689,7 @@ proc vTclWindow.pgaw:RenameObject {base} { showError [intlmsg "You must give object a new name!"] } elseif {$PgAcVar(activetab)=="Tables"} { set retval [sql_exec noquiet "alter table \"$PgAcVar(Old_Object_Name)\" rename to \"$PgAcVar(New_Object_Name)\""] + Schema::tbl_rename $PgAcVar(Old_Object_Name) $PgAcVar(New_Object_Name) if {$retval} { sql_exec quiet "update pga_layout set tablename='$PgAcVar(New_Object_Name)' where tablename='$PgAcVar(Old_Object_Name)'" Mainlib::cmd_Tables @@ -909,11 +904,11 @@ proc vTclWindow.pgaw:About {base} { wm title $base [intlmsg "About"] label $base.l1 -borderwidth 3 -font -Adobe-Helvetica-Bold-R-Normal-*-*-180-*-*-*-*-* -relief ridge -text PgAccess label $base.l2 -relief groove -text [intlmsg "A Tcl/Tk interface to\nPostgreSQL\nby Constantin Teodorescu"] - label $base.l3 -borderwidth 0 -relief sunken -text {v 0.98.7} + label $base.l3 -borderwidth 0 -relief sunken -text {v 0.99.1} label $base.l4 -relief groove -text "[intlmsg {You will always get the latest version at:}] -http://www.flex.ro/pgaccess +http://www.pgaccess.org/ -[intlmsg {Suggestions at}] : teo@flex.ro" +[intlmsg {Suggestions at}] : developers@pgaccess.org" button $base.b1 -borderwidth 1 -command {Window destroy .pgaw:About} -text Ok place $base.l1 -x 10 -y 10 -width 196 -height 103 -anchor nw -bordermode ignore place $base.l2 -x 10 -y 115 -width 198 -height 55 -anchor nw -bordermode ignore diff --git a/src/bin/pgaccess/lib/preferences.tcl b/src/bin/pgaccess/lib/preferences.tcl index e218f1cf7b..c593013e88 100644 --- a/src/bin/pgaccess/lib/preferences.tcl +++ b/src/bin/pgaccess/lib/preferences.tcl @@ -10,8 +10,8 @@ global PgAcVar set PgAcVar(pref,autoload) 1 set PgAcVar(pref,systemtables) 0 set PgAcVar(pref,lastdb) {} - set PgAcVar(pref,lasthost) {} - set PgAcVar(pref,lastport) {} + set PgAcVar(pref,lasthost) localhost + set PgAcVar(pref,lastport) 5432 set PgAcVar(pref,username) {} set PgAcVar(pref,password) {} set PgAcVar(pref,language) english diff --git a/src/bin/pgaccess/lib/reports.tcl b/src/bin/pgaccess/lib/reports.tcl index 18a431904c..e913f51e32 100644 --- a/src/bin/pgaccess/lib/reports.tcl +++ b/src/bin/pgaccess/lib/reports.tcl @@ -1,126 +1,167 @@ namespace eval Reports { - proc {new} {} { global PgAcVar - Window show .pgaw:ReportBuilder - tkwait visibility .pgaw:ReportBuilder - init + Window show .pgaw:ReportBuilder:draft + tkwait visibility .pgaw:ReportBuilder:draft + Window show .pgaw:ReportBuilder:menu + tkwait visibility .pgaw:ReportBuilder:menu + design:init set PgAcVar(report,reportname) {} set PgAcVar(report,justpreview) 0 - focus .pgaw:ReportBuilder.e2 + focus .pgaw:ReportBuilder:menu.e2 } proc {open} {reportname} { global PgAcVar CurrentDB - Window show .pgaw:ReportBuilder - #tkwait visibility .pgaw:ReportBuilder - Window hide .pgaw:ReportBuilder + Window show .pgaw:ReportBuilder:draft + #tkwait visibility .pgaw:ReportBuilder:draft + Window hide .pgaw:ReportBuilder:draft + Window show .pgaw:ReportBuilder:menu + Window hide .pgaw:ReportBuilder:menu Window show .pgaw:ReportPreview - init + design:init set PgAcVar(report,reportname) $reportname - loadReport + design:loadReport tkwait visibility .pgaw:ReportPreview set PgAcVar(report,justpreview) 1 - preview + design:preview } proc {design} {reportname} { global PgAcVar - Window show .pgaw:ReportBuilder - tkwait visibility .pgaw:ReportBuilder - init + Window show .pgaw:ReportBuilder:draft + tkwait visibility .pgaw:ReportBuilder:draft + Window show .pgaw:ReportBuilder:menu + tkwait visibility .pgaw:ReportBuilder:menu + design:init set PgAcVar(report,reportname) $reportname - loadReport + design:loadReport set PgAcVar(report,justpreview) 0 } -proc {drawReportAreas} {} { +proc {design:close} {} { +global PgAcVar + catch {Window destroy .pgaw:ReportBuilder:draft} + catch {Window destroy .pgaw:ReportBuilder:menu} +} + + +proc {design:drawReportAreas} {} { global PgAcVar foreach rg $PgAcVar(report,regions) { - .pgaw:ReportBuilder.c delete bg_$rg - .pgaw:ReportBuilder.c create line 0 $PgAcVar(report,y_$rg) 5000 $PgAcVar(report,y_$rg) -tags [subst {bg_$rg}] - .pgaw:ReportBuilder.c create rectangle 6 [expr $PgAcVar(report,y_$rg)-3] 12 [expr $PgAcVar(report,y_$rg)+3] -fill black -tags [subst {bg_$rg mov reg}] - .pgaw:ReportBuilder.c lower bg_$rg + .pgaw:ReportBuilder:draft.c delete bg_$rg + .pgaw:ReportBuilder:draft.c create line 0 $PgAcVar(report,y_$rg) 5000 $PgAcVar(report,y_$rg) -tags [subst {bg_$rg}] + .pgaw:ReportBuilder:draft.c create rectangle 6 [expr $PgAcVar(report,y_$rg)-3] 12 [expr $PgAcVar(report,y_$rg)+3] -fill black -tags [subst {bg_$rg mov reg}] + .pgaw:ReportBuilder:draft.c lower bg_$rg } } -proc {toggleAlignMode} {} { -set bb [.pgaw:ReportBuilder.c bbox hili] -if {[.pgaw:ReportBuilder.balign cget -text]=="left"} then { - .pgaw:ReportBuilder.balign configure -text right - .pgaw:ReportBuilder.c itemconfigure hili -anchor ne - .pgaw:ReportBuilder.c move hili [expr [lindex $bb 2]-[lindex $bb 0]-3] 0 +proc {design:toggleAlignMode} {} { +set bb [.pgaw:ReportBuilder:draft.c bbox hili] +if {[.pgaw:ReportBuilder:menu.balign cget -text]=="left"} then { + .pgaw:ReportBuilder:menu.balign configure -text right + .pgaw:ReportBuilder:draft.c itemconfigure hili -anchor ne + .pgaw:ReportBuilder:draft.c move hili [expr [lindex $bb 2]-[lindex $bb 0]-3] 0 } else { - .pgaw:ReportBuilder.balign configure -text left - .pgaw:ReportBuilder.c itemconfigure hili -anchor nw - .pgaw:ReportBuilder.c move hili [expr [lindex $bb 0]-[lindex $bb 2]+3] 0 + .pgaw:ReportBuilder:menu.balign configure -text left + .pgaw:ReportBuilder:draft.c itemconfigure hili -anchor nw + .pgaw:ReportBuilder:draft.c move hili [expr [lindex $bb 0]-[lindex $bb 2]+3] 0 } } -proc {getBoldStatus} {} { - if {[.pgaw:ReportBuilder.lbold cget -relief]=="raised"} then {return Medium} else {return Bold} +proc {design:getBoldStatus} {} { + if {[.pgaw:ReportBuilder:menu.lbold cget -relief]=="raised"} then {return Medium} else {return Bold} } -proc {getItalicStatus} {} { - if {[.pgaw:ReportBuilder.lita cget -relief]=="raised"} then {return R} else {return O} +proc {design:getItalicStatus} {} { + if {[.pgaw:ReportBuilder:menu.lita cget -relief]=="raised"} then {return R} else {return O} } -proc {toggleBold} {} { - if {[getBoldStatus]=="Bold"} { - .pgaw:ReportBuilder.lbold configure -relief raised +proc {design:toggleBold} {} { + if {[design:getBoldStatus]=="Bold"} { + .pgaw:ReportBuilder:menu.lbold configure -relief raised } else { - .pgaw:ReportBuilder.lbold configure -relief sunken + .pgaw:ReportBuilder:menu.lbold configure -relief sunken } - setObjectFont + design:setObjectFont } -proc {toggleItalic} {} { - if {[getItalicStatus]=="O"} { - .pgaw:ReportBuilder.lita configure -relief raised +proc {design:toggleItalic} {} { + if {[design:getItalicStatus]=="O"} { + .pgaw:ReportBuilder:menu.lita configure -relief raised } else { - .pgaw:ReportBuilder.lita configure -relief sunken + .pgaw:ReportBuilder:menu.lita configure -relief sunken } - setObjectFont + design:setObjectFont } -proc {setFont} {} { - set temp [.pgaw:ReportBuilder.bfont cget -text] - if {$temp=="Courier"} then { - .pgaw:ReportBuilder.bfont configure -text Helvetica - } else { - .pgaw:ReportBuilder.bfont configure -text Courier +# fonts remain an issue to be dealt with +proc {design:setFont} {} { + set temp [.pgaw:ReportBuilder:menu.bfont cget -text] + switch $temp { + + Courier + {.pgaw:ReportBuilder:menu.bfont configure -text Helvetica} + + Helvetica + {.pgaw:ReportBuilder:menu.bfont configure -text Times} + + Times + {.pgaw:ReportBuilder:menu.bfont configure -text Newcenturyschlbk} + + #Newcenturyschlbk + #{.pgaw:ReportBuilder:menu.bfont configure -text Palatino} + + #Palatino + #{.pgaw:ReportBuilder:menu.bfont configure -text Utopia} + + default + {.pgaw:ReportBuilder:menu.bfont configure -text Courier} + } - setObjectFont + + design:setObjectFont } +# fills in an array with columns so formulas can access them +proc {design:getSourceFieldsForPreview} {} { +global PgAcVar CurrentDB + set PgAcVar(report,source_fields) {} + wpg_select $CurrentDB "select attnum,attname from pg_class,pg_attribute where (pg_class.relname='$PgAcVar(report,tablename)') and (pg_class.oid=pg_attribute.attrelid) and (attnum>0) order by attnum" rec { + lappend PgAcVar(report,source_fields) $rec(attname) + } +} -proc {getSourceFields} {} { +# fills in the drop box with column names +proc {design:getSourceFields} {} { global PgAcVar CurrentDB - .pgaw:ReportBuilder.lb delete 0 end + .pgaw:ReportBuilder:menu.lb delete 0 end if {$PgAcVar(report,tablename)==""} return ; #setCursor CLOCK wpg_select $CurrentDB "select attnum,attname from pg_class,pg_attribute where (pg_class.relname='$PgAcVar(report,tablename)') and (pg_class.oid=pg_attribute.attrelid) and (attnum>0) order by attnum" rec { - .pgaw:ReportBuilder.lb insert end $rec(attname) + .pgaw:ReportBuilder:menu.lb insert end $rec(attname) } #setCursor DEFAULT } -proc {hasTag} {id tg} { - if {[lsearch [.pgaw:ReportBuilder.c itemcget $id -tags] $tg]==-1} then {return 0 } else {return 1} +proc {design:hasTag} {id tg} { + if {[lsearch [.pgaw:ReportBuilder:draft.c itemcget $id -tags] $tg]==-1} then {return 0 } else {return 1} } -proc {init} {} { +proc {design:init} {} { global PgAcVar set PgAcVar(report,xl_auto) 10 set PgAcVar(report,xf_auto) 10 + set PgAcVar(report,xp_auto) 10 + set PgAcVar(report,xo_auto) 10 set PgAcVar(report,regions) {rpthdr pghdr detail pgfoo rptfoo} set PgAcVar(report,y_rpthdr) 30 set PgAcVar(report,y_pghdr) 60 @@ -132,120 +173,319 @@ global PgAcVar set PgAcVar(report,e_detail) [intlmsg {Detail record}] set PgAcVar(report,e_pgfoo) [intlmsg {Page footer}] set PgAcVar(report,e_rptfoo) [intlmsg {Report footer}] - drawReportAreas + design:drawReportAreas } -proc {loadReport} {} { +proc {design:loadReport} {} { global PgAcVar CurrentDB - .pgaw:ReportBuilder.c delete all + .pgaw:ReportBuilder:draft.c delete all wpg_select $CurrentDB "select * from pga_reports where reportname='$PgAcVar(report,reportname)'" rcd { eval $rcd(reportbody) } - getSourceFields - drawReportAreas + design:changeDraftCoords + design:getSourceFields + design:drawReportAreas } +# get the preview cranking +proc {design:preview} {} { +global PgAcVar + design:previewInit + set PgAcVar(report,curr_page) 1 + if {$PgAcVar(report,last_page)>0} { + design:previewPage + } +} -proc {preview} {} { +# finds the record and page counts +proc {design:previewInit} {} { +global PgAcVar CurrentDB + Window show .pgaw:ReportPreview + set ol [.pgaw:ReportBuilder:draft.c find withtag ro] + set PgAcVar(report,prev_fields) {} + # set up the fields we need to fill with data + foreach objid $ol { + set tags [.pgaw:ReportBuilder:draft.c itemcget $objid -tags] + lappend PgAcVar(report,prev_fields) [string range [lindex $tags [lsearch -glob $tags f-*]] 2 64] + lappend PgAcVar(report,prev_fields) [lindex [.pgaw:ReportBuilder:draft.c coords $objid] 0] + lappend PgAcVar(report,prev_fields) [lindex [.pgaw:ReportBuilder:draft.c coords $objid] 1] + lappend PgAcVar(report,prev_fields) $objid + lappend PgAcVar(report,prev_fields) [lindex $tags [lsearch -glob $tags t_*]] + } + # set up all the source fields - needed for formulas + design:getSourceFieldsForPreview + # get number of records (thus the number of detail sections) + set res [pg_exec $CurrentDB "select * from \"$PgAcVar(report,tablename)\""] + set PgAcVar(report,prev_num_recs) [pg_result $res -numTuples] + # get number of detail sections per page (screw report head/foot for now) + # first: page height - (page header height + page footer height) + set pgdiff [expr {$PgAcVar(report,ph)-(($PgAcVar(report,y_pghdr)-$PgAcVar(report,y_rpthdr))+($PgAcVar(report,y_pgfoo)-$PgAcVar(report,y_detail)))}] + # second: result of first / detail height + set PgAcVar(report,prev_recs_page) [expr {round(double($pgdiff)/double($PgAcVar(report,y_detail)-$PgAcVar(report,y_pghdr)))}] + # get number of pages + set PgAcVar(report,last_page) [expr {int(ceil(double($PgAcVar(report,prev_num_recs))/double($PgAcVar(report,prev_recs_page))))}] + set PgAcVar(report,total_page) $PgAcVar(report,last_page) +} + + +# displays one section +proc {design:previewSection} {x y objid objtype py recfield} { global PgAcVar CurrentDB -Window show .pgaw:ReportPreview + +# for fields +if {$objtype=="t_f"} { + .pgaw:ReportPreview.fr.c create text $x [expr $py+$y] -text $recfield -font [.pgaw:ReportBuilder:draft.c itemcget $objid -font] -anchor [.pgaw:ReportBuilder:draft.c itemcget $objid -anchor] +} + +# for labels +if {$objtype=="t_l"} { + .pgaw:ReportPreview.fr.c create text $x [expr $py+$y] -text [.pgaw:ReportBuilder:draft.c itemcget $objid -text] -font [.pgaw:ReportBuilder:draft.c itemcget $objid -font] -anchor nw +} + +# for pictures +if {$objtype=="t_p"} { + .pgaw:ReportPreview.fr.c create image $x [expr $py+$y] -image [image create photo -file [.pgaw:ReportBuilder:draft.c itemcget $objid -image]] -anchor nw +} + +# for formulas +if {$objtype=="t_o"} { + wpg_select $CurrentDB "select * from \"$PgAcVar(report,tablename)\" limit $PgAcVar(report,prev_recs_page) offset [expr {(($PgAcVar(report,curr_page)-1)*$PgAcVar(report,prev_recs_page))}]" frec { + # assign each source field to a variable + foreach {ffield} $PgAcVar(report,source_fields) { + variable $ffield $frec($ffield) + } + } + # now flesh out and evaluate the formula + .pgaw:ReportPreview.fr.c create text $x [expr $py+$y] -text [eval [.pgaw:ReportBuilder:draft.c itemcget $objid -text]] -font [.pgaw:ReportBuilder:draft.c itemcget $objid -font] -anchor nw +} + +} + + +# displays the current page +# for now we worry about the page head/foot and detail, not report head/foot +proc {design:previewPage} {} { +global PgAcVar CurrentDB + +set sql "" +set recfield "" + .pgaw:ReportPreview.fr.c delete all -set ol [.pgaw:ReportBuilder.c find withtag ro] -set fields {} -foreach objid $ol { - set tags [.pgaw:ReportBuilder.c itemcget $objid -tags] - lappend fields [string range [lindex $tags [lsearch -glob $tags f-*]] 2 64] - lappend fields [lindex [.pgaw:ReportBuilder.c coords $objid] 0] - lappend fields [lindex [.pgaw:ReportBuilder.c coords $objid] 1] - lappend fields $objid - lappend fields [lindex $tags [lsearch -glob $tags t_*]] -} -# Parsing page header -set py 10 -foreach {field x y objid objtype} $fields { - if {$objtype=="t_l"} { - .pgaw:ReportPreview.fr.c create text $x [expr $py+$y] -text [.pgaw:ReportBuilder.c itemcget $objid -text] -font [.pgaw:ReportBuilder.c itemcget $objid -font] -anchor nw - } -} -incr py [expr $PgAcVar(report,y_pghdr)-$PgAcVar(report,y_rpthdr)] -# Parsing detail group -set di [lsearch $PgAcVar(report,regions) detail] -set y_hi $PgAcVar(report,y_detail) -set y_lo $PgAcVar(report,y_[lindex $PgAcVar(report,regions) [expr $di-1]]) -wpg_select $CurrentDB "select * from \"$PgAcVar(report,tablename)\"" rec { - foreach {field x y objid objtype} $fields { - if {($y>=$y_lo) && ($y<=$y_hi)} then { - if {$objtype=="t_f"} { - .pgaw:ReportPreview.fr.c create text $x [expr $py+$y] -text $rec($field) -font [.pgaw:ReportBuilder.c itemcget $objid -font] -anchor [.pgaw:ReportBuilder.c itemcget $objid -anchor] + +# parse the page header +set py $PgAcVar(report,y_rpthdr) +# now get the data for the section, which is the first record on the page +wpg_select $CurrentDB "select * from \"$PgAcVar(report,tablename)\" limit 1 offset [expr {(($PgAcVar(report,curr_page)-1)*$PgAcVar(report,prev_recs_page))}]" rec { + foreach {field x y objid objtype} $PgAcVar(report,prev_fields) { + if {$y < $PgAcVar(report,y_pghdr)} { + # make sure we line up the section where it was designed to go + set y [expr $y-$PgAcVar(report,y_rpthdr)] + # looking for formulas + if {$objtype=="t_f"} { + set recfield $rec($field) + } else { + set recfield "" + } + design:previewSection $x $y $objid $objtype $py $recfield } - if {$objtype=="t_l"} { - .pgaw:ReportPreview.fr.c create text $x [expr $py+$y] -text [.pgaw:ReportBuilder.c itemcget $objid -text] -font [.pgaw:ReportBuilder.c itemcget $objid -font] -anchor nw + } +} + +# Parsing detail group +set shownrecs 1 +set py $PgAcVar(report,y_pghdr) +# keep the records on the page +# and do not repeat the last record on the last page +while {($py < [expr ($PgAcVar(report,rh)-($PgAcVar(report,y_detail)-$PgAcVar(report,y_pghdr)))]) && ([expr $shownrecs*$PgAcVar(report,last_page)]<=$PgAcVar(report,prev_num_recs))} { + # now lets get some data for a record + wpg_select $CurrentDB "select * from \"$PgAcVar(report,tablename)\" limit $PgAcVar(report,prev_recs_page) offset [expr {(($PgAcVar(report,curr_page)-1)*$PgAcVar(report,prev_recs_page))}]" rec { + foreach {field x y objid objtype} $PgAcVar(report,prev_fields) { + if {$y > $PgAcVar(report,y_pghdr) && $y < $PgAcVar(report,y_detail)} { + set y [expr $y-$PgAcVar(report,y_pghdr)] + if {$objtype=="t_f"} { + set recfield $rec($field) + } else { + set recfield "" + } + design:previewSection $x $y $objid $objtype $py $recfield + } } + incr py [expr $PgAcVar(report,y_detail)-$PgAcVar(report,y_pghdr)] + incr shownrecs + } +} + +# parse the page footer +# put it in the same place on each page +set py [expr {(($PgAcVar(report,y_detail)-$PgAcVar(report,y_pghdr))*$PgAcVar(report,prev_recs_page))+$PgAcVar(report,y_pghdr)}] +# get the data for the section, which is the last record on the page +# pay attention to the case when we are looking at the last page +if {$PgAcVar(report,curr_page)==$PgAcVar(report,last_page)} { + set sql "select * from \"$PgAcVar(report,tablename)\" limit 1 offset [expr {$PgAcVar(report,prev_num_recs)-1}]" +} else { + set sql "select * from \"$PgAcVar(report,tablename)\" limit 1 offset [expr {(($PgAcVar(report,curr_page)-1)*$PgAcVar(report,prev_recs_page))+($PgAcVar(report,prev_recs_page)-1)}]" +} +wpg_select $CurrentDB $sql rec { + foreach {field x y objid objtype} $PgAcVar(report,prev_fields) { + if {$y > $PgAcVar(report,y_detail) && $y < $PgAcVar(report,y_pgfoo)} { + set y [expr $y-$PgAcVar(report,y_detail)] + if {$objtype=="t_f"} { + set recfield $rec($field) + } else { + set recfield "" + } + design:previewSection $x $y $objid $objtype $py $recfield } } - incr py [expr $PgAcVar(report,y_detail)-$PgAcVar(report,y_pghdr)] } -.pgaw:ReportPreview.fr.c configure -scrollregion [subst {0 0 1000 $py}] + +design:changePreviewCoords $py + +} + +# this postscript stuff needs some work but it sort of works +# since the tk canvas widget produces encapsulated postscript +# we need to wrap it inside of regular postscript +proc {design:printPostscriptStart} {c} { +global PgAcVar + puts $c "%!PS-Adobe-3.0" + puts $c "%%Creator: PgAccess" + puts $c "%%LanguageLevel: 2" + puts $c "%%Title: Report" + puts $c "%%CreationDate: [clock format [clock seconds]]" + puts -nonewline $c "%%Pages: " + puts $c "[expr $PgAcVar(report,last_page)-$PgAcVar(report,curr_page)+1]" + puts $c "%%PageOrder: Ascend" + puts $c "%%BoundingBox: 0 0 $PgAcVar(report,pw) $PgAcVar(report,ph)" + puts $c "%%EndComments" + puts $c "%%BeginProlog" + puts $c "%%EndProlog" + puts $c "%%BeginSetup" + puts $c "%%EndSetup" + puts $c "" +} + +proc {design:printPostscriptStop} {c} { +global PgAcVar + puts $c "%%EOF" +} + +proc {design:printPostscriptStartPage} {c} { +global PgAcVar + puts $c "%%Page: $PgAcVar(report,curr_page) $PgAcVar(report,curr_page)" + puts $c "%%BeginPageSetup" + puts $c "/pagesave save def" + puts $c "%%EndPageSetup" + puts $c "%%BeginDocument" } +proc {design:printPostscriptStopPage} {c} { +global PgAcVar + puts $c "%%EndDocument" + puts $c "pagesave restore" +} -proc {print} {} { - set bb [.pgaw:ReportPreview.fr.c bbox all] - .pgaw:ReportPreview.fr.c postscript -file "pgaccess-report.ps" -width [expr 10+[lindex $bb 2]-[lindex $bb 0]] -height [expr 10+[lindex $bb 3]-[lindex $bb 1]] - tk_messageBox -title Information -parent .pgaw:ReportBuilder -message "The printed image in Postscript is in the file pgaccess-report.ps" +# prints all pages between and including those in the entry boxes +# opens a stream and just starts feeding it postscript from the canvas +# there must be a cleaner way to do this +proc {design:print} {} { +global PgAcVar + set rpt [parameter "Enter file name or pipe for Postscript output:"] + set fid [::open $rpt w] + design:printPostscriptStart $fid + set start_page $PgAcVar(report,curr_page) + for {} {$PgAcVar(report,curr_page)<=$PgAcVar(report,last_page)} {incr PgAcVar(report,curr_page)} { + design:previewPage + design:printPostscriptStartPage $fid + .pgaw:ReportPreview.fr.c postscript -channel $fid -width $PgAcVar(report,pw) -height $PgAcVar(report,ph) -pagex 0 -pagey 0 -pageanchor sw + design:printPostscriptStopPage $fid + } + design:printPostscriptStop $fid + ::close $fid + # reset current page to the page we started printing on + set PgAcVar(report,curr_page) $start_page + design:previewPage + tk_messageBox -title Information -parent .pgaw:ReportBuilder:draft -message "Done printing $rpt" } -proc {save} {} { +proc {design:save} {} { global PgAcVar set prog "set PgAcVar(report,tablename) \"$PgAcVar(report,tablename)\"" +set prog "$prog ; set PgAcVar(report,rw) $PgAcVar(report,rw)" +set prog "$prog ; set PgAcVar(report,rh) $PgAcVar(report,rh)" +set prog "$prog ; set PgAcVar(report,pw) $PgAcVar(report,pw)" +set prog "$prog ; set PgAcVar(report,ph) $PgAcVar(report,ph)" foreach region $PgAcVar(report,regions) { set prog "$prog ; set PgAcVar(report,y_$region) $PgAcVar(report,y_$region)" } -foreach obj [.pgaw:ReportBuilder.c find all] { - if {[.pgaw:ReportBuilder.c type $obj]=="text"} { - set bb [.pgaw:ReportBuilder.c bbox $obj] - if {[.pgaw:ReportBuilder.c itemcget $obj -anchor]=="nw"} then {set x [expr [lindex $bb 0]+1]} else {set x [expr [lindex $bb 2]-2]} - set prog "$prog ; .pgaw:ReportBuilder.c create text $x [lindex $bb 1] -font [.pgaw:ReportBuilder.c itemcget $obj -font] -anchor [.pgaw:ReportBuilder.c itemcget $obj -anchor] -text {[.pgaw:ReportBuilder.c itemcget $obj -text]} -tags {[.pgaw:ReportBuilder.c itemcget $obj -tags]}" +foreach obj [.pgaw:ReportBuilder:draft.c find all] { + if {[.pgaw:ReportBuilder:draft.c type $obj]=="text"} { + set bb [.pgaw:ReportBuilder:draft.c bbox $obj] + if {[.pgaw:ReportBuilder:draft.c itemcget $obj -anchor]=="nw"} then {set x [expr [lindex $bb 0]+1]} else {set x [expr [lindex $bb 2]-2]} + set prog "$prog ; .pgaw:ReportBuilder:draft.c create text $x [lindex $bb 1] -font [.pgaw:ReportBuilder:draft.c itemcget $obj -font] -anchor [.pgaw:ReportBuilder:draft.c itemcget $obj -anchor] -text {[.pgaw:ReportBuilder:draft.c itemcget $obj -text]} -tags {[.pgaw:ReportBuilder:draft.c itemcget $obj -tags]}" } + if {[.pgaw:ReportBuilder:draft.c type $obj]=="image"} { + set bb [.pgaw:ReportBuilder:draft.c bbox $obj] + if {[.pgaw:ReportBuilder:draft.c itemcget $obj -anchor]=="nw"} then {set x [expr [lindex $bb 0]+1]} else {set x [expr [lindex $bb 2]-2]} + set prog "$prog ; image create photo [.pgaw:ReportBuilder:draft.c itemcget $obj -image] -file [.pgaw:ReportBuilder:draft.c itemcget $obj -image] ; .pgaw:ReportBuilder:draft.c create image $x [lindex $bb 1] -anchor [.pgaw:ReportBuilder:draft.c itemcget $obj -anchor] -image {[.pgaw:ReportBuilder:draft.c itemcget $obj -image]} -tags {[.pgaw:ReportBuilder:draft.c itemcget $obj -tags]}" + } } sql_exec noquiet "delete from pga_reports where reportname='$PgAcVar(report,reportname)'" sql_exec noquiet "insert into pga_reports (reportname,reportsource,reportbody) values ('$PgAcVar(report,reportname)','$PgAcVar(report,tablename)','$prog')" } -proc {addField} {} { +proc {design:addField} {} { global PgAcVar - set fldname [.pgaw:ReportBuilder.lb get [.pgaw:ReportBuilder.lb curselection]] - set newid [.pgaw:ReportBuilder.c create text $PgAcVar(report,xf_auto) [expr $PgAcVar(report,y_rpthdr)+5] -text $fldname -tags [subst {t_l mov ro}] -anchor nw -font $PgAcVar(pref,font_normal)] - .pgaw:ReportBuilder.c create text $PgAcVar(report,xf_auto) [expr $PgAcVar(report,y_pghdr)+5] -text $fldname -tags [subst {f-$fldname t_f rg_detail mov ro}] -anchor nw -font $PgAcVar(pref,font_normal) - set bb [.pgaw:ReportBuilder.c bbox $newid] + set fldname [.pgaw:ReportBuilder:menu.lb get [.pgaw:ReportBuilder:menu.lb curselection]] + set newid [.pgaw:ReportBuilder:draft.c create text $PgAcVar(report,xf_auto) [expr $PgAcVar(report,y_rpthdr)+5] -text $fldname -tags [subst {t_l mov ro}] -anchor nw -font $PgAcVar(pref,font_normal)] + .pgaw:ReportBuilder:draft.c create text $PgAcVar(report,xf_auto) [expr $PgAcVar(report,y_pghdr)+5] -text $fldname -tags [subst {f-$fldname t_f rg_detail mov ro}] -anchor nw -font $PgAcVar(pref,font_normal) + set bb [.pgaw:ReportBuilder:draft.c bbox $newid] incr PgAcVar(report,xf_auto) [expr 5+[lindex $bb 2]-[lindex $bb 0]] } -proc {addLabel} {} { +proc {design:addLabel} {} { global PgAcVar set fldname $PgAcVar(report,labeltext) - set newid [.pgaw:ReportBuilder.c create text $PgAcVar(report,xl_auto) [expr $PgAcVar(report,y_rpthdr)+5] -text $fldname -tags [subst {t_l mov ro}] -anchor nw -font $PgAcVar(pref,font_normal)] - set bb [.pgaw:ReportBuilder.c bbox $newid] + set newid [.pgaw:ReportBuilder:draft.c create text $PgAcVar(report,xl_auto) [expr $PgAcVar(report,y_rpthdr)+5] -text $fldname -tags [subst {t_l mov ro}] -anchor nw -font $PgAcVar(pref,font_normal)] + set bb [.pgaw:ReportBuilder:draft.c bbox $newid] incr PgAcVar(report,xl_auto) [expr 5+[lindex $bb 2]-[lindex $bb 0]] } +# pictures are from files and not the database, maybe this should be different +proc {design:addPicture} {} { +global PgAcVar + set fldname $PgAcVar(report,picture) + set newid [.pgaw:ReportBuilder:draft.c create image $PgAcVar(report,xp_auto) [expr $PgAcVar(report,y_rpthdr)+5] -image [image create photo $fldname -file $fldname] -tags [subst {t_p mov ro}] -anchor nw] + set bb [.pgaw:ReportBuilder:draft.c bbox $newid] + incr PgAcVar(report,xp_auto) [expr 5+[lindex $bb 2]-[lindex $bb 0]] +} + +# formulas are tcl snippets right now, but should allow scripts in the future +proc {design:addFormula} {} { +global PgAcVar + set fldname $PgAcVar(report,formula) + set newid [.pgaw:ReportBuilder:draft.c create text $PgAcVar(report,xo_auto) [expr $PgAcVar(report,y_rpthdr)+5] -text $fldname -tags [subst {t_o mov ro}] -anchor nw -font $PgAcVar(pref,font_normal)] + set bb [.pgaw:ReportBuilder:draft.c bbox $newid] + incr PgAcVar(report,xo_auto) [expr 5+[lindex $bb 2]-[lindex $bb 0]] +} + -proc {setObjectFont} {} { +proc {design:setObjectFont} {} { global PgAcVar - .pgaw:ReportBuilder.c itemconfigure hili -font -Adobe-[.pgaw:ReportBuilder.bfont cget -text]-[getBoldStatus]-[getItalicStatus]-Normal--*-$PgAcVar(report,pointsize)-*-*-*-*-*-* + .pgaw:ReportBuilder:draft.c itemconfigure hili -font -Adobe-[.pgaw:ReportBuilder:menu.bfont cget -text]-[design:getBoldStatus]-[design:getItalicStatus]-Normal--*-$PgAcVar(report,pointsize)-*-*-*-*-*-* } -proc {deleteObject} {} { - if {[tk_messageBox -title [intlmsg Warning] -parent .pgaw:ReportBuilder -message "Delete current report object?" -type yesno -default no]=="no"} return; - .pgaw:ReportBuilder.c delete hili +proc {design:deleteObject} {} { + if {[tk_messageBox -title [intlmsg Warning] -parent .pgaw:ReportBuilder:draft -message "Delete current report object?" -type yesno -default no]=="no"} return; + .pgaw:ReportBuilder:draft.c delete hili } -proc {dragMove} {w x y} { +proc {design:dragMove} {w x y} { global PgAcVar # Showing current region foreach rg $PgAcVar(report,regions) { @@ -268,54 +508,68 @@ global PgAcVar } -proc {dragStart} {w x y} { +proc {design:dragStart} {w x y} { global PgAcVar -focus .pgaw:ReportBuilder.c +focus .pgaw:ReportBuilder:draft.c catch {unset draginfo} set obj {} # Only movable objects start dragging foreach id [$w find overlapping $x $y $x $y] { - if {[hasTag $id mov]} { + if {[design:hasTag $id mov]} { set obj $id break } } -if {$obj==""} return; +# mouse resize does update after a click +if {$obj==""} { + .pgaw:ReportBuilder:draft configure -cursor watch + set c [split [winfo geometry .pgaw:ReportBuilder:draft] x+] + set PgAcVar(report,rw) [lindex $c 0] + set PgAcVar(report,rh) [lindex $c 1] + Reports::design:changeDraftCoords + return +} set PgAcVar(draginfo,obj) $obj -set taglist [.pgaw:ReportBuilder.c itemcget $obj -tags] +set taglist [.pgaw:ReportBuilder:draft.c itemcget $obj -tags] set i [lsearch -glob $taglist bg_*] if {$i==-1} { set PgAcVar(draginfo,region) {} } else { set PgAcVar(draginfo,region) [string range [lindex $taglist $i] 3 64] } -.pgaw:ReportBuilder configure -cursor hand1 -.pgaw:ReportBuilder.c itemconfigure [.pgaw:ReportBuilder.c find withtag hili] -fill black -.pgaw:ReportBuilder.c dtag [.pgaw:ReportBuilder.c find withtag hili] hili -.pgaw:ReportBuilder.c addtag hili withtag $PgAcVar(draginfo,obj) -.pgaw:ReportBuilder.c itemconfigure hili -fill blue +.pgaw:ReportBuilder:draft configure -cursor hand1 +# dont highlight pictures when moving them, it just wont work +if {![design:hasTag [.pgaw:ReportBuilder:draft.c find withtag hili] t_p]} { + .pgaw:ReportBuilder:draft.c itemconfigure [.pgaw:ReportBuilder:draft.c find withtag hili] -fill black +} + .pgaw:ReportBuilder:draft.c dtag [.pgaw:ReportBuilder:draft.c find withtag hili] hili + .pgaw:ReportBuilder:draft.c addtag hili withtag $PgAcVar(draginfo,obj) +if {![design:hasTag $obj t_p]} { + .pgaw:ReportBuilder:draft.c itemconfigure hili -fill blue +} set PgAcVar(draginfo,x) $x set PgAcVar(draginfo,y) $y set PgAcVar(draginfo,sx) $x set PgAcVar(draginfo,sy) $y # Setting font information -if {[.pgaw:ReportBuilder.c type hili]=="text"} { - set fnta [split [.pgaw:ReportBuilder.c itemcget hili -font] -] - .pgaw:ReportBuilder.bfont configure -text [lindex $fnta 2] - if {[lindex $fnta 3]=="Medium"} then {.pgaw:ReportBuilder.lbold configure -relief raised} else {.pgaw:ReportBuilder.lbold configure -relief sunken} - if {[lindex $fnta 4]=="R"} then {.pgaw:ReportBuilder.lita configure -relief raised} else {.pgaw:ReportBuilder.lita configure -relief sunken} +if {[.pgaw:ReportBuilder:draft.c type hili]=="text"} { + set fnta [split [.pgaw:ReportBuilder:draft.c itemcget hili -font] -] + .pgaw:ReportBuilder:menu.bfont configure -text [lindex $fnta 2] + if {[lindex $fnta 3]=="Medium"} then {.pgaw:ReportBuilder:menu.lbold configure -relief raised} else {.pgaw:ReportBuilder:menu.lbold configure -relief sunken} + if {[lindex $fnta 4]=="R"} then {.pgaw:ReportBuilder:menu.lita configure -relief raised} else {.pgaw:ReportBuilder:menu.lita configure -relief sunken} set PgAcVar(report,pointsize) [lindex $fnta 8] - if {[hasTag $obj t_f]} {set PgAcVar(report,info) "Database field"} - if {[hasTag $obj t_l]} {set PgAcVar(report,info) "Label"} - if {[.pgaw:ReportBuilder.c itemcget $obj -anchor]=="nw"} then {.pgaw:ReportBuilder.balign configure -text left} else {.pgaw:ReportBuilder.balign configure -text right} + if {[design:hasTag $obj t_f]} {set PgAcVar(report,info) "Database field"} + if {[design:hasTag $obj t_l]} {set PgAcVar(report,info) "Label"} + if {[design:hasTag $obj t_o]} {set PgAcVar(report,info) "Formula"} + if {[.pgaw:ReportBuilder:draft.c itemcget $obj -anchor]=="nw"} then {.pgaw:ReportBuilder:menu.balign configure -text left} else {.pgaw:ReportBuilder:menu.balign configure -text right} } } -proc {dragStop} {x y} { +proc {design:dragStop} {x y} { global PgAcVar # when click Close, ql window is destroyed but event ButtonRelease-1 is fired -if {![winfo exists .pgaw:ReportBuilder]} return; -.pgaw:ReportBuilder configure -cursor left_ptr +if {![winfo exists .pgaw:ReportBuilder:draft]} return; +.pgaw:ReportBuilder:draft configure -cursor left_ptr set este {} catch {set este $PgAcVar(draginfo,obj)} if {$este==""} return @@ -323,20 +577,20 @@ if {$este==""} return if {$PgAcVar(draginfo,region)!=""} { set dy 0 foreach rg $PgAcVar(report,regions) { - .pgaw:ReportBuilder.c move rg_$rg 0 $dy + .pgaw:ReportBuilder:draft.c move rg_$rg 0 $dy if {$rg==$PgAcVar(draginfo,region)} { set dy [expr $y-$PgAcVar(report,y_$PgAcVar(draginfo,region))] } incr PgAcVar(report,y_$rg) $dy } -# .pgaw:ReportBuilder.c move det 0 [expr $y-$PgAcVar(report,y_$PgAcVar(draginfo,region))] +# .pgaw:ReportBuilder:menu.c move det 0 [expr $y-$PgAcVar(report,y_$PgAcVar(draginfo,region))] set PgAcVar(report,y_$PgAcVar(draginfo,region)) $y - drawReportAreas + design:drawReportAreas } else { # Check if object beeing dragged is inside the canvas - set bb [.pgaw:ReportBuilder.c bbox $PgAcVar(draginfo,obj)] + set bb [.pgaw:ReportBuilder:draft.c bbox $PgAcVar(draginfo,obj)] if {[lindex $bb 0] < 5} { - .pgaw:ReportBuilder.c move $PgAcVar(draginfo,obj) [expr 5-[lindex $bb 0]] 0 + .pgaw:ReportBuilder:draft.c move $PgAcVar(draginfo,obj) [expr 5-[lindex $bb 0]] 0 } } set PgAcVar(draginfo,obj) {} @@ -344,73 +598,143 @@ PgAcVar:clean draginfo,* } -proc {deleteAllObjects} {} { - if {[tk_messageBox -title [intlmsg Warning] -parent .pgaw:ReportBuilder -message [intlmsg "All report information will be deleted.\n\nProceed ?"] -type yesno -default no]=="yes"} then { - .pgaw:ReportBuilder.c delete all - init - drawReportAreas +proc {design:deleteAllObjects} {} { + if {[tk_messageBox -title [intlmsg Warning] -parent .pgaw:ReportBuilder:draft -message [intlmsg "All report information will be deleted.\n\nProceed ?"] -type yesno -default no]=="yes"} then { + .pgaw:ReportBuilder:draft.c delete all + design:init + design:drawReportAreas } } +proc {design:changeDraftCoords} {} { +global PgAcVar + wm geometry .pgaw:ReportBuilder:draft $PgAcVar(report,rw)x$PgAcVar(report,rh) + place .pgaw:ReportBuilder:draft.c -x 0 -y 0 -width $PgAcVar(report,rw) -height $PgAcVar(report,rh) -anchor nw -bordermode ignore +} + +proc {design:changePreviewCoords} {scroller} { +global PgAcVar + wm geometry .pgaw:ReportPreview $PgAcVar(report,rw)x$PgAcVar(report,rh) + place .pgaw:ReportPreview.fr.c -x 0 -y 0 -width $PgAcVar(report,rw) -height $PgAcVar(report,rh) -anchor nw -bordermode ignore } -################################################################ +} +################################################################ -proc vTclWindow.pgaw:ReportBuilder {base} { +# handmade but call it vTcl for continuity, someday use visualtcl again +proc vTclWindow.pgaw:ReportBuilder:draft {base} { global PgAcVar if {$base == ""} { - set base .pgaw:ReportBuilder + set base .pgaw:ReportBuilder:draft } if {[winfo exists $base]} { wm deiconify $base; return } toplevel $base -class Toplevel wm focusmodel $base passive - wm geometry $base 652x426+96+120 + wm geometry $base 508x345+406+120 wm maxsize $base 1280 1024 wm minsize $base 1 1 wm overrideredirect $base 0 - wm resizable $base 0 0 + wm resizable $base 1 1 wm deiconify $base - wm title $base [intlmsg "Report builder"] - label $base.l1 \ - -borderwidth 1 \ - -relief raised -text [intlmsg {Report fields}] - listbox $base.lb \ - -background #fefefe -foreground #000000 -borderwidth 1 \ - -selectbackground #c3c3c3 \ - -highlightthickness 1 -selectborderwidth 0 \ - -yscrollcommand {.pgaw:ReportBuilder.sb set} - bind $base.lb { - Reports::addField - } + wm title $base [intlmsg "Report draft"] canvas $base.c \ -background #fffeff -borderwidth 2 -height 207 -highlightthickness 0 \ -relief ridge -takefocus 1 -width 295 + place $base.c \ + -x 0 -y 0 -width 508 -height 345 -anchor nw -bordermode ignore bind $base.c { - Reports::dragStart %W %x %y + Reports::design:dragStart %W %x %y } bind $base.c { - Reports::dragStop %x %y + Reports::design:dragStop %x %y } bind $base.c { - Reports::deleteObject + Reports::design:deleteObject } bind $base.c { - Reports::dragMove %W %x %y + Reports::design:dragMove %W %x %y + } +} + + +proc vTclWindow.pgaw:ReportBuilder:menu {base} { +global PgAcVar + if {$base == ""} { + set base .pgaw:ReportBuilder:menu + } + if {[winfo exists $base]} { + wm deiconify $base; return + } + toplevel $base -class Toplevel + wm focusmodel $base passive + wm geometry $base 307x426+96+120 + wm maxsize $base 1280 1024 + wm minsize $base 1 1 + wm overrideredirect $base 0 + wm resizable $base 0 0 + wm deiconify $base + wm title $base [intlmsg "Report menu"] + + # report size + label $base.lrsize \ + -borderwidth 0 \ + -text [intlmsg {Report size}] + entry $base.erw \ + -background #fefefe -highlightthickness 0 -relief groove \ + -textvariable PgAcVar(report,rw) + label $base.lrwbyh \ + -borderwidth 0 \ + -text x + entry $base.erh \ + -background #fefefe -highlightthickness 0 -relief groove \ + -textvariable PgAcVar(report,rh) + bind $base.erw { + Reports::design:changeDraftCoords + } + bind $base.erh { + Reports::design:changeDraftCoords + } + + # page size + label $base.lpsize \ + -borderwidth 0 \ + -text [intlmsg {Page size}] + entry $base.epw \ + -background #fefefe -highlightthickness 0 -relief groove \ + -textvariable PgAcVar(report,pw) + label $base.lpwbyh \ + -borderwidth 0 \ + -text x + entry $base.eph \ + -background #fefefe -highlightthickness 0 -relief groove \ + -textvariable PgAcVar(report,ph) + + label $base.l1 \ + -borderwidth 1 \ + -relief raised -text [intlmsg {Report fields}] + scrollbar $base.sb \ + -borderwidth 1 -command {.pgaw:ReportBuilder:menu.lb yview} -orient vert + listbox $base.lb \ + -background #fefefe -foreground #000000 -borderwidth 1 \ + -selectbackground #c3c3c3 \ + -highlightthickness 1 -selectborderwidth 0 \ + -yscrollcommand {.pgaw:ReportBuilder:menu.sb set} + bind $base.lb { + Reports::design:addField } button $base.bt2 \ - -command Reports::deleteAllObjects \ + -command Reports::design:deleteAllObjects \ -text [intlmsg {Delete all}] button $base.bt4 \ - -command Reports::preview \ + -command Reports::design:preview \ -text [intlmsg Preview] button $base.bt5 \ - -borderwidth 1 -command {Window destroy .pgaw:ReportBuilder} \ + -borderwidth 1 \ + -command Reports::design:close \ -text [intlmsg Close] - scrollbar $base.sb \ - -borderwidth 1 -command {.pgaw:ReportBuilder.lb yview} -orient vert label $base.lmsg \ -anchor w \ -relief groove -text [intlmsg {Report header}] -textvariable PgAcVar(report,msg) @@ -418,31 +742,31 @@ global PgAcVar -background #fefefe -borderwidth 1 -highlightthickness 0 \ -textvariable PgAcVar(report,tablename) bind $base.e2 { - Reports::getSourceFields + Reports::design:getSourceFields } entry $base.elab \ -background #fefefe -borderwidth 1 -highlightthickness 0 \ -textvariable PgAcVar(report,labeltext) button $base.badl \ - -borderwidth 1 -command Reports::addLabel \ + -borderwidth 1 -command Reports::design:addLabel \ -text [intlmsg {Add label}] label $base.lbold \ -borderwidth 1 -relief raised -text B bind $base.lbold { - Reports::toggleBold + Reports::design:toggleBold } label $base.lita \ -borderwidth 1 \ -font $PgAcVar(pref,font_italic) \ -relief raised -text i bind $base.lita { - Reports::toggleItalic + Reports::design:toggleItalic } entry $base.eps \ -background #fefefe -highlightthickness 0 -relief groove \ -textvariable PgAcVar(report,pointsize) bind $base.eps { - Reports::setObjectFont + Reports::design:setObjectFont } label $base.linfo \ -anchor w \ @@ -450,30 +774,30 @@ global PgAcVar label $base.llal \ -borderwidth 0 -text Align button $base.balign \ - -borderwidth 0 -command Reports::toggleAlignMode \ + -borderwidth 0 -command Reports::design:toggleAlignMode \ -relief groove -text right button $base.savebtn \ - -borderwidth 1 -command Reports::save \ + -borderwidth 1 -command Reports::design:save \ -text [intlmsg Save] label $base.lfn \ -borderwidth 0 -text Font button $base.bfont \ -borderwidth 0 \ - -command Reports::setFont \ + -command Reports::design:setFont \ -relief groove -text Courier button $base.bdd \ -borderwidth 1 \ - -command {if {[winfo exists .pgaw:ReportBuilder.ddf]} { - destroy .pgaw:ReportBuilder.ddf + -command {if {[winfo exists .pgaw:ReportBuilder:menu.ddf]} { + destroy .pgaw:ReportBuilder:menu.ddf } else { - create_drop_down .pgaw:ReportBuilder 405 22 200 - focus .pgaw:ReportBuilder.ddf.sb - foreach tbl [Database::getTablesList] {.pgaw:ReportBuilder.ddf.lb insert end $tbl} - bind .pgaw:ReportBuilder.ddf.lb { - set i [.pgaw:ReportBuilder.ddf.lb curselection] - if {$i!=""} {set PgAcVar(report,tablename) [.pgaw:ReportBuilder.ddf.lb get $i]} - destroy .pgaw:ReportBuilder.ddf - Reports::getSourceFields + create_drop_down .pgaw:ReportBuilder:menu 100 45 200 + focus .pgaw:ReportBuilder:menu.ddf.sb + foreach tbl [Database::getTablesList] {.pgaw:ReportBuilder:menu.ddf.lb insert end $tbl} + bind .pgaw:ReportBuilder:menu.ddf.lb { + set i [.pgaw:ReportBuilder:menu.ddf.lb curselection] + if {$i!=""} {set PgAcVar(report,tablename) [.pgaw:ReportBuilder:menu.ddf.lb get $i]} + destroy .pgaw:ReportBuilder:menu.ddf + Reports::design:getSourceFields break } }} \ @@ -494,14 +818,37 @@ global PgAcVar -background #fefefe -borderwidth 1 -highlightthickness 0 \ -textvariable PgAcVar(report,formula) button $base.baf \ - -borderwidth 1 \ + -borderwidth 1 -command Reports::design:addFormula \ -text [intlmsg {Add formula}] + entry $base.ep \ + -background #fefefe -borderwidth 1 -highlightthickness 0 \ + -textvariable PgAcVar(report,picture) + button $base.bap \ + -borderwidth 1 -command Reports::design:addPicture \ + -text [intlmsg {Add picture}] + + place $base.lrsize \ + -x 142 -y 58 -anchor nw -bordermode ignore + place $base.erw \ + -x 142 -y 75 -width 35 -height 18 -anchor nw -bordermode ignore + place $base.lrwbyh \ + -x 177 -y 75 -anchor nw -bordermode ignore + place $base.erh \ + -x 186 -y 75 -width 35 -height 18 -anchor nw -bordermode ignore + + place $base.lpsize \ + -x 225 -y 58 -anchor nw -bordermode ignore + place $base.epw \ + -x 225 -y 75 -width 35 -height 18 -anchor nw -bordermode ignore + place $base.lpwbyh \ + -x 260 -y 75 -anchor nw -bordermode ignore + place $base.eph \ + -x 269 -y 75 -width 35 -height 18 -anchor nw -bordermode ignore + place $base.l1 \ -x 5 -y 55 -width 131 -height 18 -anchor nw -bordermode ignore place $base.lb \ -x 5 -y 70 -width 118 -height 121 -anchor nw -bordermode ignore - place $base.c \ - -x 140 -y 75 -width 508 -height 345 -anchor nw -bordermode ignore place $base.bt2 \ -x 5 -y 365 -width 64 -height 26 -anchor nw -bordermode ignore place $base.bt4 \ @@ -511,48 +858,51 @@ global PgAcVar place $base.sb \ -x 120 -y 70 -width 18 -height 122 -anchor nw -bordermode ignore place $base.lmsg \ - -x 142 -y 55 -width 151 -height 18 -anchor nw -bordermode ignore + -x 142 -y 95 -width 151 -height 18 -anchor nw -bordermode ignore place $base.e2 \ - -x 405 -y 4 -width 129 -height 18 -anchor nw -bordermode ignore - place $base.elab \ - -x 5 -y 225 -width 130 -height 18 -anchor nw -bordermode ignore - place $base.badl \ - -x 5 -y 243 -width 132 -height 26 -anchor nw -bordermode ignore + -x 120 -y 25 -width 159 -height 18 -anchor nw -bordermode ignore place $base.lbold \ - -x 535 -y 55 -width 18 -height 18 -anchor nw -bordermode ignore + -x 252 -y 165 -width 18 -height 18 -anchor nw -bordermode ignore place $base.lita \ - -x 555 -y 55 -width 18 -height 18 -anchor nw -bordermode ignore + -x 272 -y 165 -width 18 -height 18 -anchor nw -bordermode ignore place $base.eps \ - -x 500 -y 55 -width 30 -height 18 -anchor nw -bordermode ignore + -x 252 -y 140 -width 40 -height 18 -anchor nw -bordermode ignore place $base.linfo \ - -x 295 -y 55 -width 91 -height 18 -anchor nw -bordermode ignore + -x 142 -y 115 -width 151 -height 18 -anchor nw -bordermode ignore place $base.llal \ - -x 575 -y 56 -anchor nw -bordermode ignore + -x 142 -y 165 -anchor nw -bordermode ignore place $base.balign \ - -x 610 -y 54 -width 35 -height 21 -anchor nw -bordermode ignore + -x 182 -y 165 -width 35 -height 21 -anchor nw -bordermode ignore place $base.savebtn \ -x 5 -y 395 -width 64 -height 26 -anchor nw -bordermode ignore place $base.lfn \ - -x 405 -y 56 -anchor nw -bordermode ignore + -x 142 -y 140 -anchor nw -bordermode ignore place $base.bfont \ - -x 435 -y 54 -width 65 -height 21 -anchor nw -bordermode ignore + -x 182 -y 140 -width 65 -height 21 -anchor nw -bordermode ignore place $base.bdd \ - -x 535 -y 4 -width 15 -height 20 -anchor nw -bordermode ignore + -x 280 -y 25 -width 15 -height 20 -anchor nw -bordermode ignore place $base.lrn \ -x 5 -y 5 -anchor nw -bordermode ignore place $base.ern \ -x 80 -y 4 -width 219 -height 18 -anchor nw -bordermode ignore place $base.lrs \ - -x 320 -y 5 -anchor nw -bordermode ignore - place $base.ls \ - -x 5 -y 30 -width 641 -height 2 -anchor nw -bordermode ignore + -x 5 -y 25 -anchor nw -bordermode ignore + place $base.elab \ + -x 5 -y 200 -width 297 -height 18 -anchor nw -bordermode ignore + place $base.badl \ + -x 5 -y 218 -width 132 -height 26 -anchor nw -bordermode ignore place $base.ef \ - -x 5 -y 280 -width 130 -height 18 -anchor nw -bordermode ignore + -x 5 -y 255 -width 297 -height 18 -anchor nw -bordermode ignore place $base.baf \ - -x 5 -y 298 -width 132 -height 26 -anchor nw -bordermode ignore + -x 5 -y 273 -width 132 -height 26 -anchor nw -bordermode ignore + place $base.ep \ + -x 5 -y 310 -width 297 -height 18 -anchor nw -bordermode ignore + place $base.bap \ + -x 5 -y 328 -width 132 -height 26 -anchor nw -bordermode ignore } proc vTclWindow.pgaw:ReportPreview {base} { +global PgAcVar if {$base == ""} { set base .pgaw:ReportPreview } @@ -576,24 +926,66 @@ proc vTclWindow.pgaw:ReportPreview {base} { scrollbar $base.fr.sb \ -borderwidth 1 -command {.pgaw:ReportPreview.fr.c yview} -highlightthickness 0 \ -orient vert -width 12 - frame $base.f1 \ + frame $base.fp \ -borderwidth 2 -height 75 -width 125 - button $base.f1.button18 \ - -borderwidth 1 -command {if {$PgAcVar(report,justpreview)} then {Window destroy .pgaw:ReportBuilder} ; Window destroy .pgaw:ReportPreview} \ + button $base.fp.bclose \ + -borderwidth 1 -command {if {$PgAcVar(report,justpreview)} then {Window destroy .pgaw:ReportBuilder:draft} ; Window destroy .pgaw:ReportPreview} \ -text [intlmsg Close] - button $base.f1.button17 \ - -borderwidth 1 -command Reports::print \ + button $base.fp.bprint \ + -borderwidth 1 -command Reports::design:print \ -text Print + + label $base.fp.ltexttotal -text "pages " + label $base.fp.ltotal -textvariable PgAcVar(report,total_page) + button $base.fp.bprev -text < + bind $base.fp.bprev { + if {$PgAcVar(report,curr_page)>1} { + set PgAcVar(report,curr_page) [expr $PgAcVar(report,curr_page)-1] + } + Reports::design:previewPage + } + button $base.fp.bnext -text > + bind $base.fp.bnext { + if {$PgAcVar(report,curr_page)<$PgAcVar(report,last_page)} { + set PgAcVar(report,curr_page) [expr $PgAcVar(report,curr_page)+1] + } + Reports::design:previewPage + } + entry $base.fp.estart -width 5 -textvariable PgAcVar(report,curr_page) + bind $base.fp.estart { + Reports::design:previewPage + } + label $base.fp.lthru -text - + entry $base.fp.estop -width 5 -textvariable PgAcVar(report,last_page) + bind $base.fp.estop { + Reports::design:previewPage + } + pack $base.fr \ -in .pgaw:ReportPreview -anchor center -expand 1 -fill both -side top pack $base.fr.c \ -in .pgaw:ReportPreview.fr -anchor center -expand 1 -fill both -side left pack $base.fr.sb \ -in .pgaw:ReportPreview.fr -anchor center -expand 0 -fill y -side right - pack $base.f1 \ - -in .pgaw:ReportPreview -anchor center -expand 0 -fill none -side top - pack $base.f1.button18 \ - -in .pgaw:ReportPreview.f1 -anchor center -expand 0 -fill none -side right - pack $base.f1.button17 \ - -in .pgaw:ReportPreview.f1 -anchor center -expand 0 -fill none -side left + pack $base.fp \ + -in .pgaw:ReportPreview -anchor center -expand 0 -fill none -side bottom + + pack $base.fp.ltotal \ + -in .pgaw:ReportPreview.fp -expand 0 -fill none -side left + pack $base.fp.ltexttotal \ + -in .pgaw:ReportPreview.fp -expand 0 -fill none -side left + pack $base.fp.bprev \ + -in .pgaw:ReportPreview.fp -expand 0 -fill none -side left + pack $base.fp.bnext \ + -in .pgaw:ReportPreview.fp -expand 0 -fill none -side left + pack $base.fp.estart \ + -in .pgaw:ReportPreview.fp -expand 0 -fill none -side left + pack $base.fp.lthru \ + -in .pgaw:ReportPreview.fp -expand 0 -fill none -side left + pack $base.fp.estop \ + -in .pgaw:ReportPreview.fp -expand 0 -fill none -side left + pack $base.fp.bprint \ + -in .pgaw:ReportPreview.fp -expand 0 -fill none -side left + pack $base.fp.bclose \ + -in .pgaw:ReportPreview.fp -expand 0 -fill none -side left } diff --git a/src/bin/pgaccess/lib/schema.tcl b/src/bin/pgaccess/lib/schema.tcl index 43c908250f..292a29de4f 100644 --- a/src/bin/pgaccess/lib/schema.tcl +++ b/src/bin/pgaccess/lib/schema.tcl @@ -1,5 +1,91 @@ namespace eval Schema { +proc {clm_rename} {{tbl_name} {old_name} {new_name}} { + global PgAcVar CurrentDB + catch { + wpg_select $CurrentDB "select schemaname from pga_schema where (schematables like '%$tbl_name %') order by schemaname" rec { + set Names $rec(schemaname) + do_clm_rename $tbl_name $old_name $new_name $Names + } + } +} + +proc {do_clm_rename} {{tbl_name} {old_name} {new_name} {schema}} { + global PgAcVar CurrentDB + init + set PgAcVar(schema,name) $schema + if {[set pgres [wpg_exec $CurrentDB "select schematables,schemalinks,oid from pga_schema where schemaname='$PgAcVar(schema,name)'"]]==0} then { + showError [intlmsg "Error retrieving schema definition"] + return + } + if {[pg_result $pgres -numTuples]==0} { + showError [format [intlmsg "Schema '%s' was not found!"] $PgAcVar(schema,name)] + pg_result $pgres -clear + return + } + set tuple [pg_result $pgres -getTuple 0] + set links [lindex $tuple 1] + pg_result $pgres -clear + set linkslist {} + set PgAcVar(schema,links) $links + foreach link $PgAcVar(schema,links) { + set linklist { } + foreach {tbl fld} $link { + if {$tbl==$tbl_name} { + if {$fld==$old_name} { set fld $new_name} + } + lappend linklist $tbl $fld + } + lappend linkslist $linklist + } + sql_exec noquiet "update pga_schema set schemalinks='$linkslist' where schemaname='$schema'" +} + +proc {tbl_rename} {{old_name} {new_name}} { + global PgAcVar CurrentDB + catch { + wpg_select $CurrentDB "select schemaname from pga_schema where (schematables like '$old_name %') or (schematables like '% $old_name %') order by schemaname" rec { + set Names $rec(schemaname) + do_tbl_rename $old_name $new_name $Names + } + } +} + +proc {do_tbl_rename} {{old_name} {new_name} {schema}} { + global PgAcVar CurrentDB + init + set PgAcVar(schema,name) $schema + if {[set pgres [wpg_exec $CurrentDB "select schematables,schemalinks,oid from pga_schema where schemaname='$PgAcVar(schema,name)'"]]==0} then { + showError [intlmsg "Error retrieving schema definition"] + return + } + if {[pg_result $pgres -numTuples]==0} { + showError [format [intlmsg "Schema '%s' was not found!"] $PgAcVar(schema,name)] + pg_result $pgres -clear + return + } + set tuple [pg_result $pgres -getTuple 0] + set tables [lindex $tuple 0] + set links [lindex $tuple 1] + pg_result $pgres -clear + set tablelist {} + foreach {t x y} $tables { + if {$t==$old_name} { set t $new_name} + lappend tablelist $t $x $y + } + set linkslist {} + + set PgAcVar(schema,links) $links + foreach link $PgAcVar(schema,links) { + set linklist { } + foreach {tbl fld} $link { + if {$tbl==$old_name} { set tbl $new_name} + lappend linklist $tbl $fld + } + lappend linkslist $linklist + } + sql_exec noquiet "update pga_schema set schematables='$tablelist', schemalinks='$linkslist' where schemaname='$schema'" +} proc {new} {} { global PgAcVar @@ -39,8 +125,10 @@ global PgAcVar CurrentDB } set PgAcVar(schema,links) $links drawLinks + drawCoord +#### This makes new page size foreach {ulx uly lrx lry} [.pgaw:Schema.c bbox all] { - wm geometry .pgaw:Schema [expr $lrx+30]x[expr $lry+30] +# wm geometry .pgaw:Schema [expr $lrx+30]x[expr $lry+30] } } @@ -89,6 +177,7 @@ if {$PgAcVar(schema,ntables)==1} { } else { drawTable [expr $PgAcVar(schema,ntables)-1] } +#lappend PgAcVar(schema,tables) $PgAcVar(schema,newtablename) $PgAcVar(schema,tablex[expr $PgAcVar(schema,ntables)-1]) $PgAcVar(schema,tabley[expr $PgAcVar(schema,ntables)-1]) lappend PgAcVar(schema,tables) $PgAcVar(schema,newtablename) $PgAcVar(schema,tablex[expr $PgAcVar(schema,ntables)-1]) $PgAcVar(schema,tabley[expr $PgAcVar(schema,ntables)-1]) set PgAcVar(schema,newtablename) {} focus .pgaw:Schema.f.e @@ -116,8 +205,11 @@ proc {drawTable} {it} { global PgAcVar if {$PgAcVar(schema,tablex$it)==0} { - set posy $PgAcVar(schema,nexty) - set posx $PgAcVar(schema,nextx) + set posx 380 + set posy 265 + +# set posy $PgAcVar(schema,nexty) +# set posx $PgAcVar(schema,nextx) set PgAcVar(schema,tablex$it) $posx set PgAcVar(schema,tabley$it) $posy } else { @@ -149,7 +241,11 @@ if {$nextx > [winfo width .pgaw:Schema.c] } { } set PgAcVar(schema,nextx) $nextx set PgAcVar(schema,nexty) $nexty - +} +proc {drawCoord} {} { + global PgAcVar + .pgaw:Schema.c create line 365 265 395 265 -fill "#ff0000" -width "1.0" -tags .pgaw:Schema.c + .pgaw:Schema.c create line 380 250 380 280 -fill "#ff0000" -width "1.0" -tags .pgaw:Schema.c } proc {deleteObject} {} { @@ -207,6 +303,7 @@ global PgAcVar } else { $w move $PgAcVar(draginfo,obj) $dx $dy } +# showError [intlmsg "$dx\n$dy"] set PgAcVar(draginfo,x) $x set PgAcVar(draginfo,y) $y } @@ -268,8 +365,11 @@ set PgAcVar(schema,panstarted) 0 if {$PgAcVar(draginfo,is_a_table)} { set tabnum [getTagInfo $PgAcVar(draginfo,obj) tab] foreach w [.pgaw:Schema.c find withtag $PgAcVar(draginfo,tabletag)] { +# $PgAcVar(schema,coordx)\n$PgAcVar(schema,coordy) if {[lsearch [.pgaw:Schema.c gettags $w] outer] != -1} { foreach [list PgAcVar(schema,tablex$tabnum) PgAcVar(schema,tabley$tabnum) x1 y1] [.pgaw:Schema.c coords $w] {} + set PgAcVar(schema,tablex$tabnum) [expr $PgAcVar(schema,tablex$tabnum)+$PgAcVar(schema,coordx)+1] + set PgAcVar(schema,tabley$tabnum) [expr $PgAcVar(schema,tabley$tabnum)+$PgAcVar(schema,coordy)-1] break } } @@ -408,6 +508,8 @@ global PgAcVar set PgAcVar(schema,links) {} set PgAcVar(schema,ntables) 0 set PgAcVar(schema,newtablename) {} + set PgAcVar(schema,coordx) 0 + set PgAcVar(schema,coordy) 0 } @@ -431,6 +533,8 @@ global PgAcVar set dy [expr $y-$PgAcVar(schema,panstarty)] set PgAcVar(schema,panstartx) $x set PgAcVar(schema,panstarty) $y + set PgAcVar(schema,coordx) [expr $PgAcVar(schema,coordx)-$dx] + set PgAcVar(schema,coordy) [expr $PgAcVar(schema,coordy)-$dy] if {$PgAcVar(schema,panobject)=="tables"} { .pgaw:Schema.c move mov $dx $dy .pgaw:Schema.c move links $dx $dy @@ -461,22 +565,24 @@ proc print {c} { proc {canvasClick} {x y w} { global PgAcVar set PgAcVar(schema,panstarted) 0 -if {$w==".pgaw:Schema.c"} { - set canpan 1 - if {[llength [.pgaw:Schema.c find overlapping $x $y $x $y]]!=0} {set canpan 0} - set PgAcVar(schema,panobject) tables - if {$canpan} { - if {[.pgaw:Schema.c find withtag hili]!=""} { - .pgaw:Schema.c itemconfigure hili -fill black - .pgaw:Schema.c dtag hili + if {$w==".pgaw:Schema.c"} { + set canpan 1 + if {[llength [.pgaw:Schema.c find overlapping $x $y $x $y]]!=0} {set canpan 0} + set PgAcVar(schema,panobject) tables + if {$canpan} { + if {[.pgaw:Schema.c find withtag hili]!=""} { + .pgaw:Schema.c itemconfigure hili -fill black + .pgaw:Schema.c dtag hili + .pgaw:Schema.c dtag dragme + + } + + .pgaw:Schema configure -cursor hand1 + set PgAcVar(schema,panstartx) $x + set PgAcVar(schema,panstarty) $y + set PgAcVar(schema,panstarted) 1 } - - .pgaw:Schema configure -cursor hand1 - set PgAcVar(schema,panstartx) $x - set PgAcVar(schema,panstarty) $y - set PgAcVar(schema,panstarted) 1 - } -} + } } } @@ -491,25 +597,27 @@ global PgAcVar } toplevel $base -class Toplevel wm focusmodel $base passive - wm geometry $base 759x530+10+13 + wm geometry $base 760x530+10+13 wm maxsize $base [winfo screenwidth .] [winfo screenheight .] wm minsize $base 1 1 wm overrideredirect $base 0 wm resizable $base 1 1 wm title $base [intlmsg "Visual schema designer"] - bind $base { + + + canvas $base.c -background #fefefe -borderwidth 2 -relief ridge -takefocus 0 -width 295 -height 300 + bind $base.c { Schema::canvasPanning %x %y } - bind $base { + bind $base.c { Schema::canvasClick %x %y %W } - bind $base { + bind $base.c { Schema::dragStop %x %y } - bind $base { + bind $base.c { Schema::deleteObject } - canvas $base.c -background #fefefe -borderwidth 2 -height 207 -relief ridge -takefocus 0 -width 295 frame $base.f \ -height 75 -relief groove -width 125 label $base.f.l -text [intlmsg {Add table}] @@ -523,7 +631,7 @@ global PgAcVar -command {if {[winfo exists .pgaw:Schema.ddf]} { destroy .pgaw:Schema.ddf } else { - create_drop_down .pgaw:Schema 70 27 200 + create_drop_down .pgaw:Schema 50 27 200 focus .pgaw:Schema.ddf.sb foreach tbl [Database::getTablesList] {.pgaw:Schema.ddf.lb insert end $tbl} bind .pgaw:Schema.ddf.lb { @@ -553,6 +661,7 @@ Window destroy .pgaw:Schema} -padx 2 -pady 3 -text [intlmsg Close] set pgres [wpg_exec $CurrentDB "insert into pga_schema values ('$PgAcVar(schema,name)','$tables','$PgAcVar(schema,links)')"] } else { set pgres [wpg_exec $CurrentDB "update pga_schema set schemaname='$PgAcVar(schema,name)',schematables='$tables',schemalinks='$PgAcVar(schema,links)' where oid=$PgAcVar(schema,oid)"] +# showError [intlmsg "$tables"] } setCursor DEFAULT if {$PgAcVar(pgsql,status)!="PGRES_COMMAND_OK"} then { @@ -586,9 +695,6 @@ Window destroy .pgaw:Schema} -padx 2 -pady 3 -text [intlmsg Close] -in .pgaw:Schema.f -anchor center -expand 0 -fill none -side right pack $base.f.lsn \ -in .pgaw:Schema.f -anchor center -expand 0 -fill none -side right - - pack $base.f -side top -anchor ne -expand 0 -fill x + pack $base.f -side top -anchor ne -expand 0 -fill x pack $base.c -side bottom -fill both -expand 1 } - - diff --git a/src/bin/pgaccess/lib/tables.tcl b/src/bin/pgaccess/lib/tables.tcl index 52ee3ab0fa..7e5149f430 100644 --- a/src/bin/pgaccess/lib/tables.tcl +++ b/src/bin/pgaccess/lib/tables.tcl @@ -80,8 +80,8 @@ global PgAcVar CurrentDB } } set PgAcVar(tblinfo,indexlist) {} - wpg_select $CurrentDB "select indexrelid from pg_index, pg_class where (pg_class.relname='$PgAcVar(tblinfo,tablename)') and (pg_class.oid=pg_index.indrelid)" rec { - lappend PgAcVar(tblinfo,indexlist) $rec(indexrelid) + wpg_select $CurrentDB "select oid,indexrelid from pg_index where (pg_class.relname='$PgAcVar(tblinfo,tablename)') and (pg_class.oid=pg_index.indrelid)" rec { + lappend PgAcVar(tblinfo,indexlist) $rec(oid) wpg_select $CurrentDB "select relname from pg_class where oid=$rec(indexrelid)" rec1 { .pgaw:TableInfo.f2.fl.ilb insert end $rec1(relname) } @@ -544,8 +544,7 @@ if {$PgAcVar(mw,$wn,row_edited)==$PgAcVar(mw,$wn,last_rownum)} { set PgAcVar(mw,$wn,newrec_values) [lreplace $PgAcVar(mw,$wn,newrec_values) $sfp $sfp] } lappend PgAcVar(mw,$wn,newrec_fields) "\"$fld\"" - regsub -all {'} $fldval '' fldvalfixed - lappend PgAcVar(mw,$wn,newrec_values) '$fldvalfixed' + lappend PgAcVar(mw,$wn,newrec_values) '$fldval' # Remove the untouched tag from the object $wn.c dtag $PgAcVar(mw,$wn,id_edited) unt $wn.c itemconfigure $PgAcVar(mw,$wn,id_edited) -fill red @@ -814,10 +813,6 @@ set PgAcVar(mw,$wn,toprec) 0 setScrollbar $wn if {$PgAcVar(mw,$wn,updatable)} then { $wn.c bind q "Tables::editText $wn %A %K" - if {[info commands kanjiInput] == "kanjiInput"} then { - $wn.c bind q "pgaccess_kinput_start %W"; - $wn.c bind q "pgaccess_kinput_start %W"; - } } else { $wn.c bind q {} } @@ -1029,6 +1024,7 @@ global PgAcVar CurrentDB } } if {[sql_exec noquiet "alter table \"$PgAcVar(tblinfo,tablename)\" rename column \"$old_name\" to \"$PgAcVar(tblinfo,new_cn)\""]} { + Schema::clm_rename $PgAcVar(tblinfo,tablename) $old_name $PgAcVar(tblinfo,new_cn) refreshTableInformation Window destroy .pgaw:RenameField } @@ -2176,7 +2172,7 @@ proc vTclWindow.pgaw:Permissions {base} { # # This file contains Tcl procedures used to input Japanese text. # -# $Header: /cvsroot/pgsql/src/bin/pgaccess/lib/Attic/tables.tcl,v 1.12 2002/04/04 06:27:45 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/pgaccess/lib/Attic/tables.tcl,v 1.13 2002/07/02 06:11:23 momjian Exp $ # # Copyright (c) 1993 Software Research Associates, Inc. # diff --git a/src/bin/pgaccess/main.tcl b/src/bin/pgaccess/main.tcl index 3a4b60db57..1a3d84e7eb 100644 --- a/src/bin/pgaccess/main.tcl +++ b/src/bin/pgaccess/main.tcl @@ -61,8 +61,8 @@ global PgAcVar CurrentDB foreach module {mainlib database tables queries visualqb forms views functions reports scripts users sequences schema help preferences} { source [file join $PgAcVar(PGACCESS_HOME) lib $module.tcl] } - set PgAcVar(currentdb,host) [default_pg_host] - set PgAcVar(currentdb,pgport) [default_pg_port] + set PgAcVar(currentdb,host) localhost + set PgAcVar(currentdb,pgport) 5432 set CurrentDB {} set PgAcVar(tablist) [list Tables Queries Views Sequences Functions Reports Forms Scripts Users Schema] set PgAcVar(activetab) {} @@ -73,19 +73,6 @@ global PgAcVar CurrentDB Preferences::load } -proc default_pg_host {} { - return localhost -} - -proc default_pg_port {} { -global env - if {[info exists env(PGPORT)]} { - return $env(PGPORT) - } else { - return 5432 - } -} - proc {wpg_exec} {db cmd} { global PgAcVar set PgAcVar(pgsql,cmd) "never executed" @@ -178,20 +165,15 @@ global PgAcVar CurrentDB proc {main} {argc argv} { -global PgAcVar CurrentDB tcl_platform env - if {[info exists env(PGLIB)]} { - set libpgtclpath [file join $env(PGLIB) libpgtcl] - } else { - set libpgtclpath {libpgtcl} - } - load ${libpgtclpath}[info sharedlibextension] +global PgAcVar CurrentDB tcl_platform + load libpgtcl[info sharedlibextension] catch {Mainlib::draw_tabs} set PgAcVar(opendb,username) {} set PgAcVar(opendb,password) {} if {$argc>0} { set PgAcVar(opendb,dbname) [lindex $argv 0] - set PgAcVar(opendb,host) [default_pg_host] - set PgAcVar(opendb,pgport) [default_pg_port] + set PgAcVar(opendb,host) localhost + set PgAcVar(opendb,pgport) 5432 Mainlib::open_database } elseif {$PgAcVar(pref,autoload) && ($PgAcVar(pref,lastdb)!="")} { set PgAcVar(opendb,dbname) $PgAcVar(pref,lastdb) -- 2.40.0